Commit Graph

5757 Commits

Author SHA1 Message Date
35d78b36b9 coverity#1249459 Unchecked dynamic_cast
Change-Id: I5e212976f1be310c3a802679a0d8b93c2866d591
2014-10-25 16:56:13 +01:00
76617eea54 coverity#1249460 Unchecked dynamic_cast
Change-Id: I21f85d0e18ab8a30320f3db294efa9fbdd4dd55d
2014-10-25 16:56:12 +01:00
2deb0a2651 coverity#704564 Unchecked dynamic_cast
Change-Id: I2dfdc5e1e852011b532b484e566896133208ee86
2014-10-24 09:24:53 +01:00
31af61ea09 Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba.

Conflicts:

	cui/source/tabpages/transfrm.cxx
	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx
	tools/source/generic/rational.cxx

Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
2014-10-23 18:34:39 +02:00
858c2a2977 Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e.

Conflicts:

	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx

Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-23 18:34:34 +02:00
cb414252b8 loplugin: cstylecast
Change-Id: I4aafc170895d8bab47206c7b07b4f1f6105d42d3
2014-10-23 12:36:14 +02:00
9ecac3874d Replace DISABLE_SCRIPTING with HAVE_FEATURE_SCRIPTING
Feature test macros that govern conditional compilation should be
defined in config_*.h include files, not on the compilation command
line.

Change-Id: I40575a4762fd2564f10927b6f38a112dd9f9a3d7
2014-10-22 09:30:23 +03:00
908d1b6e63 chart2: fix memory leak due to cyclic reference in VAxisBase
The VAxisBase::m_xNumberFormatsSupplier refers to the ChartModel itself,
and apparently that is a cyclic reference.  Naively using the
ChartModel's m_xNumberFormatsSupplier in
ChartView::impl_createDiagramAndContent() because it will later be passed
to AxisHelper::getExplicitNumberFormatKeyForAxis(), which expects to be
able to convert it to a ChartModel.

Since passing around the ChartModel as an XNumberFormattingSupplier is
sort of un-intuitive anyway, refactor some methods to use XChartDocument
instead, and only create the VPolarAxis / VCartesianAxis with the
ChartModel's m_xNumberFormatsSupplier.

The drawback is that if ChartModel::attachNumberFormatsSupplier()
is called after ChartView::update() has created the axes, it may not
have an effect on them; not sure if that is a real or hypothetical
problem.

Change-Id: Ib5f0d5882b85adaf44f80e086f19178b3e64882f
2014-10-20 17:14:26 +02:00
f9c2426740 Resolves: fdo#84885 chart wizard dialog cut off
Change-Id: Ie24687cd1c54b1fed04745c83f507c17a5574175
2014-10-20 14:28:20 +01:00
f5e135bb25 chart2: fix temp file leaks in Chart2ExportTest
Change-Id: Id128f19dee056189a34a02156fd0bf3ac14c2454
2014-10-20 15:27:04 +02:00
9a1889f0cb chart2: fix temp file leak caused by missing tearDown() between tests
Change-Id: Ia4ee76743c640c0c5b92ec169e619f6c8788480e
2014-10-20 15:27:03 +02:00
6e355d9561 Revert "at least fix the crash when calling SdXImpressDocument::dispose
... for now"

This reverts commit 599473a13e3c5ba669d995c913ad415bd674a16c.

moggi says the unspecified crash happened with the tests following the
comment in chart2import.cxx:75, but the tests run fine in valgrind now.

The commit creates a memory leak in the CppunitTests as
SfxBaseModel::dispose() returns early, because mbDisposed is set.

Change-Id: I987dce6a4090784d166a4a3b2e7f9e2c0cddd289
2014-10-20 15:26:57 +02:00
67c9d05451 fdo#84938: replace TIB_ constants with enum
Change-Id: I435ce2331fb49e7ce9fe97bdfddfaef706759a84
Reviewed-on: https://gerrit.libreoffice.org/12023
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-20 07:16:46 +00:00
b520fca88d coverity#1247647 Uncaught exception
Change-Id: I1e47f3970f944aa3556e4ddb9b7918d9ee23c0eb
2014-10-17 15:19:54 +01:00
03c7c26cbe java: final fields that can be static
Change-Id: I8c06be7bc0b8a38c662209f0de72a00550e25447
2014-10-17 08:26:21 +02:00
582ef22d3e fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing
like that.

Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-16 17:44:44 +02:00
ad9498f8b8 More -Werror,-Wunused-private-field
...detected with a modified trunk Clang with

