summaryrefslogtreecommitdiff
path: root/chart2
AgeCommit message (Collapse)AuthorFilesLines
2017-04-29tdf#107097 invoke internal DP and correctly handle "range" namesTomaž Vajngerl2-1/+5
When we copy/paste a pivot chart to another (new) document, we "send" a chart data as ODC to the other document. In the new document we can't use the pivot table (as there is none in this document) so we read-in the table data from the document to the internal data provider. The problem was that we didn't match the (fake) range names from the pivot table correctly in the internal data provider and the data wasn't populated. This commit fixes that and changes the fake range names to something that is easy to parse and matches the names in internal data provider. Change-Id: I9872160cca68abd91738a25bf9b3b27bc77ce38d Reviewed-on: https://gerrit.libreoffice.org/37086 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-28loplugin:salunicodeliteral: chart2Stephan Bergmann2-2/+2
Change-Id: I8531b2466298a18c06a4c2a690af6bc998cc802f
2017-04-28commit: loplugin:checkunusedparams in chart2Noel Grandin38-110/+98
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-04-27remove svx bitmaps from .src filesCaolán McNamara2-6/+10
Change-Id: Ie3795870484648e62dea483f9976af31cd1be167 Reviewed-on: https://gerrit.libreoffice.org/37006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-27tools: move errcode.hxx to the vcl moduleChris Sherlock2-2/+2
Change-Id: I17e5a033de5f0aeb0a726744f7b464cdab6e2ee3 Reviewed-on: https://gerrit.libreoffice.org/36854 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-26Resolves: tdf#107372 set opengl context when using opengl functionsCaolán McNamara1-1/+9
even if they are teardown ones Change-Id: Ie222d3ffb2b555c0013d7346552d3fc76ec87d9b Reviewed-on: https://gerrit.libreoffice.org/36948 Tested-by: Jenkins <ci@libreoffice.org> Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-25remove chart2 bitmaps from .src filesCaolán McNamara11-906/+279
Change-Id: I8ae690b510e69df65e7383e38f054580b8a5ab9d
2017-04-25errinf.hxx moved out of tools and into vcl moduleChris Sherlock1-1/+1
ErrorInfo has a hard depency on VCL, yet is in the tools package. It is more appropriate to have it reside in the VCL module. Change-Id: Ica54a46c3a7f86cf0331ed7245234bea69c05650 Reviewed-on: https://gerrit.libreoffice.org/36839 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock21-0/+21
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-24coverity#1405470 Unchecked dynamic_castCaolán McNamara1-3/+3
Change-Id: I5125ec90b83630225ca9aab689e814e5a7c03a4e
2017-04-24coverity#1405475 Uninitialized scalar fieldCaolán McNamara1-0/+1
Change-Id: If4709eb169196893378ceb7c2dc9c645d4a640a3
2017-04-24tdf#107147 ignore subtotals and grandtotals when gathering labelsTomaž Vajngerl1-3/+3
When gathering the labels and categories for the pivot chart, ignore subtotals and grandtotals so they don't end up in the chart. Change-Id: I45e80a59531d6a048a22016132e9bef280bb325c Reviewed-on: https://gerrit.libreoffice.org/36868 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-24preserve "Total" label on round-trip, remove code duplicationTomaž Vajngerl1-2/+2
Change-Id: Ic4e682f2193291798a3ebbf5a7f3f435d40a0645 Reviewed-on: https://gerrit.libreoffice.org/36867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-23Replace GetImage with CommandInfoProvider::GetImageForCommandMaxim Monastirsky4-4/+0
And move ToolBoxButtonSize->ImageType mapping code to a common place. Change-Id: If158f4b6f2750054fcf64491c2941706e7d3a329
2017-04-22tdf#107068 add arrow to the buttons, mark if field is filteredTomaž Vajngerl4-31/+139
Change-Id: Iba0b4c2ce3ab84229d388a7cb2d20db1f47c0b57 Reviewed-on: https://gerrit.libreoffice.org/36738 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky11-11/+0
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-20tdf#107071 remove "Data Range" from context menu in a pivot chartTomaž Vajngerl1-30/+38
Change-Id: Idb0087941e64af3b3373fd9a041ac04b96705934 Reviewed-on: https://gerrit.libreoffice.org/36737 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-20tdf#107067 remove data buttons as they don't have any actionTomaž Vajngerl1-19/+2
Change-Id: I91751cfc32a75ecd72dc711821d918b6a5d9f83f Reviewed-on: https://gerrit.libreoffice.org/36736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-20tdf#107069 don't show "move" cursor on field buttonsTomaž Vajngerl1-0/+8
Change-Id: I332cc7522eb98345d34cb411642189262d97744c Reviewed-on: https://gerrit.libreoffice.org/36735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-20loplugin:unusedmethodsNoel Grandin1-1/+0
Change-Id: Ib7a9b1b0802ca751da258065e89b412b090bb672 Reviewed-on: https://gerrit.libreoffice.org/36718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19pivotcharts: test pivot table fieldsTomaž Vajngerl1-4/+130
Change-Id: I384bf36a79adccdccdecb836b122958ce925c376 Reviewed-on: https://gerrit.libreoffice.org/36628 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-19pivotcharts tests: setup pivot table from scratchTomaž Vajngerl1-0/+271
This changes tests so that we fill example data and create a new pivot table from scratch, and create a new pivot chart using that pivot table. This enables that we test different cases without an example document which creates a pivot table for us. In addition add two test cases: - pivot table with one column field and one data field - pivot table with one row field and one data field (disabled, as it currently crashes) Change-Id: I8397a598857953e0b2d7da8dd91d7709a3495b71 Reviewed-on: https://gerrit.libreoffice.org/36625 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-19clang-tidy readability-simplify-boolean-expr in accessibility..cuiNoel Grandin9-50/+16
Change-Id: Iae27da322c6ede592e6b268fb2210d3525ed22cc Reviewed-on: https://gerrit.libreoffice.org/36677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19convert MeasurementSystem to scoped enumNoel Grandin1-1/+1
Change-Id: I5d26c50aa0e2c68edab6ee217ae6bdb0ee45dc09 Reviewed-on: https://gerrit.libreoffice.org/36525 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-16cppcheck: arrayIndexThenCheckJulien Nabet1-2/+2
Change-Id: Ie3ca646fae94ff5a06a29fc2823a1cacafc3deb1 Reviewed-on: https://gerrit.libreoffice.org/36575 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-04-15Fix typosAndrea Gelmini1-2/+2
Change-Id: I0238202c0dc0380b0e33a9c4567a9513c0afbe91 Reviewed-on: https://gerrit.libreoffice.org/36556 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-14update cppunit to 1.14.0Markus Mohrhard2-35/+0
Change-Id: I95fa42f4ef0580734b605df859c1660b29adb8b2 Reviewed-on: https://gerrit.libreoffice.org/36499 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-12can use gb_CppunitTest_use_configuration and still access .ui filesCaolán McNamara1-2/+1
after... commit 506cab1a01b0481d0831a7a692a26dc5a5b55e91 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Apr 12 16:14:10 2017 +0100 take the .ui files from $BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR Change-Id: I9cffdc092206c038da32a32a2cfe629e68b5c258 Change-Id: I906d16037cdf0b9203a4120cb1a5e9846a5c7b7f Reviewed-on: https://gerrit.libreoffice.org/36482 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-10pivotcharts: ignore subtotals, grand totals in pivot table dataTomaž Vajngerl1-10/+45
Change-Id: I08cdd28aaae536fa8306446168dcdb977897dfcd Reviewed-on: https://gerrit.libreoffice.org/36308 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-06Improved loplugin:redundantcast, static_cast on arithmetic types: chart2Stephan Bergmann5-6/+6
Change-Id: I21dd484a2d337d16f59d5a747afaee230a1e7c89
2017-04-06loplugin:useuniqueptrStephan Bergmann1-2/+6
Change-Id: I33aafc7351c5fdc2c677d0be123f666211255ccb
2017-04-06loplugin:redundantcast check for c-style float castsNoel Grandin3-6/+6
Change-Id: I86b6f58887cb398a80698f8d8564b5bc3f55eabb Reviewed-on: https://gerrit.libreoffice.org/36198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06loplugin:useuniqueptr extend to catch more localvar casesNoel Grandin1-4/+2
i.e. where the code looks like { foo * p = new foo; ... delete p; return ...; } Change-Id: Id5f2e55d0363fc62c72535a23faeaaf1f0ac6aee Reviewed-on: https://gerrit.libreoffice.org/36190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06loplugin:redundantcast find cstyle double castsNoel Grandin1-2/+2
Change-Id: I5507be190dac781e5cdb545a60acf3d50056c9f8 Reviewed-on: https://gerrit.libreoffice.org/36187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06Call CPPUNIT_ASSERT directly (also avoids -Werror,-Wformat with clang-cl)Stephan Bergmann1-28/+16
Change-Id: I78a1d59e6814ad7f3e39fd720871189ccb0e22d1
2017-04-05loplugin:redundantcast find c-style bool castsNoel Grandin1-2/+2
Change-Id: I3237b93babc67de12c3771aa84766c2141ca93b2 Reviewed-on: https://gerrit.libreoffice.org/36137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04tdf#83257 [API-CHANGE] Pivot chart implementationTomaž Vajngerl18-109/+737
This is a squashed commit of the pivot chart implementation. Some of the changes: - Add pivot chart specific (pivot table) data provider which provides the data from a pivot table to the associated chart. - When inserting a chart and the cursor is in a pivot table, in that case insert a pivot chart - Modify the pivot chart when the pivot table changes - Collect and set the number format for the values - isDataFromSpreadsheet check for the creation wizard - In ChartView (and VLegend) check if the data provider is a pivot chart data provider and get the pivot table field names to create the buttons on the UI. - Adds the functionallity to show a filter pop-up (from calc) when clicking on row / column / page field buttons. - Remove (X)PopupRequest as we won't need it. - Add ODF import/export for pivot charts: + Added loext:data-pilot-source attribute on chart:chart which is the internal name of the pivot table with which the pivot chart is associated with. If the element is present, then the it means the chart is a pivot chart, else it is a normal chart + Added service to create pivot chart data provider through UNO + Add new methods to XPivotChartDataProvider to create value and label data sequences separately from the data source, which is needed for pivot chart import + When importing defer setting the data provider until a later time when we know if we are creating a chart od a pivot chart - Pivot chart ODF round-trip test - Add table pivot chart supplier API: This adds the XTablePivotChartSupplier and related interfaces so we can access, create, delete pivot charts from UNO in a sheet document. With this we now distinguish between normal charts and pivot charts. This was mainly needed because we can't extend the "published" interfaces of TableChartSupplier. - Added an extensive test, which uses the API to create a new pivot chart when there was none, and checks that the pivot chart updates when the pivot table updates. Change-Id: Ia9ed96fd6b1d342e61c2f7f9fa33a5e03dda21af Reviewed-on: https://gerrit.libreoffice.org/36023 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-02coverity#1403662 Mixing enum typesCaolán McNamara1-3/+3
Change-Id: Ic5e797c65dfc736a9ef0ab14f3ae563216143947 Reviewed-on: https://gerrit.libreoffice.org/36020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-31use actual UNO enums in chart2Noel Grandin14-24/+60
Change-Id: I05d4eed55f5deba4b1802389d1ba94582d30550f Reviewed-on: https://gerrit.libreoffice.org/35917 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna17-30/+30
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-29loplugin:unusedmethodsNoel Grandin2-8/+0
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0 Reviewed-on: https://gerrit.libreoffice.org/35834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-29loplugin:singlevalfieldsNoel Grandin2-4/+0
Change-Id: I7f05903aaab9b0b274358243d680d0c30694ae61 Reviewed-on: https://gerrit.libreoffice.org/35804 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-28it makes no sense for CC to leak resources when its unaware of modelBjoern Michaelsen1-3/+6
- if the UNO_QUERY_THROW cast throws, this skips all of the disposing (and thus leaks) - the whole try-catch-ignore case has been there since early c6b95527 - even in that commit message, no sane justification has been given - apparently the try-block was Java-style "catch exceptions until it runs" cargo-cult - this change is still the more conservative change: probably the whole try-catch framing should be removed Change-Id: Ie3a71e48eb056afd8a844e19898dc1555de4297e Reviewed-on: https://gerrit.libreoffice.org/35690 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-26Remove obsolete codeBjoern Michaelsen1-8/+1
now that the ChartController doesnt own the VCL window anymore. Change-Id: I2fefa73181a61b2a7828b36e70480b59aa7838f4 Reviewed-on: https://gerrit.libreoffice.org/35640 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-25Fix typosAndrea Gelmini2-1/+1
To re-integrate the fixes in revert commit ab92c84dfe600f320f37b6126cab11385a6fbdd1 we have also to update the binary ods, to avoid break of "make check". Change-Id: Ic044d43c6c3c3d9fc3e003c282fac4ba888a0115 Reviewed-on: https://gerrit.libreoffice.org/35685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25Fix typosAndrea Gelmini7-8/+8
Change-Id: If92860597a44ee79b513d255ce3f21112485a97e Reviewed-on: https://gerrit.libreoffice.org/35617 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-24fix for regression from 522e9c65: dont make all charts disappearBjoern Michaelsen1-1/+1
Change-Id: Ica8a8c8cfd1f0743c4ad9421f3cac9aa92645838 Reviewed-on: https://gerrit.libreoffice.org/35650 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-24when getting the naked VCL Window from UNO: hold the solar mutexBjoern Michaelsen3-14/+10
Change-Id: Ia3513d67e09cdc9748a24aeffce0ec59cab30cc9 Also: fix some obvious violations of the above. Reviewed-on: https://gerrit.libreoffice.org/35605 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-24UNO objects should never hold a VclPtr they dont own on heap ...Bjoern Michaelsen8-109/+128
... so admit that the VclPtr that ChartController used to have is really owned by m_xViewWindow, and get fetch that (stack-scoped only) from there. Change-Id: Ib9e2cd20201ebe5019c3607a8c65cb1a9856812f Reviewed-on: https://gerrit.libreoffice.org/35603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-23Lets not call 1/2 of everyone we know friend...Bjoern Michaelsen1-2/+0
...esp. when they dont even need it. Change-Id: If9d00da3110328d88e832f12b8717a93f91393aa Reviewed-on: https://gerrit.libreoffice.org/35602 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>