summaryrefslogtreecommitdiff
path: root/chart2/source
AgeCommit message (Collapse)Author
2020-09-15tdf#77007: chart must honor its parent's IsEnableSetModifiedMike Kaganski
Regression from commit bb97ecdbcc8d8dafd39e728b21bc68efee4eccbc, which had dropped storing chart doc (calling its storeOwn) while loading back in 2012, to avoid performance problems when loading XLS. Funnily, in 2013, commit a666862deffa33013d3df3bb62e87c67f9a89948 was merged, that was expected to solve exactly the same problem as this change, by calling storeOwn for charts being loaded; while obviously not fixing the problem properly, it seems to had undone the effect of the Markus's commit. The latter commit had a side effect of updating views of modified charts while exporting them inside storeOwn, which made respective draw pages to be up-to-date right after loading, including those on inactive sheets. Now, after this change, this is not so, thus unit tests' getChartDocFromSheet was made to update the view explicitly. Unfortunately, it's not yet possible to revert the change from commit a666862deffa33013d3df3bb62e87c67f9a89948, because obviously some dependency grew, which makes e.g. testTdf122594 fail if that commit is reverted. Given that testTdf122594 has no charts, storing the modified objects while loading has much wider side effects than was expected by author of a666862deffa33013d3df3bb62e87c67f9a89948. Change-Id: Iee1b9ef6f4d8c2dfa0a49680c5e2b465f1817a59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102534 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-09-13Unify the code used to get object shell for componentsMike Kaganski
and their parents across the codebase. Change-Id: Ifb37fb940d285f81c1724a912204533e8c3b0044 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102546 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-09-11tdf#136573 chart2: enable arrow keys in data labelTünde Tóth
moving to custom positions. Follow-up of commit c10d5854b5427ad1bfffc00e77a9306c99c78c63 (tdf#136430 Fix chart crash trying to move data labels with arrow keys.) Change-Id: I8833e14a7c9c8f7bdb758fc0eb97be38aee35b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102262 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-09improve loplugin:unusedvarsglobalNoel Grandin
to find any global variable, was checking the wrong property of VarDecl Change-Id: I454b4e0c1701bb0771768a1ee10cd738c4ab0726 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102278 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-07loplugin:unusedfieldsNoel Grandin
Change-Id: Id1b1c07ddcacca8eef8af71890d9392f29b6be6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102172 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-07loplugin:unnecessaryvirtualNoel Grandin
Change-Id: I596ef2603560f521386e273b6f0fb2f672db56d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102171 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-07tdf#136430 Fix chart crash trying to move data labelsBalazs Varga
with arrow keys. Change-Id: I357c320406d9f044b12b1289aa0f88045001c283 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102002 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-04tdf#124176 Use #pragma once in chart2George Bateman
This commit was carried out mostly by a Python script, source of which is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97. Change-Id: Ifee23b494264f895e5612952d0875cac064e4132 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100181 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-04tdf#124176 Replace 3 include guards with #pragma onceGeorge Bateman
These are the include guards mentioned in tdf#124176 as not being compatible with an automated fix. Change-Id: Ia74453b7b96405ad36440dcd8e24759352bd15da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100092 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-03Make ImpSvNumberformatScan::GetColor constMike Kaganski
Change-Id: Idbcce18029944ab884cdde03e21190cbb574a00f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102005 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2020-09-03restore m_aModelChangeListenerCaolán McNamara
which disappeared, apparently by accident with... commit 56e1133f724896aec3f5b5c409fb5917a3b13eb4 Date: Sun Dec 8 19:33:42 2013 -0200 Convert chart 3D scene illumination to .ui and then a bunch of cleanups removed the unused code Change-Id: I53fe4f6878dda4f7b8d76a04213b5c6d1366a165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101917 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-02On double click on chart select the chart backgroudPranam Lashkari
Change-Id: I03fa26a6d88f1436bac00fef7867451378efa04a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101865 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-09-02tdf#136061 Chart ODF/OOXML: fix missing custom labelsBalazs Varga
by UNO extensions ShowCustomLabel in DataPointLabel.idl and CUSTOM in ChartDataCaption.idl, fixing OOXML/ODF import/export. We should display custom data label even if DataPointLabel is disabled (e.g. category name and/or value fields are not displayed). Note: import of the embedded chart of the DOCX unit test document uses also ODF format in the background, testing also the extension of the native file format. Change-Id: I73e21f1e69fddec9f3b4163c46b6582cd1c74b5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101640 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-01Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: I5beec4b326b7f59103de374dff8169718defc8ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101779 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-01Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: I8336c2a639a1d45c8370fd13204896f3f1494b4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101801 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-01Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: Ibaaa3bbce3f2d502073803035aaacdad07bb170c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101810 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-01Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: Icb950648977545c02ec8569f8b246359b33f8054 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101790 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-01Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: I8448ea8e50b38364913982010b106a51f7549911 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101797 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-31Fix typo in codeAndrea Gelmini
Move "grahic" to "graphic" It passed "make check" on Linux + Use "#pragma once" in include/svx/svxgraphicitem.hxx. Change-Id: Ia8a42afd1a822e19093ecee7b0b8791f96de2867 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101623 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-31tdf#134571 chart2, xmloff: add loext:custom-leader-linesBalazs Varga
new ODF chart series style attribute for saving not default (switched off) state of data labels in custom positions. Note: import of the embedded chart of the DOCX unit test document uses also ODF format in the background, testing also this loext attribute, i.e. the chart of the unit test document doesn't contain custom leader lines. Change-Id: Ia6b76e8d7fe5b6b6204761f3bbc2309f1b631008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101442 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-08-29Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: I935d0d0d6f33144702386d75b3a5bcc3675ae4aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101625 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-28Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann
This is a prerequisite for making conversion from OUStringLiteral to OUString more efficient at least for C++20 (by replacing its internals with a constexpr- generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount, conditionally for C++20 for now). For a configure-wise bare-bones build on Linux, size reported by `du -bs instdir` grew by 118792 bytes from 1155636636 to 1155755428. In most places just a u"..." string literal prefix had to be added. In some places char const a[] = "..."; variables have been changed to char16_t, and a few places required even further changes to code (which prompted the addition of include/o3tl/string_view.hxx helper function o3tl::equalsIgnoreAsciiCase and the additional OUString::createFromAscii overload). For all uses of macros expanding to string literals, the relevant uses have been rewritten as u"" MACRO instead of changing the macro definitions. It should be possible to change at least some of those macro definitions (and drop the u"" from their call sites) in follow-up commits. Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-27tdf#136105 tdf#134883 pie chart: improve data label positionBalazs Varga
Set the maximum text width of data point label shape based on the remaining space, when text wrapping is enabled and the label placement is OUTSIDE. Change-Id: I9132658e44886000c692efadaee4841c4d3ffc7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101317 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-08-24tdf#123218 tdf#108067 config key ReverseXAxisOrientationDoughnutChartTünde Tóth
for OOXML compatibility of newly created doughnut charts. The X axis orientation of doughnut charts is the opposite of the primary writing direction in LibreOffice but not in Microsoft Office. Default value is "true" to keep current behavior. Using "false", the inner and outer data series of new doughnut charts are the same, as after DOCX export. Change-Id: If431d5717e70599f07231bd673cd90c196450ae6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100417 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-08-20Fix typo in codeAndrea Gelmini
Change-Id: Ic9cc89e8b112e049594fb56a1641d36d082abbd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101006 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-18tdf#134563 Add UNO API for custom leader linesBalazs Varga
If its ShowCustomLeaderLines=true, data series uses leader lines for labels with custom alignment. Add also OOXML import/export of custom data series setting. Change-Id: I8e6f7cb457c38b84aa40c917e69704862262a96e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98323 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-08-18loplugin:unusedvarsglobalNoel Grandin
tackle some read-only vars. Mark some of them const to make it obvious they are not really used, and to make the constantparam plugin see more data. Change-Id: Ia25927745866746aa1aa9d5affd5857ad9f9ee24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100895 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14loplugin:simplifybool moreNoel Grandin
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14rename xmlnmspe -> xmlnamespaceNoel Grandin
Change-Id: I8fdf9833dede6f4c9ba4bbb76b9ab9b6b419f155 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-13use OUStringLiteral in SfxItemPropertyMapEntryNoel Grandin
Change-Id: I4f05b6a35010e661ea77f3e4b83302d2ec74d227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100405 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-13loplugin:stringstatic also look for local staticsNoel Grandin
Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-07Fix typosAndrea Gelmini
Change-Id: Ic28a1cdc779af9438555acd3bf85312e5e244fe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100336 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-06tdf#135184 add linecaps in chartsRegina Henschel
Chart is currently not able to interpret property linecap. But in case of linecap 'round' or 'square', line dashes lengths are adapted so that they look same as in MS Office (tdf#134053). This does not work, if the corresponding linecap property is not interpreted. Dashed border of data labels is not fixed because of bug tdf#135366. In addition I have fixed errors in prstDash detection, which I have noticed while creating unit tests. The unit tests cover file text, not visual appearence. Change-Id: I8cf2d2b2fc0923c2882f8148b4550bc363270480 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99562 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2020-08-03tdf#42949 Fix IWYU warnings in include/[t-x]*/*hxxGabor Kelemen
Recheck after 7-0 branchoff Also drop the now unused file include/vcl/field.hxx Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9e54c82f50d1e02a0f99858939cac999fc66f7de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99261 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-27tdf#134866 Chart OOXML import: fix percentage in custom pie chart labelTünde Tóth
Custom pie chart label showed incorrect percentage value. Follow-up of commit 8c1dc30cc9fc96ef3d3ab0c4445959473248ae4d (tdf#125444 Percentage as custom chart label). Change-Id: I2fe9cbca876da26a7c3a371c1e711b9e1fc33b1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99353 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-22merge duplicate GetFocus implementationsCaolán McNamara
Change-Id: Ifc2e3fab6dacb3b0bca74c0584c16170b8b97de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99234 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-22chart2: clean-up redundant ShapeFactory::createText()Tünde Tóth
It's needless since commit 9eb614f8d2d9cc983c51bcdde211ee0c59c3a96c (tdf#134659 chart2: use centered label alignment at text break). Change-Id: I8607cf1c85e13152bab2543a7970a77f9c72db6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98946 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-16compact namespace: chart2Noel Grandin
Change-Id: I3c9f42b2fc40d65e573a668ed7c4eb88dc64d22b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98904 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-15tdf#134659 chart2: use centered label alignment at text breakBalazs Varga
instead of left for axis labels broken into several lines. Change-Id: Iaf516055748189fa50165f0e954dfe0db15bbfb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98413 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-13tdf#134676 Chart OOXML import: fix X axis title widthTünde Tóth
Set length of the horizontal axis title box is about to 80% of the length of the chart area, to avoid of collision of axis titles, like MSO does. Change-Id: Ie01308e2ddc8c1c4d19f812231ede21ff939cb98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98484 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-13tdf#122014 Chart OOXML import: set chart title alignment to centerTünde Tóth
Regression from commit: d4190685ac208677bc77f66976287dda0360c42d (tdf#114836, only set changed SfxItemSet properties) Change-Id: If33fa39019bbd36632d15eb3cc0606727e58b111 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98241 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-09cid#1465238 Uninitialized scalar fieldCaolán McNamara
Change-Id: Ia0ffb4bad265aabe396ef94e3d9c2bbe79993b4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98405 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-09tdf#134225 Chart view: fix moved date labelBalazs Varga
outside from pie chart. Do not need to check the sector size of a pie slice, before best fit algorithm, so we can use the CENTER position as a start position of BEST_FIT. Completion of c66cb6d6e4a843dc7c7d06e1c2c0723a6ff85fc5 (tdf#134029 Chart view: enable to move data label) Change-Id: Ie1a53784e7df2887282155113bf8bb607cdb09e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96945 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-07tdf#134603 [en|dis]able logic reversedCaolán McNamara
Change-Id: I192b7a6da4bcd311e64a31d9dc2b4c2b422194cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98266 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-07tdf#134146 Chart OOXML import: break long horizontal Y axis titleTünde Tóth
Workaround to handle long (near) horizontal Y axis titles, like MSO does. See commit 17f131fcb3f534792a3b2ec6048d03fb54b55eb1 (tdf#134235 Chart OOXML import: fix long chart title). Change-Id: I215aaa8e2ca18920e2b7ca5761c5bed7e8d19663 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97631 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-07-06weld DbNumericField itemCaolán McNamara
Change-Id: I96b7945cdf9f00c3d0a4e043ee77666e19c8a072 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97896 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-05adjust FormattedSpinButton to be driven by an EntryFormatterCaolán McNamara
so we can have the same backend driving the FormattedSpinButtons as a FormattedEntry Change-Id: I07a472315a04787eb5fcf992cde8f758af742156 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97860 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-02weld FormattedControlCaolán McNamara
by using the newly split out Formatter to do the number formatting but input/output to/from a weld::Entry Change-Id: Ic9e619dc5d1ed2fae87e2d89a40dc51f3881468f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97660 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-01weld EditControl for browseboxCaolán McNamara
Change-Id: I8f21c12f7ee10e1b9ba883a8ff01bb5252429f09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97353 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-07-01sw doc model xml dump: show SdrModel of embedded chartsMiklos Vajna
Change-Id: Iae9daefb9b2173736c039d6177d7356c27eb7a33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97605 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins