summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2011-12-26 14:20:50 -0200
committerJan Holesovsky <kendy@suse.cz>2011-12-30 10:56:15 +0100
commit18692cc1412bd7eca37d80d4345c0ae775d94ac5 (patch)
tree21d4445a80835fc86826d9adf098dedc76b9ff07
parente220f41cb2486d2ad101d98e48fbbc40c9fd08c3 (diff)
Fix for fdo43460 Part XX getLength() to isEmpty()
Part XX Module framework
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx36
-rw-r--r--framework/source/accelerators/moduleacceleratorconfiguration.cxx2
-rw-r--r--framework/source/accelerators/presethandler.cxx4
-rw-r--r--framework/source/accelerators/storageholder.cxx2
-rw-r--r--framework/source/classes/fwktabwindow.cxx2
-rw-r--r--framework/source/classes/menumanager.cxx8
-rw-r--r--framework/source/dispatch/closedispatcher.cxx2
-rw-r--r--framework/source/dispatch/dispatchprovider.cxx4
-rw-r--r--framework/source/dispatch/menudispatcher.cxx4
-rw-r--r--framework/source/dispatch/servicehandler.cxx2
-rw-r--r--framework/source/fwe/classes/addonmenu.cxx8
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx16
-rw-r--r--framework/source/fwe/classes/bmkmenu.cxx4
-rw-r--r--framework/source/fwe/helper/actiontriggerhelper.cxx2
-rw-r--r--framework/source/fwe/helper/titlehelper.cxx10
-rw-r--r--framework/source/fwe/xml/menudocumenthandler.cxx22
-rw-r--r--framework/source/fwe/xml/statusbardocumenthandler.cxx4
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx18
-rw-r--r--framework/source/fwe/xml/xmlnamespaces.cxx8
-rw-r--r--framework/source/fwi/helper/mischelper.cxx4
-rw-r--r--framework/source/helper/persistentwindowstate.cxx4
-rw-r--r--framework/source/helper/titlebarupdate.cxx2
-rw-r--r--framework/source/jobs/helponstartup.cxx8
-rw-r--r--framework/source/jobs/jobexecutor.cxx4
-rw-r--r--framework/source/jobs/joburl.cxx24
-rw-r--r--framework/source/jobs/shelljob.cxx2
-rw-r--r--framework/source/layoutmanager/helpers.cxx2
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx4
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx24
-rw-r--r--framework/source/loadenv/loadenv.cxx24
-rw-r--r--framework/source/loadenv/targethelper.cxx4
-rw-r--r--framework/source/recording/dispatchrecorder.cxx2
-rw-r--r--framework/source/services/autorecovery.cxx54
-rw-r--r--framework/source/services/backingwindow.cxx6
-rw-r--r--framework/source/services/desktop.cxx2
-rw-r--r--framework/source/services/dispatchhelper.cxx2
-rw-r--r--framework/source/services/frame.cxx2
-rw-r--r--framework/source/services/license.cxx4
-rw-r--r--framework/source/services/modulemanager.cxx2
-rw-r--r--framework/source/services/pathsettings.cxx6
-rw-r--r--framework/source/services/substitutepathvars.cxx10
-rw-r--r--framework/source/services/taskcreatorsrv.cxx4
-rw-r--r--framework/source/services/urltransformer.cxx12
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx2
-rw-r--r--framework/source/uiconfiguration/moduleuicfgsupplier.cxx2
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx6
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx4
-rw-r--r--framework/source/uiconfiguration/windowstateconfiguration.cxx2
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx6
-rw-r--r--framework/source/uielement/buttontoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/complextoolbarcontroller.cxx8
-rw-r--r--framework/source/uielement/fontsizemenucontroller.cxx2
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx2
-rw-r--r--framework/source/uielement/menubarmanager.cxx18
-rw-r--r--framework/source/uielement/menubarmerger.cxx4
-rw-r--r--framework/source/uielement/newmenucontroller.cxx8
-rw-r--r--framework/source/uielement/spinfieldtoolbarcontroller.cxx10
-rw-r--r--framework/source/uielement/statusbarmanager.cxx2
-rw-r--r--framework/source/uielement/toolbarmanager.cxx14
-rw-r--r--framework/source/uielement/toolbarmerger.cxx2
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx10
-rw-r--r--framework/source/uielement/uicommanddescription.cxx4
-rw-r--r--framework/source/uifactory/addonstoolboxfactory.cxx4
-rw-r--r--framework/source/uifactory/factoryconfiguration.cxx4
-rw-r--r--framework/source/uifactory/menubarfactory.cxx2
-rw-r--r--framework/source/uifactory/toolbarcontrollerfactory.cxx6
-rw-r--r--framework/source/uifactory/uielementfactorymanager.cxx4
-rw-r--r--framework/source/uifactory/windowcontentfactorymanager.cxx10
-rw-r--r--framework/source/xml/acceleratorconfigurationreader.cxx2
-rw-r--r--framework/source/xml/imagesdocumenthandler.cxx2
71 files changed, 257 insertions, 257 deletions
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index f6f1c88abdcd..2c740088e452 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -186,7 +186,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE
static_cast< ::cppu::OWeakObject* >(this),
0);
- if (!sCommand.getLength())
+ if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty command strings are not allowed here.")),
static_cast< ::cppu::OWeakObject* >(this),
@@ -226,7 +226,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XMLBasedAcceleratorConfigurati
css::container::NoSuchElementException,
css::uno::RuntimeException )
{
- if (!sCommand.getLength())
+ if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty command strings are not allowed here.")),
static_cast< ::cppu::OWeakObject* >(this),
@@ -263,7 +263,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XMLBasedAcceleratorConfiguration::g
for (i=0; i<c; ++i)
{
const ::rtl::OUString& rCommand = lCommandList[i];
- if (!rCommand.getLength())
+ if (rCommand.isEmpty())
throw css::lang::IllegalArgumentException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty command strings are not allowed here.")),
static_cast< ::cppu::OWeakObject* >(this),
@@ -292,7 +292,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co
css::container::NoSuchElementException,
css::uno::RuntimeException )
{
- if (!sCommand.getLength())
+ if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty command strings are not allowed here.")),
static_cast< ::cppu::OWeakObject* >(this),
@@ -643,7 +643,7 @@ AcceleratorCache& XMLBasedAcceleratorConfiguration::impl_getCFG(sal_Bool bWriteA
::rtl::OUString sISOLocale;
xProp->getPropertyValue(LOCALE_KEY) >>= sISOLocale;
- if (!sISOLocale.getLength())
+ if (sISOLocale.isEmpty())
return ::comphelper::Locale::EN_US();
return ::comphelper::Locale(sISOLocale);
}
@@ -757,7 +757,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::setKeyEvent(const css::awt::KeyE
static_cast< ::cppu::OWeakObject* >(this),
0);
- if (!sCommand.getLength())
+ if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty command strings are not allowed here.")),
static_cast< ::cppu::OWeakObject* >(this),
@@ -844,7 +844,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeKeyEvent(const css::awt::K
if (rPrimaryCache.hasKey(aKeyEvent))
{
::rtl::OUString sDelCommand = rPrimaryCache.getCommandByKey(aKeyEvent);
- if (sDelCommand.getLength() > 0)
+ if (!sDelCommand.isEmpty())
{
::rtl::OUString sOriginalCommand = rPrimaryCache.getCommandByKey(aKeyEvent);
if (rSecondaryCache.hasCommand(sOriginalCommand))
@@ -861,7 +861,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeKeyEvent(const css::awt::K
else
{
::rtl::OUString sDelCommand = rSecondaryCache.getCommandByKey(aKeyEvent);
- if (sDelCommand.getLength() > 0)
+ if (!sDelCommand.isEmpty())
rSecondaryCache.removeKey(aKeyEvent);
}
@@ -874,7 +874,7 @@ css::uno::Sequence< css::awt::KeyEvent > SAL_CALL XCUBasedAcceleratorConfigurati
css::container::NoSuchElementException,
css::uno::RuntimeException )
{
- if (!sCommand.getLength())
+ if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty command strings are not allowed here.")),
static_cast< ::cppu::OWeakObject* >(this),
@@ -938,7 +938,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL XCUBasedAcceleratorConfiguration::g
for (i=0; i<c; ++i)
{
const ::rtl::OUString& rCommand = lCommandList[i];
- if (!rCommand.getLength())
+ if (rCommand.isEmpty())
throw css::lang::IllegalArgumentException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty command strings are not allowed here.")),
static_cast< ::cppu::OWeakObject* >(this),
@@ -971,7 +971,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::removeCommandFromAllKeyEvents(co
css::container::NoSuchElementException,
css::uno::RuntimeException )
{
- if (!sCommand.getLength())
+ if (sCommand.isEmpty())
throw css::lang::IllegalArgumentException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty command strings are not allowed here.")),
static_cast< ::cppu::OWeakObject* >(this),
@@ -1249,7 +1249,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util:
{
::rtl::OUString sModule;
sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
- if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 ))
+ if ( !sKey.isEmpty() && !sPath.isEmpty() )
reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
}
else if ( sGlobalModules.equals(CFG_ENTRY_MODULES) )
@@ -1257,7 +1257,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util:
::rtl::OUString sModule = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
- if (( sKey.getLength() > 0 ) && ( sPath.getLength() > 0 ))
+ if ( !sKey.isEmpty() && !sPath.isEmpty() )
{
reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
}
@@ -1328,7 +1328,7 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const
::rtl::OUString sLocale = *pFound;
::rtl::OUString sCommand;
xCommand->getByName(sLocale) >>= sCommand;
- if (sCommand.getLength()<1)
+ if (sCommand.isEmpty())
continue;
css::awt::KeyEvent aKeyEvent;
@@ -1349,7 +1349,7 @@ void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const
sToken[k] = sKey.getToken(0, '_', nIndex);
::rtl::OUString sTest = sToken[k];
- if (sToken[k].getLength() < 1)
+ if (sToken[k].isEmpty())
{
bValid = sal_False;
break;
@@ -1604,14 +1604,14 @@ void XCUBasedAcceleratorConfiguration::reloadChanged( const ::rtl::OUString& sPr
if (sPrimarySecondary.equals(CFG_ENTRY_PRIMARY))
{
- if (sCommand.getLength() ==0)
+ if (sCommand.isEmpty())
m_aPrimaryReadCache.removeKey(aKeyEvent);
else
m_aPrimaryReadCache.setKeyCommandPair(aKeyEvent, sCommand);
}
else if (sPrimarySecondary.equals(CFG_ENTRY_SECONDARY))
{
- if (sCommand.getLength() ==0)
+ if (sCommand.isEmpty())
m_aSecondaryReadCache.removeKey(aKeyEvent);
else
m_aSecondaryReadCache.setKeyCommandPair(aKeyEvent, sCommand);
@@ -1685,7 +1685,7 @@ AcceleratorCache& XCUBasedAcceleratorConfiguration::impl_getCFG(sal_Bool bPrefer
::rtl::OUString sISOLocale;
xProp->getPropertyValue(LOCALE_KEY) >>= sISOLocale;
- if (!sISOLocale.getLength())
+ if (sISOLocale.isEmpty())
return ::comphelper::Locale::EN_US();
return ::comphelper::Locale(sISOLocale);
}
diff --git a/framework/source/accelerators/moduleacceleratorconfiguration.cxx b/framework/source/accelerators/moduleacceleratorconfiguration.cxx
index 3b96453d15a1..9c3fb8f2a754 100644
--- a/framework/source/accelerators/moduleacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/moduleacceleratorconfiguration.cxx
@@ -115,7 +115,7 @@ void SAL_CALL ModuleAcceleratorConfiguration::initialize(const css::uno::Sequenc
m_sModule = lArgs.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ModuleIdentifier")), ::rtl::OUString());
m_sLocale = lArgs.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Locale")) , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("x-default")));
- if (!m_sModule.getLength())
+ if (m_sModule.isEmpty())
throw css::uno::RuntimeException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The module dependend accelerator configuration service was initialized with an empty module identifier!")),
static_cast< ::cppu::OWeakObject* >(this));
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index 28e270da6b19..d276b486eba8 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -759,7 +759,7 @@ void PresetHandler::addStorageListener(IStorageListener* pListener)
aReadLock.unlock();
// <- SAFE ----------------------------------
- if (!sRelPath.getLength())
+ if (sRelPath.isEmpty())
return;
switch(eCfgType)
@@ -789,7 +789,7 @@ void PresetHandler::removeStorageListener(IStorageListener* pListener)
aReadLock.unlock();
// <- SAFE ----------------------------------
- if (!sRelPath.getLength())
+ if (sRelPath.isEmpty())
return;
switch(eCfgType)
diff --git a/framework/source/accelerators/storageholder.cxx b/framework/source/accelerators/storageholder.cxx
index 7bb720ebbd23..d60e18d7674e 100644
--- a/framework/source/accelerators/storageholder.cxx
+++ b/framework/source/accelerators/storageholder.cxx
@@ -591,7 +591,7 @@ css::uno::Reference< css::io::XStream > StorageHolder::openSubStreamWithFallback
sNormedPath += sNormedPath.copy(1);
// "/" => "" || "" => "" ?
- if (sNormedPath.getLength() < 1)
+ if (sNormedPath.isEmpty())
return ::rtl::OUString();
// "bla" => "bla/"
diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx
index 34e8b7affecf..3497e78cfbab 100644
--- a/framework/source/classes/fwktabwindow.cxx
+++ b/framework/source/classes/fwktabwindow.cxx
@@ -361,7 +361,7 @@ FwkTabPage* FwkTabWindow::AddTabPage( sal_Int32 nIndex, const uno::Sequence< bea
m_TabList.push_back( pEntry );
sal_uInt16 nIdx = static_cast< sal_uInt16 >( nIndex );
m_aTabCtrl.InsertPage( nIdx, sTitle );
- if ( sToolTip.getLength() > 0 )
+ if ( !sToolTip.isEmpty() )
m_aTabCtrl.SetHelpText( nIdx, sToolTip );
if ( xImage.is() )
m_aTabCtrl.SetPageImage( nIdx, Image( xImage ) );
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 404f3c239d48..e2a08deb13db 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -261,7 +261,7 @@ MenuManager::MenuManager(
MenuConfiguration::Attributes* pMenuAttributes =
(MenuConfiguration::Attributes*)pMenu->GetUserValue( nItemId );
- if ( pMenuAttributes && pMenuAttributes->aImageId.getLength() > 0 )
+ if ( pMenuAttributes && !pMenuAttributes->aImageId.isEmpty() )
{
// Retrieve image id from menu attributes
aImage = GetImageFromURL( rFrame, aImageId, false );
@@ -833,7 +833,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu )
pMenuItemHandler->nItemId > END_ITEMID_WINDOWLIST )
{
::rtl::OUString aItemCommand = pMenu->GetItemCommand( pMenuItemHandler->nItemId );
- if ( !aItemCommand.getLength() )
+ if ( aItemCommand.isEmpty() )
{
const static ::rtl::OUString aSlotString( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aItemCommand = aSlotString;
@@ -986,7 +986,7 @@ sal_uInt16 MenuManager::FillItemCommand(::rtl::OUString& _rItemCommand,Menu* _pM
sal_uInt16 nItemId = _pMenu->GetItemId( _nIndex );
_rItemCommand = _pMenu->GetItemCommand( nItemId );
- if ( !_rItemCommand.getLength() )
+ if ( _rItemCommand.isEmpty() )
{
const static ::rtl::OUString aSlotString( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
_rItemCommand = aSlotString;
@@ -1023,7 +1023,7 @@ void MenuManager::FillMenuImages(Reference< XFrame >& _xFrame,Menu* _pMenu,sal_B
if ( pMenuAttributes )
aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
- if ( aImageId.getLength() > 0 )
+ if ( !aImageId.isEmpty() )
{
Image aImage = GetImageFromURL( _xFrame, aImageId, false );
if ( !!aImage )
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index c7ea2a338eed..b595da772413 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -608,7 +608,7 @@ css::uno::Reference< css::frame::XFrame > CloseDispatcher::static_impl_searchRig
if (sTarget.equalsIgnoreAsciiCaseAscii("_self"))
return xFrame;
- OSL_ENSURE((sTarget.getLength() < 1), "CloseDispatch used for unexpected target. Magic things will happen now .-)");
+ OSL_ENSURE(sTarget.isEmpty(), "CloseDispatch used for unexpected target. Magic things will happen now .-)");
css::uno::Reference< css::frame::XFrame > xTarget = xFrame;
while(sal_True)
diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx
index d54ffee4d692..a3f3eb08ee4a 100644
--- a/framework/source/dispatch/dispatchprovider.cxx
+++ b/framework/source/dispatch/dispatchprovider.cxx
@@ -257,7 +257,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryDeskt
if (
(sTargetFrameName==SPECIALTARGET_SELF) ||
(sTargetFrameName==SPECIALTARGET_TOP ) ||
- (sTargetFrameName.getLength()<1 )
+ (sTargetFrameName.isEmpty())
)
{
xDispatcher = implts_searchProtocolHandler(aURL);
@@ -408,7 +408,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
else
if (
(sTargetName==SPECIALTARGET_SELF) ||
- (sTargetName.getLength()<1 )
+ (sTargetName.isEmpty())
)
{
// There exist a hard coded interception for special URLs.
diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx
index 5a804720b986..df6f90c4059f 100644
--- a/framework/source/dispatch/menudispatcher.cxx
+++ b/framework/source/dispatch/menudispatcher.cxx
@@ -414,7 +414,7 @@ sal_Bool MenuDispatcher::impldbg_checkParameter_addStatusListener( const uno::
if (
( &xControl == NULL ) ||
( &aURL == NULL ) ||
- ( aURL.Complete.getLength() < 1 )
+ ( aURL.Complete.isEmpty() )
)
{
bOK = sal_False ;
@@ -435,7 +435,7 @@ sal_Bool MenuDispatcher::impldbg_checkParameter_removeStatusListener( const u
if (
( &xControl == NULL ) ||
( &aURL == NULL ) ||
- ( aURL.Complete.getLength() < 1 )
+ ( aURL.Complete.isEmpty() )
)
{
bOK = sal_False ;
diff --git a/framework/source/dispatch/servicehandler.cxx b/framework/source/dispatch/servicehandler.cxx
index f9b8d5b1bf16..51de3d4494fe 100644
--- a/framework/source/dispatch/servicehandler.cxx
+++ b/framework/source/dispatch/servicehandler.cxx
@@ -292,7 +292,7 @@ css::uno::Reference< css::uno::XInterface > ServiceHandler::implts_dispatch( con
sServiceName = sServiceAndArguments;
}
- if (!sServiceName.getLength())
+ if (sServiceName.isEmpty())
return css::uno::Reference< css::uno::XInterface >();
// If a service doesnt support an optional job executor interface - he can't get
diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx
index 69d3a79254af..1afe4c2338ac 100644
--- a/framework/source/fwe/classes/addonmenu.cxx
+++ b/framework/source/fwe/classes/addonmenu.cxx
@@ -269,8 +269,8 @@ void AddonMenuManager::MergeAddonPopupMenus( const Reference< XFrame >& rFrame,
aImageId,
aContext,
aAddonSubMenu );
- if ( aTitle.getLength() > 0 &&
- aURL.getLength() > 0 &&
+ if ( !aTitle.isEmpty() &&
+ !aURL.isEmpty() &&
aAddonSubMenu.getLength() > 0 &&
AddonMenuManager::IsCorrectContext( rModel, aContext ))
{
@@ -321,7 +321,7 @@ void AddonMenuManager::BuildMenu( PopupMenu* pCurrent
{
GetMenuEntry( aAddonMenuDefinition[i], aTitle, aURL, aTarget, aImageId, aContext, aAddonSubMenu );
- if ( !IsCorrectContext( rModel, aContext ) || ( !aTitle.getLength() && !aURL.getLength() ))
+ if ( !IsCorrectContext( rModel, aContext ) || ( aTitle.isEmpty() && aURL.isEmpty() ))
continue;
if ( aURL == ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:separator" )))
@@ -420,7 +420,7 @@ sal_Bool AddonMenuManager::IsCorrectContext( const Reference< XModel >& rModel,
}
}
- return ( aContext.getLength() == 0 );
+ return ( aContext.isEmpty() );
}
}
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index 84d676901ab0..d5e4561be585 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -864,7 +864,7 @@ sal_Bool AddonsOptions_Impl::ReadImages( ImageManager& aImageManager )
// An user-defined image entry must have an URL. As "ImageIdentifier" has a higher priority
// we also check if we already have an images association.
if (( aAddonImageItemNodeValues[0] >>= aURL ) &&
- aURL.getLength() > 0 &&
+ !aURL.isEmpty() &&
!HasAssociatedImages( aURL ))
{
::rtl::OUStringBuffer aBuf( aImagesItemNode );
@@ -1091,7 +1091,7 @@ sal_Bool AddonsOptions_Impl::ReadMenuItem( const ::rtl::OUString& aMenuNodeName,
Sequence< Any > aMenuItemNodePropValues;
aMenuItemNodePropValues = GetProperties( GetPropertyNamesMenuItem( aAddonMenuItemTreeNode ) );
- if (( aMenuItemNodePropValues[ OFFSET_MENUITEM_TITLE ] >>= aStrValue ) && aStrValue.getLength() > 0 )
+ if (( aMenuItemNodePropValues[ OFFSET_MENUITEM_TITLE ] >>= aStrValue ) && !aStrValue.isEmpty() )
{
aMenuItem[ OFFSET_MENUITEM_TITLE ].Value <<= aStrValue;
@@ -1122,7 +1122,7 @@ sal_Bool AddonsOptions_Impl::ReadMenuItem( const ::rtl::OUString& aMenuNodeName,
aMenuItem[ OFFSET_MENUITEM_SUBMENU ].Value <<= aSubMenuSeq;
bResult = sal_True;
}
- else if (( aMenuItemNodePropValues[ OFFSET_MENUITEM_URL ] >>= aStrValue ) && aStrValue.getLength() > 0 )
+ else if (( aMenuItemNodePropValues[ OFFSET_MENUITEM_URL ] >>= aStrValue ) && !aStrValue.isEmpty() )
{
// A simple menu item => read the other properties;
::rtl::OUString aMenuImageId;
@@ -1166,7 +1166,7 @@ sal_Bool AddonsOptions_Impl::ReadPopupMenu( const ::rtl::OUString& aPopupMenuNod
aPopupMenuNodePropValues = GetProperties( GetPropertyNamesPopupMenu( aAddonPopupMenuTreeNode ) );
if (( aPopupMenuNodePropValues[ OFFSET_POPUPMENU_TITLE ] >>= aStrValue ) &&
- aStrValue.getLength() > 0 )
+ !aStrValue.isEmpty() )
{
aPopupMenu[ OFFSET_POPUPMENU_TITLE ].Value <<= aStrValue;
@@ -1230,7 +1230,7 @@ sal_Bool AddonsOptions_Impl::ReadToolBarItem( const ::rtl::OUString& aToolBarIte
aToolBarItemNodePropValues = GetProperties( GetPropertyNamesToolBarItem( aAddonToolBarItemTreeNode ) );
// A toolbar item must have a command URL
- if (( aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_URL ] >>= aURL ) && aURL.getLength() > 0 )
+ if (( aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_URL ] >>= aURL ) && !aURL.isEmpty() )
{
if ( aURL.equals( SEPARATOR_URL ))
{
@@ -1245,7 +1245,7 @@ sal_Bool AddonsOptions_Impl::ReadToolBarItem( const ::rtl::OUString& aToolBarIte
bResult = sal_True;
}
- else if (( aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_TITLE ] >>= aTitle ) && aTitle.getLength() > 0 )
+ else if (( aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_TITLE ] >>= aTitle ) && !aTitle.isEmpty() )
{
// A normal toolbar item must also have title => read the other properties;
::rtl::OUString aImageId;
@@ -1384,7 +1384,7 @@ void AddonsOptions_Impl::ReadAndAssociateImages( const ::rtl::OUString& aURL, co
const char* aExtArray[MAX_NUM_IMAGES] = { "_16", "_26" };
const char* pBmpExt = ".bmp";
- if ( aImageId.getLength() == 0 )
+ if ( aImageId.isEmpty() )
return;
bool bImageFound = true;
@@ -1466,7 +1466,7 @@ AddonsOptions_Impl::ImageEntry* AddonsOptions_Impl::ReadImageData( const ::rtl::
// has a higher priority.
aPropertyData[i] >>= aImageURL;
- if ( aImageURL.getLength() > 0 )
+ if ( !aImageURL.isEmpty() )
{
Image aImage;
Image aImageNoScale;
diff --git a/framework/source/fwe/classes/bmkmenu.cxx b/framework/source/fwe/classes/bmkmenu.cxx
index 1bb977c33e57..8b8ac60e70d3 100644
--- a/framework/source/fwe/classes/bmkmenu.cxx
+++ b/framework/source/fwe/classes/bmkmenu.cxx
@@ -158,7 +158,7 @@ void BmkMenu::Initialize()
{
GetMenuEntry( aDynamicMenuEntries[i], aTitle, aURL, aTargetFrame, aImageId );
- if ( !aTitle.getLength() && !aURL.getLength() )
+ if ( aTitle.isEmpty() && aURL.isEmpty() )
continue;
if ( aURL == ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:separator" )))
@@ -170,7 +170,7 @@ void BmkMenu::Initialize()
if ( bShowMenuImages )
{
- if ( aImageId.getLength() > 0 )
+ if ( !aImageId.isEmpty() )
{
Image aImage = GetImageFromURL( m_xFrame, aImageId, false );
if ( !!aImage )
diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx
index f098c0298ba0..6c1cc69cbcc5 100644
--- a/framework/source/fwe/helper/actiontriggerhelper.cxx
+++ b/framework/source/fwe/helper/actiontriggerhelper.cxx
@@ -275,7 +275,7 @@ Reference< XPropertySet > CreateActionTrigger( sal_uInt16 nItemId, const Menu* p
OUString aCommandURL = pMenu->GetItemCommand( nItemId );
- if ( aCommandURL.getLength() == 0 )
+ if ( aCommandURL.isEmpty() )
{
aCommandURL = OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aCommandURL += OUString::valueOf( (sal_Int32)nItemId );
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index 3a4bdd3b1763..07ff57d514fb 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -121,7 +121,7 @@ void TitleHelper::setOwner(const css::uno::Reference< css::uno::XInterface >& xO
return m_sTitle;
// Title seams to be up-to-date. Return it directly.
- if (m_sTitle.getLength() > 0)
+ if (!m_sTitle.isEmpty())
return m_sTitle;
// Title seams to be unused till now ... do bootstraping
@@ -377,7 +377,7 @@ void TitleHelper::impl_updateTitleForModel (const css::uno::Reference< css::fram
if (xURLProvider.is())
sURL = xURLProvider->getLocation ();
- if (sURL.getLength () > 0)
+ if (!sURL.isEmpty())
{
sTitle = impl_convertURL2Title(sURL);
if (nLeasedNumber != css::frame::UntitledNumbersConst::INVALID_NUMBER)
@@ -588,7 +588,7 @@ void TitleHelper::impl_appendModuleName (::rtl::OUStringBuffer& sTitle)
// An UIname property is an optional value !
// So please add it to the title in case it does realy exists only.
- if (sUIName.getLength() > 0)
+ if (!sUIName.isEmpty())
{
sTitle.appendAscii (" " );
sTitle.append (sUIName);
@@ -690,10 +690,10 @@ void TitleHelper::impl_setSubTitle (const css::uno::Reference< css::frame::XTitl
if (aURL.hasExtension(INetURLObject::LAST_SEGMENT))
sTitle = aURL.getName(INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::DECODE_WITH_CHARSET);
- if ( ! sTitle.getLength() )
+ if ( sTitle.isEmpty() )
sTitle = aURL.GetHostPort(INetURLObject::DECODE_WITH_CHARSET);
- if ( ! sTitle.getLength() )
+ if ( sTitle.isEmpty() )
sTitle = aURL.GetURLNoPass(INetURLObject::DECODE_WITH_CHARSET);
}
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx
index 2195ac216883..a8bf41ca63b4 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -410,7 +410,7 @@ throw( SAXException, RuntimeException )
do
{
::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex );
- if ( aToken.getLength() > 0 )
+ if ( !aToken.isEmpty() )
{
if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
@@ -424,7 +424,7 @@ throw( SAXException, RuntimeException )
}
}
- if ( aCommandId.getLength() > 0 )
+ if ( !aCommandId.isEmpty() )
{
Sequence< PropertyValue > aSubMenuProp( 6 );
initPropertyCommon( aSubMenuProp, aCommandId, aHelpId, aLabel, nItemBits );
@@ -645,7 +645,7 @@ throw( SAXException, RuntimeException )
do
{
::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex );
- if ( aToken.getLength() > 0 )
+ if ( !aToken.isEmpty() )
{
if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
@@ -660,7 +660,7 @@ throw( SAXException, RuntimeException )
}
- if ( aCommandId.getLength() > 0 )
+ if ( !aCommandId.isEmpty() )
{
Sequence< PropertyValue > aSubMenuProp( 6 );
initPropertyCommon( aSubMenuProp, aCommandId, aHelpId, aLabel, nItemBits );
@@ -702,7 +702,7 @@ throw( SAXException, RuntimeException )
do
{
::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex );
- if ( aToken.getLength() > 0 )
+ if ( !aToken.isEmpty() )
{
if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
@@ -717,7 +717,7 @@ throw( SAXException, RuntimeException )
}
- if ( aCommandId.getLength() > 0 )
+ if ( !aCommandId.isEmpty() )
{
Sequence< PropertyValue > aMenuItem( 6 );
initPropertyCommon( aMenuItem, aCommandId, aHelpId, aLabel, nItemBits );
@@ -885,7 +885,7 @@ throw ( SAXException, RuntimeException )
WriteMenuItem( aCommandURL, aLabel, aHelpURL, nItemBits );
bSeparator = sal_False;
}
- else if (( aCommandURL.getLength() > 0 ) && !AddonPopupMenu::IsCommandURLPrefix ( aCommandURL ))
+ else if ( !aCommandURL.isEmpty() && !AddonPopupMenu::IsCommandURLPrefix( aCommandURL ))
{
::comphelper::AttributeList* pListMenu = new ::comphelper::AttributeList;
Reference< XAttributeList > xListMenu( (XAttributeList *)pListMenu , UNO_QUERY );
@@ -919,7 +919,7 @@ throw ( SAXException, RuntimeException )
{
if ( nType == ::com::sun::star::ui::ItemType::DEFAULT )
{
- if ( aCommandURL.getLength() > 0 )
+ if ( !aCommandURL.isEmpty() )
{
bSeparator = sal_False;
WriteMenuItem( aCommandURL, aLabel, aHelpURL, nItemBits );
@@ -946,14 +946,14 @@ void OWriteMenuDocumentHandler::WriteMenuItem( const ::rtl::OUString& aCommandUR
m_aAttributeType,
aCommandURL );
- if ( aHelpURL.getLength() > 0 )
+ if ( !aHelpURL.isEmpty() )
{
pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_HELPID )),
m_aAttributeType,
aHelpURL );
}
- if (( aLabel.getLength() > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL)) ))
+ if ( !aLabel.isEmpty() && !aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL)) )
{
pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )),
m_aAttributeType,
@@ -968,7 +968,7 @@ void OWriteMenuDocumentHandler::WriteMenuItem( const ::rtl::OUString& aCommandUR
{
if ( nStyle & pStyle->nBit )
{
- if ( aValue.getLength() )
+ if ( !aValue.isEmpty() )
aValue = aValue.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("+") ) );
aValue += rtl::OUString::createFromAscii( pStyle->attrName );
}
diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx
index dbb1e775ddaf..3da7cc6d7899 100644
--- a/framework/source/fwe/xml/statusbardocumenthandler.cxx
+++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx
@@ -584,7 +584,7 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw
nStyle,
nWidth );
- if ( aCommandURL.getLength() > 0 )
+ if ( !aCommandURL.isEmpty() )
WriteStatusBarItem( aCommandURL, aHelpURL, nOffset, nStyle, nWidth );
}
}
@@ -610,7 +610,7 @@ throw ( SAXException, RuntimeException )
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
- if ( m_aAttributeURL.getLength() == 0 )
+ if (m_aAttributeURL.isEmpty() )
{
m_aAttributeURL = m_aXMLXlinkNS;
m_aAttributeURL += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_URL ));
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 4d77bf4fd42c..58ee88f09e13 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -267,7 +267,7 @@ throw( SAXException, RuntimeException )
}
}
- if ( aUIName.getLength() > 0 )
+ if ( !aUIName.isEmpty() )
{
// Try to set UI name as a container property
Reference< XPropertySet > xPropSet( m_rItemContainer, UNO_QUERY );
@@ -387,7 +387,7 @@ throw( SAXException, RuntimeException )
do
{
::rtl::OUString aToken = aTemp.getToken( 0, ' ', nIndex );
- if ( aToken.getLength() > 0 )
+ if ( !aToken.isEmpty() )
{
sal_Int32 nHashCode = aToken.hashCode();
if ( nHashCode == m_nHashCode_Style_Radio )
@@ -426,7 +426,7 @@ throw( SAXException, RuntimeException )
throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
}
- if ( aCommandURL.getLength() > 0 )
+ if ( !aCommandURL.isEmpty() )
{
Sequence< PropertyValue > aToolbarItemProp( 7 );
aToolbarItemProp[0].Name = m_aCommandURL;
@@ -714,7 +714,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw
m_aAttributeType,
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK )) );
- if ( aUIName.getLength() > 0 )
+ if ( !aUIName.isEmpty() )
pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_UINAME )),
m_aAttributeType,
aUIName );
@@ -775,7 +775,7 @@ throw ( SAXException, RuntimeException )
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY );
- if ( m_aAttributeURL.getLength() == 0 )
+ if ( m_aAttributeURL.isEmpty() )
{
m_aAttributeURL = m_aXMLXlinkNS;
m_aAttributeURL += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_URL ));
@@ -784,7 +784,7 @@ throw ( SAXException, RuntimeException )
// save required attribute (URL)
pList->AddAttribute( m_aAttributeURL, m_aAttributeType, rCommandURL );
- if ( rLabel.getLength() > 0 )
+ if ( !rLabel.isEmpty() )
{
pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TEXT )),
m_aAttributeType,
@@ -798,14 +798,14 @@ throw ( SAXException, RuntimeException )
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_FALSE )) );
}
- if ( rHelpURL.getLength() > 0 )
+ if ( !rHelpURL.isEmpty() )
{
pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_HELPID )),
m_aAttributeType,
rHelpURL );
}
- if ( rTooltip.getLength() > 0 )
+ if ( !rTooltip.isEmpty() )
{
pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TOOLTIP )),
m_aAttributeType,
@@ -821,7 +821,7 @@ throw ( SAXException, RuntimeException )
{
if ( nStyle & pStyle->nBit )
{
- if ( aValue.getLength() )
+ if ( !aValue.isEmpty() )
aValue = aValue.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(" ") ) );
aValue += rtl::OUString::createFromAscii( pStyle->attrName );
}
diff --git a/framework/source/fwe/xml/xmlnamespaces.cxx b/framework/source/fwe/xml/xmlnamespaces.cxx
index 9b1c4931577c..80104946dfd1 100644
--- a/framework/source/fwe/xml/xmlnamespaces.cxx
+++ b/framework/source/fwe/xml/xmlnamespaces.cxx
@@ -76,7 +76,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS
}
}
- if ( aValue.getLength() == 0 && aNamespaceName.getLength() > 0 )
+ if ( aValue.isEmpty() && !aNamespaceName.isEmpty() )
{
// namespace should be reseted - as xml draft states this is only allowed
// for the default namespace - check and throw exception if check fails
@@ -85,7 +85,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS
}
else
{
- if ( aNamespaceName.getLength() == 0 )
+ if ( aNamespaceName.isEmpty() )
m_aDefaultNamespace = aValue;
else
{
@@ -142,7 +142,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS
else
aNamespace = m_aDefaultNamespace;
- if ( aNamespace.getLength() > 0 )
+ if ( !aNamespace.isEmpty() )
{
aElementName = aNamespace;
aElementName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("^"));
@@ -169,7 +169,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS
::rtl::OUString XMLNamespaces::getNamespaceValue( const ::rtl::OUString& aNamespace ) const throw( SAXException )
{
- if ( aNamespace.getLength() == 0 )
+ if ( aNamespace.isEmpty() )
return m_aDefaultNamespace;
else
{
diff --git a/framework/source/fwi/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx
index e1f139c31e8a..8a50e942a161 100644
--- a/framework/source/fwi/helper/mischelper.cxx
+++ b/framework/source/fwi/helper/mischelper.cxx
@@ -120,7 +120,7 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues
{
try
{
- if ( aCmdURL.getLength() > 0 )
+ if ( !aCmdURL.isEmpty() )
{
rtl::OUString aStr;
Sequence< PropertyValue > aPropSeq;
@@ -185,7 +185,7 @@ void FillLangItems( std::set< OUString > &rLangItems,
//4--guessed language
uno::Reference< linguistic2::XLanguageGuessing > xLangGuesser( rLangGuessHelper.GetGuesser() );
- if ( xLangGuesser.is() && rGuessedTextLang.getLength() > 0)
+ if ( xLangGuesser.is() && !rGuessedTextLang.isEmpty())
{
::com::sun::star::lang::Locale aLocale(xLangGuesser->guessPrimaryLanguage( rGuessedTextLang, 0, rGuessedTextLang.getLength()) );
LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale );
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 5318c8a7c117..f2e9bcfc89ec 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -149,7 +149,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv
// unknown module -> no configuration available!
::rtl::OUString sModuleName = PersistentWindowState::implst_identifyModule(xSMGR, xFrame);
- if (!sModuleName.getLength())
+ if (sModuleName.isEmpty())
return;
switch(aEvent.Action)
@@ -312,7 +312,7 @@ void PersistentWindowState::implst_setWindowStateOnWindow(const css::uno::Refere
{
if (
(!xWindow.is() ) ||
- ( sWindowState.getLength() < 1)
+ ( sWindowState.isEmpty() )
)
return;
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index 408f147dd35e..d027a1a8adc2 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -282,7 +282,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
// Note: If we could retrieve a module id ... everything is OK.
// UIName and Icon ID are optional values !
- ::sal_Bool bSuccess = (rInfo.sID.getLength () > 0);
+ ::sal_Bool bSuccess = !rInfo.sID.isEmpty();
return bSuccess;
}
catch(const css::uno::Exception&)
diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx
index fb06ab03ec36..c897ccec7c18 100644
--- a/framework/source/jobs/helponstartup.cxx
+++ b/framework/source/jobs/helponstartup.cxx
@@ -165,7 +165,7 @@ css::uno::Any SAL_CALL HelpOnStartup::execute(const css::uno::Sequence< css::bea
// Attention: We are bound to events for openeing any document inside the office.
// That includes e.g. the help module itself. But we have to do nothing then!
- if (!sModule.getLength())
+ if (sModule.isEmpty())
return css::uno::Any();
// check current state of the help module
@@ -177,7 +177,7 @@ css::uno::Any SAL_CALL HelpOnStartup::execute(const css::uno::Sequence< css::bea
sal_Bool bShowIt = sal_False;
// a)
- if (!sCurrentHelpURL.getLength())
+ if (sCurrentHelpURL.isEmpty())
bShowIt = sal_True;
else
// b)
@@ -188,7 +188,7 @@ css::uno::Any SAL_CALL HelpOnStartup::execute(const css::uno::Sequence< css::bea
{
// retrieve the help URL for the detected application module
::rtl::OUString sModuleDependendHelpURL = its_checkIfHelpEnabledAndGetURL(sModule);
- if (sModuleDependendHelpURL.getLength())
+ if (!sModuleDependendHelpURL.isEmpty())
{
// Show this help page.
// Note: The help window brings itself to front ...
@@ -321,7 +321,7 @@ void SAL_CALL HelpOnStartup::disposing(const css::lang::EventObject& aEvent)
//-----------------------------------------------
::sal_Bool HelpOnStartup::its_isHelpUrlADefaultOne(const ::rtl::OUString& sHelpURL)
{
- if (!sHelpURL.getLength())
+ if (sHelpURL.isEmpty())
return sal_False;
// SAFE ->
diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx
index 415c4dbe9040..22e1da15cf22 100644
--- a/framework/source/jobs/jobexecutor.cxx
+++ b/framework/source/jobs/jobexecutor.cxx
@@ -319,7 +319,7 @@ void SAL_CALL JobExecutor::elementInserted( const css::container::ContainerEvent
if (aEvent.Accessor >>= sValue)
{
::rtl::OUString sEvent = ::utl::extractFirstFromConfigurationPath(sValue);
- if (sEvent.getLength() > 0)
+ if (!sEvent.isEmpty())
{
OUStringList::iterator pEvent = m_lEvents.find(sEvent);
if (pEvent == m_lEvents.end())
@@ -334,7 +334,7 @@ void SAL_CALL JobExecutor::elementRemoved ( const css::container::ContainerEvent
if (aEvent.Accessor >>= sValue)
{
::rtl::OUString sEvent = ::utl::extractFirstFromConfigurationPath(sValue);
- if (sEvent.getLength() > 0)
+ if (!sEvent.isEmpty())
{
OUStringList::iterator pEvent = m_lEvents.find(sEvent);
if (pEvent != m_lEvents.end())
diff --git a/framework/source/jobs/joburl.cxx b/framework/source/jobs/joburl.cxx
index de459109fc86..01da85855d64 100644
--- a/framework/source/jobs/joburl.cxx
+++ b/framework/source/jobs/joburl.cxx
@@ -93,7 +93,7 @@ JobURL::JobURL( /*IN*/ const ::rtl::OUString& sURL )
// check for "event="
if (
(JobURL::implst_split(sToken,JOBURL_EVENT_STR,JOBURL_EVENT_LEN,sPartValue,sPartArguments)) &&
- (sPartValue.getLength()>0 )
+ (!sPartValue.isEmpty())
)
{
// set the part value
@@ -105,7 +105,7 @@ JobURL::JobURL( /*IN*/ const ::rtl::OUString& sURL )
// check for "alias="
if (
(JobURL::implst_split(sToken,JOBURL_ALIAS_STR,JOBURL_ALIAS_LEN,sPartValue,sPartArguments)) &&
- (sPartValue.getLength()>0 )
+ (!sPartValue.isEmpty())
)
{
// set the part value
@@ -117,7 +117,7 @@ JobURL::JobURL( /*IN*/ const ::rtl::OUString& sURL )
// check for "service="
if (
(JobURL::implst_split(sToken,JOBURL_SERVICE_STR,JOBURL_SERVICE_LEN,sPartValue,sPartArguments)) &&
- (sPartValue.getLength()>0 )
+ (!sPartValue.isEmpty())
)
{
// set the part value
@@ -419,7 +419,7 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
bOK = (
(aURL.isValid() ) &&
(aURL.getEvent(sEvent) ) &&
- (sEvent.getLength()>0 ) &&
+ (!sEvent.isEmpty() ) &&
(sEvent.compareToAscii(pExpectedEvent)==0)
);
@@ -440,9 +440,9 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
{
bOK = (
(!aURL.getEvent(sEvent) ) &&
- (sEvent.getLength()==0 ) &&
+ (sEvent.isEmpty() ) &&
(!aURL.getEventArgs(sEventArgs)) &&
- (sEventArgs.getLength()==0 )
+ (sEventArgs.isEmpty() )
);
}
@@ -455,7 +455,7 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
bOK = (
(aURL.isValid() ) &&
(aURL.getAlias(sAlias) ) &&
- (sAlias.getLength()>0 ) &&
+ (!sAlias.isEmpty() ) &&
(sAlias.compareToAscii(pExpectedAlias)==0)
);
@@ -476,9 +476,9 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
{
bOK = (
(!aURL.getAlias(sAlias) ) &&
- (sAlias.getLength()==0 ) &&
+ (sAlias.isEmpty() ) &&
(!aURL.getAliasArgs(sAliasArgs)) &&
- (sAliasArgs.getLength()==0 )
+ (sAliasArgs.isEmpty() )
);
}
@@ -491,7 +491,7 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
bOK = (
(aURL.isValid() ) &&
(aURL.getService(sService) ) &&
- (sService.getLength()>0 ) &&
+ (!sService.isEmpty() ) &&
(sService.compareToAscii(pExpectedService)==0)
);
@@ -512,9 +512,9 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
{
bOK = (
(!aURL.getService(sService) ) &&
- (sService.getLength()==0 ) &&
+ (sService.isEmpty() ) &&
(!aURL.getServiceArgs(sServiceArgs)) &&
- (sServiceArgs.getLength()==0 )
+ (sServiceArgs.isEmpty() )
);
}
diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx
index 1ce32669457d..1910d7a4142a 100644
--- a/framework/source/jobs/shelljob.cxx
+++ b/framework/source/jobs/shelljob.cxx
@@ -123,7 +123,7 @@ css::uno::Any SAL_CALL ShellJob::execute(const css::uno::Sequence< css::beans::N
// Command is required as minimum.
// If it does not exists ... we cant do our job.
// Deactivate such miss configured job silently .-)
- if (sRealCommand.getLength() < 1)
+ if (sRealCommand.isEmpty())
return ShellJob::impl_generateAnswer4Deactivation();
// do it
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index ad4ef236db40..81ca7f8a7b06 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -103,7 +103,7 @@ bool isHorizontalDockingArea( const sal_Int32 nDockArea )
{
aToolbarName = rtl::OStringToOUString( pToolBox->GetHelpId(), RTL_TEXTENCODING_UTF8 );
sal_Int32 i = aToolbarName.lastIndexOf( ':' );
- if (( aToolbarName.getLength() > 0 ) && ( i > 0 ) && (( i+ 1 ) < aToolbarName.getLength() ))
+ if ( !aToolbarName.isEmpty() && ( i > 0 ) && (( i + 1 ) < aToolbarName.getLength() ))
aToolbarName = aToolbarName.copy( i+1 ); // Remove ".HelpId:" protocol from toolbar name
else
aToolbarName = ::rtl::OUString();
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 1598537f8227..0020a2eaf4b6 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -295,7 +295,7 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
}
catch( const Exception& ) {}
- if ( aModuleIdentifier.getLength() && aOldModuleIdentifier != aModuleIdentifier )
+ if ( !aModuleIdentifier.isEmpty() && aOldModuleIdentifier != aModuleIdentifier )
{
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier;
if ( xServiceManager.is() )
@@ -1706,7 +1706,7 @@ throw (uno::RuntimeException)
}
else if ( aElementType.equalsIgnoreAsciiCaseAscii( UIRESOURCETYPE_TOOLBAR ) && m_bVisible )
{
- bool bComponentAttached( m_aModuleIdentifier.getLength() > 0 );
+ bool bComponentAttached( !m_aModuleIdentifier.isEmpty() );
uno::Reference< uno::XInterface > xThis( m_xToolbarManager, uno::UNO_QUERY );
ToolbarLayoutManager* pToolbarManager = m_pToolbarManager;
aWriteLock.unlock();
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index d14803e898a0..9d5771d307c8 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -821,7 +821,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent )
aCommand = pToolBox->GetItemCommand( nId );
}
- if (( aToolbarName.getLength() > 0 ) && ( aCommand.getLength() > 0 ))
+ if ( !aToolbarName.isEmpty() && !aCommand.isEmpty() )
{
ReadGuard aReadLock( m_aLock );
::std::vector< uno::Reference< ui::XUIFunctionListener > > aListenerArray;
@@ -863,7 +863,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent )
if ( pToolBox )
{
::rtl::OUString aToolbarName = retrieveToolbarNameFromHelpURL( pToolBox );
- if ( aToolbarName.getLength() > 0 )
+ if ( !aToolbarName.isEmpty() )
{
::rtl::OUStringBuffer aBuf(100);
aBuf.appendAscii( "private:resource/toolbar/" );
@@ -1024,13 +1024,13 @@ void ToolbarLayoutManager::implts_createAddonsToolBars()
::rtl::OUString aGenericAddonTitle = implts_generateGenericAddonToolbarTitle( i+1 );
- if ( aElement.m_aName.getLength() > 0 )
+ if ( !aElement.m_aName.isEmpty() )
{
// Reuse a local entry so we are able to use the latest
// UI changes for this document.
implts_setElementData( aElement, xDockWindow );
aElement.m_xUIElement = xUIElement;
- if ( aElement.m_aUIName.getLength() == 0 )
+ if ( aElement.m_aUIName.isEmpty() )
{
aElement.m_aUIName = aGenericAddonTitle;
implts_writeWindowStateData( aElement );
@@ -1043,7 +1043,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars()
aNewToolbar.m_bFloating = true;
implts_readWindowStateData( aAddonToolBarName, aNewToolbar );
implts_setElementData( aNewToolbar, xDockWindow );
- if ( aNewToolbar.m_aUIName.getLength() == 0 )
+ if ( aNewToolbar.m_aUIName.isEmpty() )
{
aNewToolbar.m_aUIName = aGenericAddonTitle;
implts_writeWindowStateData( aNewToolbar );
@@ -1198,20 +1198,20 @@ void ToolbarLayoutManager::implts_createCustomToolBars( const uno::Sequence< uno
}
// Only create custom toolbars. Their name have to start with "custom_"!
- if ( aTbxResName.getLength() > 0 && aTbxResName.indexOf( m_aCustomTbxPrefix ) != -1 )
+ if ( !aTbxResName.isEmpty() && ( aTbxResName.indexOf( m_aCustomTbxPrefix ) != -1 ) )
implts_createCustomToolBar( aTbxResName, aTbxTitle );
}
}
void ToolbarLayoutManager::implts_createCustomToolBar( const rtl::OUString& aTbxResName, const rtl::OUString& aTitle )
{
- if ( aTbxResName.getLength() > 0 )
+ if ( !aTbxResName.isEmpty() )
{
bool bNotify( false );
uno::Reference< ui::XUIElement > xUIElement;
implts_createToolBar( aTbxResName, bNotify, xUIElement );
- if ( aTitle.getLength() != 0 && xUIElement.is() )
+ if ( !aTitle.isEmpty() && xUIElement.is() )
{
SolarMutexGuard aGuard;
@@ -1336,7 +1336,7 @@ void ToolbarLayoutManager::implts_createToolBar( const ::rtl::OUString& aName, b
WriteGuard aWriteLock( m_aLock );
UIElement& rElement = impl_findToolbar( aName );
- if ( rElement.m_aName.getLength() > 0 )
+ if ( !rElement.m_aName.isEmpty() )
{
// Reuse a local entry so we are able to use the latest
// UI changes for this document.
@@ -3744,7 +3744,7 @@ throw (uno::RuntimeException)
aReadLock.unlock();
UIElement aUIDockingElement = implts_findToolbar( e.Source );
- bool bWinFound( aUIDockingElement.m_aName.getLength() > 0 );
+ bool bWinFound( !aUIDockingElement.m_aName.isEmpty() );
uno::Reference< awt::XWindow > xWindow( e.Source, uno::UNO_QUERY );
if ( bWinFound && xWindow.is() )
@@ -3805,7 +3805,7 @@ throw (uno::RuntimeException)
if ( !bDockingInProgress )
{
aUIDockingElement = implts_findToolbar( e.Source );
- bool bWinFound = ( aUIDockingElement.m_aName.getLength() > 0 );
+ bool bWinFound = ( !aUIDockingElement.m_aName.isEmpty() );
if ( bWinFound && xWindow.is() )
{
@@ -3941,7 +3941,7 @@ throw (uno::RuntimeException)
aWriteLock.unlock();
// destroy element
- if ( aName.getLength() > 0 )
+ if ( !aName.isEmpty() )
{
implts_writeWindowStateData( aUIElement );
destroyToolbar( aName );
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 090b6aa87ed2..dc5736f4a8e3 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -295,7 +295,7 @@ void LoadEnv::initializeLoading(const ::rtl::OUString&
// BTW: Split URL and JumpMark ...
// Because such mark is an explicit value of the media descriptor!
- if (m_aURL.Mark.getLength())
+ if (!m_aURL.Mark.isEmpty())
m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_JUMPMARK()] <<= m_aURL.Mark;
// By the way: remove the old and deprecated value "FileName" from the descriptor!
@@ -650,7 +650,7 @@ LoadEnv::EContentType LoadEnv::classifyContent(const ::rtl::OUString&
// can detect such protocol schemata too :-)
if(
- (!sURL.getLength() ) ||
+ (sURL.isEmpty() ) ||
(ProtocolCheck::isProtocol(sURL,ProtocolCheck::E_UNO )) ||
(ProtocolCheck::isProtocol(sURL,ProtocolCheck::E_SLOT )) ||
(ProtocolCheck::isProtocol(sURL,ProtocolCheck::E_MACRO )) ||
@@ -804,7 +804,7 @@ void LoadEnv::impl_detectTypeAndFilter()
sType = xDetect->queryTypeByDescriptor(lDescriptor, sal_True); /*TODO should deep detection be able for enable/disable it from outside? */
// no valid content -> loading not possible
- if (!sType.getLength())
+ if (sType.isEmpty())
throw LoadEnvException(LoadEnvException::ID_UNSUPPORTED_CONTENT);
// SAFE ->
@@ -827,7 +827,7 @@ void LoadEnv::impl_detectTypeAndFilter()
// => We must try(!) to detect the right filter for this load request.
// On the other side ... if no filter is available .. ignore it.
// Then the type information must be enough.
- if (!sFilter.getLength())
+ if (sFilter.isEmpty())
{
// no -> try to find a preferred filter for the detected type.
// Dont forget to updatet he media descriptor.
@@ -836,7 +836,7 @@ void LoadEnv::impl_detectTypeAndFilter()
{
::comphelper::SequenceAsHashMap lTypeProps(xTypeCont->getByName(sType));
sFilter = lTypeProps.getUnpackedValueOrDefault(TYPEPROP_PREFERREDFILTER, ::rtl::OUString());
- if (sFilter.getLength())
+ if (!sFilter.isEmpty())
{
// SAFE ->
aWriteLock.lock();
@@ -858,7 +858,7 @@ void LoadEnv::impl_detectTypeAndFilter()
// has to know, what he is doing .-)
sal_Bool bIsOwnTemplate = sal_False;
- if (sFilter.getLength())
+ if (!sFilter.isEmpty())
{
css::uno::Reference< css::container::XNameAccess > xFilterCont(xSMGR->createInstance(SERVICENAME_FILTERFACTORY), css::uno::UNO_QUERY_THROW);
try
@@ -892,7 +892,7 @@ sal_Bool LoadEnv::impl_handleContent()
// the type must exist inside the descriptor ... otherwhise this class is implemented wrong :-)
::rtl::OUString sType = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_TYPENAME(), ::rtl::OUString());
- if (!sType.getLength())
+ if (sType.isEmpty())
throw LoadEnvException(LoadEnvException::ID_INVALID_MEDIADESCRIPTOR);
// convert media descriptor and URL to right format for later interface call!
@@ -1196,7 +1196,7 @@ css::uno::Reference< css::uno::XInterface > LoadEnv::impl_searchLoader()
// We need this type information to locate an registered frame loader
// Without such information we can't work!
::rtl::OUString sType = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_TYPENAME(), ::rtl::OUString());
- if (!sType.getLength())
+ if (sType.isEmpty())
throw LoadEnvException(LoadEnvException::ID_INVALID_MEDIADESCRIPTOR);
// try to locate any interested frame loader
@@ -1240,7 +1240,7 @@ css::uno::Reference< css::uno::XInterface > LoadEnv::impl_searchLoader()
void LoadEnv::impl_jumpToMark(const css::uno::Reference< css::frame::XFrame >& xFrame,
const css::util::URL& aURL )
{
- if (! aURL.Mark.getLength())
+ if (aURL.Mark.isEmpty())
return;
css::uno::Reference< css::frame::XDispatchProvider > xProvider(xFrame, css::uno::UNO_QUERY);
@@ -1401,7 +1401,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded()
// Now we are sure, that this task includes the searched document.
// It's time to activate it. As special feature we try to jump internally
// if an optional jumpmark is given too.
- if (m_aURL.Mark.getLength())
+ if (!m_aURL.Mark.isEmpty())
impl_jumpToMark(xResult, m_aURL);
// bring it to front and make sure it's visible...
@@ -1763,7 +1763,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
::rtl::OUString sFilter = m_lMediaDescriptor.getUnpackedValueOrDefault(
::comphelper::MediaDescriptor::PROP_FILTERNAME(),
::rtl::OUString());
- if (!sFilter.getLength())
+ if (sFilter.isEmpty())
return;
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
@@ -1792,7 +1792,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
// Do nothing, if no configuration entry exists!
::rtl::OUString sWindowState ;
::comphelper::ConfigurationHelper::readRelativeKey(xModuleCfg, sModule, OFFICEFACTORY_PROPNAME_WINDOWATTRIBUTES) >>= sWindowState;
- if (sWindowState.getLength())
+ if (!sWindowState.isEmpty())
{
// SOLAR SAFE ->
SolarMutexGuard aSolarGuard;
diff --git a/framework/source/loadenv/targethelper.cxx b/framework/source/loadenv/targethelper.cxx
index bfc61046f96e..95f5151e1ade 100644
--- a/framework/source/loadenv/targethelper.cxx
+++ b/framework/source/loadenv/targethelper.cxx
@@ -40,7 +40,7 @@ sal_Bool TargetHelper::matchSpecialTarget(const ::rtl::OUString& sCheckTarget ,
{
case E_SELF :
return (
- (!sCheckTarget.getLength() ) ||
+ (sCheckTarget.isEmpty() ) ||
(sCheckTarget.equals(SPECIALTARGET_SELF))
);
@@ -77,7 +77,7 @@ sal_Bool TargetHelper::isValidNameForFrame(const ::rtl::OUString& sName)
// some special targets are realy special ones :-)
// E.g. the are realy used to locate one frame inside the frame tree.
if (
- (!sName.getLength() ) ||
+ (sName.isEmpty() ) ||
(TargetHelper::matchSpecialTarget(sName, E_HELPTASK)) ||
(TargetHelper::matchSpecialTarget(sName, E_BEAMER) )
)
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index 5f9578494700..6c33051f7675 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -253,7 +253,7 @@ void SAL_CALL DispatchRecorder::AppendToBuffer( css::uno::Any aValue, ::rtl::OUS
aValue >>= sVal;
// encode non printable characters or '"' by using the CHR$ function
- if ( sVal.getLength() )
+ if ( !sVal.isEmpty() )
{
const sal_Unicode* pChars = sVal.getStr();
sal_Bool bInString = sal_False;
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 2b4317851d55..f3fc4de16d0d 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1121,7 +1121,7 @@ void AutoRecovery::implts_readConfig()
//-----------------------------------------------
void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocumentInfo& rInfo)
{
- if (!rInfo.AppModule.getLength())
+ if (rInfo.AppModule.isEmpty())
{
throw css::uno::RuntimeException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cant find out the default filter and its extension, if no application module is known!")),
@@ -1183,7 +1183,7 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume
void AutoRecovery::implts_specifyAppModuleAndFactory(AutoRecovery::TDocumentInfo& rInfo)
{
ENSURE_OR_THROW2(
- rInfo.AppModule.getLength() || rInfo.Document.is(),
+ !rInfo.AppModule.isEmpty() || rInfo.Document.is(),
"Cant find out the application module nor its factory URL, if no application module (or a suitable) document is known!",
*this );
@@ -1196,7 +1196,7 @@ void AutoRecovery::implts_specifyAppModuleAndFactory(AutoRecovery::TDocumentInfo
css::uno::Reference< css::frame::XModuleManager > xManager (xSMGR->createInstance(SERVICENAME_MODULEMANAGER), css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::container::XNameAccess > xModuleConfig(xManager , css::uno::UNO_QUERY_THROW);
- if (!rInfo.AppModule.getLength())
+ if (rInfo.AppModule.isEmpty())
rInfo.AppModule = xManager->identify(rInfo.Document);
::comphelper::SequenceAsHashMap lModuleDescription(xModuleConfig->getByName(rInfo.AppModule));
@@ -1223,9 +1223,9 @@ void AutoRecovery::implts_collectActiveViewNames( AutoRecovery::TDocumentInfo& i
::rtl::OUString sViewName;
if ( xController.is() )
sViewName = xController->getViewControllerName();
- OSL_ENSURE( sViewName.getLength(), "AutoRecovery::implts_collectActiveViewNames: (no XController2 ->) no view name -> no recovery of this view!" );
+ OSL_ENSURE( !sViewName.isEmpty(), "AutoRecovery::implts_collectActiveViewNames: (no XController2 ->) no view name -> no recovery of this view!" );
- if ( sViewName.getLength() )
+ if ( !sViewName.isEmpty() )
aViewNames.push_back( sViewName );
}
}
@@ -1235,9 +1235,9 @@ void AutoRecovery::implts_collectActiveViewNames( AutoRecovery::TDocumentInfo& i
::rtl::OUString sViewName;
if ( xController.is() )
sViewName = xController->getViewControllerName();
- OSL_ENSURE( sViewName.getLength(), "AutoRecovery::implts_collectActiveViewNames: (no XController2 ->) no view name -> no recovery of this view!" );
+ OSL_ENSURE( !sViewName.isEmpty(), "AutoRecovery::implts_collectActiveViewNames: (no XController2 ->) no view name -> no recovery of this view!" );
- if ( sViewName.getLength() )
+ if ( !sViewName.isEmpty() )
aViewNames.push_back( sViewName );
}
@@ -1726,8 +1726,8 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame
// Its not realy a full featured office document. It doesnt provide an URL, any filter, a factory URL etcpp.
// TODO file bug to Basci IDE developers. They must remove the office document API from its service.
if (
- (!aNew.OrgURL.getLength() ) &&
- (!aNew.FactoryURL.getLength())
+ (aNew.OrgURL.isEmpty()) &&
+ (aNew.FactoryURL.isEmpty())
)
{
OSL_FAIL( "AutoRecovery::implts_registerDocument: this should not happen anymore!" );
@@ -1937,7 +1937,7 @@ void AutoRecovery::implts_markDocumentAsSaved(const css::uno::Reference< css::fr
else
{
rInfo.Title = lDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_TITLE() , ::rtl::OUString());
- if (!rInfo.Title.getLength())
+ if (rInfo.Title.isEmpty())
rInfo.Title = lDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_DOCUMENTTITLE(), ::rtl::OUString());
}
@@ -2025,7 +2025,7 @@ void lc_removeLockFile(AutoRecovery::TDocumentInfo& rInfo)
{
css::uno::Reference< css::frame::XStorable > xStore(rInfo.Document, css::uno::UNO_QUERY_THROW);
::rtl::OUString aURL = xStore->getLocation();
- if ( aURL.getLength() )
+ if ( !aURL.isEmpty() )
{
::svt::DocumentLockFile aLockFile( aURL );
aLockFile.RemoveFile();
@@ -2333,12 +2333,12 @@ void AutoRecovery::implts_saveOneDoc(const ::rtl::OUString&
// stored with password
::comphelper::MediaDescriptor lNewArgs;
::rtl::OUString sPassword = lOldArgs.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_PASSWORD(), ::rtl::OUString());
- if (sPassword.getLength())
+ if (!sPassword.isEmpty())
lNewArgs[::comphelper::MediaDescriptor::PROP_PASSWORD()] <<= sPassword;
// Further it must be saved using the default file format of that application.
// Otherwhise we will some data lost.
- if (rInfo.DefaultFilter.getLength())
+ if (!rInfo.DefaultFilter.isEmpty())
lNewArgs[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= rInfo.DefaultFilter;
// prepare frame/document/mediadescriptor in a way, that it uses OUR progress .-)
@@ -2517,19 +2517,19 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa
if (!bBackupWasTried)
sLoadBackupURL = rInfo.OldTempURL;
- if (rInfo.OrgURL.getLength())
+ if (!rInfo.OrgURL.isEmpty())
{
sLoadOriginalURL = rInfo.OrgURL;
}
else
- if (rInfo.TemplateURL.getLength())
+ if (!rInfo.TemplateURL.isEmpty())
{
sLoadOriginalURL = rInfo.TemplateURL;
lDescriptor[::comphelper::MediaDescriptor::PROP_ASTEMPLATE()] <<= sal_True;
lDescriptor[::comphelper::MediaDescriptor::PROP_TEMPLATENAME()] <<= rInfo.TemplateURL;
}
else
- if (rInfo.FactoryURL.getLength())
+ if (!rInfo.FactoryURL.isEmpty())
{
sLoadOriginalURL = rInfo.FactoryURL;
lDescriptor[::comphelper::MediaDescriptor::PROP_ASTEMPLATE()] <<= sal_True;
@@ -2538,14 +2538,14 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa
// A "Salvaged" item must exists every time. The core can make something special then for recovery.
// Of course it should be the real file name of the original file, in case we load the temp. backup here.
::rtl::OUString sURL;
- if (sLoadBackupURL.getLength())
+ if (!sLoadBackupURL.isEmpty())
{
sURL = sLoadBackupURL;
rInfo.DocumentState |= AutoRecovery::E_TRY_LOAD_BACKUP;
lDescriptor[::comphelper::MediaDescriptor::PROP_SALVAGEDFILE()] <<= sLoadOriginalURL;
}
else
- if (sLoadOriginalURL.getLength())
+ if (!sLoadOriginalURL.isEmpty())
{
sURL = sLoadOriginalURL;
rInfo.DocumentState |= AutoRecovery::E_TRY_LOAD_ORIGINAL;
@@ -2570,7 +2570,7 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa
{
rInfo.DocumentState &= ~AutoRecovery::E_TRY_LOAD_BACKUP;
rInfo.DocumentState &= ~AutoRecovery::E_TRY_LOAD_ORIGINAL;
- if (sLoadBackupURL.getLength())
+ if (!sLoadBackupURL.isEmpty())
{
rInfo.DocumentState |= AutoRecovery::E_INCOMPLETE;
eTimer = AutoRecovery::E_CALL_ME_BACK;
@@ -2591,7 +2591,7 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa
continue;
}
- if (rInfo.RealFilter.getLength())
+ if (!rInfo.RealFilter.isEmpty())
{
::comphelper::MediaDescriptor lPatchDescriptor(rInfo.Document->getArgs());
lPatchDescriptor[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= rInfo.RealFilter;
@@ -2780,7 +2780,7 @@ void AutoRecovery::implts_generateNewTempURL(const ::rtl::OUString&
// into the configuration and dont create any recovery file on disk.
// We use the title of the document to make it unique.
::rtl::OUStringBuffer sUniqueName;
- if (rInfo.OrgURL.getLength())
+ if (!rInfo.OrgURL.isEmpty())
{
css::uno::Reference< css::util::XURLTransformer > xParser(xSMGR->createInstance(SERVICENAME_URLTRANSFORMER), css::uno::UNO_QUERY);
css::util::URL aURL;
@@ -2789,7 +2789,7 @@ void AutoRecovery::implts_generateNewTempURL(const ::rtl::OUString&
sUniqueName.append(aURL.Name);
}
else
- if (rInfo.FactoryURL.getLength())
+ if (!rInfo.FactoryURL.isEmpty())
sUniqueName.appendAscii("untitled");
sUniqueName.appendAscii("_");
@@ -2933,7 +2933,7 @@ css::frame::FeatureStateEvent AutoRecovery::implst_createFeatureStateEvent(
aInfo.put( CFG_ENTRY_PROP_ORIGINALURL, pInfo->OrgURL );
aInfo.put( CFG_ENTRY_PROP_FACTORYURL, pInfo->FactoryURL );
aInfo.put( CFG_ENTRY_PROP_TEMPLATEURL, pInfo->TemplateURL );
- aInfo.put( CFG_ENTRY_PROP_TEMPURL, pInfo->OldTempURL.getLength() ? pInfo->OldTempURL : pInfo->NewTempURL );
+ aInfo.put( CFG_ENTRY_PROP_TEMPURL, pInfo->OldTempURL.isEmpty() ? pInfo->NewTempURL : pInfo->OldTempURL );
aInfo.put( CFG_ENTRY_PROP_MODULE, pInfo->AppModule );
aInfo.put( CFG_ENTRY_PROP_TITLE, pInfo->Title );
aInfo.put( CFG_ENTRY_PROP_VIEWNAMES, pInfo->ViewNames );
@@ -3181,13 +3181,13 @@ void AutoRecovery::implts_backupWorkingEntry(const DispatchParams& aParams)
::rtl::OUString sSourceURL;
// Prefer temp file. It contains the changes against the original document!
- if (rInfo.OldTempURL.getLength())
+ if (!rInfo.OldTempURL.isEmpty())
sSourceURL = rInfo.OldTempURL;
else
- if (rInfo.NewTempURL.getLength())
+ if (!rInfo.NewTempURL.isEmpty())
sSourceURL = rInfo.NewTempURL;
else
- if (rInfo.OrgURL.getLength())
+ if (!rInfo.OrgURL.isEmpty())
sSourceURL = rInfo.OrgURL;
else
continue; // nothing real to save! An unmodified but new created document.
@@ -3628,7 +3628,7 @@ void AutoRecovery::impl_flushALLConfigChanges()
//-----------------------------------------------
void AutoRecovery::st_impl_removeFile(const ::rtl::OUString& sURL)
{
- if ( ! sURL.getLength())
+ if ( sURL.isEmpty())
return;
try
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index abc85eb1ee88..a28f80f41329 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -322,7 +322,7 @@ void BackingWindow::prepareRecentFileMenu()
maRecentFiles.push_back( LoadRecentFile() );
maRecentFiles.back().aTargetURL = aURL;
- sal_Int32 nArgs = aFilterOpt.getLength() ? 4 : 3;
+ sal_Int32 nArgs = aFilterOpt.isEmpty() ? 3 : 4;
Sequence< PropertyValue >& rArgsList( maRecentFiles.back().aArgSeq );
rArgsList.realloc( nArgs );
@@ -330,7 +330,7 @@ void BackingWindow::prepareRecentFileMenu()
rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ));
rArgsList[nArgs].Value = makeAny( aFilter );
- if( aFilterOpt.getLength() )
+ if( !aFilterOpt.isEmpty() )
{
nArgs--;
rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterOptions" ));
@@ -546,7 +546,7 @@ void BackingWindow::initControls()
{
comphelper::SequenceAsHashMap aEntryItems( *pNewMenu );
rtl::OUString sURL( aEntryItems.getUnpackedValueOrDefault( sURLKey, rtl::OUString() ) );
- if ( sURL.getLength() )
+ if ( !sURL.isEmpty() )
aFileNewAppsAvailable.insert( sURL );
}
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index c2b6d512f216..c6d414c6b0e5 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -1051,7 +1051,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Desktop::findFrame( const ::r
else
if (
( sTargetFrameName==SPECIALTARGET_SELF ) ||
- ( sTargetFrameName.getLength()<1 )
+ ( sTargetFrameName.isEmpty() )
)
{
xTarget = this;
diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx
index fda1ef93036b..690d39c158c8 100644
--- a/framework/source/services/dispatchhelper.cxx
+++ b/framework/source/services/dispatchhelper.cxx
@@ -121,7 +121,7 @@ css::uno::Any SAL_CALL DispatchHelper::executeDispatch(
// check for valid parameters
if (
(!xDispatchProvider.is()) ||
- (sURL.getLength()<1 )
+ (sURL.isEmpty() )
)
{
return css::uno::Any();
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 4c4108fc64d9..cd60a6c5756b 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -834,7 +834,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Frame::findFrame( const ::rtl
else
if (
( sTargetFrameName==SPECIALTARGET_SELF ) ||
- ( sTargetFrameName.getLength()<1 )
+ ( sTargetFrameName.isEmpty() )
)
{
xTarget = this;
diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx
index 304d35b46d9d..3b2ef61eed7c 100644
--- a/framework/source/services/license.cxx
+++ b/framework/source/services/license.cxx
@@ -267,11 +267,11 @@ css::uno::Any SAL_CALL License::execute(const css::uno::Sequence< css::beans::Na
ResMgr* pResMgr = ResMgr::SearchCreateResMgr("fwe", aLocale);
aLangString = aLocale.Language;
- if ( aLocale.Country.getLength() != 0 )
+ if ( !aLocale.Country.isEmpty() )
{
aLangString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
aLangString += aLocale.Country;
- if ( aLocale.Variant.getLength() != 0 )
+ if ( !aLocale.Variant.isEmpty() )
{
aLangString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
aLangString += aLocale.Variant;
diff --git a/framework/source/services/modulemanager.cxx b/framework/source/services/modulemanager.cxx
index d195405bcd3b..4cec298b95ac 100644
--- a/framework/source/services/modulemanager.cxx
+++ b/framework/source/services/modulemanager.cxx
@@ -172,7 +172,7 @@ ModuleManager::~ModuleManager()
if (xWindow.is())
sModule = implts_identify(xWindow);
- if (sModule.getLength() < 1)
+ if (sModule.isEmpty())
throw css::frame::UnknownModuleException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cant find suitable module for the given component.")),
static_cast< ::cppu::OWeakObject* >(this));
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index 45d3c8f1593c..d94df4368c3a 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -184,7 +184,7 @@ void SAL_CALL PathSettings::changesOccurred(const css::util::ChangesEvent& aEven
aChange.Accessor >>= sChanged;
::rtl::OUString sPath = ::utl::extractFirstFromConfigurationPath(sChanged);
- if (sPath.getLength())
+ if (!sPath.isEmpty())
{
PathSettings::EChangeOp eOp = impl_updatePath(sPath, sal_True);
if (
@@ -678,7 +678,7 @@ void PathSettings::impl_subst(PathSettings::PathInfo& aPath ,
lTemp.push_back(*pIt);
}
- if (rPath.sWritePath.getLength() > 0)
+ if (!rPath.sWritePath.isEmpty())
lTemp.push_back(rPath.sWritePath);
::rtl::OUStringBuffer sPathVal(256);
@@ -703,7 +703,7 @@ OUStringList PathSettings::impl_convertOldStyle2Path(const ::rtl::OUString& sOld
do
{
::rtl::OUString sToken = sOldStylePath.getToken(0, ';', nToken);
- if (sToken.getLength())
+ if (!sToken.isEmpty())
lList.push_back(sToken);
}
while(nToken >= 0);
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 21f5535a522f..83988095751c 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -722,7 +722,7 @@ rtl::OUString SubstitutePathVariables::GetWorkPath() const
}
// fallback in case config layer does not return an useable work dir value.
- if (aWorkPath.getLength() < 1)
+ if (aWorkPath.isEmpty())
aWorkPath = GetWorkVariableValue();
return aWorkPath;
@@ -748,7 +748,7 @@ rtl::OUString SubstitutePathVariables::GetWorkVariableValue() const
// fallback to $HOME in case platform dependend config layer does not return
// an usuable work dir value.
- if (aWorkPath.getLength() < 1)
+ if (aWorkPath.isEmpty())
{
osl::Security aSecurity;
aSecurity.getHomeDir( aWorkPath );
@@ -785,7 +785,7 @@ rtl::OUString SubstitutePathVariables::GetPathVariableValue() const
do
{
::rtl::OUString sToken = aPathList.getToken(0, SAL_PATHSEPARATOR, nToken);
- if (sToken.getLength())
+ if (!sToken.isEmpty())
{
osl::FileBase::getFileURLFromSystemPath( sToken, aTmp );
if ( bAppendSep )
@@ -1017,10 +1017,10 @@ throw ( RuntimeException )
if ( osl::FileBase::getFileURLFromSystemPath( rURL, aTemp ) == osl::FileBase::E_None )
{
aTemp = ConvertOSLtoUCBURL( aTemp );
- if ( aTemp.getLength() )
+ if ( !aTemp.isEmpty() )
{
aURL = INetURLObject( aTemp ).GetMainURL( INetURLObject::NO_DECODE );
- if( !aURL.getLength() )
+ if( aURL.isEmpty() )
return rURL;
}
else
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index 715436afd287..dd14cf3607ac 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -180,7 +180,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL TaskCreatorService::createI
// to create it's previes frames. They must do it manually by using WindowDescriptor+Toolkit!
css::uno::Reference< css::frame::XDesktop > xDesktop(xParentFrame, css::uno::UNO_QUERY);
::sal_Bool bTopLevelDocumentWindow = (
- (sRightName.getLength () < 1) &&
+ sRightName.isEmpty() &&
(
(! xParentFrame.is() ) ||
( xDesktop.is() )
@@ -323,7 +323,7 @@ css::uno::Reference< css::frame::XFrame > TaskCreatorService::implts_createFrame
}
// Set it's API name (if there is one from outside)
- if (sName.getLength())
+ if (!sName.isEmpty())
xNewFrame->setName( sName );
return xNewFrame;
diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx
index b008bb0678cc..4e782139bc38 100644
--- a/framework/source/services/urltransformer.cxx
+++ b/framework/source/services/urltransformer.cxx
@@ -160,7 +160,7 @@ sal_Bool SAL_CALL URLTransformer::parseStrict( URL& aURL ) throw( RuntimeExcepti
{
// Safe impossible cases.
if (( &aURL == NULL ) ||
- ( aURL.Complete.getLength() < 1 ) )
+ ( aURL.Complete.isEmpty() ) )
{
return sal_False;
}
@@ -214,7 +214,7 @@ sal_Bool SAL_CALL URLTransformer::parseSmart( URL& aURL
{
// Safe impossible cases.
if (( &aURL == NULL ) ||
- ( aURL.Complete.getLength() < 1 ) )
+ ( aURL.Complete.isEmpty() ) )
{
return sal_False;
}
@@ -279,7 +279,7 @@ sal_Bool SAL_CALL URLTransformer::assemble( URL& aURL ) throw( RuntimeException
::rtl::OUStringBuffer aCompletePath( aURL.Path );
// Concat the name if it is provided, just support a final slash
- if ( aURL.Name.getLength() > 0 )
+ if ( !aURL.Name.isEmpty() )
{
sal_Int32 nIndex = aURL.Path.lastIndexOf( sal_Unicode('/') );
if ( nIndex == ( aURL.Path.getLength() -1 ))
@@ -312,7 +312,7 @@ sal_Bool SAL_CALL URLTransformer::assemble( URL& aURL ) throw( RuntimeException
// Return "URL is assembled".
return sal_True;
}
- else if ( aURL.Protocol.getLength() > 0 )
+ else if ( !aURL.Protocol.isEmpty() )
{
// Minimal support for unknown protocols
::rtl::OUStringBuffer aBuffer( aURL.Protocol );
@@ -333,7 +333,7 @@ sal_Bool SAL_CALL URLTransformer::assemble( URL& aURL ) throw( RuntimeException
{
// Safe impossible cases.
if (( &aURL == NULL ) ||
- ( aURL.Complete.getLength() < 1 ) ||
+ ( aURL.Complete.isEmpty() ) ||
(( bWithPassword != sal_True ) &&
( bWithPassword != sal_False ) ) )
{
@@ -345,7 +345,7 @@ sal_Bool SAL_CALL URLTransformer::assemble( URL& aURL ) throw( RuntimeException
sal_Bool bParseResult = parseSmart( aTestURL, aTestURL.Protocol );
if ( bParseResult )
{
- if ( !bWithPassword && aTestURL.Password.getLength() > 0 )
+ if ( !bWithPassword && !aTestURL.Password.isEmpty() )
{
// Exchange password text with other placeholder string
aTestURL.Password = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("<******>"));
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 86c3c979f238..7426360fa27b 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -195,7 +195,7 @@ void CmdImageList::impl_fillCommandToImageNameMap()
SERVICENAME_UICOMMANDDESCRIPTION ),
UNO_QUERY );
- if ( m_aModuleIdentifier.getLength() > 0 )
+ if ( !m_aModuleIdentifier.isEmpty() )
{
// If we have a module identifier - use to retrieve the command image name list from it.
// Otherwise we will use the global command image list
diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
index 47e2a9b1f6a6..241a3d5874ce 100644
--- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
+++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
@@ -227,7 +227,7 @@ throw ( NoSuchElementException, RuntimeException)
sShort = ::rtl::OUString();
}
- if (!sShort.getLength())
+ if (sShort.isEmpty())
throw NoSuchElementException();
PropertyValue aArg;
Sequence< Any > aArgs( 2 );
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 7977f8dfd3f8..c4679f55db5d 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -272,7 +272,7 @@ void ModuleUIConfigurationManager::impl_preloadUIElementTypeList( Layer eLayer,
OUString aExtension( aUIElementNames[n].copy( nIndex+1 ));
OUString aUIElementName( aUIElementNames[n].copy( 0, nIndex ));
- if (( aUIElementName.getLength() > 0 ) &&
+ if (!aUIElementName.isEmpty() &&
( aExtension.equalsIgnoreAsciiCaseAsciiL( "xml", 3 )))
{
aUIElementData.aResourceURL = aResURLPrefix + aUIElementName;
@@ -302,7 +302,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement
UIElementType& rElementTypeData = m_aUIElements[eLayer][nElementType];
Reference< XStorage > xElementTypeStorage = rElementTypeData.xStorage;
- if ( xElementTypeStorage.is() && aUIElementData.aName.getLength() )
+ if ( xElementTypeStorage.is() && !aUIElementData.aName.isEmpty() )
{
try
{
@@ -839,7 +839,7 @@ void SAL_CALL ModuleUIConfigurationManager::initialize( const Sequence< Any >& a
else if ( i == ::com::sun::star::ui::UIElementType::STATUSBAR )
aResourceType = PresetHandler::RESOURCETYPE_STATUSBAR();
- if ( aResourceType.getLength() > 0 )
+ if ( !aResourceType.isEmpty() )
{
m_pStorageHandler[i] = new PresetHandler( m_xServiceManager );
m_pStorageHandler[i]->connectToResource( PresetHandler::E_MODULES,
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 66369b86ece1..0803ff01dc69 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -215,7 +215,7 @@ void UIConfigurationManager::impl_preloadUIElementTypeList( sal_Int16 nElementTy
rtl::OUString aExtension( aUIElementNames[n].copy( nIndex+1 ));
rtl::OUString aUIElementName( aUIElementNames[n].copy( 0, nIndex ));
- if (( aUIElementName.getLength() > 0 ) &&
+ if (!aUIElementName.isEmpty() &&
( aExtension.equalsIgnoreAsciiCaseAsciiL( "xml", 3 )))
{
aUIElementData.aResourceURL = aResURLPrefix + aUIElementName;
@@ -240,7 +240,7 @@ void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType,
UIElementType& rElementTypeData = m_aUIElements[nElementType];
Reference< XStorage > xElementTypeStorage = rElementTypeData.xStorage;
- if ( xElementTypeStorage.is() && aUIElementData.aName.getLength() )
+ if ( xElementTypeStorage.is() && !aUIElementData.aName.isEmpty() )
{
try
{
diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx
index 88e0a3c798d6..1f0974282d3f 100644
--- a/framework/source/uiconfiguration/windowstateconfiguration.cxx
+++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx
@@ -1403,7 +1403,7 @@ WindowStateConfiguration::WindowStateConfiguration( const Reference< XMultiServi
}
}
- if ( aWindowStateFileStr.getLength() > 0 )
+ if ( !aWindowStateFileStr.isEmpty() )
{
// Create first mapping ModuleIdentifier ==> Window state configuration file
m_aModuleToFileHashMap.insert( ModuleToWindowStateFileMap::value_type( aModuleIdentifier, aWindowStateFileStr ));
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 5d136aaec714..6ae3d09cbe5c 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -125,10 +125,10 @@ AddonsToolBarManager::~AddonsToolBarManager()
static sal_Bool IsCorrectContext( const ::rtl::OUString& rModuleIdentifier, const ::rtl::OUString& aContextList )
{
- if ( aContextList.getLength() == 0 )
+ if ( aContextList.isEmpty() )
return sal_True;
- if ( rModuleIdentifier.getLength() > 0 )
+ if ( !rModuleIdentifier.isEmpty() )
{
sal_Int32 nIndex = aContextList.indexOf( rModuleIdentifier );
return ( nIndex >= 0 );
@@ -145,7 +145,7 @@ static Image RetrieveImage( Reference< com::sun::star::frame::XFrame >& rFrame,
{
Image aImage;
- if ( aImageId.getLength() > 0 )
+ if ( !aImageId.isEmpty() )
{
aImage = framework::AddonsOptions().GetImageFromURL( aImageId, bBigImage );
if ( !!aImage )
diff --git a/framework/source/uielement/buttontoolbarcontroller.cxx b/framework/source/uielement/buttontoolbarcontroller.cxx
index 554a9e75ab03..4f8c655f22e3 100644
--- a/framework/source/uielement/buttontoolbarcontroller.cxx
+++ b/framework/source/uielement/buttontoolbarcontroller.cxx
@@ -245,7 +245,7 @@ throw (::com::sun::star::uno::RuntimeException)
if ( m_bInitialized &&
m_xFrame.is() &&
m_xServiceManager.is() &&
- m_aCommandURL.getLength() )
+ !m_aCommandURL.isEmpty() )
{
if ( !m_xURLTransformer.is() )
{
diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx
index 94b398694b2b..a70dd5a7d45f 100644
--- a/framework/source/uielement/complextoolbarcontroller.cxx
+++ b/framework/source/uielement/complextoolbarcontroller.cxx
@@ -136,7 +136,7 @@ throw ( RuntimeException )
if ( m_bInitialized &&
m_xFrame.is() &&
m_xServiceManager.is() &&
- m_aCommandURL.getLength() )
+ !m_aCommandURL.isEmpty() )
{
xURLTransformer = m_xURLTransformer;
xDispatch = getDispatchFromCommand( m_aCommandURL );
@@ -146,7 +146,7 @@ throw ( RuntimeException )
}
}
- if ( xDispatch.is() && aTargetURL.Complete.getLength() > 0 )
+ if ( xDispatch.is() && !aTargetURL.Complete.isEmpty() )
{
// Execute dispatch asynchronously
ExecuteInfo* pExecuteInfo = new ExecuteInfo;
@@ -321,7 +321,7 @@ uno::Reference< frame::XDispatch > ComplexToolbarController::getDispatchFromComm
{
uno::Reference< frame::XDispatch > xDispatch;
- if ( m_bInitialized && m_xFrame.is() && m_xServiceManager.is() && aCommand.getLength() )
+ if ( m_bInitialized && m_xFrame.is() && m_xServiceManager.is() && !aCommand.isEmpty() )
{
URLToDispatchMap::const_iterator pIter = m_aListenerMap.find( aCommand );
if ( pIter != m_aListenerMap.end() )
@@ -335,7 +335,7 @@ uno::Reference< frame::XDispatch > ComplexToolbarController::getDispatchFromComm
const ::com::sun::star::util::URL& ComplexToolbarController::getInitializedURL()
{
- if ( m_aURL.Complete.getLength() == 0 )
+ if ( m_aURL.Complete.isEmpty() )
{
m_aURL.Complete = m_aCommandURL;
m_xURLTransformer->parseStrict( m_aURL );
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index fadf338bec5c..2de8e8d5833b 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -166,7 +166,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
// try to retrieve printer name of document
aPrinterName = retrievePrinterName( m_xFrame );
- if ( aPrinterName.getLength() > 0 )
+ if ( !aPrinterName.isEmpty() )
{
pInfoPrinter = new Printer( aPrinterName );
if ( pInfoPrinter && pInfoPrinter->GetDevFontCount() > 0 )
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 08db404d63c4..defc407db11e 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -165,7 +165,7 @@ throw ( RuntimeException )
if ( m_bInitialized &&
m_xFrame.is() &&
m_xServiceManager.is() &&
- m_aCommandURL.getLength() )
+ !m_aCommandURL.isEmpty() )
{
xURLTransformer = Reference< XURLTransformer >( m_xServiceManager->createInstance(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))),
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 7da9718a2b5d..568383d5d0e4 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -169,7 +169,7 @@ IMPL_STATIC_LINK_NOINSTANCE( MacrosMenuController, ExecuteHdl_Impl, ExecuteInfo*
String MacrosMenuController::RetrieveLabelFromCommand( const String& aCmdURL )
{
- sal_Bool bModuleIdentified = m_aModuleIdentifier.getLength() != 0;
+ sal_Bool bModuleIdentified = !m_aModuleIdentifier.isEmpty();
return framework::RetrieveLabelFromCommand(aCmdURL,m_xServiceManager,m_xUICommandLabels,m_xFrame,m_aModuleIdentifier,bModuleIdentified,"Label");
}
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 1ce47762af32..4de7ea4accd1 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -782,8 +782,8 @@ void MenuBarManager::CheckAndAddMenuExtension( Menu* pMenu )
// retrieve menu extension item
MenuExtensionItem aMenuItem( GetMenuExtension() );
- if (( aMenuItem.aURL.getLength() > 0 ) &&
- ( aMenuItem.aLabel.getLength() > 0 ))
+ if (( !aMenuItem.aURL.isEmpty() ) &&
+ ( !aMenuItem.aLabel.isEmpty() ))
{
// remove all old window list entries from menu
sal_uInt16 nNewItemId( 0 );
@@ -925,7 +925,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
Reference< XDispatch > xMenuItemDispatch;
::rtl::OUString aItemCommand = pMenu->GetItemCommand( pMenuItemHandler->nItemId );
- if ( !aItemCommand.getLength() )
+ if ( aItemCommand.isEmpty() )
{
aItemCommand = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
aItemCommand += ::rtl::OUString::valueOf( (sal_Int32)pMenuItemHandler->nItemId );
@@ -1281,7 +1281,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
sal_uInt16 nItemId = FillItemCommand(aItemCommand,pMenu, i );
// Set module identifier when provided from outside
- if ( rModuleIdentifier.getLength() > 0 )
+ if ( !rModuleIdentifier.isEmpty() )
{
m_aModuleIdentifier = rModuleIdentifier;
m_bModuleIdentified = sal_True;
@@ -1290,7 +1290,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
if (( pMenu->IsMenuBar() || bAccessibilityEnabled ) &&
( pMenu->GetItemText( nItemId ).Len() == 0 ))
{
- if ( aItemCommand.getLength() > 0 )
+ if ( !aItemCommand.isEmpty() )
pMenu->SetItemText( nItemId, RetrieveLabelFromCommand( aItemCommand ));
}
@@ -1425,7 +1425,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
MenuConfiguration::Attributes* pMenuAttributes =
(MenuConfiguration::Attributes*)pMenu->GetUserValue( nItemId );
- if ( pMenuAttributes && pMenuAttributes->aImageId.getLength() > 0 )
+ if ( pMenuAttributes && !pMenuAttributes->aImageId.isEmpty() )
{
// Retrieve image id from menu attributes
aImage = GetImageFromURL( m_xFrame, aImageId, false );
@@ -1646,7 +1646,7 @@ void MenuBarManager::RetrieveImageManagers()
}
Reference< XModuleManager > xModuleManager;
- if ( m_aModuleIdentifier.getLength() == 0 )
+ if ( m_aModuleIdentifier.isEmpty() )
xModuleManager.set( getServiceFactory()->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW );
try
@@ -1794,7 +1794,7 @@ void MenuBarManager::FillMenu(
}
// Use help command to transport module identifier
- if ( aModuleIdentifier.getLength() > 0 )
+ if ( !aModuleIdentifier.isEmpty() )
pMenu->SetHelpCommand( nId, aModuleIdentifier );
++nId;
@@ -2009,7 +2009,7 @@ sal_uInt16 MenuBarManager::FillItemCommand(::rtl::OUString& _rItemCommand,Menu*
sal_uInt16 nItemId = _pMenu->GetItemId( _nIndex );
_rItemCommand = _pMenu->GetItemCommand( nItemId );
- if ( !_rItemCommand.getLength() )
+ if ( _rItemCommand.isEmpty() )
{
const static ::rtl::OUString aSlotString( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
_rItemCommand = aSlotString;
diff --git a/framework/source/uielement/menubarmerger.cxx b/framework/source/uielement/menubarmerger.cxx
index 30a6a6295b66..544c52ad2668 100644
--- a/framework/source/uielement/menubarmerger.cxx
+++ b/framework/source/uielement/menubarmerger.cxx
@@ -74,7 +74,7 @@ namespace framework
*/
bool MenuBarMerger::IsCorrectContext( const ::rtl::OUString& rContext, const ::rtl::OUString& rModuleIdentifier )
{
- return (( rContext.getLength() == 0 ) || ( rContext.indexOf( rModuleIdentifier ) >= 0 ));
+ return ( rContext.isEmpty() || ( rContext.indexOf( rModuleIdentifier ) >= 0 ));
}
void MenuBarMerger::RetrieveReferencePath(
@@ -88,7 +88,7 @@ void MenuBarMerger::RetrieveReferencePath(
do
{
::rtl::OUString aToken = rReferencePathString.getToken( 0, aDelimiter, nIndex );
- if ( aToken.getLength() > 0 )
+ if ( !aToken.isEmpty() )
rReferencePath.push_back( aToken );
}
while ( nIndex >= 0 );
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index dad7a1922c47..3fc4a5a72834 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -110,7 +110,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage
if ( pInfo != m_aAddInfoForItem.end() )
aImageId = pInfo->second.aImageId; // Retrieve image id for menu item
- if ( aImageId.getLength() > 0 )
+ if ( !aImageId.isEmpty() )
{
aImage = GetImageFromURL( xFrame, aImageId, false );
if ( !!aImage )
@@ -143,7 +143,7 @@ void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const
sal_Bool bFound( sal_False );
rtl::OUString aCommand;
- if ( m_aEmptyDocURL.getLength() > 0 )
+ if ( !m_aEmptyDocURL.isEmpty() )
{
// Search for the empty document URL
@@ -167,7 +167,7 @@ void NewMenuController::determineAndSetNewDocAccel( PopupMenu* pPopupMenu, const
{
// Search for the default module name
rtl::OUString aDefaultModuleName( SvtModuleOptions().GetDefaultModuleName() );
- if ( aDefaultModuleName.getLength() > 0 )
+ if ( !aDefaultModuleName.isEmpty() )
{
for ( sal_uInt32 i = 0; i < sal_uInt32( nCount ); i++ )
{
@@ -507,7 +507,7 @@ void NewMenuController::impl_setPopupMenu()
m_bModuleIdentified = sal_True;
Reference< XNameAccess > xNameAccess( xModuleManager, UNO_QUERY );
- if (( m_aModuleIdentifier.getLength() > 0 ) && xNameAccess.is() )
+ if ( !m_aModuleIdentifier.isEmpty() && xNameAccess.is() )
{
Sequence< PropertyValue > aSeq;
diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
index 8a941aedae57..6245d01e4183 100644
--- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx
+++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
@@ -477,7 +477,7 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star::
}
// Check values and set members
- if ( aValue.getLength() > 0 )
+ if ( !aValue.isEmpty() )
{
m_bFloat = bFloatValue;
m_nValue = aValue.toDouble();
@@ -486,17 +486,17 @@ void SpinfieldToolbarController::executeControlCommand( const ::com::sun::star::
m_pSpinfieldControl->SetText( aOutString );
notifyTextChanged( aOutString );
}
- if ( aMax.getLength() > 0 )
+ if ( !aMax.isEmpty() )
{
m_nMax = aMax.toDouble();
m_bMaxSet = true;
}
- if ( aMin.getLength() > 0 )
+ if ( !aMin.isEmpty() )
{
m_nMin = aMin.toDouble();
m_bMinSet = true;
}
- if ( aStep.getLength() > 0 )
+ if ( !aStep.isEmpty() )
m_nStep = aStep.toDouble();
}
@@ -525,7 +525,7 @@ bool SpinfieldToolbarController::impl_getValue(
rtl::OUString SpinfieldToolbarController::impl_formatOutputString( double fValue )
{
- if ( m_aOutFormat.getLength() == 0 )
+ if ( m_aOutFormat.isEmpty() )
{
if ( m_bFloat )
return rtl::OUString::valueOf( fValue );
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 029cc52d5cb4..9fd22cdee959 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -519,7 +519,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc
}
}
- if (( nType == ::com::sun::star::ui::ItemType::DEFAULT ) && ( aCommandURL.getLength() > 0 ))
+ if (( nType == ::com::sun::star::ui::ItemType::DEFAULT ) && !aCommandURL.isEmpty() )
{
rtl::OUString aString( RetrieveLabelFromCommand( aCommandURL ));
sal_uInt16 nItemBits( impl_convertItemStyleToItemBits( nStyle ));
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 3c2896eac8bc..8d4f9841e00c 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -842,7 +842,7 @@ uno::Sequence< beans::PropertyValue > ToolBarManager::GetPropsForCommand( const
m_bModuleIdentified = sal_True;
m_aModuleIdentifier = xModuleManager->identify( xIfac );
- if ( m_aModuleIdentifier.getLength() > 0 )
+ if ( !m_aModuleIdentifier.isEmpty() )
{
Reference< XNameAccess > xNameAccess( m_xServiceManager->createInstance( SERVICENAME_UICOMMANDDESCRIPTION ), UNO_QUERY );
if ( xNameAccess.is() )
@@ -852,7 +852,7 @@ uno::Sequence< beans::PropertyValue > ToolBarManager::GetPropsForCommand( const
if ( m_xUICommandLabels.is() )
{
- if ( rCmdURL.getLength() > 0 )
+ if ( !rCmdURL.isEmpty() )
m_xUICommandLabels->getByName( rCmdURL ) >>= aPropSeq;
}
}
@@ -1036,7 +1036,7 @@ void ToolBarManager::CreateControllers()
if ( xSubToolBar.is() && xSubToolBar->opensSubToolbar() )
{
rtl::OUString aSubToolBarName = xSubToolBar->getSubToolbarName();
- if ( aSubToolBarName.getLength() != 0 )
+ if ( !aSubToolBarName.isEmpty() )
{
SubToolBarToSubToolBarControllerMap::iterator pIter =
m_aSubToolBarControllerMap.find( aSubToolBarName );
@@ -1333,7 +1333,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
aProp[i].Value >>= nStyle;
}
- if (( nType == ::com::sun::star::ui::ItemType::DEFAULT ) && ( aCommandURL.getLength() > 0 ))
+ if (( nType == ::com::sun::star::ui::ItemType::DEFAULT ) && !aCommandURL.isEmpty() )
{
::rtl::OUString aString( RetrieveLabelFromCommand( aCommandURL ));
@@ -1342,7 +1342,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
m_aMenuMap[ nId ] = aMenuDesc;
m_pToolBar->InsertItem( nId, aString, nItemBits );
m_pToolBar->SetItemCommand( nId, aCommandURL );
- if ( aTooltip.getLength() )
+ if ( !aTooltip.isEmpty() )
{
m_pToolBar->SetQuickHelpText( nId, aTooltip );
}
@@ -1360,7 +1360,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
m_pToolBar->SetQuickHelpText( nId, sQuickHelp );
}
- if ( aLabel.getLength() > 0 )
+ if ( !aLabel.isEmpty() )
{
m_pToolBar->SetItemText( nId, aLabel );
}
@@ -1493,7 +1493,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
{
rtl::OUString aUIName;
xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= aUIName;
- if ( aUIName.getLength() > 0 )
+ if ( !aUIName.isEmpty() )
m_pToolBar->SetText( aUIName );
}
catch (const Exception&)
diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx
index 7e0b39ffbfb9..4b5da501f896 100644
--- a/framework/source/uielement/toolbarmerger.cxx
+++ b/framework/source/uielement/toolbarmerger.cxx
@@ -116,7 +116,7 @@ bool ToolBarMerger::IsCorrectContext(
const ::rtl::OUString& rContext,
const ::rtl::OUString& rModuleIdentifier )
{
- return (( rContext.getLength() == 0 ) || ( rContext.indexOf( rModuleIdentifier ) >= 0 ));
+ return ( rContext.isEmpty() || ( rContext.indexOf( rModuleIdentifier ) >= 0 ));
}
/**
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index a31f32865818..ecc6a9b209f2 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -176,7 +176,7 @@ void ToolbarsMenuController::addCommand(
sal_uInt16 nItemId = m_xPopupMenu->getItemCount()+1;
rtl::OUString aLabel;
- if ( rLabel.getLength() == 0 )
+ if ( rLabel.isEmpty() )
aLabel = getUINameFromCommand( rCommandURL );
else
aLabel = rLabel;
@@ -297,7 +297,7 @@ static void fillHashMap( const Sequence< Sequence< ::com::sun::star::beans::Prop
pProperties[j].Value >>= aUIName;
}
- if ( aResourceURL.getLength() > 0 &&
+ if ( !aResourceURL.isEmpty() &&
rHashMap.find( aResourceURL ) == rHashMap.end() )
rHashMap.insert( ToolbarHashMap::value_type( aResourceURL, aUIName ));
}
@@ -322,7 +322,7 @@ Sequence< Sequence< com::sun::star::beans::PropertyValue > > ToolbarsMenuControl
xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" ))) >>= aResName;
if (( nType == ::com::sun::star::ui::UIElementType::TOOLBAR ) &&
- ( aResName.getLength() > 0 ))
+ !aResName.isEmpty() )
{
ToolBarInfo aToolBarInfo;
@@ -411,7 +411,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
sal_Bool bHideFromMenu( sal_False );
sal_Bool bContextSensitive( sal_False );
sal_Bool bVisible( sal_False );
- if ( aUIName.getLength() == 0 &&
+ if ( aUIName.isEmpty() &&
m_xPersistentWindowState.is() )
{
try
@@ -444,7 +444,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
}
- if (( aUIName.getLength() > 0 ) && ( !bHideFromMenu ))
+ if ( !aUIName.isEmpty() && !bHideFromMenu )
{
ToolBarEntry aTbEntry;
aTbEntry.aUIName = aUIName;
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index 7c1ad858fecf..a14d5938d54d 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -341,7 +341,7 @@ Any ConfigurationAccess_UICommand::getSequenceFromCache( const ::rtl::OUString&
Sequence< PropertyValue > aPropSeq( 4 );
aPropSeq[0].Name = m_aPropLabel;
- aPropSeq[0].Value = pIter->second.aContextLabel.getLength() ?
+ aPropSeq[0].Value = !pIter->second.aContextLabel.isEmpty() ?
makeAny( pIter->second.aContextLabel ): makeAny( pIter->second.aLabel );
aPropSeq[1].Name = m_aPropName;
aPropSeq[1].Value <<= pIter->second.aCommandName;
@@ -738,7 +738,7 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la
}
}
}
- else if ( m_aPrivateResourceURL.getLength() && aName.indexOf( m_aPrivateResourceURL ) == 0 )
+ else if ( !m_aPrivateResourceURL.isEmpty() && aName.indexOf( m_aPrivateResourceURL ) == 0 )
{
// special keys to retrieve information about a set of commands
return m_xGenericUICommands->getByName( aName );
diff --git a/framework/source/uifactory/addonstoolboxfactory.cxx b/framework/source/uifactory/addonstoolboxfactory.cxx
index 601bff09c6b1..aa024d5a656f 100644
--- a/framework/source/uifactory/addonstoolboxfactory.cxx
+++ b/framework/source/uifactory/addonstoolboxfactory.cxx
@@ -91,10 +91,10 @@ AddonsToolBoxFactory::~AddonsToolBoxFactory()
static sal_Bool IsCorrectContext( const ::rtl::OUString& rModuleIdentifier, const rtl::OUString& aContextList )
{
- if ( aContextList.getLength() == 0 )
+ if ( aContextList.isEmpty() )
return sal_True;
- if ( rModuleIdentifier.getLength() > 0 )
+ if ( !rModuleIdentifier.isEmpty() )
{
sal_Int32 nIndex = aContextList.indexOf( rModuleIdentifier );
return ( nIndex >= 0 );
diff --git a/framework/source/uifactory/factoryconfiguration.cxx b/framework/source/uifactory/factoryconfiguration.cxx
index cce667a63ac2..cbfb934e6e63 100644
--- a/framework/source/uifactory/factoryconfiguration.cxx
+++ b/framework/source/uifactory/factoryconfiguration.cxx
@@ -113,7 +113,7 @@ rtl::OUString ConfigurationAccess_ControllerFactory::getServiceFromCommandModule
if ( pIter != m_aMenuControllerMap.end() )
return pIter->second.m_aImplementationName;
- else if ( rModule.getLength() )
+ else if ( !rModule.isEmpty() )
{
// Try to detect if we have a generic popup menu controller
pIter = m_aMenuControllerMap.find( getHashKeyFromStrings( rCommandURL, rtl::OUString() ));
@@ -134,7 +134,7 @@ rtl::OUString ConfigurationAccess_ControllerFactory::getValueFromCommandModule(
if ( pIter != m_aMenuControllerMap.end() )
return pIter->second.m_aValue;
- else if ( rModule.getLength() )
+ else if ( !rModule.isEmpty() )
{
// Try to detect if we have a generic popup menu controller
pIter = m_aMenuControllerMap.find( getHashKeyFromStrings( rCommandURL, rtl::OUString() ));
diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx
index 47c0bce81d05..7e2de9c2111b 100644
--- a/framework/source/uifactory/menubarfactory.cxx
+++ b/framework/source/uifactory/menubarfactory.cxx
@@ -167,7 +167,7 @@ void MenuBarFactory::CreateUIElement(const ::rtl::OUString& ResourceURL
if ( !bHasSettings )
{
rtl::OUString aModuleIdentifier = _xModuleManager->identify( Reference< XInterface >( xFrame, UNO_QUERY ));
- if ( aModuleIdentifier.getLength() )
+ if ( !aModuleIdentifier.isEmpty() )
{
Reference< ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier(
_xServiceManager->createInstance( SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ), UNO_QUERY );
diff --git a/framework/source/uifactory/toolbarcontrollerfactory.cxx b/framework/source/uifactory/toolbarcontrollerfactory.cxx
index c3a2365b88c4..2369605b6e3e 100644
--- a/framework/source/uifactory/toolbarcontrollerfactory.cxx
+++ b/framework/source/uifactory/toolbarcontrollerfactory.cxx
@@ -119,7 +119,7 @@ throw (Exception, RuntimeException)
}
rtl::OUString aServiceName = m_pConfigAccess->getServiceFromCommandModule( aServiceSpecifier, rtl::OUString() );
- if ( aServiceName.getLength() > 0 )
+ if ( !aServiceName.isEmpty() )
return m_xServiceManager->createInstance( aServiceName );
else
return Reference< XInterface >();
@@ -189,7 +189,7 @@ throw (Exception, RuntimeException)
// SAFE
- if ( aServiceName.getLength() > 0 )
+ if ( !aServiceName.isEmpty() )
return xServiceManager->createInstanceWithArguments( aServiceName, aNewArgs );
else
return Reference< XInterface >();
@@ -216,7 +216,7 @@ throw (::com::sun::star::uno::RuntimeException)
m_pConfigAccess->readConfigurationData();
}
- return ( m_pConfigAccess->getServiceFromCommandModule( aCommandURL, aModuleName ).getLength() > 0 );
+ return ( !m_pConfigAccess->getServiceFromCommandModule( aCommandURL, aModuleName ).isEmpty() );
}
void SAL_CALL ToolbarControllerFactory::registerController(
diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx
index 4d19c33b89b9..a673ba627cbf 100644
--- a/framework/source/uifactory/uielementfactorymanager.cxx
+++ b/framework/source/uifactory/uielementfactorymanager.cxx
@@ -199,7 +199,7 @@ Sequence< Sequence< PropertyValue > > ConfigurationAccess_FactoryManager::getFac
while ( pIter != m_aFactoryManagerMap.end() )
{
rtl::OUString aFactory = pIter->first;
- if ( aFactory.getLength() > 0 )
+ if ( !aFactory.isEmpty() )
{
sal_Int32 nToken = 0;
Sequence< PropertyValue > aSeq( 1 );
@@ -507,7 +507,7 @@ throw ( RuntimeException )
rtl::OUString aServiceSpecifier = m_pConfigAccess->getFactorySpecifierFromTypeNameModule( aType, aName, aModuleId );
aLock.unlock();
- if ( aServiceSpecifier.getLength() )
+ if ( !aServiceSpecifier.isEmpty() )
return Reference< XUIElementFactory >( xSManager->createInstance( aServiceSpecifier ), UNO_QUERY );
else
return Reference< XUIElementFactory >();
diff --git a/framework/source/uifactory/windowcontentfactorymanager.cxx b/framework/source/uifactory/windowcontentfactorymanager.cxx
index 400473745e4c..f9a841dfab36 100644
--- a/framework/source/uifactory/windowcontentfactorymanager.cxx
+++ b/framework/source/uifactory/windowcontentfactorymanager.cxx
@@ -112,7 +112,7 @@ void WindowContentFactoryManager::RetrieveTypeNameFromResourceURL( const rtl::OU
do
{
::rtl::OUString sToken = aTmpStr.getToken( 0, '/', nToken);
- if ( sToken.getLength() )
+ if ( !sToken.isEmpty() )
{
if ( nPart == 0 )
aType = sToken;
@@ -178,9 +178,9 @@ throw (uno::Exception, uno::RuntimeException)
}
RetrieveTypeNameFromResourceURL( aResourceURL, aType, aName );
- if ( aType.getLength() > 0 &&
- aName.getLength() > 0 &&
- aModuleId.getLength() > 0 )
+ if ( !aType.isEmpty() &&
+ !aName.isEmpty() &&
+ !aModuleId.isEmpty() )
{
::rtl::OUString aImplementationName;
uno::Reference< uno::XInterface > xHolder( static_cast<cppu::OWeakObject*>(this), uno::UNO_QUERY );
@@ -197,7 +197,7 @@ throw (uno::Exception, uno::RuntimeException)
}
aImplementationName = m_pConfigAccess->getFactorySpecifierFromTypeNameModule( aType, aName, aModuleId );
- if ( aImplementationName.getLength() > 0 )
+ if ( !aImplementationName.isEmpty() )
{
aLock.unlock();
// UNSAFE
diff --git a/framework/source/xml/acceleratorconfigurationreader.cxx b/framework/source/xml/acceleratorconfigurationreader.cxx
index 422272612e2b..47ce04ac6397 100644
--- a/framework/source/xml/acceleratorconfigurationreader.cxx
+++ b/framework/source/xml/acceleratorconfigurationreader.cxx
@@ -176,7 +176,7 @@ void SAL_CALL AcceleratorConfigurationReader::startElement(const ::rtl::OUString
// validate command and key event.
if (
- (!sCommand.getLength()) ||
+ sCommand.isEmpty() ||
(aEvent.KeyCode == 0 )
)
{
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index 21f1e4f5f680..deade3d825d8 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -252,7 +252,7 @@ throw( SAXException, RuntimeException )
{
::rtl::OUString aColor = xAttribs->getValueByIndex( n );
- if ( aColor.getLength() > 0 )
+ if ( !aColor.isEmpty() )
{
if ( aColor.getStr()[0] == '#' )
{