diff options
author | Noel Grandin <noel@peralex.com> | 2013-09-27 16:37:15 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-04 08:49:00 +0200 |
commit | 73873ef6b4d7ad8697bda3a44bb16b7eed9b93bd (patch) | |
tree | 5530ef35ec07f7bc27f467ebb131eca9247b69f8 /sc/source/filter/excel | |
parent | 145a6b6bf970257f2627d986084cd5d782d48fc7 (diff) |
convert sc/source/filter/inc/xl*.hxx from String to OUString
Change-Id: If396f7b3d34373fa093cfe1c1e71fd47a559148d
Diffstat (limited to 'sc/source/filter/excel')
-rw-r--r-- | sc/source/filter/excel/xecontent.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xehelper.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xeroot.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xipage.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xistyle.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/excel/xlescher.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/excel/xlformula.cxx | 22 | ||||
-rw-r--r-- | sc/source/filter/excel/xlpage.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xlroot.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/excel/xlstyle.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/excel/xltracer.cxx | 4 |
11 files changed, 36 insertions, 36 deletions
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 46ccfd0a03a7..e30f6d7294cb 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -1556,7 +1556,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) : { if( pValData->GetDataMode() == SC_VALID_LIST ) { - String aString; + OUString aString; if( XclTokenArrayHelper::GetStringList( aString, *xScTokArr, '\n' ) ) { OUStringBuffer sFormulaBuf; @@ -1569,7 +1569,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) : sal_Int32 nStringIx = 0; for( xub_StrLen nToken = 0; nToken < nTokenCnt; ++nToken ) { - String aToken( aString.GetToken( 0, '\n', nStringIx ) ); + String aToken( aString.getToken( 0, '\n', nStringIx ) ); if( nToken > 0 ) { mxString1->Append(OUString(static_cast<sal_Unicode>('\0'))); diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index 2a2e2dc46fd6..8c491a022753 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -750,8 +750,8 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico (aNewData.mnWeight > EXC_FONTWGHT_NORMAL) ? WEIGHT_BOLD : WEIGHT_NORMAL, aNewData.mbItalic ? ITALIC_NORMAL : ITALIC_NONE ) ); aNewData.maStyle = pFontList->GetStyleName( aFontInfo ); - if( aNewData.maStyle.Len() ) - aParaText += "," + OUString(aNewData.maStyle); + if( !aNewData.maStyle.isEmpty() ) + aParaText += "," + aNewData.maStyle; } aParaText += "\""; } diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx index b72503f8f3d4..521879cb879b 100644 --- a/sc/source/filter/excel/xeroot.cxx +++ b/sc/source/filter/excel/xeroot.cxx @@ -351,7 +351,7 @@ uno::Sequence< beans::NamedValue > XclExpRoot::GetEncryptionData() const uno::Sequence< beans::NamedValue > XclExpRoot::GenerateDefaultEncryptionData() const { uno::Sequence< beans::NamedValue > aEncryptionData; - if ( GetDefaultPassword().Len() > 0 ) + if ( !GetDefaultPassword().isEmpty() ) aEncryptionData = GenerateEncryptionData( GetDefaultPassword() ); return aEncryptionData; diff --git a/sc/source/filter/excel/xipage.cxx b/sc/source/filter/excel/xipage.cxx index dcc4168938a0..2894a80c6478 100644 --- a/sc/source/filter/excel/xipage.cxx +++ b/sc/source/filter/excel/xipage.cxx @@ -279,7 +279,7 @@ void XclImpPageSettings::Finalize() XclImpHFConverter aHFConv( GetRoot() ); // header - bool bHasHeader = (maData.maHeader.Len() != 0); + bool bHasHeader = !maData.maHeader.isEmpty(); SvxSetItem aHdrSetItem( GETITEM( rItemSet, SvxSetItem, ATTR_PAGE_HEADERSET ) ); SfxItemSet& rHdrItemSet = aHdrSetItem.GetItemSet(); rHdrItemSet.Put( SfxBoolItem( ATTR_PAGE_ON, bHasHeader ) ); @@ -315,7 +315,7 @@ void XclImpPageSettings::Finalize() rItemSet.Put( aHdrSetItem ); // footer - bool bHasFooter = (maData.maFooter.Len() != 0); + bool bHasFooter = !maData.maFooter.isEmpty(); SvxSetItem aFtrSetItem( GETITEM( rItemSet, SvxSetItem, ATTR_PAGE_FOOTERSET ) ); SfxItemSet& rFtrItemSet = aFtrSetItem.GetItemSet(); rFtrItemSet.Put( SfxBoolItem( ATTR_PAGE_ON, bHasFooter ) ); diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 74cf2a429a53..197727e4c27c 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -191,7 +191,7 @@ void XclImpFont::SetFontData( const XclFontData& rFontData, bool bHasCharSet ) { maData = rFontData; mbHasCharSet = bHasCharSet; - if( maData.maStyle.Len() ) + if( !maData.maStyle.isEmpty() ) { if( SfxObjectShell* pDocShell = GetDocShell() ) { @@ -206,7 +206,7 @@ void XclImpFont::SetFontData( const XclFontData& rFontData, bool bHasCharSet ) } } } - maData.maStyle.Erase(); + maData.maStyle = ""; } GuessScriptType(); SetAllUsedFlags( true ); @@ -663,7 +663,7 @@ void XclImpNumFmtBuffer::CreateScFormats() sal_Int32 nCheckPos; short nType = NUMBERFORMAT_DEFINED; sal_uInt32 nKey; - if( rNumFmt.maFormat.Len() ) + if( !rNumFmt.maFormat.isEmpty() ) { OUString aFormat( rNumFmt.maFormat ); rFormatter.PutandConvertEntry( aFormat, nCheckPos, diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx index 00def4658a36..56fbb5587169 100644 --- a/sc/source/filter/excel/xlescher.cxx +++ b/sc/source/filter/excel/xlescher.cxx @@ -318,9 +318,9 @@ spTbxListenerData[] = } // namespace bool XclControlHelper::FillMacroDescriptor( ScriptEventDescriptor& rDescriptor, - XclTbxEventType eEventType, const String& rXclMacroName, SfxObjectShell* pDocShell ) + XclTbxEventType eEventType, const OUString& rXclMacroName, SfxObjectShell* pDocShell ) { - if( rXclMacroName.Len() > 0 ) + if( !rXclMacroName.isEmpty() ) { rDescriptor.ListenerType = OUString::createFromAscii( spTbxListenerData[ eEventType ].mpcListenerType ); rDescriptor.EventMethod = OUString::createFromAscii( spTbxListenerData[ eEventType ].mpcEventMethod ); @@ -331,7 +331,7 @@ bool XclControlHelper::FillMacroDescriptor( ScriptEventDescriptor& rDescriptor, return false; } -String XclControlHelper::ExtractFromMacroDescriptor( +OUString XclControlHelper::ExtractFromMacroDescriptor( const ScriptEventDescriptor& rDescriptor, XclTbxEventType eEventType, SfxObjectShell* /*pShell*/ ) { if( (!rDescriptor.ScriptCode.isEmpty()) && diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx index 8d2c77a03752..e18dcc857f9f 100644 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -33,11 +33,11 @@ using namespace ::formula; // Function data ============================================================== -String XclFunctionInfo::GetMacroFuncName() const +OUString XclFunctionInfo::GetMacroFuncName() const { if( IsMacroFunc() ) return String( mpcMacroName, RTL_TEXTENCODING_UTF8 ); - return EMPTY_STRING; + return OUString(); } // abbreviations for function return token class @@ -517,7 +517,7 @@ const XclFunctionInfo* XclFunctionProvider::GetFuncInfoFromXclFunc( sal_uInt16 n return (aIt == maXclFuncMap.end()) ? 0 : aIt->second; } -const XclFunctionInfo* XclFunctionProvider::GetFuncInfoFromXclMacroName( const String& rXclMacroName ) const +const XclFunctionInfo* XclFunctionProvider::GetFuncInfoFromXclMacroName( const OUString& rXclMacroName ) const { // only in import filter allowed, but do not test maXclMacroNameMap, it may be empty for old BIFF versions OSL_ENSURE( !maXclFuncMap.empty(), "XclFunctionProvider::GetFuncInfoFromXclMacroName - wrong filter" ); @@ -703,24 +703,24 @@ void XclTokenArrayIterator::SkipSpaces() // strings and string lists --------------------------------------------------- -bool XclTokenArrayHelper::GetTokenString( String& rString, const FormulaToken& rScToken ) +bool XclTokenArrayHelper::GetTokenString( OUString& rString, const FormulaToken& rScToken ) { bool bIsStr = (rScToken.GetType() == svString) && (rScToken.GetOpCode() == ocPush); if( bIsStr ) rString = rScToken.GetString(); return bIsStr; } -bool XclTokenArrayHelper::GetString( String& rString, const ScTokenArray& rScTokArr ) +bool XclTokenArrayHelper::GetString( OUString& rString, const ScTokenArray& rScTokArr ) { XclTokenArrayIterator aIt( rScTokArr, true ); // something is following the string token -> error return aIt.Is() && GetTokenString( rString, *aIt ) && !++aIt; } -bool XclTokenArrayHelper::GetStringList( String& rStringList, const ScTokenArray& rScTokArr, sal_Unicode cSep ) +bool XclTokenArrayHelper::GetStringList( OUString& rStringList, const ScTokenArray& rScTokArr, sal_Unicode cSep ) { bool bRet = true; - String aString; + OUString aString; XclTokenArrayIterator aIt( rScTokArr, true ); enum { STATE_START, STATE_STR, STATE_SEP, STATE_END } eState = STATE_START; while( eState != STATE_END ) switch( eState ) @@ -730,12 +730,12 @@ bool XclTokenArrayHelper::GetStringList( String& rStringList, const ScTokenArray break; case STATE_STR: bRet = GetTokenString( aString, *aIt ); - if( bRet ) rStringList.Append( aString ); + if( bRet ) rStringList += aString ; eState = (bRet && (++aIt).Is()) ? STATE_SEP : STATE_END; break; case STATE_SEP: bRet = aIt->GetOpCode() == ocSep; - if( bRet ) rStringList.Append( cSep ); + if( bRet ) rStringList += OUString(cSep); eState = (bRet && (++aIt).Is()) ? STATE_STR : STATE_END; break; default:; @@ -745,7 +745,7 @@ bool XclTokenArrayHelper::GetStringList( String& rStringList, const ScTokenArray void XclTokenArrayHelper::ConvertStringToList( ScTokenArray& rScTokArr, sal_Unicode cStringSep, bool bTrimLeadingSpaces ) { - String aString; + OUString aString; if( GetString( aString, rScTokArr ) ) { rScTokArr.Clear(); @@ -753,7 +753,7 @@ void XclTokenArrayHelper::ConvertStringToList( ScTokenArray& rScTokArr, sal_Unic sal_Int32 nStringIx = 0; for( xub_StrLen nToken = 0; nToken < nTokenCnt; ++nToken ) { - String aToken( aString.GetToken( 0, cStringSep, nStringIx ) ); + String aToken( aString.getToken( 0, cStringSep, nStringIx ) ); if( bTrimLeadingSpaces ) aToken = comphelper::string::stripStart(aToken, ' '); if( nToken > 0 ) diff --git a/sc/source/filter/excel/xlpage.cxx b/sc/source/filter/excel/xlpage.cxx index 9f88f19a1da9..83ca60e6a88b 100644 --- a/sc/source/filter/excel/xlpage.cxx +++ b/sc/source/filter/excel/xlpage.cxx @@ -175,8 +175,8 @@ void XclPageData::SetDefaults() maHorPageBreaks.clear(); maVerPageBreaks.clear(); mxBrushItem.reset(); - maHeader.Erase(); - maFooter.Erase(); + maHeader = ""; + maFooter = ""; mfLeftMargin = mfRightMargin = XclTools::GetInchFromHmm( EXC_MARGIN_DEFAULT_LR ); mfTopMargin = mfBottomMargin = XclTools::GetInchFromHmm( EXC_MARGIN_DEFAULT_TB ); mfHeaderMargin = mfFooterMargin = XclTools::GetInchFromHmm( EXC_MARGIN_DEFAULT_HF ); diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index b21bb240d20f..75edc1836420 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -101,7 +101,7 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium, mbExport( bExport ) { maUserName = SvtUserOptions().GetLastName(); - if( maUserName.Len() == 0 ) + if( maUserName.isEmpty() ) maUserName = "Calc"; switch( ScGlobal::GetDefaultScriptType() ) @@ -243,26 +243,26 @@ bool XclRoot::HasVbaStorage() const return xRootStrg.Is() && xRootStrg->IsContained( EXC_STORAGE_VBA_PROJECT ); } -SotStorageRef XclRoot::OpenStorage( SotStorageRef xStrg, const String& rStrgName ) const +SotStorageRef XclRoot::OpenStorage( SotStorageRef xStrg, const OUString& rStrgName ) const { return mrData.mbExport ? ScfTools::OpenStorageWrite( xStrg, rStrgName ) : ScfTools::OpenStorageRead( xStrg, rStrgName ); } -SotStorageRef XclRoot::OpenStorage( const String& rStrgName ) const +SotStorageRef XclRoot::OpenStorage( const OUString& rStrgName ) const { return OpenStorage( GetRootStorage(), rStrgName ); } -SotStorageStreamRef XclRoot::OpenStream( SotStorageRef xStrg, const String& rStrmName ) const +SotStorageStreamRef XclRoot::OpenStream( SotStorageRef xStrg, const OUString& rStrmName ) const { return mrData.mbExport ? ScfTools::OpenStorageStreamWrite( xStrg, rStrmName ) : ScfTools::OpenStorageStreamRead( xStrg, rStrmName ); } -SotStorageStreamRef XclRoot::OpenStream( const String& rStrmName ) const +SotStorageStreamRef XclRoot::OpenStream( const OUString& rStrmName ) const { return OpenStream( GetRootStorage(), rStrmName ); } diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index 94a2550f165e..5db4602486e2 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -189,7 +189,7 @@ XclFontData::XclFontData( const SvxFont& rFont ) void XclFontData::Clear() { maName = ""; - maStyle.Erase(); + maStyle = ""; maColor.SetColor( COL_AUTO ); mnHeight = 0; mnWeight = EXC_FONTWGHT_DONTKNOW; @@ -203,7 +203,7 @@ void XclFontData::Clear() void XclFontData::FillFromVclFont( const Font& rFont ) { maName = XclTools::GetXclFontName( rFont.GetName() ); // substitute with MS fonts - maStyle.Erase(); + maStyle = ""; maColor = rFont.GetColor(); SetScUnderline( rFont.GetUnderline() ); mnEscapem = EXC_FONTESC_NONE; @@ -1491,7 +1491,7 @@ void XclNumFmtBuffer::InitializeImport() maFmtMap.clear(); } -void XclNumFmtBuffer::InsertFormat( sal_uInt16 nXclNumFmt, const String& rFormat ) +void XclNumFmtBuffer::InsertFormat( sal_uInt16 nXclNumFmt, const OUString& rFormat ) { XclNumFmt& rNumFmt = maFmtMap[ nXclNumFmt ]; rNumFmt.maFormat = rFormat; diff --git a/sc/source/filter/excel/xltracer.cxx b/sc/source/filter/excel/xltracer.cxx index 7250053ec69a..5a83ae37c5de 100644 --- a/sc/source/filter/excel/xltracer.cxx +++ b/sc/source/filter/excel/xltracer.cxx @@ -24,13 +24,13 @@ using ::com::sun::star::uno::Sequence; using ::com::sun::star::beans::PropertyValue; -XclTracer::XclTracer( const String& rDocUrl ) +XclTracer::XclTracer( const OUString& rDocUrl ) : mbEnabled(false) , maFirstTimes(eTraceLength,true) { Sequence< PropertyValue > aConfigData( 1 ); aConfigData[ 0 ].Name = "DocumentURL"; - aConfigData[ 0 ].Value <<= OUString( rDocUrl ); + aConfigData[ 0 ].Value <<= rDocUrl; } XclTracer::~XclTracer() |