> Index: lib/Sema/SemaDeclCXX.cpp
> ===================================================================
> --- lib/Sema/SemaDeclCXX.cpp	(revision 219190)
> +++ lib/Sema/SemaDeclCXX.cpp	(working copy)
> @@ -1917,9 +1917,10 @@
>    const Type *T = FD.getType()->getBaseElementTypeUnsafe();
>    // FIXME: Destruction of ObjC lifetime types has side-effects.
>    if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
> -    return !RD->isCompleteDefinition() ||
> -           !RD->hasTrivialDefaultConstructor() ||
> -           !RD->hasTrivialDestructor();
> +    return !RD->hasAttr<WarnUnusedAttr>() &&
> +           (!RD->isCompleteDefinition() ||
> +            !RD->hasTrivialDefaultConstructor() ||
> +            !RD->hasTrivialDestructor());
>    return false;
>  }
>
> @@ -3517,9 +3518,11 @@
>    bool addFieldInitializer(CXXCtorInitializer *Init) {
>      AllToInit.push_back(Init);
>
> +#if 0
>      // Check whether this initializer makes the field "used".
>      if (Init->getInit()->HasSideEffects(S.Context))
>        S.UnusedPrivateFields.remove(Init->getAnyMember());
> +#endif
>
>      return false;
>    }

to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about
initializations with side effects (cf.
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html>
"-Wunused-private-field distracted by side effects").

Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-15 15:58:56 +02:00
83210e28ae Take the current axis alignment state.
Change-Id: I02c28f44af0a1510bdb780d1e6c70561b7ba24e5
2014-10-14 11:38:37 -04:00
658f031bb1 Revert "Revert "Make VCartesianAxis::get2DAxisMainLine() truly const method.""
This reverts commit bf302000ea8849ac7ecd9162f3014bac9da4406e,
as clarified on IRC, --enable-chart-tests is known flaky and not intended to be
used by anybody but moggi.
2014-10-14 15:07:31 +02:00
bf302000ea Revert "Make VCartesianAxis::get2DAxisMainLine() truly const method."
This reverts commit 410c5bd58c36d9064a79520d5bc31cb32ead1326,
it causes CppunitTest_chart2_xshape to fail.
2014-10-14 13:01:43 +02:00
2d6dacc1c9 More on documenting the methods.
Change-Id: Ibdbc1b26521e56de5dcba1b9572bb0221fc0fff5
2014-10-13 19:45:39 -04:00
942731076d Scope level reduction & explain what the max axis index really is.
The concept of axis index and dimension index is quite confusing in the
chart2 code....

Change-Id: I035af0a225396bd5394089d6f584f78dcaf0ad31
2014-10-13 19:45:33 -04:00
139f0f44f5 Explain what doAutoScaling() does.
Change-Id: I15ca9ca0c3a22094f0a969adf2b3f1145d116052
2014-10-13 19:45:28 -04:00
410c5bd58c Make VCartesianAxis::get2DAxisMainLine() truly const method.
No internal state gets modified by this method now.

Change-Id: I10475ad3483cb3a92e41208e1a55a6b925c10223
2014-10-13 19:45:21 -04:00
4027bc476a fdo#84647 : Fixed default value for TickLableSkip value.
1. 'TextCanOverlap' property was stored as false if TickLableSkip
      is not equal to one.
   2. For OOXML charts TickLableSkip can be between 1 to 999999999.
   3. We can not apply zero or less than zero  value to TickLableSkip.
      ( As per specification)
   4. In axis model default value for TickLableSkip was zero which is
      incorrect.
   5. Added unit test to check 'TextCanOverlap' property for chart.

Change-Id: Ib3104b1d932f6e9376c149eabb201c8e9ad23da9
Reviewed-on: https://gerrit.libreoffice.org/11901
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2014-10-11 16:57:32 +00:00
ecf648b3a5 Make the variable name shorter and sweeter...
Change-Id: Ibea26f3c99b50f2011050960794d9736566ee7ce
2014-10-10 15:42:38 -04:00
acfabbf06d prepareScaleAutomatismForDimensionAndIndex -> prepareAutomaticAxisScaling.
Change-Id: Ic66d2fcf78603bdd4fa1e08933900f49c66384b7
2014-10-10 15:42:30 -04:00
2ba6c00d37 Hide the 3rd nested looping for clarity.
Also aScaleAutomatism -> aAutoScaling.  The word 'automatism' is a bit
awkward.

Change-Id: I9856f904d5693e79e19176ba5fff881267d5c7e7
2014-10-10 15:42:23 -04:00
5ce6a22a3b Make this loop a bit easier to follow...
Change-Id: Ib978f47925e1f7d77e02586bff50d24fa5b27f2c
2014-10-10 15:42:16 -04:00
424fb26da3 Make this a hard prerequisite.
Change-Id: Ib1c859b6033b2cf148e1ed74a437dda85872dffe
2014-10-10 15:42:09 -04:00
eb2c2f1a3c Use boost::ptr_vector for this...
which also exposed few cases of mis-used const-ness here and there...

