summaryrefslogtreecommitdiff
path: root/chart2/source/view/axes/VCartesianAxis.cxx
AgeCommit message (Collapse)Author
2018-03-19tdf#116163: Limit label height in chart if neededSzymon Kłos
Change-Id: Ia84fd0c3b76886bc6124dc3b59035465aa31b020 Reviewed-on: https://gerrit.libreoffice.org/50700 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/50830 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 87d8df83efd210a322b42f590aaff3d2e8efe2bc)
2018-01-07tdf#108031 Area chart labels not rotatedJochen Nitschke
This fixes recognition of x-axis or y-axis when the coordinate system is rotated (3D-view). So the labels are rotated correctly. Change-Id: Iaacfec943f3885c58e99a55585714a79f1d0d9d5 Reviewed-on: https://gerrit.libreoffice.org/38355 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> (cherry picked from commit 38bf5f69663f64434a3a0a74e02c1a23f876b677) Reviewed-on: https://gerrit.libreoffice.org/47015 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-11-03inline ASSERT_EXCEPTION macro in chart2Noel Grandin
Change-Id: I6bdcde5fd416531e2cdd3c9ec160833f1022247c Reviewed-on: https://gerrit.libreoffice.org/44246 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: chart2Stephan Bergmann
Change-Id: I5b455c684e7cd689d5160135246f3400363c7d40
2017-09-26Rename the basegfx::tools namespace to basegfx::utilsTor Lillqvist
Reduce potential confusion with the global tools namespace. Will hopefully make it possible to remove the annoying initial :: when referring to the global tools namespace. Unless we have even more tools subnamespaces somewhere. Thorsten said it was OK. Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996 Reviewed-on: https://gerrit.libreoffice.org/42644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-08-02remove unnecessary use of 'this->'Noel Grandin
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4 Reviewed-on: https://gerrit.libreoffice.org/40671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-27loplugin:constparams in chart2Noel Grandin
Change-Id: Ic325b79f04e04aa19e08a60db30b982d90f04c80 Reviewed-on: https://gerrit.libreoffice.org/40480 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07C++11 remove std::binary_function bases from functorsJochen Nitschke
std::binary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::binary_function base class was used by deprecated std::bind2nd, this was solved in individual commits. The members first_argument_type and second_argument_type were used in chart2/source/controller/dialogs/DataBrowserModel.cxx: DataBrowserModel::implColumnLess and are inlined in this commit. Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a Reviewed-on: https://gerrit.libreoffice.org/39659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30teach redundantcast plugin about functional castsNoel Grandin
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-23loplugin:comparisonwithconstant in chart2Noel Grandin
Change-Id: I95787007b26cdcf0d5d1617ecd0e55d377b551d7 Reviewed-on: https://gerrit.libreoffice.org/37941 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12remove unused uno::Reference varsNoel Grandin
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-01tdf#107074 uncommenting createLabels for the axis fixes the issueTomaž Vajngerl
Quick fix for this bug seems to be to call createLabels again after creating shapes. The code to position axis label seems to be quite messy it would be better to greatly refactor the code if we want to do any enhancement to this code in the future. Change-Id: I2bc2c3d503944002c538d2d2a5119102c927f3b7 Reviewed-on: https://gerrit.libreoffice.org/37122 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-28commit: loplugin:checkunusedparams in chart2Noel Grandin
Change-Id: Ia1f42e74365ca1dace93babc132ad67fd09fc99d Reviewed-on: https://gerrit.libreoffice.org/37064 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-15Drop :: prefix from std in c*/Tor Lillqvist
Change-Id: If078cda95fa6ccd37270a5e9d81cfa0b84e71155 Reviewed-on: https://gerrit.libreoffice.org/34324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-03makeAny->Any in basctl..chart2Noel Grandin
Change-Id: Ief1cdffbfc59ab4e35ac945d020772ff84c50d61 Reviewed-on: https://gerrit.libreoffice.org/33867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-23loplugin:unnecessaryoverride (dtors) in chart2Stephan Bergmann
Change-Id: I013fd81467b353262e8de554a06a0b24e4deca6d
2016-10-06rtl::math::approxEqual(value,0.0) never yields true for value!=0.0Eike Rathke
... so replace with a simple value == 0.0 also in other modules than sc. Change-Id: Ie7316505a1cf9c15100114b45d300facceb03b7e Reviewed-on: https://gerrit.libreoffice.org/29575 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-06-28loplugin:singlevalfields in chart2Noel Grandin
Change-Id: I8b8bf093736a191c90d765dce82b00e15bb398d6 Reviewed-on: https://gerrit.libreoffice.org/26708 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-11try auto rotate tick labels only when useful tdf#99883Jochen Nitschke
By default we try to fit as many tick labels as possible on an axis. One way is (auto) rotating the labels at 45 degrees. But rotating only works for horizontal axes with horizontal text or vertical axes with vertical text, else rotated tick labels need more space. Join the check for this prerequisite with isAutoStaggeringOfLabelsAllowed. while here make isAutoStaggeringOfLabelsAllowed local and wrap stuff in anonymous namespaces Change-Id: I5784d0e5aa42ff90927e19d0bd2c6fed488d39f4 Reviewed-on: https://gerrit.libreoffice.org/25792 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-06-06follow up fix: initialise PointSequenceSequence directlyJochen Nitschke
commit e95be04a73e977022455335d7cbf56804638f761 uses wrong ctor: Sequence( sal_Int32 len ) Change-Id: I08751c10942f705ead008155a6e7e9dcfb0a2ca9 Reviewed-on: https://gerrit.libreoffice.org/25945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-06-04initialise PointSequenceSequence directlyJochen Nitschke
this list initialisation is short enough to remove the local helper function Change-Id: I17fab47e51fc0b1a0aa0462d517d7861f8a278e0 Reviewed-on: https://gerrit.libreoffice.org/25884 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-03-14com::sun::star->css in chart2Noel Grandin
Change-Id: I04320d32d6d5c54e461cfabef58645f8b772bc69
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I71de514405bb9bcc746c1ab9633e7fe659888943
2015-10-19loplugin:defaultparamsStephan Bergmann
Change-Id: I946e1970647d8005f54ac0362f5c2b04f867b22f
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-07tdf#88154 workaround and unit testMarco Cecchetti
Fixed 45-degree layout for axis labels, too. Change-Id: I9764e281aeee0a439fa9eec1e3b0df840221b72f Reviewed-on: https://gerrit.libreoffice.org/18889 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2015-10-06clang-analyzer-deadcode.DeadStoresStephan Bergmann
Change-Id: I3f34115b7d73e71441404866fc45894f78ab28f6
2015-09-14boost->stdCaolán McNamara
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-07-30small fix to reduce UnknownPropertyException in chart2Markus Mohrhard
accidently introduced with f1531cdaaebe706d909dc6ddde439ccb5f4ad36d Change-Id: I292097c5f61ecb32a28a90e9f5be48fcfd6bcd7b
2015-07-04Fix typosAndrea Gelmini
Change-Id: I75b4ad61785bf0ba1cb07735d938c0977356b8cc Reviewed-on: https://gerrit.libreoffice.org/16705 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-06-16Fix typosAndrea Gelmini
Change-Id: I528752dfabeb31d14c350f79819b521537ab9b56 Reviewed-on: https://gerrit.libreoffice.org/16300 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-09cppcheck: variableScopeCaolán McNamara
Change-Id: If0c56c89e2722d47a401363f3854331229856490
2015-04-23loplugin:staticmethodsNoel Grandin
Change-Id: Iab2f10b000ef41fb090e0034785d4ed0bda4cf43
2015-03-23TyposJulien Nabet
Change-Id: Ie08a26a569b83bfe3ef4351dbb7b6e928745b95d
2015-03-12CppCheck cleanlyness : reduce variable's scopeMichaël Lefèvre
Change-Id: I5bd18b1a93f7197121eb42f6b82d2d8d87e7671f Reviewed-on: https://gerrit.libreoffice.org/14843 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-12-24bnc#830738 Now all axis labels of a chart are displaied.Marco Cecchetti
Problem: Some axis labels of a chart are missing, when they should not. Analysis and solution: The current implementation is affected by the following issues: 1) When the method switches to the 45-degrees layout the `nRhythm` parameter is not reset to 1. 2) The bounding boxes computed by the `doesOverlap` test routine for the 45-degrees layout are wrong. Because of the first issue only one label every `nRhythm` is showed even if in the 45-degrees layout no overlap occurs. The second issue is located inside the `lcl_getRotatedPolygon` routine which is used by the `doesOverlap` routine for building a polygon representing the bb for a text label. The polygon is created in the following way: a new rectangle is created: the top-left vertex is placed at axes origin and it is initialized with the same width and height of the bb of the passed text label. Later several transformations are performed on the new rectangle: 1) the rectangle is rotated by a 45-degrees angle respect with its center; 2) the rectangle is translated by a vector equals to the top-left vertex of the bb of the passed text label. There are 2 errors in this sequence of transformations: 1) The `B2DHomMatrix` class used for representing the transformation, performs rotations in the positive direction (from the X axis to the Y axis). However since the coordinate system used by the chart has the Y-axis pointing downward, a rotation in the positive direction means a clockwise rotation. On the contrary text labels are rotated counterclockwise. This can be easily fixed by using the opposite angle. 2) Rotating the rectangle respect with its center is wrong since the fixed point of the rotation must be the top-left corner of the rectangle: in this way when the final translation is performed the top-left vertex of the transformed rectangle will be coincident with the top-left vertex of the text label bb, and so the transformed rectangle will be coincident with the text label bb. Change-Id: Ia8072c3d5bd6c1a11f66c33d45d56e55634edf4c
2014-11-04Modify the tick iterator strategy to use fewer ticks.Kohei Yoshida
To pre-determine the size of the largest text label object, auto-staggering strategy etc. In theory (if I read the code correctly) we could achieve the same thing by using only 3 ticks rather than 5. Change-Id: Iee51588061e482c724ee4fb666c51c2a6b636e8c
2014-11-04Let's use size_t for the index.Kohei Yoshida
This removes unnecessary static_cast's and check for negative values which, from what I've read from the code, never happens. Change-Id: I9d9e1de5b091df335dd3b7eeb34e4e8f98de0fbd
2014-11-04Some code sharing.Kohei Yoshida
Change-Id: If80c4b0ceec5e0afd55d12ebe7511fb4f40b4797
2014-11-04Create a variant of createTextShapes for simpler use cases.Kohei Yoshida
So that we can do more aggressive optimization without breaking the other cases. Change-Id: I5d4ceb2a3b7f041f752a570827815236e9de58db
2014-11-04Standard way of writing class description.Kohei Yoshida
Change-Id: I5572f4417a05132e46a4560088f519cdadfdaec1
2014-11-04Code annotation.Kohei Yoshida
Change-Id: I41067bf7503c591ce869ecfde111b049143bbb9a
2014-11-04Add const to read-only variables.Kohei Yoshida
Change-Id: Ie5782e6f450db91e1a66693163fba2b83441e9ae
2014-11-04Mark these methods const.Kohei Yoshida
Change-Id: Idf53b85d962406caf9ca1df636fffd8b3459baf5
2014-10-14Take the current axis alignment state.Kohei Yoshida
Change-Id: I02c28f44af0a1510bdb780d1e6c70561b7ba24e5
2014-10-14Revert "Revert "Make VCartesianAxis::get2DAxisMainLine() truly const method.""Stephan Bergmann
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-14Revert "Make VCartesianAxis::get2DAxisMainLine() truly const method."Stephan Bergmann
This reverts commit 410c5bd58c36d9064a79520d5bc31cb32ead1326, it causes CppunitTest_chart2_xshape to fail.
2014-10-13Make VCartesianAxis::get2DAxisMainLine() truly const method.Kohei Yoshida
No internal state gets modified by this method now. Change-Id: I10475ad3483cb3a92e41208e1a55a6b925c10223