diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-06-06 20:51:05 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-06-07 00:11:49 +0200 |
commit | 1af2f810624c0e772880d5fafd27cdefa6c88d2c (patch) | |
tree | f4838ae817a45553cff1ba964d5308220b3c2059 /include | |
parent | 63a43711ac1e85b15f6912f568d0a5fb021da920 (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
(cherry picked from commit e2b9946022c2a286ebac625ccb45f5ddddd5a5d6)
Diffstat (limited to 'include')
-rw-r--r-- | include/editeng/svxacorr.hxx | 5 |
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, |