summaryrefslogtreecommitdiff
path: root/reportdesign
AgeCommit message (Collapse)Author
2022-05-12speed up simple use of NamedValueCollectionNoel Grandin
where instantiating and allocating a whole map just to extract a single key is way inefficient Change-Id: I55248bc71a9e8826cab9b76fa6916bfa888efa0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134226 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-10tdf#147590 update OLE object after document refreshJuergen Funk
Regression from b099da78a6f0b3e120f706714003b05d84d11e70 we didn't update linked OLE document after document reload Change-Id: I8e52f6430f454b276cb43449c6f7a3b0e07e909f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130692 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Tested-by: Jenkins
2022-05-05use more o3tl::getTokenNoel Grandin
found by inspecting call sites of OUString::getToken Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Just use Any ctor instead of makeAny in reportdesignStephan Bergmann
Change-Id: If8b6f8f7facf36f740b2e1773e923e28d8c85552 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133792 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03add o3tl::equalsAsciiNoel Grandin
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-01use more string_view in variousNoel Grandin
found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-20loplugin:passstuffbyrefNoel Grandin
Change-Id: I336fd329b577b6fa141265d8bc7ce67784bd7306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-10use more string_viewNoel Grandin
found by tweaking the loplugin:stringview and making it whitelist getLength Change-Id: Ic15d3703d1fb07658e99e1db1c89e2fa5bc70c19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132771 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-31Resolves: tdf#117159 don't crash with chart selected in database report editCaolán McNamara
Change-Id: I770008bf0a775c108019c2005b6ec73ee9702a19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132337 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-30Related: tdf#117162 use a marginally tidier but riskier fix for trunkCaolán McNamara
Change-Id: I94a836d7424eb561af623fee9d3a7e6d307cf065 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132287 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-30tdf#117162 ImportDocumentHandler expected XDocumentHandler argumentCaolán McNamara
but SvXMLImport not longer supports XDocumentHandler since commit fe2b4e7dc6533535736a8f08496f316427386179 Date: Tue Oct 6 18:27:27 2020 +0200 make SvXMLImport fast-parser only here use a SvXMLLegacyToFastDocHandler to try and glue the two parts together again. Though the use of reflection::XProxyFactory is a bit worrying here wrt this change so unforseen side effects are possible. Full change over to fast-parser only is probably advisable. Change-Id: Ie14d1d9fa8534c187efc67a6c1cc0989316c4634 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132285 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-11loplugin:constparamsNoel Grandin
Change-Id: I5f184f93dbdb414514855c85c9dc1624e7ec8636 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-10tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macroGautham Krishnan
Change-Id: If35c679839b39a01e474f7b0b0abee570e85bdd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130798 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-01use SfxItemSet::GetItemIfSet in desktop..reportdesignNoel Grandin
Change-Id: Iaa0ddf4e97866d537a478e668e3c651a9eabc465 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-25Advanced Diagram support: cleanup/consolidate with existing codeArmin Le Grand (Allotropia)
Reorganized and streamlined, use IDiagramHelper as main interface now also for existing code. Had to adapt oox::Shape && Diagram handling since there the import gets handled very different. This ensures that a Diagram is detected at export and that the same happens for now as before Had to add a detection that resetting the GrabBag is meant to disable the Diagam functionality. That is very indirect, but has to stay for compaibility reasons for now Change-Id: I620b7d61cd84b5f9dd8ae4dc890ebf70ce779cdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130389 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-02-23SdrLayerID must be based on sal_Int16Mike Kaganski
... which is the type corresponding to the related published property "LayerID" of com.sun.star.drawing.Shape service. Without this, the code asserts on values passed to the published API from external sources to be in the 8-bit limits, which is incorrect. Change-Id: I0449a7dd313f7e6c4adbc1c1f7b8c50b6a51434e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121760 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-11svx::PropertyChangeNotifier improvementsNoel Grandin
(*) rename the enum to make it's purpose more obvious (*) remove the enum header - it belongs to this class, no need to have it somewhere else (*) return property name by const&, no need to copy here (*) use a o3tl::enumarray instead of a std::unordered_map - there are only 3 entries here, and two of them are ALWAYS used, so just flatten the data structure. Change-Id: Ic496bd5220d55be1209a3243c095d461df0a02ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129788 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-08 Simplify sequence of PropertyValue in linguisting/reportdesign/sc/sfx2Julien Nabet
Change-Id: Icd19a46f59e7b4e9ef4062354c5d066382ea8ade Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129644 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-04add toId/fromId to tidy up some ugly castingCaolán McNamara
Change-Id: I70f34ac5e9b5d2f2d6c0375e823908eaa2e540b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-30Recheck modules [o-r]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I6b4b05a5e59b256653c4caf5297fffd601b45083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128845 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-29used TypedWhichId in the constructor of various svx *Item classesNoel Grandin
to act as an extra check that we have the association of Item and TypedWhichId annotations correct. (*) requires that I add an upcasting constructor to TypedWhichId (*) Make the field dialog stuff in writer use a new item id FN_FIELD_DIALOG_DOC_PROPS instead of abusing the existing SID_DOCINFO Change-Id: Ica4aea930c80124609a063768c9af5a189df1c27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-22Use o3tl::convert instead of OutputDevice::LogicToLogicMike Kaganski
Change-Id: Ifb7be992c6e951692a741d10ed24ec8b3836982a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128782 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-07remove E3D_INVENTOR_FLAG and convert SdrObjKind to scoped enumNoel Grandin
We don't need E3D_INVENTOR_FLAG, we can just check if the SdrObjKind is in the right range. Which exposes some dodgy code in DrawViewShell::GetMenuStateSel SfxItemState::DEFAULT == rSet.GetItemState( OBJ_TITLETEXT ) || SfxItemState::DEFAULT == rSet.GetItemState( OBJ_OUTLINETEXT ) || which has been there ever since commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b Date: Mon Sep 18 16:07:07 2000 +0000 initial import just remove that. In SwFEShell::ImpEndCreate() move some logic around to avoid using an out-of-range SdrObjKind value Change-Id: I4620bfe61aca8f7415503debe3c84bfe5f4368a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-22loplugin:flatten in package..reportdesignNoel Grandin
Change-Id: I2da242fcb59709ebdd0819ec04d051d794da71e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-20sd theme: allow setting the color's theme index in the chardlgMiklos Vajna
This routes not only the rgb color and a name, but also a theme index from the color picker to the chardlg (only there as a start). That way the picked color will be updated if the master page theme changes. Change-Id: I7a45d7cf63c7c36013e4656c66d9b2dbc3aa0b88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127135 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-12-18remove some unused definesNoel Grandin
Change-Id: Ieeba8b55451dffa768d6bcc7f24dd33bd19c2a15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-10merge setUnoShape and impl_setUnoShapeNoel Grandin
since the one purely forwards to the other Change-Id: I5f614cc1eb819572a55da57d9d6c9ae56b9139c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126608 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-04use more OUStringLiteral in reportdesignNoel Grandin
Change-Id: Ic5b7ab4cf672a964c3f74570a9ec4191b20372ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-04loplugin:stringliteraldefine in reportdesignNoel Grandin
Change-Id: I9e685bb6650517a6f73b6978e448b4fc0242e2ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126307 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-03replace comphelper::OListenerContainer with OInterfaceContainerHelper3Noel Grandin
OInterfaceContainerHelper3 is in wide use and can do the same thing with less ceremony Change-Id: I5252738d6b7bda6245c66da46352944ead79bd52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126271 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-03loplugin:stringliteraldefine in xmloffNoel Grandin
Change-Id: I9216c18d3ba4a4a528a49198fdfe547a66c06b6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126284 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-27use more OInterfaceContainerHelper3 in reportdesignNoel Grandin
Change-Id: I742f8a684bb689af8593c3ad5d8918b30c6a7ab1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-15add a rule to enforce always-show-image of True if an image is usedCaolán McNamara
If not set, then gtk3 will show the image if there is no text, but only the text if there's an image. For simplicity sake just enforce it as true if an image is referenced. Change-Id: Id4bb9140ba83e7e07e0d8ec5e3c29aece49b9087 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125200 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-15tdf#145323 reportbuilder Moving a field corrupts the fieldNoel Grandin
regression from commit 09cb778b6eb7d3a5b9029965a1320b49c90e7295 clean up SdrObject cloning Change-Id: I7f234dee1dca704195eeebba874c80e73c7abe91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125196 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-12simplify construction of XMLPropertyMapEntryNoel Grandin
so we don't have to pass in the size of the string literal. This is mostly a preparatory change, to make an another patch of mine less noisy. Change-Id: Idafcd68586b8b465e63dc89e4a4180d2e70ac3a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-07return XShape from SdrObject::getUnoShapeNoel Grandin
instead of XInterface, to make it obvious what the reality of the requirement is Change-Id: Icdd4113f2a0ece930305f4d8ba010b81d24f43c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124802 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-04elide unnecessary UNO_QUERY_THROW callsNoel Grandin
Change-Id: I0d0fc57f352e9717e721416c8941cfcf48af24c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-03loplugin:finalclassesNoel Grandin
Change-Id: I10ff73f89c965beb3cfb5fc3a40dd959d8f77aaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124600 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-02Drop char*-based API from NamedValueCollectionMike Kaganski
Change-Id: I87f339b348580e256a8d65470ad15cbdabf2c9dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124609 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-31uniformly allow focus into GtkToolbarCaolán McNamara
Change-Id: I110daf882d9196cf7552e43a157ba4ae73fd670b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124458 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-31gtk[3 vs 4]: remove can-focus from GtkToolButtonCaolán McNamara
so tab-cycling inside sidebar panel toolbars works as wanted It needs to be false for gtk3 and true for gtk4, leaving it unspecified gets a desired working default. Change-Id: I34869d5dcffc814f62ec2b717108f90c395a067b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124446 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-30Prepare for removal of non-const operator[] from Sequence in reportdesignMike Kaganski
Change-Id: I7631aeb90bf224ba7a00025df6e3fa444b216a42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124380 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-29simplify framework::TitleHelperNoel Grandin
Every callsite (bar one) calls setOwner and connectWithUntitledNumbers after construction, so just pass them in the constructor. And for that lone callsite we can just nullptr as an argument. Change-Id: If838e068bb59a407225d853a0f67983be400f2f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124426 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-26Replace macros from reportdesign/source/ui/inspection/metadata.cxxJulien Nabet
Change-Id: I779b6a20b814815b480876d8e65ef6b8e80f9443 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124241 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-22Revert "Simplify vector initialization in reportdesign"Julien Nabet
since it needs 2 allocations instead of one This reverts commit ac10792ed4ca8d92f60c95ab4acd5b911e42cec7. Change-Id: I5b07664b7930ae1a04a6f755ddbe5ef56a880f56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124071 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-22Optimize assignment from OUStringLiteral to OUStringStephan Bergmann
...by making the OUString's pData point to the OUStringLiteral, instead of copying the contained characters. This is one of the improvements that had not been done as part of e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString": "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." (Simply dropping the OUStringLiteral overload was not possible in this case, though, as that would have lead to ambiguities among the various OUString and std::u16string_view overloads.) The now-deleted OUStringLiteral rvalue reference overload means that some existing assignments from ternary-operator OUStringLiteral<N> to OUString no longer compile and had to be replaced with uses of std::u16string_view. Those had not already been replaced in e6dfaf9f44f9939abc338c83b3024108431d0f69 because they happened to use OUStringLiteral instances of identical length N in both arms of the ternary operator, so did not already start to fail to compile back then. Change-Id: I328e25b8324d045774e811d20a639f40d6a9a960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124040 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-16Simplify vector initialization in reportdesignJulien Nabet
Change-Id: Ic1927155b23f056fc1117b7726ab4b2eff8a6da3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123690 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>