Commit Graph

2823 Commits

Author SHA1 Message Date
da57421b36 commit: loplugin:checkunusedparams in chart2
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-28 13:41:48 +02:00
dd1df645b4 remove svx bitmaps from .src files
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-27 10:50:48 +02:00
6c75ef5835 remove chart2 bitmaps from .src files
Change-Id: I8ae690b510e69df65e7383e38f054580b8a5ab9d
2017-04-25 16:06:39 +01:00
da64d198ec tools: svstream.hxx needs only errcode.hxx & not errinf.hxx
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-25 09:31:31 +02:00
a21e0d3aa8 coverity#1405470 Unchecked dynamic_cast
Change-Id: I5125ec90b83630225ca9aab689e814e5a7c03a4e
2017-04-24 14:51:27 +01:00
fb698d5e81 Replace GetImage with CommandInfoProvider::GetImageForCommand
And move ToolBoxButtonSize->ImageType mapping code to a
common place.

Change-Id: If158f4b6f2750054fcf64491c2941706e7d3a329
2017-04-23 19:50:15 +03:00
df69f1c4aa tdf#107071 remove "Data Range" from context menu in a pivot chart
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-20 16:10:35 +02:00
d30d50e2fd tdf#107069 don't show "move" cursor on field buttons
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-20 16:09:40 +02:00
8fced917aa clang-tidy readability-simplify-boolean-expr in accessibility..cui
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-19 14:38:35 +02:00
6390d77a14 convert MeasurementSystem to scoped enum
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-19 08:25:59 +02:00
0446cca0b6 Improved loplugin:redundantcast, static_cast on arithmetic types: chart2
Change-Id: I21dd484a2d337d16f59d5a747afaee230a1e7c89
2017-04-06 18:33:05 +02:00
724ddb9177 loplugin:useuniqueptr
Change-Id: I33aafc7351c5fdc2c677d0be123f666211255ccb
2017-04-06 16:02:24 +02:00
aa09b0c27a loplugin:useuniqueptr extend to catch more localvar cases
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-06 09:22:46 +00:00
7662e92c64 loplugin:redundantcast find cstyle double casts
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-06 07:47:30 +00:00
572e9cde74 loplugin:redundantcast find c-style bool casts
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-05 12:21:19 +00:00
9009663deb tdf#83257 [API-CHANGE] Pivot chart implementation
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-04 13:39:29 +00:00
8cd5002959 use actual UNO enums in chart2
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-31 07:00:10 +00:00
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
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-31 06:27:11 +00:00
9bfd742d8c loplugin:unusedmethods
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-29 11:43:40 +00:00
539470ebd5 it makes no sense for CC to leak resources when its unaware of model
- 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-28 19:59:51 +00:00
83c1a3235d Remove obsolete code
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-26 00:01:01 +00:00
5262883672 Fix typos
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-25 08:43:01 +00:00
3784370615 fix for regression from 522e9c65: dont make all charts disappear
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-24 15:29:55 +00:00
9c2884ae4b when getting the naked VCL Window from UNO: hold the solar mutex
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-24 09:54:56 +00:00
522e9c65fa UNO objects should never hold a VclPtr they dont own on heap ...
... 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-24 00:09:56 +00:00
e8c723ac7f Lets not call 1/2 of everyone we know friend...
...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>
2017-03-23 21:34:36 +00:00
f0a6f3549e Lets not call 1/2 of everyone we know friend...
...esp. when they tend try to own our private parts.
Lets be honest here. Also remove pointless repeated private:s.

Change-Id: Idaa7621fbe812ef25f13bba1882a16cca4de9d61
Reviewed-on: https://gerrit.libreoffice.org/35600
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-23 18:53:24 +00:00
eb0218315a Lets not call 1/2 of everyone we know friend...
...esp. when they tend try to own our private parts.
Lets be honest here. Also remove pointless dynamic_casts.

Change-Id: Ie6ef8a0c07a72aaa15e374e5ec6841520c0fafb1
Reviewed-on: https://gerrit.libreoffice.org/35599
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-23 17:29:27 +00:00
b5bef1f7d5 Typos
Change-Id: I13020539fe121151e884a90d72d47788fb3ae65c
Reviewed-on: https://gerrit.libreoffice.org/35436
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-19 18:50:33 +00:00
d948d66509 Fix typos
Change-Id: I5c89a47e658ae4ad2b0cdfcdb4988c4b79353085
Reviewed-on: https://gerrit.libreoffice.org/35413
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-19 05:49:15 +00:00
9bb21ef311 cleanup itempool includes
Change-Id: I3762cdfc6d92d2c15ef6e42d9be8e18ad8d79a10
Reviewed-on: https://gerrit.libreoffice.org/35313
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-03-17 11:00:09 +00:00
e29dafb350 remove unused defines from HRC files in chart2
Change-Id: I8ce5b900353034c4ad1424375bed0ea0c9db36b1
Reviewed-on: https://gerrit.libreoffice.org/35255
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-16 10:14:33 +00:00
8ccbc16b5e convert SvxFrameDirection to scoped enum
Based on the casts in chart2/source/view/main/ChartView.cxx
and the similarity of naming of values, I conclude that this
enum was intended to abstract over css::text::WritingMode2.

