summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-05-13 13:35:23 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-05-13 15:05:24 +0200
commit75f7e057039aaa49558e22d18cad651d11589da9 (patch)
tree196bc31749d9eaebd8fb418436ab994ffcf71ec4 /sw/inc
parent923c1a79efd0885be37feb4a5b3c847e659e4f53 (diff)
sw content controls, dropdown: add an initial properties dialog
- read the doc model: show if a content control is a placeholder or not - work with a shared pointer in the dialog, which avoids lifetime issues in case the content control we edit in one view gets deleted in an other view - write the doc model: set the placeholder mode of the content control based on the checkbox state and mark the doc as modified if any widget is touched when pressing OK - handle command state: allow this dialog only inside content controls Change-Id: Ie0b9075ccd3450dd403cc7f8bbf93fc04de3b234 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134278 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/cmdid.h1
-rw-r--r--sw/inc/formatcontentcontrol.hxx4
-rw-r--r--sw/inc/swabstdlg.hxx1
3 files changed, 4 insertions, 2 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index a11bfd4e21df..0e1691d7ec2d 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -222,6 +222,7 @@ class SwUINumRuleItem;
#define FN_INSERT_OBJECT_DLG (FN_INSERT + 22) /* Object */
#define FN_INSERT_PAGEBREAK (FN_INSERT + 23) /* Page break*/
#define FN_INSERT_DROPDOWN_CONTENT_CONTROL (FN_INSERT + 24) /* Dropdown content control */
+#define FN_CONTENT_CONTROL_PROPERTIES (FN_INSERT + 25) /* Content control properties */
#define FN_POSTIT (FN_INSERT + 29) /* Insert/edit PostIt */
#define FN_INSERT_TABLE (FN_INSERT + 30) /* Insert Table */
#define FN_INSERT_STRING (FN_INSERT+31)
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index 09797fd00b0a..adf20db09162 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -69,8 +69,8 @@ public:
*/
void NotifyChangeTextNode(SwTextNode* pTextNode);
static SwFormatContentControl* CreatePoolDefault(sal_uInt16 nWhich);
- SwContentControl* GetContentControl() { return m_pContentControl.get(); }
- const SwContentControl* GetContentControl() const { return m_pContentControl.get(); }
+ std::shared_ptr<SwContentControl> GetContentControl() { return m_pContentControl; }
+ const std::shared_ptr<SwContentControl>& GetContentControl() const { return m_pContentControl; }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index cd6d4b3593dd..52964ba91177 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -389,6 +389,7 @@ public:
virtual VclPtr<AbstractSwAsciiFilterDlg> CreateSwAsciiFilterDlg(weld::Window* pParent, SwDocShell& rDocSh,
SvStream* pStream) = 0;
virtual VclPtr<VclAbstractDialog> CreateSwInsertBookmarkDlg(weld::Window *pParent, SwWrtShell &rSh) = 0;
+ virtual VclPtr<VclAbstractDialog> CreateSwContentControlDlg(weld::Window *pParent, SwWrtShell &rSh) = 0;
virtual std::shared_ptr<AbstractSwBreakDlg> CreateSwBreakDlg(weld::Window *pParent, SwWrtShell &rSh) = 0;
virtual VclPtr<VclAbstractDialog> CreateSwChangeDBDlg(SwView& rVw) = 0;