diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-02-21 13:38:33 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-03-09 12:58:31 +0100 |
commit | 55d6be75732d1bb0067bba9496c74ef30be9a3ec (patch) | |
tree | 281c43cc47c77f1c202708fcf89b66a4798d7946 /sw/inc | |
parent | 021332144074a9d20a3eab9ada117acfa7cdbfe0 (diff) |
MSForms: Implement undo / redo for insertion of legacy form fields
Need to handle undo / redo explicitely for form fields, because
there is no a general working undo / redo mechanism for fieldmarks.
During the insertion of the fieldmark, text insertion also happens which
generates an interfering undo action, so we need to disable undoing
temporary.
Also need to invalidta SID_UNDO slot to make the undo toolbar item updated
after we insert a form field.
Change-Id: I358c2704cb30212a38f8a998888a36f72fa404e5
Reviewed-on: https://gerrit.libreoffice.org/68956
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/IDocumentMarkAccess.hxx | 2 | ||||
-rw-r--r-- | sw/inc/strings.hrc | 1 | ||||
-rw-r--r-- | sw/inc/swundo.hxx | 4 |
3 files changed, 6 insertions, 1 deletions
diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx index 3fb7090e5067..823326e2b8ac 100644 --- a/sw/inc/IDocumentMarkAccess.hxx +++ b/sw/inc/IDocumentMarkAccess.hxx @@ -254,6 +254,8 @@ class IDocumentMarkAccess virtual ::sw::mark::IFieldmark* getDropDownFor(const SwPosition& pos) const=0; virtual std::vector< ::sw::mark::IFieldmark* > getDropDownsFor(const SwPaM &rPaM) const=0; + virtual void deleteFieldmarkAt(const SwPosition& rPos) = 0; + // Annotation Marks virtual const_iterator_t getAnnotationMarksBegin() const = 0; virtual const_iterator_t getAnnotationMarksEnd() const = 0; diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index 85ec816ad3d8..c8671f015e91 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -541,6 +541,7 @@ #define STR_UNDO_TBLSTYLE_DELETE NC_("STR_UNDO_TBLSTYLE_DELETE", "Delete table style: $1") #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_ACCESS_DOC_NAME NC_("STR_ACCESS_DOC_NAME", "Document view") #define STR_ACCESS_DOC_DESC NC_("STR_ACCESS_DOC_DESC", "Document view") diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx index c393554f0614..90fa6c51d055 100644 --- a/sw/inc/swundo.hxx +++ b/sw/inc/swundo.hxx @@ -162,7 +162,9 @@ enum class SwUndoId UI_DELETE_PAGE_BREAK, // 131 UI_TEXT_CORRECTION, // 132 UI_TABLE_DELETE, // 133 - CONFLICT // 134 + CONFLICT, // 134 + + INSERT_FORM_FIELD // 135 }; OUString GetUndoComment(SwUndoId eId); |