diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-02-08 12:19:17 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-02-08 21:40:00 +0100 |
commit | 6b2b0af1936ddc57992b01a56725d4acadffc806 (patch) | |
tree | ecb619edd31aad4951e37078266a270600e9f4e8 /sw/inc | |
parent | e2d96d38afb30fa78f37e84543bfd04c25e1c6b2 (diff) |
introduce SwFieldType::FindFormatForField and use it (once)
Change-Id: Id7136b936c0585e7013f3d06ad97436b51522da3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88264
Tested-by: Jenkins
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/fldbas.hxx | 3 | ||||
-rw-r--r-- | sw/inc/fmtfld.hxx | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index 664f74b45242..19fad702c4ad 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -28,6 +28,8 @@ #include <climits> class SwDoc; +class SwField; +class SwFormatField; class SwRootFrame; class SvNumberFormatter; namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } } @@ -267,6 +269,7 @@ public: inline void UpdateFields() const; virtual void dumpAsXml(xmlTextWriterPtr pWriter) const; + SwFormatField* FindFormatForField(const SwField*) const; }; inline void SwFieldType::UpdateFields() const diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx index cde0efe48f5a..7857b9915c6b 100644 --- a/sw/inc/fmtfld.hxx +++ b/sw/inc/fmtfld.hxx @@ -31,8 +31,18 @@ class SwField; class SwTextField; class SwView; class SwFieldType; +class SwFormatField; namespace com { namespace sun { namespace star { namespace text { class XTextField; } } } } +namespace sw { + struct FindFormatForFieldHint final : SfxHint { + const SwField* m_pField; + SwFormatField*& m_rpFormat; + FindFormatForFieldHint(const SwField* pField, SwFormatField*& rpFormat) : m_pField(pField), m_rpFormat(rpFormat) {}; + }; +} + + // ATT_FLD class SW_DLLPUBLIC SwFormatField final : public SfxPoolItem |