summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-02-08 23:00:26 +0100
committerBjörn Michaelsen <bjoern.michaelsen@libreoffice.org>2020-02-10 19:51:23 +0100
commit7477b3ca599bc1d0e8e84fa3674032b0da4117b3 (patch)
tree9119c505645df85b44fbe96a3c34e61e2bbfdcaa /sw/inc
parentcc0759f1e2bea4241d878ee57deaab9e50e24a3d (diff)
refactor PostIt access to SwFormatFields in ...
- 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>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/fldbas.hxx3
-rw-r--r--sw/inc/fmtfld.hxx12
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 19fad702c4ad..0b7367a24509 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -32,6 +32,7 @@ class SwField;
class SwFormatField;
class SwRootFrame;
class SvNumberFormatter;
+class IDocumentRedlineAccess;
namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
@@ -270,6 +271,8 @@ public:
inline void UpdateFields() const;
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
SwFormatField* FindFormatForField(const SwField*) const;
+ SwFormatField* FindFormatForPostItId(sal_uInt32 nPostItId) const;
+ void CollectPostIts(std::vector<SwFormatField*>& rvFormatFields, IDocumentRedlineAccess const& rIDRA, bool HideRedlines);
};
inline void SwFieldType::UpdateFields() const
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index 7857b9915c6b..812bc7403209 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -32,6 +32,7 @@ class SwTextField;
class SwView;
class SwFieldType;
class SwFormatField;
+class IDocumentRedlineAccess;
namespace com { namespace sun { namespace star { namespace text { class XTextField; } } } }
namespace sw {
@@ -40,6 +41,17 @@ namespace sw {
SwFormatField*& m_rpFormat;
FindFormatForFieldHint(const SwField* pField, SwFormatField*& rpFormat) : m_pField(pField), m_rpFormat(rpFormat) {};
};
+ struct FindFormatForPostItIdHint final : SfxHint {
+ const sal_uInt32 m_nPostItId;
+ SwFormatField*& m_rpFormat;
+ FindFormatForPostItIdHint(const sal_uInt32 nPostItId, SwFormatField*& rpFormat) : m_nPostItId(nPostItId), m_rpFormat(rpFormat) {};
+ };
+ struct CollectPostItsHint final : SfxHint {
+ std::vector<SwFormatField*>& m_rvFormatFields;
+ IDocumentRedlineAccess const& m_rIDRA;
+ const bool m_bHideRedlines;
+ CollectPostItsHint(std::vector<SwFormatField*>& rvFormatFields, IDocumentRedlineAccess const& rIDRA, bool bHideRedlines) : m_rvFormatFields(rvFormatFields), m_rIDRA(rIDRA), m_bHideRedlines(bHideRedlines) {};
+ };
}