diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2011-12-16 17:29:07 -0200 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2011-12-20 19:28:37 +0400 |
commit | 1375183d465fb17db513dfe16ac522e48573a4c0 (patch) | |
tree | 149a5335e02bd92c33201cc49a4c85c390969e46 /cui/source/customize | |
parent | remove obsolete comment (diff) | |
download | core-1375183d465fb17db513dfe16ac522e48573a4c0.tar.gz core-1375183d465fb17db513dfe16ac522e48573a4c0.zip |
Fix for fdo43460 Part XI getLength() to isEmpty()
Part XI
Module
cui
Diffstat (limited to 'cui/source/customize')
-rw-r--r-- | cui/source/customize/acccfg.cxx | 8 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 26 | ||||
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 10 | ||||
-rw-r--r-- | cui/source/customize/macropg.cxx | 6 | ||||
-rw-r--r-- | cui/source/customize/selector.cxx | 10 |
5 files changed, 30 insertions, 30 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index 159272f07c2b..9a2a918e1661 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -1015,7 +1015,7 @@ void SfxAcceleratorConfigPage::Apply(const css::uno::Reference< css::ui::XAccele try { - if (sCommand.getLength()) + if (!sCommand.isEmpty()) xAccMgr->setKeyEvent(aAWTKey, sCommand); else xAccMgr->removeKeyEvent(aAWTKey); @@ -1233,7 +1233,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, LoadHdl, sfx2::FileDialogHelper*, EMPTYARG if ( ERRCODE_NONE == m_pFileDlg->GetError() ) sCfgName = m_pFileDlg->GetPath(); - if ( !sCfgName.getLength() ) + if ( sCfgName.isEmpty() ) return 0; GetTabDialog()->EnterWait(); @@ -1317,7 +1317,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, EMPTYARG if ( ERRCODE_NONE == m_pFileDlg->GetError() ) sCfgName = m_pFileDlg->GetPath(); - if ( !sCfgName.getLength() ) + if ( sCfgName.isEmpty() ) return 0; GetTabDialog()->EnterWait(); @@ -1358,7 +1358,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, EMPTYARG // set the correct media type if the storage was new created ::rtl::OUString sMediaType; xUIConfigProps->getPropertyValue(MEDIATYPE_PROPNAME) >>= sMediaType; - if (!sMediaType.getLength()) + if (sMediaType.isEmpty()) xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, css::uno::makeAny(MEDIATYPE_UICONFIG)); xCfgMgr = css::uno::Reference< css::ui::XUIConfigurationManager >(m_xSMGR->createInstance(SERVICE_UICONFIGMGR), css::uno::UNO_QUERY_THROW); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index de19df3769cf..35de8426617a 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -481,7 +481,7 @@ OUString GetUIModuleName( const OUString& aModuleId, const uno::Reference< css:: } } - if ( aModuleUIName.getLength() == 0 ) + if ( aModuleUIName.isEmpty() ) aModuleUIName = GetModuleName( aModuleId ); return aModuleUIName; @@ -613,7 +613,7 @@ ConvertSvxConfigEntry( // as an empty string. // It will be initialised again later using the command to label map. aPropSeq[2].Name = aDescriptorLabel; - if ( pEntry->HasChangedName() == sal_False && pEntry->GetCommand().getLength() ) + if ( pEntry->HasChangedName() == sal_False && !pEntry->GetCommand().isEmpty() ) { sal_Bool isDefaultName = sal_False; try @@ -694,7 +694,7 @@ ConvertToolbarEntry( // as an empty string. // It will be initialised again later using the command to label map. aPropSeq[2].Name = aDescriptorLabel; - if ( pEntry->HasChangedName() == sal_False && pEntry->GetCommand().getLength() ) + if ( pEntry->HasChangedName() == sal_False && !pEntry->GetCommand().isEmpty() ) { sal_Bool isDefaultName = sal_False; try @@ -781,7 +781,7 @@ sal_Bool impl_showKeyConfigTabPage( const css::uno::Reference< css::frame::XFram { ::rtl::OUString sModuleId = xMM->identify(xFrame); if ( - ( sModuleId.getLength() ) && + ( !sModuleId.isEmpty() ) && (!sModuleId.equals(MODULEID_STARTMODULE)) ) return sal_True; @@ -1187,7 +1187,7 @@ bool MenuSaveInData::LoadSubMenus( OUString subMenuTitle( rBaseTitle ); - if ( subMenuTitle.getLength() != 0 ) + if ( !subMenuTitle.isEmpty() ) { subMenuTitle += OUString( RTL_CONSTASCII_USTRINGPARAM(aMenuSeparatorStr)); @@ -1758,7 +1758,7 @@ void SvxConfigPage::Reset( const SfxItemSet& ) // if an item to select has been passed in (eg. the ResourceURL for a // toolbar) then try to select the SaveInData entry that has that item bool bURLToSelectFound = sal_False; - if ( m_aURLToSelect.getLength() != 0 ) + if ( !m_aURLToSelect.isEmpty() ) { if ( pDocData != NULL && pDocData->HasURL( m_aURLToSelect ) ) { @@ -3016,9 +3016,9 @@ SvxConfigEntry* SvxMainMenuOrganizerDialog::GetSelectedEntry() const OUString& SvxConfigEntry::GetHelpText() { - if ( aHelpText.getLength() == 0 ) + if ( aHelpText.isEmpty() ) { - if ( aCommand.getLength() ) + if ( !aCommand.isEmpty() ) { aHelpText = Application::GetHelp()->GetHelpText( aCommand, NULL ); } @@ -3688,7 +3688,7 @@ void SvxToolbarConfigPage::Init() ReloadTopLevelListBox(); sal_uInt16 nPos = 0; - if ( m_aURLToSelect.getLength() != 0 ) + if ( !m_aURLToSelect.isEmpty() ) { for ( sal_uInt16 i = 0 ; i < aTopLevelListBox.GetEntryCount(); ++i ) { @@ -3989,12 +3989,12 @@ SvxEntries* ToolbarSaveInData::GetEntries() uno::Reference< container::XIndexAccess > xToolbarSettings = GetConfigManager()->getSettings( url, sal_False ); - if ( uiname.getLength() == 0 ) + if ( uiname.isEmpty() ) { // try to get the name from m_xPersistentWindowState uiname = GetSystemUIName( url ); - if ( uiname.getLength() == 0 ) + if ( uiname.isEmpty() ) { uiname = systemname; } @@ -4077,12 +4077,12 @@ SvxEntries* ToolbarSaveInData::GetEntries() uno::Reference< container::XIndexAccess > xToolbarSettings = xParentCfgMgr->getSettings( url, sal_False ); - if ( uiname.getLength() == 0 ) + if ( uiname.isEmpty() ) { // try to get the name from m_xPersistentWindowState uiname = GetSystemUIName( url ); - if ( uiname.getLength() == 0 ) + if ( uiname.isEmpty() ) { uiname = systemname; } diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index b25e2e443fab..123088b82a2e 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -145,7 +145,7 @@ sal_Bool SfxStylesInfo_Impl::parseStyleCommand(SfxStyleInfo_Impl& aStyle) if (sArg.indexOf(CMDURL_FPART_ONLY) == 0) aStyle.sFamily = sArg.copy(LEN_FPART, sArg.getLength()-LEN_FPART); - if (aStyle.sFamily.getLength() && aStyle.sStyle.getLength()) + if (!(aStyle.sFamily.isEmpty() || aStyle.sStyle.isEmpty())) return sal_True; return sal_False; @@ -178,7 +178,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle) catch(const css::uno::Exception&) { aStyle.sLabel = ::rtl::OUString(); } - if (!aStyle.sLabel.getLength()) + if (aStyle.sLabel.isEmpty()) { aStyle.sLabel = aStyle.sCommand; } @@ -503,7 +503,7 @@ void SfxConfigGroupListBox_Impl::InitModule() try { m_xModuleCategoryInfo->getByName(sGroupID) >>= sGroupName; - if (!sGroupName.getLength()) + if (sGroupName.isEmpty()) continue; } catch(const css::container::NoSuchElementException&) @@ -813,7 +813,7 @@ Image SfxConfigGroupListBox_Impl::GetImage( } } } - if( factoryURL.getLength() > 0 ) + if( !factoryURL.isEmpty() ) { aImage = SvFileInformationManager::GetFileImage( INetURLObject(factoryURL), false ); } @@ -886,7 +886,7 @@ SfxConfigGroupListBox_Impl::getDocumentModel( Reference< XComponentContext >& xC { sUIName = ::rtl::OUString(); } // fallback for missing UINames !? - if (!sUIName.getLength()) + if (sUIName.isEmpty()) { sUIName = sCommand; } diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 26847cc25666..367fc6799cc9 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -791,7 +791,7 @@ Any _SvxMacroTabPage::GetPropsByName( const ::rtl::OUString& eventName, EventsHa Any aReturn; ::comphelper::NamedValueCollection aProps; - if ( rAssignedEvent.first.getLength() && rAssignedEvent.second.getLength() ) + if ( !(rAssignedEvent.first.isEmpty() || rAssignedEvent.second.isEmpty()) ) { aProps.put( "EventType", rAssignedEvent.first ); aProps.put( "Script", rAssignedEvent.second ); @@ -882,7 +882,7 @@ IMPL_LINK(AssignComponentDialog, ButtonHandler, Button *, EMPTYARG) { ::rtl::OUString aMethodName = maMethodEdit.GetText(); maURL = ::rtl::OUString(); - if( aMethodName.getLength() ) + if( !aMethodName.isEmpty() ) { maURL = aVndSunStarUNO; maURL += aMethodName; @@ -904,7 +904,7 @@ AssignComponentDialog::AssignComponentDialog( Window * pParent, const ::rtl::OUS maOKButton.SetClickHdl(LINK(this, AssignComponentDialog, ButtonHandler)); ::rtl::OUString aMethodName; - if( maURL.getLength() ) + if( !maURL.isEmpty() ) { sal_Int32 nIndex = maURL.indexOf( aVndSunStarUNO ); if( nIndex == 0 ) diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 2e9cd2539a93..d5beb563da30 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -470,7 +470,7 @@ void SvxConfigGroupListBox_Impl::Init() Reference< container::XNameAccess > xModuleCategories; if ( xAllCategories.is() ) { - if ( aModuleId.getLength() != 0 ) + if ( !aModuleId.isEmpty() ) { try { @@ -629,7 +629,7 @@ Image SvxConfigGroupListBox_Impl::GetImage( } } } - if( factoryURL.getLength() > 0 ) + if( !factoryURL.isEmpty() ) { aImage = SvFileInformationManager::GetFileImage( INetURLObject(factoryURL), false ); } @@ -720,7 +720,7 @@ void SvxConfigGroupListBox_Impl::GroupSelected() for ( sal_Int32 i = 0; i < commands.getLength(); ++i ) { - if ( commands[i].Command.getLength() == 0 ) + if ( commands[i].Command.isEmpty() ) { continue; } @@ -756,7 +756,7 @@ void SvxConfigGroupListBox_Impl::GroupSelected() { } - if ( aLabel.getLength() == 0 ) + if ( aLabel.isEmpty() ) { aLabel = commands[i].Command; } @@ -1072,7 +1072,7 @@ void SvxScriptSelectorDialog::UpdateUI() { OUString url = GetScriptURL(); - if ( url != NULL && url.getLength() != 0 ) + if ( url != NULL && !url.isEmpty() ) { String rMessage = aCommands.GetHelpText( aCommands.FirstSelected() ); |