summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-09-20 11:23:03 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-09-20 11:23:03 +0200
commit49f11e4a5cb60993e1421ccae831c810d494c4d7 (patch)
treeffe2aa4381fcf6f89c267b35feb92613d4c69159
parentRemove redundant default ctor definition (diff)
downloadcore-49f11e4a5cb60993e1421ccae831c810d494c4d7.tar.gz
core-49f11e4a5cb60993e1421ccae831c810d494c4d7.zip
Related cid#1371289: Improve code to not depend on missing move assignment
Change-Id: I6f0b8247b6757ddee158bd870473b749f22e7671
-rw-r--r--i18nutil/source/utility/unicode.cxx12
-rw-r--r--include/i18nutil/unicode.hxx1
2 files changed, 6 insertions, 7 deletions
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx
index 0ae9ab77c553..9c489b1a6706 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -1210,7 +1210,7 @@ sal_uInt32 ToggleUnicodeCodepoint::CharsToDelete()
OUString ToggleUnicodeCodepoint::ReplacementString()
{
OUString sIn = StringToReplace();
- maOutput = "";
+ OUStringBuffer output = "";
sal_Int32 nUPlus = sIn.indexOf("U+");
// convert from hex notation to glyph
if( nUPlus != -1 || (sIn.getLength() > 1 && mbIsHexString) )
@@ -1224,13 +1224,13 @@ OUString ToggleUnicodeCodepoint::ReplacementString()
while( nUPlus > 0 )
{
nUnicode = sIn.copy(0, nUPlus).toUInt32(16);
- maOutput.appendUtf32( nUnicode );
+ output.appendUtf32( nUnicode );
sIn = sIn.copy(nUPlus+2);
nUPlus = sIn.indexOf("U+");
}
nUnicode = sIn.toUInt32(16);
- maOutput.appendUtf32( nUnicode );
+ output.appendUtf32( nUnicode );
}
// convert from glyph to hex notation
else
@@ -1242,11 +1242,11 @@ OUString ToggleUnicodeCodepoint::ReplacementString()
//pad with zeros - minimum length of 4.
for( sal_Int32 i = 4 - aTmp.getLength(); i > 0; --i )
aTmp.insert( 0,"0" );
- maOutput.append( "U+" );
- maOutput.append( aTmp );
+ output.append( "U+" );
+ output.append( aTmp );
}
}
- return maOutput.toString();
+ return output.toString();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/i18nutil/unicode.hxx b/include/i18nutil/unicode.hxx
index 318c7807c9be..ec517161f4dd 100644
--- a/include/i18nutil/unicode.hxx
+++ b/include/i18nutil/unicode.hxx
@@ -72,7 +72,6 @@ class I18NUTIL_DLLPUBLIC ToggleUnicodeCodepoint
{
private:
OUStringBuffer maInput;
- OUStringBuffer maOutput;
OUStringBuffer maUtf16;
OUStringBuffer maCombining;
bool mbAllowMoreChars = true;