Commit Graph

248 Commits

Author SHA1 Message Date
40c4a08652 loplugin:nullptr (automatic rewrite)
Change-Id: I71de514405bb9bcc746c1ab9633e7fe659888943
2015-11-10 10:31:18 +01:00
a86b41ca81 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I5accc3f27b545c1dca6281201151729e3717fb0f
2015-11-06 09:34:50 +01:00
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
391f181c9f chart2: replace for_each with range-based for
Replace complex uses of ::std::for_each with a range-based for-loop.

Change-Id: I6f3d8488a63a5bed271ab70ad6f024e9869906cc
Reviewed-on: https://gerrit.libreoffice.org/19143
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2015-10-08 09:06:46 +00:00
92c8d74c54 CppCheck : reduce variables scope
Change-Id: Ief402017b693a4337f330fb07bb7a6dc6e749f72
Reviewed-on: https://gerrit.libreoffice.org/18753
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-23 07:29:33 +00:00
33cddeea13 boost->std
Change-Id: Iff14f69c200217c5d868978e8ffc06962b99ac09
Reviewed-on: https://gerrit.libreoffice.org/18568
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-14 19:32:42 +00:00
9ed1dd01be tdf#90839: support for wrapped text in data labels and for centered data value
Now in a pie chart the text of a label can be wrapped, the wrapping is
automatic and the maximum text width is fixed to almost half the pie
radius. This feature is used to import correctly the relative text
wrapping property provided by MSO.

Moreover the data value and percent value of a label are now centered
horizontally, respect with the label text.

Conflicts:
	chart2/qa/extras/xshape/chart2xshape.cxx

Change-Id: Ie10d6184365436f763cd9693a5bbefcfa9b3862b
Reviewed-on: https://gerrit.libreoffice.org/17193
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-09-09 07:41:51 +00:00
6900bf41e2 o3tl/cow_wrapper: remove boost dependency
Remove boost dependencies from ::o3tl::cow_wrapper, and add
the necessary includes to files including checked_delete and
noncopyable that do not already include the necessary files.

Change-Id: Iedae4232002792724226829a5d5cf9d16ffd0686
Reviewed-on: https://gerrit.libreoffice.org/18125
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-29 22:51:36 +00:00
0db25f68ab remove default value from SfxPoolItem::PutValue
more useful to make it explicit.

Specifically, otherwise my defaultvalue clang plugin would want to
remove lots of places that contains #define constants which, while
technically the same as the default value, convey semantic
information which is quite useful.

Change-Id: I918ad5b0e73ba279fa1b1489b62d900339ff71eb
2015-08-14 09:16:06 +02:00
b226928c6d cppcheck: redundantCondition [part1]
Change-Id: I21c5340e7b5ec09248b08aa76f43acf883c56cd8
2015-06-14 12:17:55 +02:00
e19cd844be Rephrase comparisons between bool and sal_Bool
...to cater for forthcoming loplugin:implicitboolconversion improvements

Change-Id: I801b6b73648715448198d582a087cc834f6e20c8
2015-04-28 10:21:01 +02:00
b57f8a9451 Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I97e238df6fc71367b4a17a5da48ed527c5b57666
2015-03-31 13:12:20 +02:00
e7f65a0a98 fix y-axis position on x-axis handling
Change-Id: I870541c44babdcdbf3c4ca3da6da624d7850b0e2
2015-03-20 18:24:54 +01:00
3948dee435 reduce scope of local variables
This addresses some cppcheck warnings.

Change-Id: I864a4e84326633d33f09324247cbe439fba801c8
Reviewed-on: https://gerrit.libreoffice.org/13336
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-12-06 22:29:49 +00:00
6a0fe37dec sal: clean up public headers with include-what-you-use
Sadly cannot forward declare "struct {...} TimeValue;".

rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h
was painful enough for now...

Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-17 11:06:53 +01:00
cb414252b8 loplugin: cstylecast
Change-Id: I4aafc170895d8bab47206c7b07b4f1f6105d42d3
2014-10-23 12:36:14 +02: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
b520fca88d coverity#1247647 Uncaught exception
Change-Id: I1e47f3970f944aa3556e4ddb9b7918d9ee23c0eb
2014-10-17 15:19:54 +01:00
ea733ab5b6 Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState")

Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-12 06:08:32 +00:00
02f0102b8b prevent memory leak
Found by Lsan.

Returning this or a heap allocated object asks for trouble. Let the
caller handle it and return null instead of this.

Change-Id: I7586e103bef5a8c2727adfe214b052d6962d4467
Reviewed-on: https://gerrit.libreoffice.org/10716
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-08-04 12:49:59 +00:00
88ba62b0e0 cosmetic clean-up
Change-Id: I7b34e021c9f193643c89f20dc1ba42aad8e065d6
Reviewed-on: https://gerrit.libreoffice.org/10715
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-08-03 20:58:46 +00:00
f1531cdaae bnc#885825: Support borders around data labels.
Change-Id: Ib141413e523cbf73746876f727e9f80dda9f5f7c
2014-07-26 16:26:08 -04:00
7df0cb37a4 boost::checked_deleter will do.
Change-Id: I952d9dfcffd85aaae49fc1f1eba9ba070900f672
2014-07-22 00:03:43 -04:00
a630bfb5a0 Perhaps it's time we put ItemConverter etc into the right namespace.
Change-Id: I8082c51ff82568b8a00f92e5ab20263c017f1265
2014-07-21 23:54:44 -04:00
998ab5c405 More on removing (unreasonable) use of std::auto_ptr.
Change-Id: I98f5fb22eecb7749e4c86e1ce52965b0c73641ca
2014-07-21 23:12:34 -04:00
9e970303dd Remove auto_ptr from CharacterPropertyItemConverter.
And adjust all that's necessary.

