summaryrefslogtreecommitdiff
path: root/sw/inc/fmtcol.hxx
AgeCommit message (Collapse)Author
2024-05-13Revert "reduce symbol visibility in sw"Thorsten Behrens
This reverts commit 1a6711276f0c8abeb0028a47cc345a7453374a38. After some discussion and experiments, it turned out this rather fundamentally breaks clang's PCH build. Conclusion was: this change is not significant enough to warrant making life harder for developers. Excerpt of errors (affected were vbaswobj, msword & swui libs): - ld.lld: error: undefined symbol: SwFormat::~SwFormat() >>> referenced by fmtcol.hxx:37 (sw/inc/fmtcol.hxx:37) >>> core/workdir/CxxObject/sw/inc/pch/precompiled_vbaswobj.o:(SwFormatColl::~SwFormatColl()) - ld.lld: error: undefined symbol: SwFrameFormat::SetPositionLayoutDir(short) >>> referenced by precompiled_msword.cxx >>> core/workdir/CxxObject/sw/inc/pch/precompiled_msword.o:(vtable for sw::SpzFrameFormat) - ld.lld: error: undefined symbol: SwFrameFormat::SetLayoutDir(SwFrameFormat::tLayoutDir) >>> referenced by precompiled_swui.cxx >>> core/workdir/CxxObject/sw/inc/pch/precompiled_swui.o:(vtable for sw::SpzFrameFormat) Change-Id: I1dcf115cc191b1ebf1f8d5023c0c5015f891287a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167549 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-05-03replace createFromAscii with OUString literals in SwFormatNoel Grandin
Change-Id: I53ec6e3914ef995a4fd708ea0f1c2976673d97d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-13reduce symbol visibility in swNoel Grandin
Change-Id: Ib3edefc365d3c605c3024e160572fa4030100ef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-24tdf#78510 sw: combine items from SwTextNode and SwNumFormatMichael Stahl
Tweak SwTextFormatColl::AreListLevelIndentsApplicable() and SwTextNode::AreListLevelIndentsApplicable() to return a bitmask so that SvxFirstLineIndentItem and SvxTextLeftMarginItem from paragraph or numbering can be freely combined. Particularly confusing was SwTextNode::GetLeftMarginWithNum() and its baffling usage in SwTextMargin::CtorInitTextMargin(); it appears easiest (if unintuitive) to interpret its return value as a delta to be added to the paragraph's items. This fixes the ODF interop problem. It looks like no compat setting is needed because every OOo/LO generated document should have either both fo:text-indent and fo:margin-left on a paragraph style/list level, or neither. Change-Id: If20b2556bb5ab5d915a2aa6633525bb44a9be33b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147166 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-12-20sw: document SwFormatCollMiklos Vajna
I.e. first what's confusing is that SwCharFormat doesn't derive from SwFormatColl, and the answer is that in practice it doesn't matter too much, as long as in practice user-visible char styles are SwCharFormats where SetAuto(false) is called in some other way. Change-Id: Ie85f9bf947348b5ef7051f055c5b931a8a2b932a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144544 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-10-04tdf#151094 ODT export: fix crash when linked paragraph style is deletedMiklos Vajna
If a document contains a linked paragraph-character style pair and the paragraph style gets deleted, we crash on save. Commit 3227975c0f42ff23d528f5ab94b4538c8af764c (sw: paragraph styles: add doc model & UNO API for a linked character style, 2021-09-24) added support for linked para/char styles, but it failed to get the lifecycle correctly when it comes to deleting these styles. Fix the dangling para/char style references by explicitly looking what styles may refer to us and clear their references. An alternative would be to clear the "link" pointer of our own "link" pointer only, but broken documents may e.g. link multiple paragraph styles to a single character style, so this is probably not enough. Change-Id: I9465d43e90cf54c3c02bffda3e7c75b52c543a65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140930 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-09-28sal_uLong->sal_uInt32 in CommandStructNoel Grandin
we are already using sal_uInt32 for this in some places Change-Id: I69ed8f6c29215fcedcafc403861cdd0e06c034ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140701 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-24sw: paragraph styles: add doc model & UNO API for a linked character styleMiklos Vajna
And the same in the other direction: link a para style from a char style. Towards getting this info out of the grab-bag, so we can store it also in ODF, as currently this is only kept for DOCX -> DOCX conversions, via the style grab-bags. Change-Id: I21691dafce0bc216d041fc8ecb16b162d293739e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122595 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-07-19Use reference to WhichRangesContainer instead of pointer in swMike Kaganski
Change-Id: I8e6418ce08f339824433e9af52259b2a8f3bb71d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119226 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-17use WhichRangesContainer in swNoel Grandin
Change-Id: I8662b2e03b0dbe3a7206d8b59ae3556e3b2e75a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119007 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-25SwFntCache: move down from SwFormat to SwTextFormatCol where possibleBjoern Michaelsen
Change-Id: Ia5dcc3b1145c6bd65253577499da3bb80d82e926 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109659 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-26Refactor SwFormatDropBjoern Michaelsen
... and get rid of the SwClientNotifyCall. Change-Id: I2118290944c21e9773c359109e60e7778459a41f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106365 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-26SwTextFormatColl: Modify no more ...Bjoern Michaelsen
Change-Id: Idbacff4f7bdd0f986c55c68f796c00b6f82d61ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104782 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2019-12-23sal_Char->char in swNoel Grandin
Change-Id: I63fb87a8e8eaf9c9da7bf7b8b6f5706222ffcc07 Reviewed-on: https://gerrit.libreoffice.org/85730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-02-28use the xmlTextWriterPtr typedef consistentlyNoel Grandin
this is the single biggest chunk of stuff my upcoming paramtypedef loplugin will warn about, so do it separately Change-Id: I412e69e76406d6d947101885d4cd92c65e021508 Reviewed-on: https://gerrit.libreoffice.org/68486 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-14tdf#42949 Fix IWYU warnings in include/svl/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ide75232858599c275e023c2300201090acd22307 Reviewed-on: https://gerrit.libreoffice.org/63237 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-10-25sw: fix some IWYU warningsMiklos Vajna
Change-Id: Ic7e6aa31e5c6d210101da7223a294092ab5b7481 Reviewed-on: https://gerrit.libreoffice.org/62334 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-25sw: fix remaining IWYU warnings in inc/*.hxxMiklos Vajna
Also check for not needed forward declarations. Change-Id: I92759f3f40d9458fd192665b39b87a78d8b97e5a Reviewed-on: https://gerrit.libreoffice.org/53418 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-21Fix some IWYU warningsMiklos Vajna
Change-Id: If1e6727e4b5bb225495e20d5dfb78fa5da770f75 Reviewed-on: https://gerrit.libreoffice.org/50060 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-30loplugin:unused-returns in swNoel Grandin
Change-Id: I753fcdd35d461880a8d8160213cabd465cfde967 Reviewed-on: https://gerrit.libreoffice.org/48189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: swStephan Bergmann
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
2017-10-23loplugin:finalclasses in swNoel Grandin
Change-Id: I3b1d689d5eb800a36466376bca735dd31fe4567c Reviewed-on: https://gerrit.libreoffice.org/43639 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-04New loplugin:dyncastvisibilityStephan Bergmann
...to find uses of dynamic_cast where the static (base) type has hidden visibility while the dynamic (derived) one has default visibility, and which may thus fail at least on macOS like happened in d5ed3cd6dbd22bb18542778f1c48f4d5b3ae0f95 "Make WinMtfFontStyle's base class EMFIO_DLLPUBLIC, too". libcxxabi's __dynamic_cast takes static_type and dst_type arguments. Now, if dst_type (the derived type, with default visibility) is taken from .so A (and thus references the version of the base type info hidden in .so A) but the __dynamic_cast call is made from .so B, it passes for static_type the base type information hidden in .so B, and __dynamic_cast will consider the cast to fail. I'm not sure whether hidden intermediary types (in the hierarchy between the dynamic_cast's base and derived types) acutally cause a problem too, but lets flag them with the plugin anyway. The fixes use SAL_DLLPUBLIC_RTTI. For one, there appear to be no other reasons than type visibility to make those classes SAL_DLLPUBLIC. For another, this nicely avoids any actual changes on Windows (where SAL_DLLPUBLIC expands to nothing, and many of the affected classes were explicityl introduced into class hierarchies as "MSVC hacks"). Change-Id: Ia85a9635cebffb1009a9efc1484b8bd4025585d4 Reviewed-on: https://gerrit.libreoffice.org/41802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-29loplugin:unusedmethodsNoel Grandin
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0 Reviewed-on: https://gerrit.libreoffice.org/35834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-27Fix typo footenote -> footnoteGulsah Kose
Change-Id: Iee166416aaca627e55f25a25ed69f468fa2e510d Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/34653 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-13convert Master_CollConditions to scoped enumNoel Grandin
And drop read-only enumerator USRFLD_EXPRESSION. And drop the bitfield values, this enum is never used as a combination of flags. Change-Id: Iaae1b30439a7d1bb5d3526d9aee52dbc78e635dc
2016-10-06tdf#75757 Remove inheritance from std::vectorTakeshi Abe
Change-Id: I87572c545559ef22d4f74fb63218910681c1a7d7 Reviewed-on: https://gerrit.libreoffice.org/29533 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-04loplugin:countusersofdefaultparams in swNoel Grandin
Change-Id: I65beb17816641cff6a07379b7ba234afe26806b3 Reviewed-on: https://gerrit.libreoffice.org/29488 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-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-05-23loplugin:unusedmethods in swNoel Grandin
Change-Id: I05e224bcc7d2b08cf1349c14e3acf274d422e109 Reviewed-on: https://gerrit.libreoffice.org/25145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-19drawinglayer, sw: indentation fixesMiklos Vajna
Change-Id: Ia84182629f33220a0d85bde00c16f9c26f45e3c5
2016-03-22loplugin:constantparam in swNoel Grandin
Change-Id: I56925a8fd776b3ee787cc26adbaa08c58dd022c0
2016-01-19loplugin:unusedmethods in sw/Noel Grandin
Change-Id: Id452bfac5c83f130a138e06984a0c79c37af70ac
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-02sw: prefix members of SwCollConditionMiklos Vajna
Change-Id: Idf7956c2178093bcaba3ad1093b8d0a54e46aaca
2015-10-26sw: prefix remaining members of SwTextFormatCollMiklos Vajna
Change-Id: Ife3a2c9dae17d3c8f2972fb7d65682b6d6778ed1
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-09-11sw: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl
Change-Id: I8baa909f5e3ddb6b227337f3731e4d4b4ca183e5
2015-09-02SetXXX(bool) with a default value of false are just wrongNoel Grandin
Change-Id: I4888d0474199bb10ca81d1ad03118a150f574671 Reviewed-on: https://gerrit.libreoffice.org/18235 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-20loplugin: defaultparamsNoel Grandin
Change-Id: If105665a016183f08a2be13366e5068060b5954c
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-02-13Extract SwTxtFmtColl::dumpAsXml() from docnodeMiklos Vajna
Change-Id: I3ffe83afa0e0e6f181f75319af3d5cbcc78de395
2015-02-07loplugin:deletedspecialStephan Bergmann
Change-Id: Ia2b137e0167966a3d0b60f3c642a106834da8f1c
2014-11-16Remove code commented out since February 2011Matteo Casalin
Change-Id: I4eec581ad83c8aceea8e853d2d19275f77029a68
2014-11-10loplugin: cstylecastNoel Grandin
Change-Id: Ie57f543681790e662f6ac7d074ccb37925999790