summaryrefslogtreecommitdiff
path: root/sw/inc/formatcontentcontrol.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-04-01 10:58:01 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-04-01 11:54:33 +0200
commit5da08b21cd23f2e70f5003733b03a7aee7915225 (patch)
tree6b60d4ed7edc275fb65f2b6917d6e4f498a7e7b6 /sw/inc/formatcontentcontrol.hxx
parent5b5205f1b1835cff20c091856887273f3a2c1e73 (diff)
sw content controls: add UNO API to insert this with custom props
Add the ability to specify if the content control is a placeholder or not on the content control object itself before insertion. Change-Id: Ia06869c69a5b85cfc1d0a55739bbb23a53bef4d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132404 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/inc/formatcontentcontrol.hxx')
-rw-r--r--sw/inc/formatcontentcontrol.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index 0fa075bf7036..c1ac07279efe 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -61,6 +61,8 @@ public:
void NotifyChangeTextNode(SwTextNode* pTextNode);
static SwFormatContentControl* CreatePoolDefault(sal_uInt16 nWhich);
SwContentControl* GetContentControl() { return m_pContentControl.get(); }
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
/// Stores the properties of a content control.
@@ -73,6 +75,9 @@ class SwContentControl : public sw::BroadcastingModify
/// Can be nullptr if not in a document for undo purposes.
SwTextNode* m_pTextNode;
+ /// Current content is placeholder text.
+ bool m_bShowingPlaceHolder = false;
+
public:
SwTextContentControl* GetTextAttr() const;
@@ -99,6 +104,15 @@ public:
explicit SwContentControl(SwFormatContentControl* pFormat);
virtual ~SwContentControl() override;
+
+ void SetShowingPlaceHolder(bool bShowingPlaceHolder)
+ {
+ m_bShowingPlaceHolder = bShowingPlaceHolder;
+ }
+
+ bool GetShowingPlaceHolder() const { return m_bShowingPlaceHolder; }
+
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */