diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-10 17:54:51 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-10 23:39:13 -0200 |
commit | e24a27b4cc920cbb1b87c33f99b7379f50d2e0f7 (patch) | |
tree | ab6af7397220ee41793b7edef303075daf853bc6 /sfx2/source/appl | |
parent | f19d269ab4286b2e2e9f579bc4705daf4f6756ab (diff) |
Fix for fdo43460 Part XXXIII getLength() to isEmpty()
Part XXXIII
Modules
sfx2
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 26 | ||||
-rw-r--r-- | sfx2/source/appl/fileobj.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/helpdispatch.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/imagemgr.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/appl/shutdownicon.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/appl/shutdowniconunx.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/xpackcreator.cxx | 8 |
10 files changed, 38 insertions, 38 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 3ac312273f34..9fe9a833d6d6 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -153,7 +153,7 @@ static sal_Bool checkURL( const char *pName, const char *pExt, rtl::OUString &rU rURL += rtl::OUString::createFromAscii( pExt ); rtl::Bootstrap::expandMacros( rURL ); - if (rURL.getLength() != 0) + if (!rURL.isEmpty()) return DirectoryItem::get( rURL, aDirItem ) == DirectoryItem::E_None; else return sal_False; @@ -940,7 +940,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepositoryURL")), ::rtl::OUString()); - if ( xSystemShell.is() && sTemplRepoURL.getLength() > 0 ) + if ( xSystemShell.is() && !sTemplRepoURL.isEmpty() ) { ::rtl::OUStringBuffer aURLBuf( sTemplRepoURL ); aURLBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM("?lang=")); diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index b9ae282e3b20..c807c8ae03a0 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -686,7 +686,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStandardDir)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for StandardDir" ); if (bOK) rSet.Put( SfxStringItem( SID_STANDARD_DIR, sVal ) ); @@ -706,7 +706,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFileName)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for FileName" ); if (bOK) rSet.Put( SfxStringItem( SID_FILE_NAME, sVal ) ); @@ -732,13 +732,13 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); DBG_ASSERT( bOK, "invalid type for FrameName" ); - if (bOK && sVal.getLength()) + if (bOK && !sVal.isEmpty()) rSet.Put( SfxStringItem( SID_TARGETNAME, sVal ) ); } else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMediaType)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for MediaType" ); if (bOK) rSet.Put( SfxStringItem( SID_CONTENTTYPE, sVal ) ); @@ -746,7 +746,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateName)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for TemplateName" ); if (bOK) rSet.Put( SfxStringItem( SID_TEMPLATE_NAME, sVal ) ); @@ -754,7 +754,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateRegionName)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for TemplateRegionName" ); if (bOK) rSet.Put( SfxStringItem( SID_TEMPLATE_REGIONNAME, sVal ) ); @@ -762,7 +762,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sJumpMark)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for JumpMark" ); if (bOK) rSet.Put( SfxStringItem( SID_JUMPMARK, sVal ) ); @@ -770,7 +770,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sCharacterSet)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for CharacterSet" ); if (bOK) rSet.Put( SfxStringItem( SID_CHARSET, sVal ) ); @@ -778,7 +778,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterFlags)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for FilterFlags" ); if (bOK) rSet.Put( SfxStringItem( SID_FILE_FILTEROPTIONS, sVal ) ); @@ -810,7 +810,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDocumentTitle)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for DocumentTitle" ); if (bOK) rSet.Put( SfxStringItem( SID_DOCINFO_TITLE, sVal ) ); @@ -827,7 +827,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHierarchicalDocumentName)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for HierarchicalDocumentName" ); if (bOK) rSet.Put( SfxStringItem( SID_DOC_HIERARCHICALNAME, sVal ) ); @@ -859,7 +859,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsDir)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for SuggestedSaveAsDir" ); if (bOK) rSet.Put( SfxStringItem( SID_SUGGESTEDSAVEASDIR, sVal ) ); @@ -867,7 +867,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsName)) ) { ::rtl::OUString sVal; - sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength()); + sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); DBG_ASSERT( bOK, "invalid type or value for SuggestedSaveAsName" ); if (bOK) rSet.Put( SfxStringItem( SID_SUGGESTEDSAVEASNAME, sVal ) ); diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 7cddda525b5b..deb135a4f2e0 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -411,7 +411,7 @@ String impl_getFilter( const String& _rURL ) css::uno::Sequence< css::beans::PropertyValue > aDescrList = aDescr.getAsConstPropertyValueList(); ::rtl::OUString sType = xTypeDetection->queryTypeByDescriptor( aDescrList, sal_True ); - if ( sType.getLength() ) + if ( !sType.isEmpty() ) { css::uno::Reference< css::container::XNameAccess > xTypeCont( xTypeDetection, css::uno::UNO_QUERY ); diff --git a/sfx2/source/appl/helpdispatch.cxx b/sfx2/source/appl/helpdispatch.cxx index b21e5f11b1b2..dad5423334a6 100644 --- a/sfx2/source/appl/helpdispatch.cxx +++ b/sfx2/source/appl/helpdispatch.cxx @@ -76,7 +76,7 @@ void SAL_CALL HelpDispatch_Impl::dispatch( if ( 0 == ( *pBegin ).Name.compareToAscii( "HelpKeyword" ) ) { rtl::OUString sHelpKeyword; - if ( ( ( *pBegin ).Value >>= sHelpKeyword ) && sHelpKeyword.getLength() > 0 ) + if ( ( ( *pBegin ).Value >>= sHelpKeyword ) && !sHelpKeyword.isEmpty() ) { sKeyword = String( sHelpKeyword ); bHasKeyword = ( sKeyword.Len() > 0 ); diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx index 2b9109932b4f..cf62e9e7770c 100644 --- a/sfx2/source/appl/imagemgr.cxx +++ b/sfx2/source/appl/imagemgr.cxx @@ -167,7 +167,7 @@ Image SAL_CALL GetImage( try { - if ( aCommandURL.getLength() > 0 ) + if ( !aCommandURL.isEmpty() ) { Reference< XImageManager > xModuleImageManager; rtl::OUString aModuleId = xModuleManager->identify( rFrame ); diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 6b09c100bea8..53253d109fff 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -677,7 +677,7 @@ void IndexTabPage_Impl::InitializeIndex() { // abi: Do not copy, but use references const ::rtl::OUString& aKeywordPair = aKeywordList[i]; - DBG_ASSERT( aKeywordPair.getLength() > 0, "invalid help index" ); + DBG_ASSERT( !aKeywordPair.isEmpty(), "invalid help index" ); const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRefList = aKeywordRefList[i]; const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aAnchorList = aAnchorRefList[i]; const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aTitleList = aTitleRefList[i]; @@ -1491,7 +1491,7 @@ void BookmarksTabPage_Impl::AddBookmarks( const String& rTitle, const String& rU sHelpURL.append(sContent); String sURL = String(sHelpURL.makeStringAndClear()); AppendConfigToken(sURL, bUseQuestionMark); - if (sAnchor.getLength()) + if (!sAnchor.isEmpty()) sURL += String(sAnchor); return ::rtl::OUString(sURL); } diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 6093d8025379..32a542df815a 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -125,7 +125,7 @@ static rtl::OUString HelpLocaleString() const rtl::OUString aEnglish( RTL_CONSTASCII_USTRINGPARAM( "en" ) ); // detect installed locale aLocaleStr = utl::ConfigManager::getLocale(); - bool bOk = aLocaleStr.getLength() != 0; + bool bOk = !aLocaleStr.isEmpty(); if ( !bOk ) aLocaleStr = aEnglish; else @@ -165,7 +165,7 @@ static rtl::OUString HelpLocaleString() void AppendConfigToken( String& rURL, sal_Bool bQuestionMark, const rtl::OUString &rLang ) { ::rtl::OUString aLocaleStr( rLang ); - if ( !aLocaleStr.getLength() ) + if ( aLocaleStr.isEmpty() ) aLocaleStr = HelpLocaleString(); // query part exists? @@ -197,7 +197,7 @@ sal_Bool GetHelpAnchor_Impl( const String& _rURL, String& _rAnchor ) if ( ( aCnt.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorName")) ) >>= sAnchor ) ) { - if ( sAnchor.getLength() > 0 ) + if ( !sAnchor.isEmpty() ) { _rAnchor = String( sAnchor ); bRet = sal_True; @@ -276,7 +276,7 @@ SfxHelpOptions_Impl::SfxHelpOptions_Impl() do { rtl::OString aToken = aTmp.getToken( 0, ',', nIndex ); - if ( aToken.getLength() ) + if ( !aToken.isEmpty() ) m_aIds.insert( aToken ); } while ( nIndex >= 0 ); @@ -368,7 +368,7 @@ SfxHelp::SfxHelp() : ::rtl::OUString sHelpDebug; ::rtl::OUString sEnvVarName( RTL_CONSTASCII_USTRINGPARAM( "HELP_DEBUG" ) ); osl_getEnvironment( sEnvVarName.pData, &sHelpDebug.pData ); - bIsDebug = ( 0 != sHelpDebug.getLength() ); + bIsDebug = !sHelpDebug.isEmpty(); } pImp = new SfxHelp_Impl( bIsDebug ); @@ -464,7 +464,7 @@ String SfxHelp::GetHelpModuleName_Impl() rtl::OUString aFactoryShortName; rtl::OUString aModuleIdentifier = getCurrentModuleIdentifier_Impl(); - if ( aModuleIdentifier.getLength() > 0 ) + if ( !aModuleIdentifier.isEmpty() ) { try { @@ -491,7 +491,7 @@ String SfxHelp::GetHelpModuleName_Impl() } rtl::OUString sDefaultModule = getDefaultModule_Impl(); - if ( aFactoryShortName.getLength() > 0 ) + if ( !aFactoryShortName.isEmpty() ) { // Map some module identifiers to their "real" help module string. if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("chart2")) ) @@ -645,7 +645,7 @@ XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* pWindow sHelpText += String( sModuleName ); sHelpText += DEFINE_CONST_UNICODE(": "); sHelpText += aCommandURL; - if ( aNewHelpId.getLength() ) + if ( !aNewHelpId.isEmpty() ) { sHelpText += DEFINE_CONST_UNICODE(" - "); sHelpText += String(rtl::OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8)); @@ -662,7 +662,7 @@ static bool impl_hasHelpInstalled( const rtl::OUString &rLang = rtl::OUString() AppendConfigToken( aHelpRootURL, sal_True, rLang ); Sequence< ::rtl::OUString > aFactories = SfxContentHelper::GetResultSet( aHelpRootURL ); - return ( aFactories.getLength() != 0 ); + return ( aFactories.getLength() != 0 ); } sal_Bool SfxHelp::SearchKeyword( const XubString& rKeyword ) diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index fd1bddd31e14..141aacdeab27 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -508,7 +508,7 @@ IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYAR // Retrieve the current filter - if ( !aFilterName.getLength() ) + if ( aFilterName.isEmpty() ) xPickerControls->getValue( CommonFilePickerElementIds::LISTBOX_FILTER, ControlActions::GET_SELECTED_ITEM ) >>= aFilterName; } @@ -516,7 +516,7 @@ IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYAR // Convert UI filter name to internal filter name - if ( aFilterName.getLength() ) + if ( !aFilterName.isEmpty() ) { const SfxFilter* pFilter = SFX_APP()->GetFilterMatcher().GetFilter4UIName( aFilterName, 0, SFX_FILTER_NOTINFILEDLG ); @@ -524,7 +524,7 @@ IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYAR { aFilterName = pFilter->GetFilterName(); - if ( aFilterName.getLength() ) + if ( !aFilterName.isEmpty() ) { aArgs.realloc( ++nArgs ); aArgs[nArgs-1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName")); @@ -538,7 +538,7 @@ IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYAR else { OUString aBaseDirURL = sFiles[0]; - if ( aBaseDirURL.getLength() > 0 && aBaseDirURL[aBaseDirURL.getLength()-1] != '/' ) + if ( !aBaseDirURL.isEmpty() && aBaseDirURL[aBaseDirURL.getLength()-1] != '/' ) aBaseDirURL += OUString(RTL_CONSTASCII_USTRINGPARAM("/")); int iFiles; diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx index a9a147ce9f56..d0b17edc9ec9 100644 --- a/sfx2/source/appl/shutdowniconunx.cxx +++ b/sfx2/source/appl/shutdowniconunx.cxx @@ -192,7 +192,7 @@ static void add_ugly_db_item( GtkMenuShell *pMenuShell, const char *pAsciiURL, aEntry[m].Value >>= aDescription; } - if ( aURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(BASE_URL)) && aDescription.getLength() ) + if ( aURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(BASE_URL)) && !aDescription.isEmpty() ) { add_item (pMenuShell, pAsciiURL, &aDescription, nResId, pFnCallback); break; diff --git a/sfx2/source/appl/xpackcreator.cxx b/sfx2/source/appl/xpackcreator.cxx index 3f404fdc725e..44c4ed180959 100644 --- a/sfx2/source/appl/xpackcreator.cxx +++ b/sfx2/source/appl/xpackcreator.cxx @@ -103,7 +103,7 @@ void SAL_CALL OPackageStructureCreator::convertToPackage( const ::rtl::OUString& sal_True ); SotStorageRef aStorage = new SotStorage( pUCBStorage ); - if ( aTempURL.getLength() ) + if ( !aTempURL.isEmpty() ) { pTempStream = new SvFileStream( aTempURL, STREAM_STD_READWRITE ); SotStorageRef aTargetStorage = new SotStorage( sal_True, *pTempStream ); @@ -142,7 +142,7 @@ void SAL_CALL OPackageStructureCreator::convertToPackage( const ::rtl::OUString& if ( pTempStream ) delete pTempStream; - if ( aTempURL.getLength() ) + if ( !aTempURL.isEmpty() ) ::utl::UCBContentHelper::Kill( aTempURL ); throw; @@ -152,7 +152,7 @@ void SAL_CALL OPackageStructureCreator::convertToPackage( const ::rtl::OUString& if ( pTempStream ) delete pTempStream; - if ( aTempURL.getLength() ) + if ( !aTempURL.isEmpty() ) ::utl::UCBContentHelper::Kill( aTempURL ); throw; @@ -164,7 +164,7 @@ void SAL_CALL OPackageStructureCreator::convertToPackage( const ::rtl::OUString& if ( pTempStream ) delete pTempStream; - if ( aTempURL.getLength() ) + if ( !aTempURL.isEmpty() ) ::utl::UCBContentHelper::Kill( aTempURL ); } |