summaryrefslogtreecommitdiff
path: root/sw/source/uibase/wrtsh/wrtundo.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/wrtsh/wrtundo.cxx')
-rw-r--r--sw/source/uibase/wrtsh/wrtundo.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/uibase/wrtsh/wrtundo.cxx b/sw/source/uibase/wrtsh/wrtundo.cxx
index 1e92006a232b..770c59367a37 100644
--- a/sw/source/uibase/wrtsh/wrtundo.cxx
+++ b/sw/source/uibase/wrtsh/wrtundo.cxx
@@ -25,11 +25,12 @@
#include <swdtflvr.hxx>
#include <svtools/svtresid.hxx>
#include <svtools/strings.hrc>
+#include <osl/diagnose.h>
// Undo ends all modes. If a selection is emerged by the Undo,
// this must be considered for further action.
-void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt )
+void SwWrtShell::Do(DoType eDoType, sal_uInt16 nCnt, sal_uInt16 nOffset)
{
// #105332# save current state of DoesUndo()
bool bSaveDoesUndo = DoesUndo();
@@ -41,7 +42,7 @@ void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt )
DoUndo(false); // #i21739#
// Reset modes
EnterStdMode();
- SwEditShell::Undo(nCnt);
+ SwEditShell::Undo(nCnt, nOffset);
break;
case REDO:
DoUndo(false); // #i21739#
@@ -94,7 +95,7 @@ void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt )
OUString SwWrtShell::GetDoString( DoType eDoType ) const
{
OUString aUndoStr;
- const char* pResStr = STR_UNDO;
+ TranslateId pResStr = STR_UNDO;
switch( eDoType )
{
case UNDO:
@@ -129,7 +130,7 @@ void SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) const
for (const OUString & comment : comments)
{
OSL_ENSURE(!comment.isEmpty(), "no Undo/Redo Text set");
- buf.append(comment).append("\n");
+ buf.append(comment + "\n");
}
rStrs.SetString(buf.makeStringAndClear());
}