diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-06 18:15:33 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-15 15:10:05 +0100 |
commit | b8b53e54e3873275c3ab40b4ec9217c00727ed26 (patch) | |
tree | e1b0253c7cd73f31bf21681e388b4ec970bd1343 /sw/source/core/undo | |
parent | 5f8bae548fd84c26cd05af3563e6b6ba200edf74 (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/source/core/undo')
-rw-r--r-- | sw/source/core/undo/undobj.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/undo/unredln.cxx | 7 |
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; |