summaryrefslogtreecommitdiff
path: root/sw/inc/unodraw.hxx
AgeCommit message (Collapse)Author
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-13loplugin:unusedmethodsNoel Grandin
Change-Id: I00f228451574ca9f9e352d233c7f326c88e90a95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-07merge SvxFmDrawPage into SvxDrawPageNoel Grandin
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-05DRY use existing method in SwXShape rather than open-codingNoel Grandin
Change-Id: I1dc66d4161411998ab36e454ad168cada2dc7a23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156561 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-05SvxDrawPage does not need to use aggregationNoel Grandin
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-04-21SwXShape no longer needs to extend SvtListenerNoel Grandin
after commit 40babcfa637957bf7b59caa3cd12a630189e3e63 tdf#154827 and tdf#154428 graphics anchored in Writer as character. Change-Id: Iad3ad440690fa9b8530f32e17a113b8365656a05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-20tdf#154827 and tdf#154428 graphics anchored in Writer as character..Noel Grandin
..become anchored at paragraph when reopening the document regression from commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3 ref-count SdrObject This used to work by accident, previously, the SwXGroupShape that we need would get created and destroyed and handful of times, and then properly created. Now, however, the first time we create it it sticks around, which means it does not get the m_pFormat field configured correctly. Fix this by removing the caching of m_pFormat from SwXShape, and just fetching it from the model when we need it. Change-Id: I10fe2ad0b877b3d928d5288e73cfed373b27a506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-01sw: implement "Theme" property for the XDrawPage in WriterTomaž Vajngerl
Change-Id: I8eed04f0ccb2e626a648abcaecd957b6f62c39d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146226 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-20Base SwXShapeBaseClass on WeakImplHelperStephan Bergmann
...rather than on the deprecated WeakAggImplHelper6. The two classes SwXShape and SwXGroupShape, both deriving from SwXShapeBaseClass, had been found to implement their respective queryInterface in a way that is incompatible with the XAggregation protocol inherited via WeakAggImplHelper6. It looks like no code actually made use of the XAggregation offered by this class hierarchy, so the easiest fix for those queryInterface implementations appears to switch from WeakAggImplHelper6 to WeakImplHelper (thereby dropping XAggregation, and thus rendering the existing queryInterface implementations OK). Change-Id: I47dd177db7f3ddbd53482c3b4c194b6e7f15f69c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-19Fix SwFmDrawPage queryAggregationStephan Bergmann
The base SvxDrawPage uses WeakAggImplHelper7, so (for better or worse) derives from XAggregation, but SwFmDrawPage failed to properly implement the XAggregation protocol. Change-Id: Idf2c2d27cd5fb443e574cfd770091600a23c6e8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145771 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-19Fix SvxFmDrawPage et al getTypesStephan Bergmann
The implementation of SxvFmDrawPage::getTypes was presumably forgotten when e97beb270fd1a5121cdb69ffafd12ea04100e290 "NTEGRATION: CWS xmlperf02" changed SvxFmDrawPage from supporting XFormsSupplier to supporting XFormsSupplier2 (which derives from XFormsSupplier). And SwFmDrawPage uses ImplInheritanceHelper to derivefrom SvxFmDrawPage, so there should be no need to implement SwFmDrawPage::getTypes manually (and wrongly, at that, in that it included the types of SvxFmDrawPage twice, once directly via SvxFmDrawPage::getTypes(), and once indirectly via SwFmDrawPage_Base::getTypes()). Change-Id: I8c467f5a20e1f44396378abe9199851e646f6947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145772 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-13ofz#50767 docxfuzzer: Indirect-leak in rtl_allocateMemoryNoel Grandin
Two fixes required here (1) the unnecessary use of aggregation in SwXDrawPage, which leads to a very confusing cycle that I don't fully follow. No indication why this is necessary in the git history, has been this way since initial commit (2) a ref-counting cycle through SvxShapeGroup and SvxDrawPage, use a weak reference here to break the ref-counting cycle. Change-Id: Ie7ec583960ed0864a073ad8489fb65964bd83080 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29ref-count SdrObjectNoel Grandin
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-07-25use more o3tl::spanNoel Grandin
which means we can reserve precisely the right number of entries when building maps Change-Id: I580414699289369de4730caae09829bbd8759e82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137292 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-30tdf#135316 cache propertysetinfo in SwXShapeNoel Grandin
shaves 3% off loaad time Change-Id: I6541f94553d862787566672d91e2a87902835664 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118158 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-18loplugin:finalclasses in swNoel Grandin
Change-Id: I5f228e839e0d5a51ece868b55715b04f0affc28d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-20loplugin:refcounting in swNoel
Change-Id: I56f2f5aa4d9105e93f28701b8352d1fb97829ead Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111215 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-24tdf#42949 Fix new IWYU warnings in directory swGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I4bb84c3f401aba8a3dede9cec3a7f2187a2ba02a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106473 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-08-17sw: prefix members of SwNode2LayImpl, SwRetrievedInputStreamDataManager, ...Miklos Vajna
... SwXDrawPage and SwXShape See tdf#94879 for motivation. Change-Id: I0cfdc1a1b7e1667dccf8db29616b895a76b8fea5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100843 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-08-12sw: prefix members of SwFmDrawPage, SwNumRule, SwTableAutoFormat and ...Miklos Vajna
... WriterSpecificAutoFormatBlock See tdf#94879 for motivation. Change-Id: Ie740f07e1c65a6def6ba673529144d0e111b056e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100610 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-11-04loplugin:finalclasses in sw/incNoel Grandin
Change-Id: I084502d8c5607f103ef987b54252ef95341f0bef Reviewed-on: https://gerrit.libreoffice.org/81981 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-28loplugin:constmethod in swNoel Grandin
Change-Id: I73c3c6d2165287d2d581a04b23b1d3b48166a488 Reviewed-on: https://gerrit.libreoffice.org/79780 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-07kill SwXShape SwClientBjoern Michaelsen
this completely removes calbck.hxx from sw/source/core/unocore -- may it never return. Change-Id: Ie4c8b3a29fd4038a19c34116d47672b504ee9f2c Reviewed-on: https://gerrit.libreoffice.org/78735 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2019-09-07make page bookkeep the SwXShapesBjoern Michaelsen
- and remove SwClient/Modify between SwXShape and Page Change-Id: I482f5357dbd361e957fef54b5cbc594351c70b96 Reviewed-on: https://gerrit.libreoffice.org/78734 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2019-06-18tdf#42949 Fix IWYU warnings in include/svx/[t-v]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I345b8c54890b5bc27f51addd2e6e73ba68b6b327 Reviewed-on: https://gerrit.libreoffice.org/73977 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-07-17loplugin:useuniqueptr in SwXShapeNoel Grandin
Change-Id: I7081485c63e17078cfbae7211d20809b0aec6fc3 Reviewed-on: https://gerrit.libreoffice.org/57517 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-18tdf#108523 Remove @author annotationsAbhyudaya Sharma
Change-Id: I85e364da59ce70ddd97fdae9bc03a4ea76b007fc Reviewed-on: https://gerrit.libreoffice.org/55263 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-28loplugin:useuniqueptr in SvxDrawPageNoel Grandin
Change-Id: Ic0ca03d419cb7124d5076130163de113b29bac9d Reviewed-on: https://gerrit.libreoffice.org/54848 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-28sw: fix some IWYU warningsMiklos Vajna
Change-Id: I96a6401f0cc7bf9f219717671e41932d7d8570b7 Reviewed-on: https://gerrit.libreoffice.org/51972 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-24tdf#113938 sw: apply new default vertical orientation only during importMichael Stahl
Commit c79467ba954987f1d239c594c1e1b3af3f5515f6 changed the default vertical orientation for shapes in Writer; it turns out that at least one extension assumes the previous default. Tweak SwXShape so that the new default is used for shapes that are created during file import, otherwise the old default. Change-Id: I1dc4d3342dd53ce8e0857984456717b8ffcc97c7
2017-11-15Resolves: tdf#113615 wrong SwXShape from three possibilities returnedCaolán McNamara
There is the group object itself and the two subobjects all registered with this SwFrameFormat and the right line is randomly returned instead of the wanted one. Its possibly the presence of working a11y under gtk3 causing it to be the only platform apparently with this trouble with a11y querying for details of the grouped object Change-Id: I4d1bd3f826b630dd7734eb1decaf0211cd896894 Reviewed-on: https://gerrit.libreoffice.org/44729 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-23loplugin:includeform: swStephan Bergmann
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
2017-08-04loplugin:constparams in sw part5Noel Grandin
Change-Id: I6c33709aa407ccb3eee7026ab9b40dc4257de209 Reviewed-on: https://gerrit.libreoffice.org/40769 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, swStephan Bergmann
Change-Id: I2da2ce4cd247e7b9f973150917b4ee7bd7a0e0c4
2016-09-22loplugin:unusedmethods in sc..vclNoel Grandin
Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8 Reviewed-on: https://gerrit.libreoffice.org/29183 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-07-15new loplugin unnecessary overrideNoel Grandin
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb Reviewed-on: https://gerrit.libreoffice.org/27135 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-22Avoid reserved identifiersStephan Bergmann
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-04-18Avoid reserved identifier (_CreateShape -> CreateShape)Stephan Bergmann
Change-Id: Idcdd35302e60392fae9f63de1828e1a41ab89610
2016-04-18Avoid reserved identifier (_CreateSdrObject -> CreateSdrObject_)Stephan Bergmann
Change-Id: Iee63999e4953a083783cb5c9811640150616472d
2016-04-14loplugin:passstuffbyref in swNoel Grandin
Change-Id: I124bdd4f28c7d7508e77b902dfa23c398454bf38
2015-11-115th step to remove tools/rtti.hxxOliver Specht
tools/rtti.hxx removed completed the interface of some Sdr.* Items and removed pseudo items Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a Reviewed-on: https://gerrit.libreoffice.org/19837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-11-06com::sun::star->css in sw/incNoel Grandin
Change-Id: I6ffdb1deaa32156c65f997a1a1056928b7cd863d Reviewed-on: https://gerrit.libreoffice.org/19803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-09-09sw: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
with the variadic variants. Change-Id: I1c423f98fba55c1ac5c3bd9a4e81ebd7eb6604b4 Reviewed-on: https://gerrit.libreoffice.org/18393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-05loplugin:staticmethodsNoel Grandin
Change-Id: I90dd921077bbfc57200e398e7959306f26c65cfe