summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-06-06 20:51:05 +0200
committerMichael Stahl <mstahl@redhat.com>2013-06-07 00:09:34 +0200
commite2b9946022c2a286ebac625ccb45f5ddddd5a5d6 (patch)
treea52de2d64d3fe3ef7b0776864a096cd49887b79b /include
parentf62cb42d060b50cf7015ee8e2031c45f7631669a (diff)
sw: fix AutoCorrect bold/underline regression
The horrible SvxAutoCorrect::AutoCorrect() inserts the character into the document half-way through, and then _expects_ this inserted character to show up in its rTxt parameter. This broke in Writer when SwTxtNode::m_Text was converted to OUString, because now a temporary String copy is created. Work around this disaster area for now. (regression from 0295c8a34e39326414c1b98cf4da905802f061b0) Change-Id: I1cb11a20cb0c2577036176e605426105631f3311
Diffstat (limited to 'include')
-rw-r--r--include/editeng/svxacorr.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 9d5774a12464..85bf3e913768 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -290,7 +290,10 @@ public:
// Execute an AutoCorrect.
// Returns what has been executed, according to the above flags
- sal_uLong AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
+ // FIXME: this has the horrible flaw that the rTxt must be a reference
+ // to the actual SwTxtNode/EditNode string because it inserts the character
+ // in rDoc and expects that to side-effect rTxt
+ sal_uLong DoAutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nPos, sal_Unicode cInsChar, sal_Bool bInsert, Window* pFrameWin = NULL );
// Return for the autotext expansion the previous word,