summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-07-04 15:49:52 +0200
committerMichael Stahl <mstahl@redhat.com>2017-07-05 11:35:02 +0200
commitb4c4187bcc6ab03be1b9c1c05cf992677c546c08 (patch)
tree57c3a8d44df11cebd20ba6b8c4236cd82224fede
parentb0e05f9ade9e93c569c6a62c59ac1819e615f27b (diff)
sw: fix Undo strings when deleting input fields and fieldmarks
Filter our current collection of magic dummy chars in DenoteSpecialCharacters() so that no weird U+000004 code points are displayed in tooltips of the Undo button. Change-Id: I7c7fe9b79b452624bb2569ffa18939e3e5ab1a53
-rw-r--r--sw/source/core/undo/undel.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index dfae9e8e779a..94a86342db6d 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -564,6 +564,11 @@ static bool lcl_IsSpecialCharacter(sal_Unicode nChar)
case CH_TXTATR_INWORD:
case CH_TXTATR_TAB:
case CH_TXTATR_NEWLINE:
+ case CH_TXT_ATR_INPUTFIELDSTART:
+ case CH_TXT_ATR_INPUTFIELDEND:
+ case CH_TXT_ATR_FORMELEMENT:
+ case CH_TXT_ATR_FIELDSTART:
+ case CH_TXT_ATR_FIELDEND:
return true;
default:
@@ -598,6 +603,16 @@ static OUString lcl_DenotedPortion(const OUString& rStr, sal_Int32 nStart, sal_I
aResult = SwRewriter::GetPlaceHolder(UndoArg2);
break;
+ case CH_TXT_ATR_INPUTFIELDSTART:
+ case CH_TXT_ATR_INPUTFIELDEND:
+ case CH_TXT_ATR_FORMELEMENT:
+ case CH_TXT_ATR_FIELDSTART:
+ case CH_TXT_ATR_FIELDEND:
+ break; // nothing?
+
+ default:
+ assert(!"unexpected special character");
+ break;
}
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1,