Added a comment to that effect.

Change-Id: I3af8bbe8b6ac8c4a9375f6ccde145b98b9c69a57
Reviewed-on: https://gerrit.libreoffice.org/35164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-15 08:35:10 +00:00
9cb57a50d7 convert SvxAdjust to scoped enum
Change-Id: I0df7a5313d6d62d0c657e62ef6014a3ddbab4639
Reviewed-on: https://gerrit.libreoffice.org/34941
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-08 06:30:49 +00:00
60708af4a7 Revert "tdf#99352: ensure ChartController is disposing its VclPtrs on DeInitVCL"
The original patch crashes charts on disposing, e.g. during the UI testing.

This reverts commit 926c0d73e82bb1d5644c49fb95c56e241b6c8f34.

Change-Id: I93cb5c41e3705a487d2547b55eac761c6952049c
Reviewed-on: https://gerrit.libreoffice.org/34900
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-03-05 08:48:21 +00:00
926c0d73e8 tdf#99352: ensure ChartController is disposing its VclPtrs on DeInitVCL
Change-Id: I46851debe8a0bdc1ff871ee9ba34ca41f89b844b
Reviewed-on: https://gerrit.libreoffice.org/34841
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-03-03 10:22:01 +00:00
198c41c4fe new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89
Reviewed-on: https://gerrit.libreoffice.org/34714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 10:17:47 +00:00
b8e85c6a64 loplugin:subtlezeroinit: chart2
Change-Id: I9012f97b188195140504dacb262c212d46df675a
2017-02-21 07:35:11 +01:00
ce315ac121 SvNumberFormatter::GetType() does not include NumberFormat::DEFINED
... so masking it out is unnecessary.

Change-Id: I4b25ced640f9287c4db52a6257020fce4e4c1303
2017-02-20 20:58:17 +01:00
be021ba04d convert StackMode to scoped enum
and drop unused AMBIGUOUS enumerator

Change-Id: I71954d75a64928061c0e520beb47f979c53ee5a8
2017-02-17 09:56:19 +02:00
80dd757500 convert GraphicObjectType to scoped enum
and drop unused FILL_PROPERTIES enumerator

Change-Id: I302d9d1d997c4fc491f7950b220060740f831539
2017-02-17 07:57:52 +02:00
3ed6cb5748 convert AccessibleBase::EventType to scoped enum
and drop unused enumerators

Change-Id: I1ce08b16d587edcaee214b40798fe53fa3fc7923
2017-02-17 07:57:52 +02:00
6de3688cc6 Drop :: prefix from std in c*/
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-15 23:01:23 +00:00
8faff1ee9c chart2: remove unneeded includes
Change-Id: I49e15f57e8eddb53dbf4d1b7ddbf6d33fed116f2
Reviewed-on: https://gerrit.libreoffice.org/34172
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-02-13 21:09:50 +00:00
608811c2cb chart2: simplify and/or clean-up and c++11 features
Change-Id: I4550d04ae4bf6e45f24e34dfb2babc0fdef8ba5a
Reviewed-on: https://gerrit.libreoffice.org/34006
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2017-02-12 23:00:59 +00:00
4df2bc90cc A newline is not that special or hard to remember
Change-Id: I2960a59283a5a04c5c804a57e43bdb633c0e45cf
2017-02-08 13:35:19 +02:00
a3190d7201 remove unused SCHATTR_DIAGRAM_STYLE
and associated SvxChartStyleItem and SvxChartStyle

Change-Id: I1564a4583125dd32af71e4eff338dfcefc6517c4
Reviewed-on: https://gerrit.libreoffice.org/33988
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08 08:12:56 +00:00
5601c77e99 fix oss-fuzz build
Change-Id: I0e292bcca27035b316bcf0c93dbd6c87e3f93e3b
2017-02-07 12:35:21 +00:00
6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00
83721f4365 makeAny->Any in basctl..chart2
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>
2017-02-03 08:50:50 +00:00