Change-Id: Ie4374459643fc050ded646762d72ad622cf3f843
2014-10-10 15:42:01 -04:00
d1217a95ef coverity#1223085 Unchecked return value
there were three of these, not just one

i.e. see also

commit 276a051ef5dc144a202633779259a4ecd43c81a8
Date:   Sun Oct 5 13:05:04 2014 -0500
    coverity#1223085 Unchecked return value

Change-Id: I07ee033ae31a346a08f68a6edfa480505fe6c11a
2014-10-10 18:14:36 +01:00
890d0254db loplugin:passstuffbyref
Change-Id: If17bfdfdb51d5b9b8db563fccf09bb7608fcd0f8
2014-10-10 16:38:11 +02:00
e60183503e fdo#54361: Add additional unit test case.
Change-Id: Ifa3fd6f074d1957a468a1dad5dc2c223d38d24d4
2014-10-10 19:14:23 +05:30
cbdf857299 coverity#707673 Uninitialized scalar field
Change-Id: Ic631ebc74e94f4ccf7e3915db3952714fd4d28d4
2014-10-10 12:50:20 +01:00
87bf3fb4a5 Fix CppunitTest_chart2_xshape
...regression from d7e477c4518bb3f638af59fa48cae04eba8c76cc "Use boost::optional
for these members."

Change-Id: I8e02033d75fd52489be03b34fbce494ae49ab7e3
2014-10-10 09:41:00 +02:00
0c06f9c5bb Further fallout from git mis-merge?
...in a80f74add22c303327dd3203d9be5eeb901a73a4 "Put SeriesPlotterContainer into
CreateShapeParam2D."

Change-Id: I9e2f700a1999070069ff87fc3030c00a045372c6
2014-10-10 08:35:58 +02:00
9dfc5fe09a Fix git's wrong 3-way merge.
Change-Id: I30520ff78f47bcfa487cea6f40904bf718610967
2014-10-09 23:11:50 -04:00
a80f74add2 Put SeriesPlotterContainer into CreateShapeParam2D.
Change-Id: I537c131c0c927d2cbbd7cd44f07e9e4748b8ed6c
2014-10-09 22:46:39 -04:00
78a33913b1 Explain what updateScreenValues() does.
Change-Id: I323827f259c9f09c5b4bfe882c63096dea640dbf
2014-10-09 22:46:39 -04:00
110d0915c6 Use typedef rather than raw nested std::vector everywhere...
Change-Id: Id4b58d13b229776f2ef1f270e937547ece9e1248
2014-10-09 22:46:39 -04:00
d7dd306302 Make its own header the first header.
Change-Id: I81ff1cb9200bdccd3f50dc08fa68fc69929e7c90
2014-10-09 22:46:38 -04:00
e776418ce4 Clean this up a bit.
Change-Id: Ief207c72a22eee6a745f885912ea929ade717321
2014-10-09 17:48:32 -04:00
5aa51c08cd Description for m_aAllTickInfos.
Especially wrt why it is nested vectors.

Change-Id: I143785778ef62abbdc047a2d18c713f43a6522d9
2014-10-09 17:48:26 -04:00
700ed579f9 Make AxisProperties non-virtual; nobody derives from it.
Change-Id: I1cb5203374b6d13a914c335d73a7db6d8a47c4bb
2014-10-09 17:48:23 -04:00
c5cb66b537 B2DVector supports operator!=. Let's use it.
Change-Id: Iecf58e0f24909ec2fd2780a5f4b219105c7c4b47
2014-10-09 16:34:36 -04:00
bd485290c7 Make it clear which bounding rectangle it returns & const.
Change-Id: I9c8080225cfbe0f38133ce2503bd2d0c1d0f5e13
2014-10-09 16:34:28 -04:00
877b66a00b xInverseScaling is set but not used. Remove it.
Change-Id: I1d185df4b14e152f4da9dfdbc2e71504c2cb1f3b
2014-10-09 16:34:14 -04:00
f602c74fac Re-organize method / class descriptions.
Change-Id: Ib7fe33581c3aec2f58f8a16a07215b69080e0a51
2014-10-09 16:34:09 -04:00
70ac6e7997 Make this data member const, as it never gets modified once constructed.
Change-Id: Ic01fd0591bbb524b4a6a0ec1dfe448e33f4d6b18
2014-10-09 16:34:04 -04:00