summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpsave.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-01-31 21:01:50 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-01-31 21:01:50 -0500
commit46f69ccfcfc2463efe93b4d8f36f46344a97dd0a (patch)
treef13b42acce1336c7523435b0bf57fe286d02db70 /sc/source/core/data/dpsave.cxx
parent5f85fcb2597eed726a1e8f994ce6e0099181748f (diff)
Use OUStringBuffer in case we need to modify string after creation.
Diffstat (limited to 'sc/source/core/data/dpsave.cxx')
-rw-r--r--sc/source/core/data/dpsave.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 55c3b61ca1a1..5e5c95a35c80 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -67,6 +67,7 @@ using namespace com::sun::star;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
using ::rtl::OUStringHash;
using ::std::hash_map;
using ::std::auto_ptr;
@@ -1131,11 +1132,11 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
{
if ( pDim->GetDupFlag() )
{
- String aNewName = pDim->GetName();
+ OUStringBuffer aBuf(pDim->GetName());
// different name for each duplication of a (real) dimension...
for (long j=0; j<=i; ++j) //! Test !!!!!!
- aNewName += '*'; //! modify name at creation of SaveDimension
+ aBuf.append(sal_Unicode('*')); //! modify name at creation of SaveDimension
uno::Reference<util::XCloneable> xCloneable( xIntDim, uno::UNO_QUERY );
DBG_ASSERT( xCloneable.is(), "cannot clone dimension" );
@@ -1145,7 +1146,7 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
uno::Reference<container::XNamed> xNewName( xNew, uno::UNO_QUERY );
if (xNewName.is())
{
- xNewName->setName( aNewName );
+ xNewName->setName(aBuf.makeStringAndClear());
pDim->WriteToSource( xNew );
}
}