summaryrefslogtreecommitdiff
path: root/chart2
AgeCommit message (Collapse)AuthorFilesLines
2015-03-04gbuild: CppunitTest: always use unittest configurationMichael Stahl3-6/+0
The sc_subsequent_filters_test was failing because of a lock file because it did not use the unittest configuration. Refactor gb_CppunitTest_use_configuration so it uses both the instdir and unittest configuration to prevent such errors. In case there ever is a test that does not work with the unittest configuration it should call gb_CppunitTest_use_instdir_configuration. (cherry picked from commit f0a60415597bae7ca54767b397a217882578ce97) Conflicts: dbaccess/CppunitTest_dbaccess_RowSetClones.mk sc/CppunitTest_sc_condformats.mk sc/CppunitTest_sc_recordchanges.mk Change-Id: Ibc00d42f8b6102d50d922f51173120798fa45c6e Reviewed-on: https://gerrit.libreoffice.org/14738 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-04Missing dependencyStephan Bergmann1-0/+3
Change-Id: I4b66f7e549fe318f61b5ec8127ca073b2eb19ed3 (cherry picked from commit defbb4752bfa4bc2a35f5ee4c24d0e1654afeb2c) Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-02-17tdf#84514: don't hide grid along with checkbox if not neededKatarina Behrens2-1/+7
Regression from .ui migration, which unconditionally (and wrongly) hides the grid with radiobuttons. Do what the old code did - hide the whole frame iff the grid has been hidden already. Change-Id: Ia9dc8b166f4031b4c07fbb1969908d314cc3456c Reviewed-on: https://gerrit.libreoffice.org/14511 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-25Resolves: fdo#88229 Crash when you try to create a bar chart GL3DCaolán McNamara1-2/+9
Change-Id: I6390f8988ca287de19e9981053bdeb9473d1e3e1 (cherry picked from commit 05e7b1db351ee964d155e49c55de7db3c917083f) Reviewed-on: https://gerrit.libreoffice.org/14138 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-01-23Allow for null xModel in TitleHelper::getTitleStephan Bergmann1-10/+10
Witnessed a JunitTest_chart2_unoapi failure where (deep within Idle::Timeout) chart::impl::ModelState::update is apparently called with a null xModel. All the code called from there appears to be careful to handle a null xModel, except for chart::TitleHelper::getTitle, which---presumably by accident---stopped doing so with 401f01caf5b357ac6c15b37a89c0a9aaeb46f4e4 "use ChartModel instead of XModel in a few places." Change-Id: I5788b5e41a6d68fe193cb214d736ee54c4c581d7 (cherry picked from commit 6acfc822566ca3c7d9fdd4af37ad5104a00d5d35) Reviewed-on: https://gerrit.libreoffice.org/14126 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-12-30bnc#830738 Now all axis labels of a chart are displaied.Marco Cecchetti1-7/+20
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-12-01chart2: ChartController: fix CommandDispatchContainer access lockingMichael Stahl2-4/+21
crashes on concurrent setModel() and getDispatchForURL() in JunitTest_chart2_unoapi: Thread 13: 7 in (anonymous namespace)::Frame::isActionLocked (this=0x2b66c0e4a090) at /home/tinderbox/master/framework/source/services/frame.cxx:2596 8 in (anonymous namespace)::Frame::close (this=0x2b66c0e4a090, bDeliverOwnership=0 '\000') at /home/tinderbox/master/framework/source/services/frame.cxx:1772 9 in chart::ChartController::notifyClosing (this=0x2b668ae41058, rSource=...) at /home/tinderbox/master/chart2/source/controller/main/ChartController.cxx:872 10 in apphelper::CloseableLifeTimeManager::impl_doClose (this=0x2b669a0b1d08) at /home/tinderbox/master/chart2/source/tools/LifeTime.cxx:360 11 in apphelper::CloseableLifeTimeManager::g_close_endTryClose_doClose (this=0x2b669a0b1d08) at /home/tinderbox/master/chart2/source/tools/LifeTime.cxx:311 12 in chart::ChartModel::close (this=0x2b669a0b1c28, bDeliverOwnership=1 '\001') at /home/tinderbox/master/chart2/source/model/main/ChartModel.cxx:659 Thread 1: 4 in std::__debug::map<rtl::OUString, com::sun::star::uno::Reference<com::sun::star::frame::XDispatch>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, com::sun::star::uno::Reference<com::sun::star::frame::XDispatch> > > >::find (this=0x2b668ae41248, __x=...) at /usr/include/c++/4.8.3/debug/map.h:382 No locals. 5 in chart::CommandDispatchContainer::getDispatchForURL (this=0x2b668ae41248, rURL=...) at /home/tinderbox/master/chart2/source/controller/main/CommandDispatchContainer.cxx:80 6 in chart::ChartController::queryDispatch (this=0x2b668ae41058, rURL=..., rTargetFrameName=...) at /home/tinderbox/master/chart2/source/controller/main/ChartController.cxx:1003 No locals. 7 in framework::DispatchProvider::implts_queryFrameDispatch (this=0x2b66a3fd21e8, xFrame=..., aURL=..., sTargetFrameName=..., nSearchFlags=0) at /home/tinderbox/master/framework/source/dispatch/dispatchprovider.cxx:374 8 in framework::DispatchProvider::queryDispatch (this=0x2b66a3fd21e8, aURL=..., sTargetFrameName=..., nSearchFlags=0) at /home/tinderbox/master/framework/source/dispatch/dispatchprovider.cxx:111 9 in framework::InterceptionHelper::queryDispatch (this=0x2b668a61bc08, aURL=..., sTargetFrameName=..., nSearchFlags=0) at /home/tinderbox/master/framework/source/dispatch/interceptionhelper.cxx:78 10 in (anonymous namespace)::Frame::queryDispatch (this=0x2b66c0e4a090, aURL=..., sTargetFrameName=..., nSearchFlags=0) at /home/tinderbox/master/framework/source/services/frame.cxx:2227 11 in svt::ToolboxController::bindListener (this=0x2b66c0f72740) at /home/tinderbox/master/svtools/source/uno/toolboxcontroller.cxx:529 12 in svt::ToolboxController::update (this=0x2b66c0f72740) at /home/tinderbox/master/svtools/source/uno/toolboxcontroller.cxx:232 13 in framework::ToolBarManager::UpdateControllers (this=0x2b669a0a1728) at /home/tinderbox/master/framework/source/uielement/toolbarmanager.cxx:440 14 in framework::ToolBarManager::AsyncUpdateControllersHdl (this=0x2b669a0a1728) at /home/tinderbox/master/framework/source/uielement/toolbarmanager.cxx:2110 15 in framework::ToolBarManager::LinkStubAsyncUpdateControllersHdl (pThis=0x2b669a0a1728, pCaller=0x2b669a0a1890) at /home/tinderbox/master/framework/source/uielement/toolbarmanager.cxx:2097 16 in Link::Call (this=0x2b669a0a18b0, pCaller=0x2b669a0a1890) at /home/tinderbox/master/include/tools/link.hxx:139 17 in Timer::Timeout (this=0x2b669a0a1890) at /home/tinderbox/master/vcl/source/app/timer.cxx:276 Change-Id: I17ef63db8f7c288460e00031e8e8a5c3e4d086b3 (cherry picked from commit 426ef2847cbdc74c068531915efb852a727cd3ee)
2014-11-18cppuhelper: clean up public headers with include-what-you-useMichael Stahl2-0/+2
Change-Id: I41ba46831f24b2960a1fe982b74a2b623e682e0b
2014-11-17coverity#1242824 Unused valueCaolán McNamara1-7/+2
Change-Id: I5f53e538f8f76c337cda8b90fcf4ed717ed2476e
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl14-0/+15
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-16vcl: let the ModalDialog ctor take an OUStringMiklos Vajna1-2/+2
Change-Id: I839435338f4acf80c40896b6c86f7ef122f5449d
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava3-4/+4
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini3-3/+3
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-11fdo#84938: replace HELPMODE_ constants with enumNoel Grandin1-1/+1
Change-Id: I44be5567e84cdabd8b10771ea37e28b8a88cc23e Reviewed-on: https://gerrit.libreoffice.org/12333 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-10callcatcher: unused codeCaolán McNamara2-7/+0
Change-Id: I2ead5d998c3b1b3cde1222fee6f072bf09ab0021
2014-11-10move README.deprecated from chart2 to vclMarkus Mohrhard1-23/+0
Change-Id: I077209d52805e1b8850a6702b9d88fe63acf8a0b
2014-11-10prevent crash with empty chart sceneMarkus Mohrhard1-0/+3
Change-Id: I9eb8adf887532c62af6efeac5b0eeec1419b7252
2014-11-10merge vcllo and vclopenglloMarkus Mohrhard3-4/+0
Change-Id: I419ca67dc1f87dd9ac751aa5a094fecf58136edb
2014-11-09OpenGL ES does not support double and glPolygonModeMarkus Mohrhard1-0/+6
Change-Id: I623babba561dc0a126c6884a70a33ad4a78ef63f Reviewed-on: https://gerrit.libreoffice.org/12187 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-11-07fdo#84938: replace MOUSE_ modifier constants with enumNoel Grandin2-2/+2
and make the two categories of constants non-overlapping, we really don't need to risk confusion in order to save 6 bits in a data structure like this. Change-Id: I2251195d8e45ed04e2a89e47ae9c3e52cf0475c0
2014-11-07use css:: prefix to tidy up chart2 UNO macrosNoel Grandin1-33/+23
Change-Id: I8dbe23bfec15fbc905407f64a3a87a5c75dbcd54
2014-11-05changed some timer to idleJennifer Liebel1-2/+2
Change-Id: Ifd5e2d87732d3e537c7754e52be24ef768ecb8d9
2014-11-05loplugin:unreffunStephan Bergmann1-1/+3
Change-Id: Id1a5a0756c2704a622eccecb32726a427e64b70d
2014-11-05fdo#38835 strip out OUString globalsNoel Grandin32-139/+139
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-11-04Avoid re-constructing chart shapes when it's not in visible range.Kohei Yoshida2-6/+20
The re-construction will be deferred until it becomes visible again. Change-Id: I364ea8d38d48078dfd803b0e5bb20bfc8a2913ba
2014-11-04Actually we shouldn't always set Overlap flag on for all xlsx charts...Kohei Yoshida1-1/+1
The correct fix unfortunately would require making the axis label layout smarter, to avoid overlapping of angled text label objects. Change-Id: I92198dbb90fd4a206ee226307992343d064f733a
2014-11-04Modify the tick iterator strategy to use fewer ticks.Kohei Yoshida1-11/+21
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 Yoshida3-17/+18
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 Yoshida3-62/+64
Change-Id: If80c4b0ceec5e0afd55d12ebe7511fb4f40b4797
2014-11-04Create a variant of createTextShapes for simpler use cases.Kohei Yoshida4-17/+193
So that we can do more aggressive optimization without breaking the other cases. Change-Id: I5d4ceb2a3b7f041f752a570827815236e9de58db
2014-11-04These methods can be private rather than protected.Kohei Yoshida1-1/+1
Change-Id: I56f1296f5a2df67ae9386ae9f30761aee0fde7f3
2014-11-04More method descriptions.Kohei Yoshida1-2/+12
I'm starting to "get" this axis label layout code. Change-Id: I797a92698cb81a1b9325f81b5275cb033cb7c342
2014-11-04More method descriptions.Kohei Yoshida1-0/+16
Change-Id: I465e991c83cd5b711d73afd9407596ef1df70f27
2014-11-04Standard way of writing class description.Kohei Yoshida1-11/+9
Change-Id: I5572f4417a05132e46a4560088f519cdadfdaec1
2014-11-04Code annotation.Kohei Yoshida2-48/+82
Change-Id: I41067bf7503c591ce869ecfde111b049143bbb9a
2014-11-04Add const to read-only variables.Kohei Yoshida1-4/+4
Change-Id: Ie5782e6f450db91e1a66693163fba2b83441e9ae
2014-11-04Mark these methods const.Kohei Yoshida2-7/+7
Change-Id: Idf53b85d962406caf9ca1df636fffd8b3459baf5
2014-11-04remove some unused code in chart2Noel Grandin4-27/+0
Change-Id: I99afd30ad413b57d27c89421b5010f6d88856496
2014-11-03coverity#1242524, arguments in wrong orderMarkus Mohrhard1-1/+1
2014-11-01coverity#704564 Unchecked dynamic_castCaolán McNamara1-1/+1
Change-Id: Ife93dd20c08bf2a30298384099cd36592091c336
2014-10-31Removed duplicated includesAndrea Gelmini6-7/+0
Change-Id: I5362d997bfa086c9fb1726efcb15132a966684f6 Reviewed-on: https://gerrit.libreoffice.org/12160 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-10-29coverity#1242433 SdrMakeOutliner alway derefs pModCaolán McNamara1-1/+1
so change from a pointer to a reference Change-Id: I81eb2c9e4df8353fbbdad7058c6ca7ea22286e62
2014-10-25coverity#1249459 Unchecked dynamic_castCaolán McNamara1-1/+1
Change-Id: I5e212976f1be310c3a802679a0d8b93c2866d591
2014-10-25coverity#1249460 Unchecked dynamic_castCaolán McNamara1-1/+1
Change-Id: I21f85d0e18ab8a30320f3db294efa9fbdd4dd55d
2014-10-24coverity#704564 Unchecked dynamic_castCaolán McNamara1-1/+1
Change-Id: I2dfdc5e1e852011b532b484e566896133208ee86
2014-10-23Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"Jan Holesovsky2-3/+3
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-23Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"Jan Holesovsky2-3/+3
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-23loplugin: cstylecastNoel Grandin21-86/+85
Change-Id: I4aafc170895d8bab47206c7b07b4f1f6105d42d3
2014-10-22Replace DISABLE_SCRIPTING with HAVE_FEATURE_SCRIPTINGTor Lillqvist3-3/+3
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-20chart2: fix memory leak due to cyclic reference in VAxisBaseMichael Stahl13-25/+37
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