summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmloff/source/text/txtvfldi.cxx20
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);