diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-18 14:02:51 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-18 14:13:25 -0500 |
commit | bf034403ac8c98c9ebbe5ae59042502ab7c330d7 (patch) | |
tree | 4ee0dd8d728f6330d8f936b849114ce7c418ce6b /sc | |
parent | e48ea72a2fb8099145a260e691461be3cc0323f5 (diff) |
String to rtl::OUString.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/read.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx index d389402154f3..d68fc5147b34 100644 --- a/sc/source/filter/excel/read.cxx +++ b/sc/source/filter/excel/read.cxx @@ -835,8 +835,7 @@ FltError ImportExcel8::Read( void ) bool bSheetHasCodeName = false; - std::vector< String > CodeNames; - + std::vector<rtl::OUString> aCodeNames; std::vector < SCTAB > nTabsWithNoCodeName; while( eAkt != EXC_STATE_END ) @@ -1109,7 +1108,7 @@ FltError ImportExcel8::Read( void ) GetDoc().GetCodeName( GetCurrScTab(), sCodeName ); OSL_TRACE("Have CodeName %s for SheetName %s", rtl::OUStringToOString( sCodeName, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr() ); - CodeNames.push_back( sCodeName ); + aCodeNames.push_back( sCodeName ); } bSheetHasCodeName = false; // reset @@ -1244,10 +1243,12 @@ FltError ImportExcel8::Read( void ) OSL_TRACE("Trying to find suitable codename for %d", *it ); while ( true ) { - String sTmpName( RTL_CONSTASCII_USTRINGPARAM("Sheet" ) ); - sTmpName += String::CreateFromInt32( sal_Int32(nTab++) ); - std::vector< String >::iterator codeName_It = CodeNames.begin(); - std::vector< String >::iterator codeName_It_end = CodeNames.end(); + rtl::OUStringBuffer aBuf; + aBuf.appendAscii("Sheet"); + aBuf.append(static_cast<sal_Int32>(nTab++)); + rtl::OUString sTmpName = aBuf.makeStringAndClear(); + std::vector<rtl::OUString>::iterator codeName_It = aCodeNames.begin(); + std::vector<rtl::OUString>::iterator codeName_It_end = aCodeNames.end(); // search for codename for ( ; codeName_It != codeName_It_end; ++codeName_It ) { @@ -1261,7 +1262,7 @@ FltError ImportExcel8::Read( void ) // Set new codename GetDoc().SetCodeName( *it, sTmpName ); // Record newly used codename - CodeNames.push_back( sTmpName ); + aCodeNames.push_back(sTmpName); // Record those we have created so they can be created in // basic maAutoGeneratedCodeNames.push_back( sTmpName ); |