summaryrefslogtreecommitdiff
path: root/chart2/source
AgeCommit message (Collapse)Author
2020-12-17tdf#136816: fix hidden legend entries in "Column and Line" chartsTünde Tóth
Regression from commit: 300e65cc47f3d6ae1563350757dbfadc080d7452 (tdf#123268 fix lost chart if all legend entries are hidden) Change-Id: Id59cd8d681dada123feadbe7910be7fbc7ec37f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107757 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 1eb25c11500a235aa141a327a5489f6861e60a89) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107802 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-12-11check that extraction succeededCaolán McNamara
Change-Id: Ie03215ee43c885948261b6df4e8d1f23a4dd1a4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107551 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-24tdf#138181 Chart OOXML: fix deleted legend entries of pie chartsTünde Tóth
The legend of the pie chart showed deleted legend entries too when VaryColorsByPoint was false. Change-Id: I6fc978af0db6e2d39d7f451e765d7ef81c73a05c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105943 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 3be5e428d669accd841949662d601a6f6e1cdb3f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106443 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-23tdf#134059 Always include hidden cells in chart series labelOuyang Leyan
Change-Id: I92ff60b26af713a49fefd8b2ce8042f4e8e4d179 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106317 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit fd5f3b212a38ec6ef35d2686ce5a7cc39cb7d377) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106240 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-22tdf#123936 Formatting files in module chart2 with clang-formatPhilipp Hofer
Change-Id: Ie4dea73190040e5716fe531cf35fae20d7e175db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105650 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-18Clarify signature of some opertor() that must match ColorSelectFunctionStephan Bergmann
Change-Id: Ibb71d1e993bbb0fa453c59f48ab5f7c79e1d8025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106036 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-17tdf#138204 Chart OOXML Import: doesn't show placeholderBalazs Varga
for CELLRANGE data label field type. Add CELLRANGE to enum com::sun::star::chart2::DataPointCustomLabelFieldType, like we do at CELLREF, while both of them are not implemented, see commit 790f9abeb1a1167ad5ab84c5fb855b36669c125b (tdf#114821 import complex data labels in bar chart). Regression from commit: 0d2340998415fb4b2f794054c62ef61c83e32155 (tdf#136061 Chart ODF/OOXML: fix missing custom labels) Change-Id: I8e0f4ca9db6e613a190cbda31504a7542fc13a86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105934 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-17tdf#138018 don't show leader lines inside pie chartTünde Tóth
Show leader lines to data labels in custom position only outside of pie chart, as intended. Change-Id: I87dee2d33f4f876ffca208f69a069e1f0bcee688 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105920 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-14Fix typoAndrea Gelmini
Change-Id: Iea4c4b35f4e658bffcfcac8ee933fbd96f7448f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105833 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-11-13Sidebar tdf#92768: Fix title & subtitle checkboxes on the ChartDeckMuhammet Kara
Turns out the 2nd part of tdf#92768 was not implemented yet, so it is still necessary to remove the title/subtitle for good, otherwise we set the "Visibility" property, but nothing actually reads that when rendering. So the titles now work as they did before the regression. An uncheck action removes the title/subtitle, and a check action just makes the existing title/subtitle visible or creates a new one if it doesn't exist Change-Id: I23122d1be2d95af878b824ba194bd1aeed5f4f89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90692 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105737 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-11-13chart2: Add the possibility to edit title & subtitle from the sidebar.Jan Holesovsky
Change-Id: I4be15acbc2127ebb6eca8864a0209ba57b488100 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104313 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105736 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-11-12New loplugin:stringviewparamStephan Bergmann
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-12tdf#137874 Chart OOXML import: fix pie chart legend entriesTünde Tóth
Pie chart legend changed when VaryColorsByPoint was false. Change-Id: I8022e5290f2269a902b4417f91d2e454f088c553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105172 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-11loplugin:stringviewNoel
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11lok: Add posibility to change chart fill gradientSzymon Kłos
Change-Id: I942d478cd870036710390d2c03413b6fc0454038 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103619 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104808 Tested-by: Jenkins
2020-11-10tdf#133630 Check object type when updating side panel dataOuyang Leyan
Change-Id: I033b4c7fb1dc1787d28caf5b925ed45bbb63cf06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102544 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-11-06make SdrObject Identifiers SdrObjKind enum membersCaolán McNamara
with unique values so that, e.g. if (pObj->GetObjIdentifier() == OBJ_LINE) is only true if pObj is a SdrPathObj and not a E3dScene Change-Id: I30c91e57eb27141390c644dec42e2a4bee96edf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105374 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06tdf#42949 Fix new IWYU warnings in directories c*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iac1e7802dbe1efa01c2befdd10406231788d4fc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105315 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-01use officecfg for Experimental flagNoel Grandin
move IsShowOutlineContentVisibilityButton out of header to avoid having to add extra include paths to all the unit test makefiles. Change-Id: I2763390e07cd85b8f09b6f2ad7702039daecb22f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105100 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-30convert some tools::Long->sal_Int32Noel
in places where it is obvious we only need a sal_Int32, because we are dealing with rows and columns, and not even calc needs more than 32 bits for that. Change-Id: I114417e639c224d45bfd9fc6838122ab195eefa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104584 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-27Fire selection change event before sidebar is unregisteredSzymon Kłos
Prevent us from crash in online using mobile phone when leaving chart edit mode with chart type modified. Change-Id: I8da70612786141a2c92b55a45822ef8ff5713e5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104606 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-10-26tdf#137505 OOXML Import: Custom shape in chart: fix font sizeBalazs Varga
The default font size of text in shapes is 12pt in LibreOffice, nevertheless, we used 24 pt for font size in custom shapes inside chart objects during ooxml import. Change-Id: I69d02374bc4b4781e2ca617913c642999b3d5fa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104429 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-21use tools::Long in basegfx..chart2Noel
Change-Id: Ide4014348d51f0b5f59e1e91b8d41c7748853254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104608 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20cid#1468269 Uninitialized scalar fieldCaolán McNamara
Change-Id: I4457019570571c810265bf721cdefb0bdd65dd7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104551 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-19tdf#134121 pie chart: add leader linesTünde Tóth
to data labels with custom position. See commit 769433ad93040bc81f06672c8a2c01e2b76fece3 (tdf#90749 chart: add leader lines to custom data label positions) Change-Id: If5d912cc04993e59bd5ab93b644ea49ba8642b49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104410 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-19tdf#137154 pie chart: improve Outside position of data labelsTünde Tóth
Some pie chart data labels were too close to the pie with Outside placement. Change-Id: I0eecdfc32601bdfa8bb3115183f9ca723a9f945b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103683 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-16chart2: use the fastparser API when possibleNoel
part of the process of making SvXMLImport fastparser-only Change-Id: I9fd7dbcc8b5c345f7e86bc06b1b898b7d39f36da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-09tdf#134978 Chart OOXML Import: fix pie chart label custom positionTünde Tóth
Follow-up of commit dff7a46fb46d1fa2a3ad674ee493ae2d59150fe3 (tdf#130032 Chart OOXML Import: fix data label custom position). Change-Id: Iaaf4ae654ac0c1b4896a53be6034e6c027412df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102981 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-06loplugin:const* make some params and methods constNoel
Change-Id: Idec482c21c270912f9bcaeb980077c1616f67c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-06move set_user_managed_scrolling to an initial weld argumentCaolán McNamara
gtk is creating a11y objects on widgets changing parents so manage when that can happen to avoid premature creation of custom widget a11y objects Change-Id: I4879a93a897b2e4084cf6af0c9c0b0f0c1062254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104025 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-06lok: Add posibility to change chart fill colorSzymon Kłos
Change-Id: I519a0fe15c4983803109aed7eef840d36a5e7b21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102920 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103141 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-10-06Use default diagram page selection for chartsSzymon Kłos
Change-Id: I0bf0e5d2d1ef43a61c1bb723b25bafa30b5ad5c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103602 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104013 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-10-02tdf#137116 pie chart: improve BestFit position of data labelsTünde Tóth
Regression from commit: 2e1a1054a4a98415057e72269ace9db075d3b191 (tdf#136752 pie chart: improve data label position) Change-Id: I66943684957a220c81db7f928fbb47700b78d012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103610 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-02tdf#137165 chart2: fix label position in Position and SizeBalazs Varga
dialog window. Follow-up of commit 4223ff2be69f03e571464b0b09ad0d278918631b (tdf#48436 Chart: add CustomLabelPosition UNO API property). Change-Id: Ie676af7b9438b928041a404fb1efac6919b30030 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103750 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-01loplugin:reducevarscope in canvas,chart2Noel
Change-Id: I6c73e609cc8ce0ed9cf0f5a6b68c6e299bf26a44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103761 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-28Removed duplicated includeAndrea Gelmini
Change-Id: I0eb3ea540270dd2200c957762139c68eaedd9fd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103538 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-09-28rename for disentangling AA and B2D use in VCL drawingLuboš Luňák
This renames AntialiasingFlags::EnableB2dDraw to just Enable, and the AntiAliasB2DDraw names to just AntiAlias. This is in preparation for a second commit that will actually separate the AA and B2D functionality of these flags. Change-Id: I9cc215c5752dfabce41e00e19d9074fc8dc3d4de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103416 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-09-28tdf#108059 Introduce compatibility key for pie chart orientationKelemen Gábor
There is no similar setting in MSO, it just always uses clockwise. LO on the other hand confuses users by using counterclockwise which turns to clockwise upon save to OOXML and reload. Eliminate this behavior by introducing a compatibility key for OOXML-heavy environments that: - sets the orientation to clockwise when pie chart type is selected - hides the checkbox that would have no effect after a save to OOXML Default value is false to keep current behavior Change-Id: I9e12ecad8e9978f960c921a521461aee023a5063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/82524 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: Balazs Varga <balazs.varga991@gmail.com> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-28Fix typo in codeAndrea Gelmini
Change-Id: Ifab76c880b1802740689704f929858b261e1f5bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103488 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-24Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: Icf1d8dae0f357aabeeda70f8c059e4cbf785df89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103309 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-09-24tdf#136402 Chart View: remove custom label textBalazs Varga
Now Delete Data Labels and Insert Data Labels local menu options remove custom label text instead of keeping it. See with unit test document custom_data_label.xlsx of commit bcda268cde1f8408c2066ce985acedfce3e3bc2e (tdf#134977 Chart OOXML: fix import of custom data label). Change-Id: Ifc7afd0f2ece9da528e6206a6bd393b394b36f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101929 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-23Fix typoAndrea Gelmini
Change-Id: I29de3e8483f3a6921bdf3d402fd10d0d587da2c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103250 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-09-23tdf#136752 pie chart: improve data label positionTünde Tóth
to avoid chart distortion. Set the maximum text width of data point label shape based to the 80% of the remaining space, when text wrapping is enabled and the label placement is AVOID_OVERLAP. Change-Id: I174089ec62df3aa21b5d1f26f74d475945d83684 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102744 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-22OUStringLiteral/OStringLiteral coverity PARSE_ERROR workaroundCaolán McNamara
do more like commit 121771e37f7e2de41cd5643475861062bf25627b Date: Mon Sep 21 09:17:54 2020 +0200 Make some OUStringLiteral vars constexpr cause coverity can live with that Change-Id: I9efd7f848289c4865997a44c6780373068422227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-22cid#1467075 silence Unchecked return valueCaolán McNamara
Change-Id: I77809ff271004a216131f26a26696d5717877a8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103145 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-20cid#1466912 silence Unchecked return valueCaolán McNamara
Change-Id: I5d8ef4a52f0aeef9012445a382aa472bd69ec925 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103069 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-18tdf#136267 OOXML Chart Import: create main category axis labels onceBalazs Varga
because InternalDataProvider can not handle different category names on the primary and secondary category axis. Revert e0b0502516a10181bbd1737b93b38b2bba4c98e8 commit, except the relevant unit test. Regression from commit: e0b0502516a10181bbd1737b93b38b2bba4c98e8 (tdf#128016 Chart OOXML Import: fix duplicated category labels) Also fix tdf#129994 (FILEOPEN - hang at import time), which is a a regression from commit fa0a981af41a2606541eec1cb20a379a739691e0 (tdf#114166 DOCX chart import: fix missing complex categories) Change-Id: I5d049e760eb1a647ea774be264349a2f16f15f5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102463 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-09-17tdf#133482 don't increase dialog width when new columns addedCaolán McNamara
gtk will expand to fit all children, while vcl will clip. insert a borderless ScrolledWindow with "external" scrolling to allow the dialog to clip the children (same thing we do for our menubar to shrink down past its natural size) adjust the width calculation to avoid logictopixel rounding Change-Id: Id2e4f92959f1827c6960360d1530a9c63a4d0c00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102972 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-16Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uStringStephan Bergmann
...from which an OUString can cheaply be instantiated. This is the OUString equivalent of 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String". Most remarks about that commit apply here too (this commit is just substantially bigger and a bit more complicated because there were so much more uses of OUStringLiteral than of OStringLiteral): The one downside is that OUStringLiteral now needs to be a template abstracting over the string length. But any uses for which that is a problem (e.g., as the element type of a container that would no longer be homogeneous, or in the signature of a function that shall not be turned into a template for one reason or another) can be replaced with std::u16string_view, without loss of efficiency compared to the original OUStringLiteral, and without loss of expressivity. The new OUStringLiteral ctor code would probably not be very efficient if it were ever executed at runtime, but it is intended to be only executed at compile time. Where available, C++20 "consteval" is used to statically ensure that. The intended use of the new OUStringLiteral is in all cases where an object that shall itself not be an OUString (e.g., because it shall be a global static variable for which the OUString ctor/dtor would be detrimental at library load/unload) must be converted to an OUString instance in at least one place. Other string literal abstractions could use std::u16string_view (or just plain char16_t const[N]), but interestingly OUStringLiteral might be more efficient than constexpr std::u16string_view even for such cases, as it should not need any relocations at library load time. For now, no existing uses of OUStringLiteral have been changed to some other abstraction (unless technically necessary as discussed above), and no additional places that would benefit from OUStringLiteral have been changed to use it. Global constexpr OUStringLiteral variables defined in an included file would be somewhat suboptimal, as each translation unit that uses them would create its own, unshared instance. The envisioned solution is to turn them into static data members of some class (and there may be a loplugin coming to find and fix affected places). Another approach that has been taken here in a few cases where such variables were only used in one .cxx anyway is to move their definitions from the .hxx into that one .cxx (in turn causing some files to become empty and get removed completely)---which also silenced some GCC -Werror=unused-variable if a variable from a .hxx was not used in some .cxx including it. To keep individual commits reasonably manageable, some consumers of OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat odd state for now, where they don't take advantage of OUStringLiteral's equivalence to rtl_uString, but just keep extracting its contents and copy it elsewhere. In follow-up commits, those consumers should be changed appropriately, making them treat OUStringLiteral like an rtl_uString or dropping the OUStringLiteral overload in favor of an existing (and cheap to use now) OUString overload, etc. In a similar vein, comparison operators between OUString and std::u16string_view have been added to the existing plethora of comparison operator overloads. It would be nice to eventually consolidate them, esp. with the overloads taking OUStringLiteral and/or char16_t const[N] string literals, but that appears tricky to get right without introducing new ambiguities. Also, a handful of places across the code base use comparisons between OUString and OUStringNumber, which are now ambiguous (converting the OUStringNumber to either OUString or std::u16string_view). For simplicity, those few places have manually been fixed for now by adding explicit conversion to std::u16string_view. Also some compilerplugins code needed to be adapted, and some of the compilerplugins/test cases have become irrelevant (and have been removed), as the tested code would no longer compile in the first place. sal/qa/rtl/strings/test_oustring_concat.cxx documents a workaround for GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878> "Failed class template argument deduction in unevaluated, parenthesized context". That place, as well as uses of OUStringLiteral in extensions/source/abpilot/fieldmappingimpl.cxx and i18npool/source/localedata/localedata.cxx, which have been replaced with OUString::Concat (and which is arguably a better choice, anyway), also caused failures with at least Clang 5.0.2 (but would not have caused failures with at least recent Clang 12 trunk, so appear to be bugs in Clang that have meanwhile been fixed). Change-Id: I34174462a28f2000cfeb2d219ffd533a767920b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102222 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-15tdf#133227 chart UI: option to hide leader linesBalazs Varga
between data points and displaced data labels of a data series. Follow-up of the following commits related to the new UNO property ShowCustomLeaderLines for data labels: commit e2f4e65a7b8024c00b049eebf0d87637efda7f24 (tdf#134571 chart2, xmloff: add loext:custom-leader-lines) commit 5d67d70b26706ce8a08612c12a68821f984210a2 (tdf#134563 Add UNO API for custom leader lines) Change-Id: Id8a953b16ff737ca924c0c2c3241fba4e3ac904b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102221 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>