summaryrefslogtreecommitdiffstats
path: root/sw/source/uibase/wrtsh/wrtsh2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/wrtsh/wrtsh2.cxx')
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 82d7c27cb0c6..3197c596e52a 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -68,11 +68,11 @@
#include <sfx2/event.hxx>
#include <sal/log.hxx>
-void SwWrtShell::Insert(SwField const& rField, SwPaM* pAnnotationRange)
+bool SwWrtShell::InsertField2(SwField const& rField, SwPaM* pAnnotationRange)
{
ResetCursorStack();
if(!CanInsert())
- return;
+ return false;
StartAllAction();
SwRewriter aRewriter;
@@ -120,7 +120,7 @@ void SwWrtShell::Insert(SwField const& rField, SwPaM* pAnnotationRange)
}
}
- SwEditShell::Insert2(rField, bDeleted);
+ bool const isSuccess = SwEditShell::InsertField(rField, bDeleted);
if ( pAnnotationTextRange )
{
@@ -145,6 +145,8 @@ void SwWrtShell::Insert(SwField const& rField, SwPaM* pAnnotationRange)
EndUndo();
EndAllAction();
+
+ return isSuccess;
}
// Start the field update