xmloff/source/text/txtvfldi.cxx | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-)
New commits: commit 2b729c8fac2b3fb9da06b8a2e3c6a57251cc00d1 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Fri Oct 11 22:56:18 2019 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Sat Oct 12 09:25:54 2019 +0200 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 <serval2...@yahoo.fr> 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits