Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3870

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/70/3870/1

Fixes fdo#64237 by modifying the underlyning string

Change-Id: I7d387e40464b53a55524bf950b8d413cf8468376
---
M sw/source/core/text/guess.cxx
1 file changed, 4 insertions(+), 4 deletions(-)



diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 637372f..03628da 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -275,7 +275,7 @@
                 aDebugString = rInf.GetTxt();
 #endif
 
-                OUString rOldTxt = rInf.GetTxt();
+                OUString& rOldTxt = const_cast<OUString&> (rInf.GetTxt());
                 rOldTxt = rOldTxt.replaceAt( rInf.GetIdx() - 1, 1, aTxt );
                 rInf.SetIdx( rInf.GetIdx() + nFieldDiff );
             }
@@ -487,9 +487,9 @@
                     "I've got field trouble, part2!" );
             nCutPos = nCutPos - nFieldDiff;
 
-            XubString& rOldTxt = (XubString&)rInf.GetTxt();
-            rOldTxt.Erase( nOldIdx - 1, nFieldDiff + 1 );
-            rOldTxt.Insert( cFldChr, nOldIdx - 1 );
+            OUString& rOldTxt = const_cast<OUString&> (rInf.GetTxt());
+            OUString aReplacement( cFldChr );
+            rOldTxt = rOldTxt.replaceAt( nOldIdx - 1, nFieldDiff + 1, aReplacement);
             rInf.SetIdx( nOldIdx );
 
 #if OSL_DEBUG_LEVEL > 0

-- 
To view, visit https://gerrit.libreoffice.org/3870
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d387e40464b53a55524bf950b8d413cf8468376
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Arnaud Versini <arnaud.versini@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.