diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-10-11 22:56:18 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-10-12 09:25:54 +0200 |
commit | 2b729c8fac2b3fb9da06b8a2e3c6a57251cc00d1 (patch) | |
tree | 5b84126d3d429aaf6b8e0c167960f27c739b55c9 /xmloff/source/text/txtvfldi.cxx | |
parent | e0b0502516a10181bbd1737b93b38b2bba4c98e8 (diff) |
Replace some OUStringBuffer by OUString in txtvfldi (xmloff)
Change-Id: I55cb62b58194128533b416797e65078124e8500a
Reviewed-on: https://gerrit.libreoffice.org/80698
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'xmloff/source/text/txtvfldi.cxx')
-rw-r--r-- | xmloff/source/text/txtvfldi.cxx | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index d4aff131fbc7..24ab366f71e7 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -856,17 +856,11 @@ bool XMLVariableDeclImportContext::FindFieldMaster( if (eFMVarType != eVarType) { - OUString sNew; + ++nCollisionCount; + OUString sNew(sName + "_renamed_" + OUString::number(nCollisionCount)); // FIXME! can't find if name is taken already!!!! - nCollisionCount++; - OUStringBuffer aBuf; - aBuf.append(sName); - aBuf.append("_renamed_"); - aBuf.append(nCollisionCount); - sNew = aBuf.makeStringAndClear(); - rImportHelper.GetRenameMap().Add( sal::static_int_cast< sal_uInt16 >(eVarType), sName, sNew); @@ -880,18 +874,12 @@ bool XMLVariableDeclImportContext::FindFieldMaster( aAny >>= xMaster; if (VarTypeUserField != eVarType) { + ++nCollisionCount; // find new name that is not taken - OUString sNew; + OUString sNew(sName + "_renamed_" + OUString::number(nCollisionCount)); // FIXME! can't find if name is taken already!!!! - nCollisionCount++; - OUStringBuffer aBuf; - aBuf.append(sName); - aBuf.append("_renamed_"); - aBuf.append(nCollisionCount); - sNew = aBuf.makeStringAndClear(); - rImportHelper.GetRenameMap().Add( sal::static_int_cast< sal_uInt16 >(eVarType), sName, sNew); |