Change-Id: I121e5aa4d117da2e5e6b11e4fd85960a8b3aa727
2014-07-21 20:31:24 -04:00
b2ffa40c12 Compiler macro in lieu of literal "Label" to make it easier to track it.
Change-Id: I6bc694fcc8f97b308747c097c4fa977d20524377
2014-07-21 20:31:24 -04:00
3575dba98d remove whitespaces
Change-Id: I05ef3c1ffd4e2179e0142a21abf8a4578718102e
2014-07-02 23:03:07 +02:00
8918dabbee coverity#705359 Mixing enum types
and

coverity#705361 Mixing enum types
coverity#705362 Mixing enum types

Change-Id: I557d7178277e5d497e3bbab12b75724c05653f57
2014-07-02 14:00:41 +01:00
5ace3f3b4f clang scan-build: various warnings
Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713
2014-07-01 10:56:14 +01:00
c6da184295 Track all uses of ErrorBarX and ErrorBarY UNO property names.
Change-Id: I994424c98d977c3a8f9138cccc17348de813a9d7
2014-06-26 19:36:46 -04:00
2daceb87b9 clang: Uninitialized argument value
Change-Id: Id65c5815185cf022171e3523c6ad92545830104c
2014-06-26 16:29:13 +01:00
1d38cb3655 fdo#71076, fdo#71767: Preserve number formats when charts are copied.
Change-Id: If5ae8852152012483237e7602e56a0c46ea8748a
2014-06-19 14:46:56 -04:00
2538e30ccc Use define constant to keep track of all NumberFormat property usage.
Change-Id: I2a544922e03ec8253290ac8bf5a89c9cdd72d8dd
2014-06-19 14:46:56 -04:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
0d8908b359 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part16
Change-Id: I78b3a0151397d4e69521e6b2451e93ea6e463376
2014-05-18 00:36:10 +02:00
97a5ba4a71 remove comments why a file gets included
also remove some commented out code

Change-Id: Ia80c5c57d8d2a74418032de50eee95642cc0969d
2014-04-21 18:08:28 +02:00
329332ba52 chart2: sal_Bool->bool
Change-Id: I85751b4e636596ef88ef02bc958abdc6abf98427
2014-04-15 15:23:29 +02:00
567ef6d578 Second batch of adding SAL_OVERRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27 18:12:18 +01:00
236d6cd67e chart2: prefer passing OUString by reference
Change-Id: I685b1dc3d7c735bc70be29252f55c082546f3cb1
2014-03-17 13:30:50 +02:00
13bc4094da svx: sal_Bool->bool
Change-Id: I673d022c01b7d076120c026b236a37735b5043b0
2014-03-14 07:50:32 +02:00
12f1faf7bf svl: sal_Bool -> bool
Change-Id: Ic31455a1f5ffffa35d4fdde901dd70734207b6f4
2014-02-20 08:17:00 +01:00
33dc343268 coverity#1158125 Unchecked dynamic_cast
Change-Id: Id560c9d5941ba679b92aaa2b2db0fb34a23d7a5f
2014-02-07 12:24:43 +00:00
6f62f3f0af Custom name for a trend line (shown in legend).
Previously, a trendline name was fixed to a combination of the
trendline type and the name of the series. With this it is possible
to add a custom name for the trendline, which is shown in the
legend.

Change-Id: I61eaaf14e6df45088abdf1f3e9c24877d26ae8a7
2013-11-24 19:43:16 +01:00
f58e03e7bb Simplify conversion from/to ItemSet/PropertySet for RegressionCurves
Change-Id: I5ddf53f984508a88fd02063eb9f81cd05cf627c9
2013-11-24 19:43:16 +01:00
3af08dd27d DRY-cleanup RegressionCurveItemConverter
Change-Id: I8fb799b2efc81587252161ccadfa1dbd6b096bda
2013-11-24 19:43:16 +01:00
401f01caf5 use ChartModel instead of XModel in a few places
This allows us easier implementation of some advanced features. Mainly
the 4D chartting will now be able to work without several ugly layers of
UNO.

Change-Id: I74d07229eaef921c508f3bab8fae6d6075ad737a
2013-11-19 13:47:36 +01:00
ab5d1fbfb4 SAL_WARN_UNUSED com::sun::uno::Any
Change-Id: I9058044d13f696e07667dce706f6c311af6dbea0
2013-11-14 21:02:40 +01:00
75b7ce9c66 fixincludeguards.sh: chart2
Change-Id: I166e054926fb975949b3021cbc43b25a222f6198
2013-10-23 23:22:34 +02:00
7be7824bbb chart2: String to OUString
Change-Id: I8abc6a31a46bea404e9d8b0c8777e3400dbf928c
Reviewed-on: https://gerrit.libreoffice.org/5865
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-09-08 02:23:15 +00:00