Commit Graph

241 Commits

Author SHA1 Message Date
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
226f212668 cppcheck: fix redundant assignments
Change-Id: Ia4c81fefc914aaaead6f8e47ae2818e139357bb4
2013-08-15 00:12:45 +02:00
917444b08d cppcheck: dup break
Change-Id: I96a1ce5d98b4d51f2cacabe7eac95cabcd38ad28
2013-07-29 22:13:56 +02:00
dd9c97d587 fdo#62475 removed pointless comments
Change-Id: I3f5e86dba2df950aeb12c895f52d99274c0959aa
Reviewed-on: https://gerrit.libreoffice.org/5148
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-07-29 11:34:33 +00:00
1c5c226698 Insert new trendline instead of changing the existing one.
Change-Id: Ic7cbfa55c7b2e42eb21400b2fca34724a72de701
2013-07-03 21:46:45 +02:00
1cd3e20380 Multiple trendline removing and changing type support.
Change-Id: I33a298341e228080920977639cb59986d0b4bd82
2013-07-03 21:46:44 +02:00
6085bd1574 Force intercept for polynomial regression & dialog improvements
Change-Id: I2f712d8b95b5fdeb05b93b5247aab9772a00cc70
2013-07-03 21:46:43 +02:00
e6a0cc2d6c fdo#35712 polynomial and moving average regression lines
- added polynomial and moving average to the dialog
- implemented moving average and polynomal RegressionCurveCalculator
- added icon for polynomial regression curve
- prepare icon for moving average regression curve
- degree parameter for polynomial regression curve
- period parameter for moving average regression curve
- limit the curve to max and min x value
- added extrapolation

Change-Id: I4ebb8dc23a3aff285b999e115fdda20ab11910a5
2013-07-03 21:46:39 +02:00