summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorofftkp <parisoplop@gmail.com>2022-12-21 14:29:59 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-01-06 07:42:32 +0000
commitc010b5d2b2cdb22f48ef9d2b9d1fdc6125e1fec2 (patch)
treef71cb600aa83e1e82a65b5e9ef3514cd0a0d9bf3 /sw/inc
parentd7514d34b67626ba0b7d1dc0e9acbdfc635fe0ac (diff)
tdf#86630 sw: Add one-step page number insertion wizard
Add a one-step wizard for easy insertion of the page number to the header/footer. Change-Id: Idb33c92d594e04d9256460fe414e4b10e5166af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144683 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/cmdid.h1
-rw-r--r--sw/inc/strings.hrc1
-rw-r--r--sw/inc/swabstdlg.hxx11
-rw-r--r--sw/inc/swundo.hxx1
4 files changed, 14 insertions, 0 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 004a40d8d89f..dbb3a259b422 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -242,6 +242,7 @@ class SwUINumRuleItem;
#define FN_TOOL_ANCHOR_PAGE (FN_INSERT + 50) /* anchor Draw object to page */
#define FN_TOOL_ANCHOR_PARAGRAPH (FN_INSERT + 51) /* anchor Draw object to paragraph */
#define FN_TOOL_HIERARCHIE (FN_INSERT + 52) /* change hierarchy */
+#define FN_PGNUMBER_WIZARD (FN_INSERT + 53) /* page number wizard */
#define FN_MAILMERGE_WIZARD (FN_INSERT + 64) /* mail merge wizard */
#define FN_TOOL_ANCHOR_FRAME (FN_INSERT + 66) /* anchor Draw-Object to frame*/
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 425d31f88d30..e6927179b875 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -588,6 +588,7 @@
#define STR_UNDO_TBLSTYLE_UPDATE NC_("STR_UNDO_TBLSTYLE_UPDATE", "Update table style: $1")
#define STR_UNDO_TABLE_DELETE NC_("STR_UNDO_TABLE_DELETE", "Delete table")
#define STR_UNDO_INSERT_FORM_FIELD NC_("STR_UNDO_INSERT_FORM_FIELD", "Insert form field")
+#define STR_UNDO_INSERT_PAGE_NUMBER NC_("STR_UNDO_INSERT_PAGE_NUMBER", "Insert page number")
#define STR_DROP_DOWN_FIELD_ITEM_LIMIT NC_("STR_DROP_DOWN_FIELD_ITEM_LIMIT", "You can specify maximum of 25 items for a drop-down form field.")
#define STR_ACCESS_DOC_NAME NC_("STR_ACCESS_DOC_NAME", "Document view")
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 02b38a71d5ee..534d422cb781 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -229,6 +229,16 @@ public:
};
+/// Interface for the insert -> fields -> page number wizard dialog
+class AbstractSwPageNumberDlg : public VclAbstractDialog
+{
+protected:
+ virtual ~AbstractSwPageNumberDlg() override = default;
+public:
+ virtual int GetPageNumberPosition() const = 0;
+ virtual int GetPageNumberAlignment() const = 0;
+};
+
/**
* Interface for the insert -> more breaks -> manual break dialog. It's implemented by
* AbstractSwBreakDlg_Impl, but SwTextShell only knows about this interface and the
@@ -475,6 +485,7 @@ public:
css::uno::Reference< css::container::XNamed > & xNamed,
css::uno::Reference< css::container::XNameAccess > & xNameAccess) = 0;
virtual VclPtr<AbstractSwModalRedlineAcceptDlg> CreateSwModalRedlineAcceptDlg(weld::Window *pParent) = 0;
+ virtual VclPtr<AbstractSwPageNumberDlg> CreateSwPageNumberDlg(weld::Window* pParent) = 0;
virtual VclPtr<VclAbstractDialog> CreateTableMergeDialog(weld::Window* pParent, bool& rWithPrev) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateFrameTabDialog(const OUString &rDialogType,
diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx
index cda4ec02c49f..7e9e0108b71f 100644
--- a/sw/inc/swundo.hxx
+++ b/sw/inc/swundo.hxx
@@ -166,6 +166,7 @@ enum class SwUndoId
INSERT_FORM_FIELD, // 135
OUTLINE_EDIT, // 136
+ INSERT_PAGE_NUMBER, // 137
};
OUString GetUndoComment(SwUndoId eId);