diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:33:38 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:33 +0100 |
commit | f79c92198775cac688774ace792b296647448781 (patch) | |
tree | 61c2278198cfac07d0f4fdfef59383aaaefb5443 /svl | |
parent | afdd564e5f1f5c9772a9f2b278113605c40f9da8 (diff) |
svl: Use appropriate OUString functions on string constants
Change-Id: I212dccf416fda574f940f13a2b1de5c293b3f9fd
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/srchitem.cxx | 24 | ||||
-rw-r--r-- | svl/source/numbers/supservs.cxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zforfind.cxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 10 | ||||
-rw-r--r-- | svl/source/numbers/zforscan.cxx | 10 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 2 | ||||
-rw-r--r-- | svl/source/uno/registerservices.cxx | 7 |
8 files changed, 30 insertions, 33 deletions
diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx index db0244ff43b4..35fa3b804cc9 100644 --- a/svl/source/items/srchitem.cxx +++ b/svl/source/items/srchitem.cxx @@ -368,29 +368,29 @@ bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMembe case 0 : { Sequence< PropertyValue > aSeq( SRCH_PARAMS ); - aSeq[0].Name = OUString( SRCH_PARA_OPTIONS ); + aSeq[0].Name = SRCH_PARA_OPTIONS; aSeq[0].Value <<= aSearchOpt; - aSeq[1].Name = OUString( SRCH_PARA_FAMILY ); + aSeq[1].Name = SRCH_PARA_FAMILY; aSeq[1].Value <<= sal_Int16( eFamily ); - aSeq[2].Name = OUString( SRCH_PARA_COMMAND ); + aSeq[2].Name = SRCH_PARA_COMMAND; aSeq[2].Value <<= nCommand; - aSeq[3].Name = OUString( SRCH_PARA_CELLTYPE ); + aSeq[3].Name = SRCH_PARA_CELLTYPE; aSeq[3].Value <<= nCellType; - aSeq[4].Name = OUString( SRCH_PARA_APPFLAG ); + aSeq[4].Name = SRCH_PARA_APPFLAG; aSeq[4].Value <<= nAppFlag; - aSeq[5].Name = OUString( SRCH_PARA_ROWDIR ); + aSeq[5].Name = SRCH_PARA_ROWDIR; aSeq[5].Value <<= bRowDirection; - aSeq[6].Name = OUString( SRCH_PARA_ALLTABLES ); + aSeq[6].Name = SRCH_PARA_ALLTABLES; aSeq[6].Value <<= bAllTables; - aSeq[6].Name = OUString( SRCH_PARA_SEARCHFILTERED ); + aSeq[6].Name = SRCH_PARA_SEARCHFILTERED; aSeq[6].Value <<= bSearchFiltered; - aSeq[7].Name = OUString( SRCH_PARA_BACKWARD ); + aSeq[7].Name = SRCH_PARA_BACKWARD; aSeq[7].Value <<= bBackward; - aSeq[8].Name = OUString( SRCH_PARA_PATTERN ); + aSeq[8].Name = SRCH_PARA_PATTERN; aSeq[8].Value <<= bPattern; - aSeq[9].Name = OUString( SRCH_PARA_CONTENT ); + aSeq[9].Name = SRCH_PARA_CONTENT; aSeq[9].Value <<= bContent; - aSeq[10].Name = OUString( SRCH_PARA_ASIANOPT ); + aSeq[10].Name = SRCH_PARA_ASIANOPT; aSeq[10].Value <<= bAsianOptions; rVal <<= aSeq; } diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx index 58be033d2d60..0234b1e0f8c3 100644 --- a/svl/source/numbers/supservs.cxx +++ b/svl/source/numbers/supservs.cxx @@ -39,8 +39,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; using namespace ::utl; -#define PERSISTENT_SERVICE_NAME OUString("com.sun.star.util.NumberFormatsSupplier"); - Reference< XInterface > SAL_CALL SvNumberFormatsSupplierServiceObject_CreateInstance(const Reference< XMultiServiceFactory >& _rxFactory) { return static_cast< ::cppu::OWeakObject* >(new SvNumberFormatsSupplierServiceObject( comphelper::getComponentContext(_rxFactory) )); @@ -128,7 +126,7 @@ sal_Bool SAL_CALL SvNumberFormatsSupplierServiceObject::supportsService( const O Sequence< OUString > SAL_CALL SvNumberFormatsSupplierServiceObject::getSupportedServiceNames( ) throw(RuntimeException, std::exception) { Sequence< OUString > aSupported(1); - aSupported.getArray()[0] = PERSISTENT_SERVICE_NAME; + aSupported.getArray()[0] = "com.sun.star.util.NumberFormatsSupplier"; return aSupported; } diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index cd8bc6f84e1e..4e1f3cd38fae 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -289,7 +289,7 @@ bool ImpSvNumberInputScan::NextNumberStringSymbol( const sal_Unicode*& pStr, } else { - rSymbol = ""; + rSymbol.clear(); } pStr = pHere; @@ -3340,7 +3340,7 @@ void ImpSvNumberInputScan::ChangeIntl() bDecSepInDateSeps = ( cDecSep == (sal_Unicode)'-' || cDecSep == pFormatter->GetDateSep()[0] ); bTextInitialized = false; - aUpperCurrSymbol =""; + aUpperCurrSymbol.clear(); InvalidateDateAcceptancePatterns(); } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index cb7af29b357b..0a3de627d58d 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -3344,7 +3344,7 @@ bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, OUString return true; } } - rStr = ""; + rStr.clear(); return false; } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index cb95094361d2..45093a9aba29 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -417,7 +417,7 @@ bool ImpSvNumFor::GetNewCurrencySymbol( OUString& rSymbol, } else { - rExtension = ""; + rExtension.clear(); } return true; } @@ -1636,8 +1636,8 @@ bool SvNumberformat::GetNewCurrencySymbol( OUString& rSymbol, return true; } } - rSymbol = ""; - rExtension = ""; + rSymbol.clear(); + rExtension.clear(); return false; } @@ -2068,7 +2068,7 @@ bool SvNumberformat::GetOutputString(double fNumber, { bool bRes = false; OUStringBuffer sBuff; - OutString = ""; + OutString.clear(); *ppColor = NULL; // No color change if (eType & NUMBERFORMAT_LOGICAL) { @@ -3115,7 +3115,7 @@ bool SvNumberformat::ImpFallBackToGregorianCalendar( OUString& rOrgCalendar, dou } else if ( rOrgCalendar == rGregorian ) { - rOrgCalendar = ""; + rOrgCalendar.clear(); } rCal.loadCalendar( rGregorian, rLoc().getLanguageTag().getLocale() ); rCal.setDateTime( fOrgDateTime ); diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index ea28370dc477..582c23356b7b 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -122,8 +122,8 @@ void ImpSvNumberformatScan::ChangeIntl() bKeywordsNeedInit = true; bCompatCurNeedInit = true; // may be initialized by InitSpecialKeyword() - sKeyword[NF_KEY_TRUE] = ""; - sKeyword[NF_KEY_FALSE] = ""; + sKeyword[NF_KEY_TRUE].clear(); + sKeyword[NF_KEY_FALSE].clear(); } void ImpSvNumberformatScan::InitSpecialKeyword( NfKeywordIndex eIdx ) const @@ -515,7 +515,7 @@ Color* ImpSvNumberformatScan::GetColor(OUString& sStr) } else { - sStr = ""; + sStr.clear(); if (bConvertMode) { pFormatter->ChangeIntl(eNewLnge); @@ -651,7 +651,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr, const sal_Int32 nStart = nPos; short eType = 0; ScanState eState = SsStart; - sSymbol = ""; + sSymbol.clear(); while ( nPos < rStr.getLength() && eState != SsStop ) { sal_Unicode cToken = rStr[nPos++]; @@ -2685,7 +2685,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) } } // Concatenate strings, remove quotes for output, and rebuild the format string - rString = ""; + rString.clear(); i = 0; while (i < nAnzStrings) { diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 01573f8ee6fb..aadd1f9892a8 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -1175,7 +1175,7 @@ void SAL_CALL PasswordContainer::removeMasterPassword() ::osl::MutexGuard aGuard( mMutex ); if ( m_pStorageFile ) { - m_aMasterPasswd = ""; + m_aMasterPasswd.clear(); m_pStorageFile->setEncodedMP( OUString() ); // let the master password be removed from configuration } } diff --git a/svl/source/uno/registerservices.cxx b/svl/source/uno/registerservices.cxx index 64277feca9ac..cd28b250dc7e 100644 --- a/svl/source/uno/registerservices.cxx +++ b/svl/source/uno/registerservices.cxx @@ -47,7 +47,7 @@ SVL_DLLPUBLIC void* SAL_CALL svl_component_getFactory ( { Sequence< OUString > aServiceNames(1); aServiceNames.getArray()[0] = - OUString("com.sun.star.util.NumberFormatsSupplier"); + "com.sun.star.util.NumberFormatsSupplier"; xFactory = ::cppu::createSingleFactory( reinterpret_cast< css::lang::XMultiServiceFactory* >(_pServiceManager), @@ -60,8 +60,7 @@ SVL_DLLPUBLIC void* SAL_CALL svl_component_getFactory ( "com.sun.star.uno.util.numbers.SvNumberFormatterServiceObject") == 0) { Sequence< OUString > aServiceNames(1); - aServiceNames.getArray()[0] = - OUString("com.sun.star.util.NumberFormatter"); + aServiceNames.getArray()[0] = "com.sun.star.util.NumberFormatter"; xFactory = ::cppu::createSingleFactory( reinterpret_cast< css::lang::XMultiServiceFactory* >(_pServiceManager), @@ -74,7 +73,7 @@ SVL_DLLPUBLIC void* SAL_CALL svl_component_getFactory ( { Sequence< OUString > aServiceNames(1); aServiceNames.getArray()[0] = - OUString("com.sun.star.config.SpecialConfigManager"); + "com.sun.star.config.SpecialConfigManager"; xFactory = ::cppu::createSingleFactory ( reinterpret_cast< css::lang::XMultiServiceFactory* >( _pServiceManager ), OUString::createFromAscii( pImplementationName ), |