summaryrefslogtreecommitdiff
path: root/reportdesign/source/core
AgeCommit message (Collapse)AuthorFilesLines
2024-04-09tdf#146619 Drop unused 'using namespace' in: reportdesign/Gabor Kelemen3-5/+0
Change-Id: Iaf246112014d5b5da751570ca55a179232a1e9d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165692 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-02-12ITEM: ItemPool Rework (I)Armin Le Grand (allotropia)1-1/+0
Driving forward the Item reworks I now take the ItemPool in focus: It now does not hold any items anymore and should be renamed to something like ItemInfoProvider/ItemHelper, since it's main purpose is to provide the Defaults for the Item functionality. There is that SfxItemInfo, only a struct and bundling SlotID and ItemFlags. There are also the DefaultItems, just handled as ptrs in an array. It is/was always error-prone to keep these in sync. Remember that it's also necessary for the order to not only being sorted but being increments of one with no gaps allowed in the WhichIDs to which the Items are bound. I now bundled that to a new class ItemInfo that joins WhichID, SlotID, ItemFlags and the default Item. This is a pure virtual base class, it comes in three derivations: (1) ItemInfoStatic: This is supposed to be global static and hosts the Item in a std::unique_ptr to ensure cleanup. It is designed to be constructed once during runtime and being shared globally. It allows the ItemPtr to be nullptr to mark as non-static (if initial static is not possible for some reason) but still offers the needed data. Most cases (95%+) are of that case. The contained Item is owned by that instance. The flag isStaticDefault() is set at the Item. (2) ItemInfoDynamic: This is supposed to be used for cases where the Item cannot be static: Mainly for SfxSetItem (that needs a Pool itself in the contained SfxItemSet, so lifetime is bound to that Pool), but other cases showed up in the transition. These instances live while the Pool lives and get destructed when the Pool goes down. Also uses std::unique_ptr for the Item instance for as much automated cleanup as possible, the contained Item is owned by that instance, the instance by the Pool. The flag isDynamicDefault() is set at the Item. (3) ItemInfoUser: This is used for UserDefaults that can be set for every ItemInfo entry to 'overshadow' the default from the 'outside'. It uses a regular Item and the central access methods implCreateItemEntry/ implCleanupItemEntry to manage the Item instance, thus works like a SfxPoolItemHolder. The Item instance can be globally shared and re-used even when the Pool goes down. Instances belong to the Pool and are cleaned up when the Pool goes down. This Item does not need any further flag to be set. The ItemInfos are organized using a class called ItemInfoPackage: This bundles groups of ItemInfoStatic to functional instances. There are derivations/ implementations of this e.g. for Writer ItemPool bundling all the needed defaults for Writer, similar for draw/impress, Calc and other usages. These ItemInfoPackage can be 'registered' at an ItemPool using it's method registerItemInfoPackage. This does all the needed stuff to setup that group of ItemInfos at the Pool (It even sets internal vars First/LastWhich, that info can just be derived from the buildup ItemInfo Ptrs). The ItemInfoPackage has methods 'size()' and 'getItemInfo(index) to allow looping over it and deliver the infos the Pool needs. The (forced, pure virtual) overloads of getItemInfo in the specific implementations check for the ItemPtr being nullptr and create a exclusive incarnation of ItemInfoDynamic for the Pool if needed, returning that. The Pool owns the ItemInfoDynamic incarnations and uses the ItemInfoStatic directly. On shutdown it cleans up the ItemInfoDynamic as needed. The ItemInfoUser is used by the Pool when a UserDefault is set/used: for SetUserDefaultItem, GetUserDefaultItem, ResetUserDefaultItem. It is not held in a 2nd list, but directly in the list of ItemInfo'ptrs: To keep track of this an unordered_map is used that helds the original ItemInfo associated with the WhichID. That way no two lookups (as before) are needed to get the current Pool's default for any WhichID. The derivations of ItemInfoPackage are encapsulated and just allow access to an ItemInfoPackage& with a single method as return value. All use a static local instance of a std::array<ItemInfoStatic, FIXED_SIZE> which constructs all ItemInfoStatic and the static Item instances - if already possible. Sometimes it is necessary to overload the constructor to set some static instances for Items later than the lib init. These are also just marked with nullptr as Item instance. Some need to overload getItemInfo to complete instances of ItemInfoStatic, if needed, or create and deliver instances of ItemInfoDynamic. The registerItemInfoPackage also offers a optional lambda callback: there were two cases where local data from the Pool was needed to incarnate the item - just add that to the call to registerItemInfoPackage if needed, see examples in the adapted code. For the re-use of Items this means that now in SfxItemSet/SfxPoolItemHolder *true* static Items can and will be used without RefCount directly and globally. This is also the case for dynamic Items, with the exception of differing Pools for SfxSetItems which cannot be done. Future: That design is already prepared to allow solving that Pool-chaining problem: currently there are master/sub-pools and all accesses have to traverse that structure before even doing anything. For the future the idea is more to 'compose' a Pool by registering ItemInfoPackages, e.g. for Writer pool you may start with SfxItemPool, register the writer-specific ItemInfoPackage, then the one for DrawingLayer (if needed) and the one for EditEngine. It should also be possible to get to smaller granularities of that packages. Ideas for new ones will emerge. We might also think about composing Pools which can e.g. run Writer and Chart, so allowing to use Chart *without* OLE stuff in Writer - just ideas... More changes: - Adapted all stuff, cleaned up old stuff/ definitions - Removed FreezeIdRanges, that can be done once per Pool on-demand (and cannot be forgotten to be called) - Merged XOutdevItemPool with SdrItemPool and offered a ItemInfoPackage which joins both needed sets of Items - All the cleanup hassle with Pools and defaults cleaned up - Adapted all access methods of the pool to use that new stuff. Pool chaining currently stays, but I use a central method 'getTargetPool' instead of recursive calling to get the correct Pool for the action Change-Id: I2b8d3d4c3cc80b1d0d0b3c0f4bd90d7656b4bab7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163157 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski1-1/+1
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-18c++20: use std::erase(_if) instead of std::remove(_if)+erase (part 7)Julien Nabet1-2/+1
Change-Id: I2a72422a6c8185d17876daac41a86137048b034c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159627 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann7-165/+165
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: reportdesignStephan Bergmann4-5/+5
Change-Id: I5e45fd5d464db3cf038a844b955144649f980ba1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158208 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-16Resolves: tdf#157726 missing chart from Base reportCaolán McNamara1-0/+6
since: commit c9b5c627ccb5b70c103c559b1df38c1175efc2d1 Author: Caolán McNamara <caolan.mcnamara@collabora.com> Date: Wed Sep 6 10:05:23 2023 +0100 add referer to ole objects Change-Id: I9ef18bf0d734dd900bdbcac475ca15af7b15456e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158027 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-06SdrModel::getUnoModel can use XModel instead of XInterfaceNoel Grandin1-2/+2
Change-Id: Ica10c62066881ba86099d2057ff6fe20e0084a85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157632 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-29cid#1546827 Unchecked return valueCaolán McNamara1-1/+1
and cid#1546828 Unchecked return value cid#1546830 Unchecked return value cid#1546833 Unchecked return value Change-Id: I9ed0246f27a3e652d31346e0543b207249f7e1a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157395 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-07merge SvxFmDrawPage into SvxDrawPageNoel Grandin1-2/+1
it adds hardly any functionality. Change-Id: I82f5c52148222596d52f1fb41d726733ca1cf40d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156654 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-06add referer to ole objectsCaolán McNamara1-1/+1
so we can identify what document is requesting their contents extends: commit 5668e73beb30b95abc6520b7432c54972ca3ab2c Date: Wed Nov 20 14:43:45 2013 +0100 avmedia: Implement "block untrusted referer links" feature See f0a9ca24fd4bf79cac908bf0d6fdb8905dc504db "rhbz#887420 Implement 'block untrusted referer links' feature" for details. This adds some further /*TODO?*/ comments, and one known problem (marked /*TODO!*/) is that movies/sounds are not blocked during a slideshow presentation. to these objects too, namely OLE2Shape and derivatives AppletShape, FrameShape and PluginShape so in paranoid mode we won't load the contents of such objects from documents considered "untrusted". Change-Id: I6d988035d0cd09fd3fade5f6885fe336c95579ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156612 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-05SvxDrawPage does not need to use aggregationNoel Grandin1-0/+1
we use custom subclasses when we want to modify behaviour Change-Id: I1aef9e87c76ea97f1868134f5e1ac0e317b5c698 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26new loplugin:constexprliteralNoel Grandin2-3/+3
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-04Use getXWeak in reportdesignMike Kaganski7-25/+23
Change-Id: I5d7c6b4b3d9440c6ae63a133e1b7d1374fa61063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150861 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-11tdf#150732 ReportBuilder,Moving fields breaks connection of field to datasourceNoel Grandin1-12/+35
regression from commit 09cb778b6eb7d3a5b9029965a1320b49c90e7295 Author: Noel <noel.grandin@collabora.co.uk> Date: Tue Feb 9 13:42:22 2021 +0200 clean up SdrObject cloning The changed order of initialisation of the copied objects meant that they ended up with a missing servicename, which broke copying of properties Change-Id: I76a2a4721f1e3669684094a86cd501c03f80206d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151672 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-23tdf#154886: fix Report builder mutex assertionJulien Nabet1-0/+2
Thank you Noel for the hint! Change-Id: Icb1f63deaffc454e0dcc3b736c9214d93b6871df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150826 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-21loplugin:referencecasting look for a new patternNoel Grandin1-1/+1
Change-Id: Ib7ded8db2c513909159f0876389f63b60082a529 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-10-17use more string_viewNoel Grandin1-8/+8
Change-Id: Ie826234aa9064b08b8f0647738b57c47ac0ed91a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141369 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-29split utl::TempFile into fast and named variantsNoel Grandin1-2/+4
which makes it easier to know what each variant requires to stay on it's happy path Change-Id: I3275a2543573367714bc78092e882f6535507285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-18use more string_view in utl::TempFileNoel Grandin1-2/+2
Change-Id: I151c66479053b9b5b7699a4938a622b4320aeaa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-09Fix typoAndrea Gelmini1-1/+1
Change-Id: I764af470a6bff3ec82182d32fd971e94fa2f725a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139732 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-09tdf#150732 ReportBuilder: Moving fields from one section to another crashesNoel Grandin2-6/+26
regression from commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu May 27 10:27:46 2021 +0200 ref-count SdrObject Fixes 2 issues (1) where I removed some code that we need (2) where the OUnoObject constructor was deleting the object is was constructing Note that this only fixes the crash that Julien saw, not the underlying problem that this tdf bug reports. That bug appears to predate my commit. Change-Id: I3878ef460dedc3c2a6c86b88fce9d155e79bc0b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139714 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-08tdf#150756 Assertion when opening report for editingNoel Grandin1-0/+7
regression from commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu May 27 10:27:46 2021 +0200 ref-count SdrObject Change-Id: Icfdf74035658a6d8222059bb6db36c852a51c4de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139632 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-05Simplify by using replace instead of replaceAt in 2 loops in reportdesignJulien Nabet1-8/+2
It required to fix loplugin:stringviewparam error during build Change-Id: I0111ea5001d18df2913aaa9c154371a86ae7f3bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139370 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-05tdf#150756 Assertion when opening report for editingNoel Grandin1-1/+3
Change-Id: I59cbbc63175a95568f9a0390ab618a5f32d6488b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139331 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29ref-count SdrObjectNoel Grandin6-58/+11
Which means we can get rid of the majestic hack of ScCaptionPtr Previously, SdrObject was manually managed, and the ownership passed around in very complicated fashion. Notes: (*) SvxShape has a strong reference to SdrObject, where previously it had a weak reference. It is now strong since otherwise the SdrObject will go away very eagerly. (*) SdrObject still has a weak reference to SvxShape (*) In the existing places that an SdrObject is being deleted, we now just clear the reference (*) instead of SwVirtFlyDrawObj removing itself from the page that contains inside it's destructor, make the call site do the removing from the page. (*) Needed to take the SolarMutex in UndoManagerHelper_Impl::impl_clear because this can be called from UNO (e.g. sfx2_complex JUnit test) and the SdrObjects need the SolarMutex when destructing. (*) handle a tricky situation with SwDrawVirtObj in the SwDrawModel destructor because the existing code wants mpDrawObj in SwAnchoredObject to be sometimes owning, sometimes not, which results in a cycle with the new code. Change-Id: I4d79df1660e386388e5d51030653755bca02a163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann10-10/+10
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-11tools: rename getHeight/Width() to GetOpenHeight/Width()Chris Sherlock1-2/+2
By default Rectangle uses closed interval, if we really want to use half open intervals then we should specifically say as such in the name. Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-06-24clang-tidy modernize-pass-by-value in reportdesignNoel Grandin10-17/+23
Change-Id: I2c005a2f66139237cb1ebf09812f31fb08f53c90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-01The return value of those getLength functions is guaranteed to be non-negativeStephan Bergmann1-1/+2
...so use o3tl::make_unsigned when comparing it against an expression of unsigned integer type, instead of casting that expression to a signed type Change-Id: Ic47c6d96919b2aba2d16ce6d1a2a8e4c5761a480 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135219 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-25directly instantiate IndexedPropertyValuesContainerNoel Grandin1-3/+4
without the overhead of the UNO service engine Change-Id: I4a02fda2b3c92a897634374bf72cfffee4f531f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-24Use o3tl::make_unsigned in some placesStephan Bergmann4-4/+8
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-24modernize and improve PropertySetInfoNoel Grandin1-2/+1
(*) use o3tl::span for the array param, which means we don't need a null entry to terminate the array (*) use std::unordered_map to speed things up (*) mark the array as static at a few more call sites Change-Id: I05b6cae7552f44459e183ec05cb94e60edb3bfe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134832 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-10tdf#147590 update OLE object after document refreshJuergen Funk1-1/+3
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-04Just use Any ctor instead of makeAny in reportdesignStephan Bergmann25-109/+109
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 Grandin1-3/+3
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 Grandin1-16/+16
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 Grandin3-3/+3
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 Grandin1-1/+1
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-02-23SdrLayerID must be based on sal_Int16Mike Kaganski1-3/+3
... 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-01-30Recheck modules [o-r]* with IWYUGabor Kelemen5-6/+1
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-07remove E3D_INVENTOR_FLAG and convert SdrObjKind to scoped enumNoel Grandin2-28/+28
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 Grandin1-20/+19
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-10merge setUnoShape and impl_setUnoShapeNoel Grandin1-9/+9
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-11-27use more OInterfaceContainerHelper3 in reportdesignNoel Grandin5-15/+16
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 Grandin5-11/+11
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-15tdf#145323 reportbuilder Moving a field corrupts the fieldNoel Grandin1-1/+1
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-08use more OUStringLiteral in MediaDescriptorNoel Grandin1-2/+2
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 Grandin1-13/+13
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 Grandin1-4/+2
Change-Id: I0d0fc57f352e9717e721416c8941cfcf48af24c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>