summaryrefslogtreecommitdiff
path: root/sw/inc/fldbas.hxx
AgeCommit message (Collapse)Author
2023-04-19use more concrete UNO type in SwFieldTypeNoel Grandin
Change-Id: Iffb0ffad6daf102299fa7ce072bfc117cdf38b55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-10Resolves: tdf#154217 Edit date+time User Field and Set VariableEike Rathke
... instead of the raw numeric value. Change-Id: I256cb4fde1e4ea6b0580b3208c5d4948e2573448 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150169 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-02-25refactor DocPosUpdate, part 2Bjoern Michaelsen
- separate the message send from the field manager to the fields containing no start index from those send from the field to the frames containing an index - use member functions where possible: SwFieldType, SwFormatField, SwTextNode Change-Id: I488e4003b75bf7b0ae700f39e2364d6e34a8bbfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147490 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2022-12-21sw, field insert: handle the Content param for refmarks and accept HTML thereMiklos Vajna
Creating a bookmark just to refer to it is a bit hacky, refmarks are the proper solution to that. But while .uno:InsertBookmark allows specifying custom HTML for the content of the created bookmark, there is no matching UNO command that would do the same for refmarks. Fix the problem by extending .uno:InsertField: - add a TypeName parameter, so TypeName=SetRef can be used in macros, which is more readable than Type=12 - handle the previously ignored Content parameter when creating a refmark and accept HTML there to allow rich formatting Note that unlike bookmarks, refmarks are text attributes in a text node, so in case multi-paragraph HTML would be provided, the created refmark will only cover the content till the end of the first paragraph. Also not that unlike fieldmarks and bookmarks, a refmark can only represent a reference, not a bibliography, we'll need sections for that. Change-Id: I4d95f0a6e5618f1b611f7431e9189a63ee75d349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144646 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
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-03-24sw fields: add Title uno propertyMiklos Vajna
The use-case is user fields, which are kind of variables in the document. They have a name and a value, but the name might be only readable to an extension or macro, not to the user. In this case, it makes sense to have a way to specify a user-readable tooltip. Be consistent with TextFrames which already have a Title property. Change-Id: I986792f5e55e0b96489347be482d640d155113cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132077 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-03-10Recheck sw headers with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I99558e6b6952b3f2c1ee32dd07354ff659ad9cd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131183 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-22Add XWeak constructor and operator= to uno::WeakReferenceNoel Grandin
which is faster since we can skip the UNO_QUERY. Change-Id: Id95ad9f3568213e974bd13659d92d4ea94dbfbd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130282 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-07loplugin:unusedmethodsNoel Grandin
Change-Id: Ic1ba90447575278d854af85312271c41766b776b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126422 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29use virtual function call for dynamic dispatchBjoern Michaelsen
... as it is around since the dawn of C++ and should be stable -- certainly more stable and less errorprone that manual typetagging. Change-Id: I5dfe2ce40c2334dc8fe60705d358779fa4bf1586 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124131 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2021-10-25tdf#138531: Also update DDE tables, not only fieldsBjoern Michaelsen
Change-Id: I0cbf8ce355b460b2f7ea73c8fae653641c980979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124129 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-10-21introduce SwNodeOffset strong typedefNoel Grandin
for indexing into node children. Replaces various usage of sal_uLong, tools::Long, sal_uInt32 with an underlying type of sal_Int32. Also add a NODE_OFFSET_MAX constant to replace usage of ULONG_MAX Change-Id: I2f466922e1ebc19029bb2883d2b29aa4c0614170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-26loplugin:passstuffbyrefNoel
Change-Id: I330e0ab6c9955939dad313f9d472f93e39dbd313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109924 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-11-05Ensure no class directly derives from SwModifyBjoern Michaelsen
- make all classes that used to be SwModify to be sw::BroadcastingModify's - this makes sure they are all sw::BroadcastMixin too, so all clients of SwModify can be migrated over to use sw::BroadcastMixin (only) instead Change-Id: Idd217b98f9c20f01e0788bc65af796050dbb5699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105207 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02SwFieldType: ModifyNotification no more ...Bjoern Michaelsen
Change-Id: Idb6c0a6cca5df729037067f6def5594eed2cca19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105178 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-06loplugin:const* make some params and methods constNoel
Change-Id: I3c8ca72b2b41a4f82ee20cbe025b41425f32e715 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104028 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-21Fix typo in codeAndrea Gelmini
Change-Id: I8681bd1be07fe44ab017bce65807b9bf0afa7b42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101107 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-29pack a few more classesNoel Grandin
Change-Id: Ia7870d1d0d91de213727116ccda5b41913223866 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95097 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-09compact namespace in swNoel Grandin
Change-Id: Ie2c3e3f95a687b12b89bcfc5cad44fb7a1d4568f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93862 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-15SwDoc::RemoveInvisibleContent(): SwIterator no more ...Bjoern Michaelsen
Change-Id: I62400059950bbd0cd110a4d1144d8e9a7163b744 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90499 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-03-13Revert "loplugin:constfields in sw"Noel Grandin
This reverts commit 4969f4c0d3e2581aaa8a5b5a5769840fa6b6f8ea. Change-Id: I527e9366b05e8a20633720e334395b285991c524 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-25add GatherField member functionBjoern Michaelsen
Change-Id: Ifa2ea333ccccec240cc10374fd6539a8b3f6df46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89316 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-16GatherRefFields for ww8Bjoern Michaelsen
Change-Id: Ic40c1241854bdbcdf7987ab592e0f07ecdd73f0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88823 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-16no more SwIterator in GatherChapterFieldsBjoern Michaelsen
Change-Id: Iab5e210199948b2fbe9cca2f2ff6a36341a6c1c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88780 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-16no more SwIterator in HasHiddenInformationNotesBjoern Michaelsen
Change-Id: Ic2a4340972ad29305dadc56a33081a211cc0205b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88758 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org> Tested-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-10refactor PostIt access to SwFormatFields in ...Bjoern Michaelsen
- SwTextShell::ExecField() - PostItManager Change-Id: I7eabf0a7d8170d0dacf3069925abfe1a91a4a9f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88334 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-02-08introduce SwFieldType::FindFormatForField and use it (once)Bjoern Michaelsen
Change-Id: Id7136b936c0585e7013f3d06ad97436b51522da3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88264 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2019-09-20convert SwFieldTypesEnum to scoped enumNoel Grandin
clamp it to sal_uInt16 since we convert it that type when passing it via SfxItemSet Change-Id: I4b7bd4ba5e19015af357d5a81a629239451d71e4 Reviewed-on: https://gerrit.libreoffice.org/79289 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-28return by unique_ptr from SwFieldType::CopyNoel Grandin
Change-Id: I145b55c9cd62a5853c0dd26cc9b805b9f3a0e436 Reviewed-on: https://gerrit.libreoffice.org/69854 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>
2018-11-15sw: GSE_INP is dead since CVS import, remove itMichael Stahl
Change-Id: Ib0713df614e63c20965979e7e34f7481fe8ed838
2018-11-15sw_redlinehide_3: transport layout from ExpandField() to Expand()Michael Stahl
While at it, rename that to ExpandImpl() so it's unique. Change-Id: I217deb72b4dfdca777e28e18ff56e49863e66640
2018-11-15sw_redlinehide_3: add layout parameter to SwField::ExpandField()Michael Stahl
If the bCached=true, it shouldn't matter what the layout is, because the field won't be expanded properly anyway. Except for the SwInputField which disables caching, but that one often has a different code path anyway. For most fields it doesn't matter anyway, e.g. database fields. Change-Id: I628195f43c5d26feba94af0a832386791c072ba1
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-10-03loplugin:constfields in swNoel Grandin
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f Reviewed-on: https://gerrit.libreoffice.org/61177 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-20Scope breaks; and add number comments to SwFieldIdsJan-Marek Glogowski
SwFieldIds is fixed, so add number comments to easier find the ID in the long list. Change-Id: I2b9fc00bd0ddc15fc327324c2895810d61e2870e Reviewed-on: https://gerrit.libreoffice.org/60795 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-07-30sw doc model xml dump: dump float value of user fieldsMiklos Vajna
Change-Id: Ie59070254eb293cbfdd688d97bf4bb6c06e77a79 Reviewed-on: https://gerrit.libreoffice.org/58339 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-07-30sw doc model xml dump: cover SwValueFieldMiklos Vajna
Also SwUserField. Change-Id: Ie8a8ca997e5b89bcf6b40363721e9caaeb60f696 Reviewed-on: https://gerrit.libreoffice.org/58325 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
2018-07-27sw: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc.; and by removing explicitly user- provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non- deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already include, so why bother with non-inline functions.) Change-Id: Ib4a48431398d40858d9e2ee1fd685b1f223a5423 Reviewed-on: https://gerrit.libreoffice.org/58168 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-07-10pass SwField around by std::unique_ptrNoel Grandin
Fix leak in SwFieldPage::InsertField, where it interacts badly with SwFieldMgr::UpdateCurField The awkward return std::unique_ptr<SwField>(pTmp.release()); code is because clang 3.8.0 doesn't seem able to do auto-upcast of std::unique_ptr. Change-Id: I05b748e9cda145fd972a01bfa343239df32368b9 Reviewed-on: https://gerrit.libreoffice.org/57197 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11dont use SwClient/SwModify in unocore: SwXFieldMasterBjoern Michaelsen
Change-Id: I3e2579601c94fe6261e4eb56bbcf3b3b7905be7f Reviewed-on: https://gerrit.libreoffice.org/55550 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2018-05-22tdf#117171 support localized page number numbering stylesLászló Németh
in ordinal and cardinal number names and ordinal indicators. Change-Id: I35fa9c5c31b31f112ac0bb7feb5d310daca819e1 Reviewed-on: https://gerrit.libreoffice.org/54553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2018-04-18sw: fix some IWYU warningsMiklos Vajna
Change-Id: Idff219e1c8f18adaa0f445a5469650c7793cae3a Reviewed-on: https://gerrit.libreoffice.org/53066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-15Fix some IWYU warningsMiklos Vajna
Change-Id: I49b5e3a9e8b91baace9f3b3d4f0ac9d8531d5abe Reviewed-on: https://gerrit.libreoffice.org/49782 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
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-11-27loplugin:countusersofdefaultparams in sw (2)Noel Grandin
Change-Id: Ibb045a0b7750cf6807d6f5caba86a9e6e59828ae Reviewed-on: https://gerrit.libreoffice.org/45237 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-08-28sw: insert paragraph signature fieldAshod Nakashian
Change-Id: Ibf062c19b9896841df765bc39716cddad8bc12f2 Reviewed-on: https://gerrit.libreoffice.org/41602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-26use strong_int for LanguageTypeNoel Grandin
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>