summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-11-06 18:15:33 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-11-10 19:47:00 +0100
commit285c591707757c58a50d904a4fd1c110229c8f20 (patch)
treeb8b2ec42f627bdab9d45f338c5f3cddafd1b3f24 /sw
parent45b470be8809a6cc08a58031af7c3cfe75a13311 (diff)
sw_redlinehide_3: fix comment of SwUndoRedlineDelete
GetUndoComment() just returns "$1" and then SwUndoRedlineDelete::GetRewriter() just replaces all of that; seems to work... Change-Id: Iaaa563b8dc6848506a5f8e186248f4f6fb9c80e9
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/undo/undobj.cxx4
-rw-r--r--sw/source/core/undo/unredln.cxx7
2 files changed, 7 insertions, 4 deletions
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 1b14c4ffc8a8..8f45e20e514d 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -362,8 +362,8 @@ OUString GetUndoComment(SwUndoId eId)
pId = STR_CHANGEFTN;
break;
case SwUndoId::REDLINE:
- SAL_WARN("sw.core", "Should NEVER be used/translated");
- return OUString();
+ SAL_INFO("sw.core", "Should NEVER be used/translated");
+ return OUString("$1");
case SwUndoId::ACCEPT_REDLINE:
pId = STR_ACCEPT_REDLINE;
break;
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 09b7651e2eed..b85fa4baa113 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -176,17 +176,20 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
bCacheComment = false;
}
+// bit of a hack, replace everything...
SwRewriter SwUndoRedlineDelete::GetRewriter() const
{
SwRewriter aResult;
OUString aStr = m_sRedlineText;
aStr = DenoteSpecialCharacters(aStr);
aStr = ShortenString(aStr, nUndoStringLength, SwResId(STR_LDOTS));
- aResult.AddRule(UndoArg1, aStr);
+ SwRewriter aRewriter;
+ aRewriter.AddRule(UndoArg1, aStr);
+ OUString ret = aRewriter.Apply(SwResId(STR_UNDO_REDLINE_DELETE));
+ aResult.AddRule(UndoArg1, ret);
return aResult;
}
-
void SwUndoRedlineDelete::SetRedlineText(const OUString & rText)
{
m_sRedlineText = rText;