[Libreoffice-commits] .: 4 commits - ucbhelper/source unodevtools/source unotools/source unoxml/source uui/source

Olivier Hallot ohallot at kemper.freedesktop.org
Thu Jan 19 16:10:18 PST 2012


 ucbhelper/source/client/content.cxx                       |   12 ++--
 ucbhelper/source/client/proxydecider.cxx                  |   20 +++----
 ucbhelper/source/provider/contenthelper.cxx               |    6 +-
 ucbhelper/source/provider/propertyvalueset.cxx            |    2 
 ucbhelper/source/provider/providerhelper.cxx              |    6 +-
 ucbhelper/source/provider/resultset.cxx                   |    8 +-
 ucbhelper/source/provider/resultsetmetadata.cxx           |    2 
 ucbhelper/source/provider/simpleauthenticationrequest.cxx |    4 -
 unodevtools/source/skeletonmaker/cppcompskeleton.cxx      |   10 +--
 unodevtools/source/skeletonmaker/cpptypemaker.cxx         |   18 +++---
 unodevtools/source/skeletonmaker/javacompskeleton.cxx     |    4 -
 unodevtools/source/skeletonmaker/javatypemaker.cxx        |    6 +-
 unodevtools/source/skeletonmaker/skeletoncommon.cxx       |    2 
 unodevtools/source/unodevtools/typeblob.cxx               |    2 
 unotools/source/config/bootstrap.cxx                      |   12 ++--
 unotools/source/config/configitem.cxx                     |   20 +++----
 unotools/source/config/confignode.cxx                     |    4 -
 unotools/source/config/configpathes.cxx                   |    6 +-
 unotools/source/config/eventcfg.cxx                       |    2 
 unotools/source/config/fontcfg.cxx                        |   26 ++++-----
 unotools/source/config/lingucfg.cxx                       |   22 ++++----
 unotools/source/config/moduleoptions.cxx                  |   10 +--
 unotools/source/config/securityoptions.cxx                |    2 
 unotools/source/config/syslocaleoptions.cxx               |   10 +--
 unotools/source/config/useroptions.cxx                    |    2 
 unotools/source/i18n/localedatawrapper.cxx                |    8 +-
 unotools/source/ucbhelper/progresshandlerwrap.cxx         |    4 -
 unotools/source/ucbhelper/tempfile.cxx                    |    8 +-
 unoxml/source/dom/document.cxx                            |   10 +--
 unoxml/source/dom/element.cxx                             |   12 ++--
 unoxml/source/dom/saxbuilder.cxx                          |    2 
 unoxml/source/rdf/CBlankNode.cxx                          |    2 
 unoxml/source/rdf/CLiteral.cxx                            |    4 -
 unoxml/source/rdf/CURI.cxx                                |    2 
 unoxml/source/rdf/librdf_repository.cxx                   |   14 ++---
 uui/source/iahndl-authentication.cxx                      |    8 +-
 uui/source/iahndl-errorhandler.cxx                        |    4 -
 uui/source/iahndl-filter.cxx                              |    6 +-
 uui/source/iahndl-locking.cxx                             |    4 -
 uui/source/iahndl-ssl.cxx                                 |    2 
 uui/source/iahndl.cxx                                     |   38 +++++---------
 uui/source/nameclashdlg.cxx                               |    4 -
 uui/source/newerverwarn.cxx                               |    4 -
 uui/source/passwordcontainer.cxx                          |   12 ++--
 uui/source/passworddlg.cxx                                |    2 
 45 files changed, 179 insertions(+), 189 deletions(-)

New commits:
commit c571e8777d15fd1c3f8730a7c1325d75c746333d
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Thu Jan 19 22:05:49 2012 -0200

    Fix for fdo43460 Part XLIII getLength() to isEmpty()
    
    Part XLIII
    Modules
    uui

diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index c764143..4a38c2e 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -335,7 +335,7 @@ handleAuthenticationRequest_(
               if (aInfo.GetIsRememberPassword())
               {
                   if (!aPwContainerHelper.addRecord(
-                          rURL.getLength() ? rURL : rRequest.ServerName,
+                          !rURL.isEmpty() ? rURL : rRequest.ServerName,
                           rtl::OUString(), // empty u/p -> sys creds
                           uno::Sequence< rtl::OUString >(),
                           xIH,
@@ -350,7 +350,7 @@ handleAuthenticationRequest_(
                            == ucb::RememberAuthentication_SESSION)
               {
                   if (!aPwContainerHelper.addRecord(
-                          rURL.getLength() ? rURL : rRequest.ServerName,
+                          !rURL.isEmpty() ? rURL : rRequest.ServerName,
                           rtl::OUString(), // empty u/p -> sys creds
                           uno::Sequence< rtl::OUString >(),
                           xIH,
@@ -373,7 +373,7 @@ handleAuthenticationRequest_(
               if (aInfo.GetIsRememberPassword())
               {
                   if (!aPwContainerHelper.addRecord(
-                          rURL.getLength() ? rURL : rRequest.ServerName,
+                          !rURL.isEmpty() ? rURL : rRequest.ServerName,
                           aInfo.GetUserName(),
                           aPassList,
                           xIH,
@@ -388,7 +388,7 @@ handleAuthenticationRequest_(
                            == ucb::RememberAuthentication_SESSION)
               {
                   if (!aPwContainerHelper.addRecord(
-                          rURL.getLength() ? rURL : rRequest.ServerName,
+                          !rURL.isEmpty() ? rURL : rRequest.ServerName,
                           aInfo.GetUserName(),
                           aPassList,
                           xIH,
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index 05530fc..328f671 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -61,7 +61,7 @@ executeErrorDialog(
     SolarMutexGuard aGuard;
 
     rtl::OUStringBuffer aText(rContext);
-    if (rContext.getLength() != 0 && rMessage.getLength() != 0)
+    if (!rContext.isEmpty() && !rMessage.isEmpty())
         aText.appendAscii(RTL_CONSTASCII_STRINGPARAM(":\n"));
             //TODO! must be internationalized
     aText.append(rMessage);
@@ -265,7 +265,7 @@ UUIInteractionHelper::handleErrorHandlerRequest(
 
         //TODO! remove this backwards compatibility?
         rtl::OUString aContext(getContextProperty());
-        if (aContext.getLength() == 0 && nErrorCode != 0)
+        if (aContext.isEmpty() && nErrorCode != 0)
         {
             SolarMutexGuard aGuard;
             ErrorContext * pContext = ErrorContext::GetContext();
diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx
index 149a60f..df3a512 100644
--- a/uui/source/iahndl-filter.cxx
+++ b/uui/source/iahndl-filter.cxx
@@ -193,7 +193,7 @@ handleNoSuchFilterRequest_(
 
     // If he doesn't select anyone
     // -> abort operation
-    if (sSelectedFilter.getLength()<1)
+    if (sSelectedFilter.isEmpty())
     {
         xAbort->select();
         return;
@@ -298,7 +298,7 @@ handleAmbigousFilterRequest_(
                                  lNames,
                                  sFilter );
 
-            if( sFilter.getLength() > 0 )
+            if( !sFilter.isEmpty() )
             {
                 xFilterTransport->setFilter( sFilter );
                 xFilterTransport->select();
@@ -362,7 +362,7 @@ handleFilterOptionsRequest_(
                     {
                         ::rtl::OUString aServiceName;
                         aProps[nProperty].Value >>= aServiceName;
-                        if( aServiceName.getLength() )
+                        if( !aServiceName.isEmpty() )
                         {
                             uno::Reference<
                                 ui::dialogs::XExecutableDialog > xFilterDialog(
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index 79917de..e03e217 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -96,7 +96,7 @@ handleLockedDocumentRequest_(
         sal_Int32 nResult = RET_CANCEL;
         if ( nMode == UUI_DOC_LOAD_LOCK )
         {
-            aArguments.push_back( aInfo.getLength()
+            aArguments.push_back( !aInfo.isEmpty()
                                   ? aInfo
                                   : ::rtl::OUString( String(
                                         ResId( STR_UNKNOWNUSER,
@@ -111,7 +111,7 @@ handleLockedDocumentRequest_(
         }
         else if ( nMode == UUI_DOC_SAVE_LOCK )
         {
-            aArguments.push_back( aInfo.getLength()
+            aArguments.push_back( !aInfo.isEmpty()
                                   ? aInfo
                                   : ::rtl::OUString( String(
                                         ResId( STR_UNKNOWNUSER,
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index 9fbcf0c..48d61b1 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -92,7 +92,7 @@ isDomainMatch(
     for ( int i = 0; i < certHostNames.getLength(); i++){
         ::rtl::OUString element = certHostNames[i];
 
-       if (element.getLength() == 0)
+       if (element.isEmpty())
            continue;
 
        if (hostName.equalsIgnoreAsciiCase( element ))
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 4f6cb6b..345fb48 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -499,7 +499,7 @@ UUIInteractionHelper::handleRequest_impl(
             ErrCode nErrorCode = ERRCODE_UUI_IO_TARGETALREADYEXISTS;
             std::vector< rtl::OUString > aArguments;
 
-            if( aNCException.Name.getLength() )
+            if( !aNCException.Name.isEmpty() )
             {
                 nErrorCode = ERRCODE_UUI_IO_ALREADYEXISTS;
                 aArguments.push_back( aNCException.Name );
@@ -648,33 +648,25 @@ UUIInteractionHelper::handleRequest_impl(
         {
             ErrCode nErrorCode;
             std::vector< rtl::OUString > aArguments;
-            if (aWrongJavaVersionException.DetectedVersion.getLength() == 0)
-                if (aWrongJavaVersionException.LowestSupportedVersion.
-                    getLength()
-                    == 0)
+            if (aWrongJavaVersionException.DetectedVersion.isEmpty())
+                if (aWrongJavaVersionException.LowestSupportedVersion.isEmpty())
                     nErrorCode = ERRCODE_UUI_WRONGJAVA;
                 else
                 {
                     nErrorCode = ERRCODE_UUI_WRONGJAVA_MIN;
-                    aArguments.push_back(aWrongJavaVersionException.
-                                         LowestSupportedVersion);
+                    aArguments.push_back(aWrongJavaVersionException.LowestSupportedVersion);
                 }
-            else if (aWrongJavaVersionException.LowestSupportedVersion.
-                     getLength()
-                     == 0)
+            else if (aWrongJavaVersionException.LowestSupportedVersion.isEmpty())
             {
                 nErrorCode = ERRCODE_UUI_WRONGJAVA_VERSION;
-                aArguments.push_back(aWrongJavaVersionException.
-                                     DetectedVersion);
+                aArguments.push_back(aWrongJavaVersionException.DetectedVersion);
             }
             else
             {
                 nErrorCode = ERRCODE_UUI_WRONGJAVA_VERSION_MIN;
                 aArguments.reserve(2);
-                aArguments.push_back(aWrongJavaVersionException.
-                                     DetectedVersion);
-                aArguments.push_back(aWrongJavaVersionException.
-                                     LowestSupportedVersion);
+                aArguments.push_back(aWrongJavaVersionException.DetectedVersion);
+                aArguments.push_back(aWrongJavaVersionException.LowestSupportedVersion);
             }
             handleErrorHandlerRequest(task::InteractionClassification_ERROR,
                                       nErrorCode,
@@ -736,7 +728,7 @@ UUIInteractionHelper::handleRequest_impl(
             const ErrCode nErrorCode = ERRCODE_UUI_CONFIGURATION_BACKENDMISSING;
 
             rtl::OUString aStratum = aStratumCreationException.StratumData;
-            if (aStratum.getLength() == 0)
+            if (aStratum.isEmpty())
                 aStratum = aStratumCreationException.StratumService;
 
             std::vector< rtl::OUString > aArguments;
@@ -827,7 +819,7 @@ UUIInteractionHelper::handleRequest_impl(
         {
             std::vector< rtl::OUString > aArguments;
 
-            if( aBrokenPackageRequest.aName.getLength() )
+            if( !aBrokenPackageRequest.aName.isEmpty() )
                 aArguments.push_back( aBrokenPackageRequest.aName );
 
             handleBrokenPackageRequest( aArguments,
@@ -930,7 +922,7 @@ UUIInteractionHelper::handleRequest_impl(
                 handleMacroConfirmRequest(
                     aMacroConfirmRequest.DocumentURL,
                     aMacroConfirmRequest.DocumentStorage,
-                    aMacroConfirmRequest.DocumentVersion.getLength() ? aMacroConfirmRequest.DocumentVersion : ODFVER_012_TEXT,
+                    !aMacroConfirmRequest.DocumentVersion.isEmpty() ? aMacroConfirmRequest.DocumentVersion : ODFVER_012_TEXT,
                     aMacroConfirmRequest.DocumentSignatureInformation,
                     rRequest->getContinuations());
                 return true;
@@ -1233,12 +1225,10 @@ UUIInteractionHelper::handleNameClashResolveRequest(
         task::XInteractionContinuation > > const & rContinuations)
   SAL_THROW((uno::RuntimeException))
 {
-    OSL_ENSURE(
-        rRequest.TargetFolderURL.getLength() > 0,
+    OSL_ENSURE(!rRequest.TargetFolderURL.isEmpty(),
         "NameClashResolveRequest must not contain empty TargetFolderURL" );
 
-    OSL_ENSURE(
-        rRequest.ClashingName.getLength() > 0,
+    OSL_ENSURE(!rRequest.ClashingName.isEmpty(),
         "NameClashResolveRequest must not contain empty ClashingName" );
 
     uno::Reference< task::XInteractionAbort > xAbort;
@@ -1332,7 +1322,7 @@ UUIInteractionHelper::handleGenericErrorRequest(
                                        : STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE,
                                    *xManager.get() ) );
 
-            if ( aTitle.getLength() && aErrTitle.getLength() )
+            if ( !aTitle.isEmpty() && !aErrTitle.isEmpty() )
                 aTitle += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " - " ) );
             aTitle += aErrTitle;
 
diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx
index 0ec9cbc..f6beaf8 100644
--- a/uui/source/nameclashdlg.cxx
+++ b/uui/source/nameclashdlg.cxx
@@ -42,7 +42,7 @@ IMPL_LINK( NameClashDialog, ButtonHdl_Impl, PushButton *, pBtn )
     {
         nRet = (long) RENAME;
         rtl::OUString aNewName = maEDNewName.GetText();
-        if ( ( aNewName == maNewName ) || !aNewName.getLength() )
+        if ( ( aNewName == maNewName ) || aNewName.isEmpty() )
         {
             ErrorBox aError( NULL, WB_OK, maSameName );
             aError.Execute();
@@ -100,7 +100,7 @@ NameClashDialog::NameClashDialog( Window* pParent, ResMgr* pResMgr,
     aInfo.SearchAndReplaceAscii( "%NAME", rClashingName );
     aInfo.SearchAndReplaceAscii( "%FOLDER", aPath );
     maFTMessage.SetText( aInfo );
-    if ( rProposedNewName.getLength() )
+    if ( !rProposedNewName.isEmpty() )
         maEDNewName.SetText( rProposedNewName );
     else
         maEDNewName.SetText( rClashingName );
diff --git a/uui/source/newerverwarn.cxx b/uui/source/newerverwarn.cxx
index 2fd8be7..d60c3d4 100644
--- a/uui/source/newerverwarn.cxx
+++ b/uui/source/newerverwarn.cxx
@@ -101,7 +101,7 @@ IMPL_LINK( NewerVersionWarningDialog, UpdateHdl, PushButton*, EMPTYARG )
 
     try
     {
-        if ( ( sNotifyURL.getLength() > 0 ) && ( m_sVersion.getLength() > 0 ) )
+        if (  !sNotifyURL.isEmpty()  &&  !m_sVersion.isEmpty() )
         {
             uno::Reference< lang::XMultiServiceFactory > xSMGR =
                 ::comphelper::getProcessServiceFactory();
@@ -110,7 +110,7 @@ IMPL_LINK( NewerVersionWarningDialog, UpdateHdl, PushButton*, EMPTYARG )
                     RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
                 uno::UNO_QUERY_THROW );
             sNotifyURL += m_sVersion;
-            if ( xSystemShell.is() && sNotifyURL.getLength() )
+            if ( xSystemShell.is() && !sNotifyURL.isEmpty() )
             {
                 xSystemShell->execute(
                     sNotifyURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx
index 359aa97..2b24832 100644
--- a/uui/source/passwordcontainer.cxx
+++ b/uui/source/passwordcontainer.cxx
@@ -178,8 +178,8 @@ bool PasswordContainerHelper::handleAuthenticationRequest(
         // Runtime / Persistent info avail for current auth request?
 
         rtl::OUString aResult = xUrlContainer->findUrl(
-            rURL.getLength() ? rURL : rRequest.ServerName );
-        if ( aResult.getLength() > 0 )
+            rURL.isEmpty() ? rRequest.ServerName : rURL );
+        if ( !aResult.isEmpty() )
         {
             if ( fillContinuation( true,
                                    rRequest,
@@ -199,10 +199,10 @@ bool PasswordContainerHelper::handleAuthenticationRequest(
     {
         try
         {
-            if (rRequest.UserName.getLength() == 0)
+            if (rRequest.UserName.isEmpty())
             {
                 task::UrlRecord aRec;
-                if ( rURL.getLength() )
+                if ( !rURL.isEmpty() )
                     aRec = xContainer->find(rURL, xIH);
 
                 if ( aRec.UserList.getLength() == 0 )
@@ -225,7 +225,7 @@ bool PasswordContainerHelper::handleAuthenticationRequest(
             else
             {
                 task::UrlRecord aRec;
-                if ( rURL.getLength() )
+                if ( !rURL.isEmpty() )
                     aRec = xContainer->findForName(
                         rURL, rRequest.UserName, xIH);
 
@@ -265,7 +265,7 @@ bool PasswordContainerHelper::addRecord(
 {
     try
     {
-        if ( rUsername.getLength() )
+        if ( !rUsername.isEmpty() )
         {
             OSL_ENSURE( m_xPasswordContainer.is(),
                         "Got no XPasswordContainer!" );
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index 908666c..ca94e18 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -120,7 +120,7 @@ PasswordDialog::PasswordDialog(
     aFTPassword.SetText( aFTPassword.GetText() + aDocURL );
     if (bIsSimplePasswordRequest)
     {
-        DBG_ASSERT( aDocURL.getLength() == 0, "A simple password request should not have a document URL! Use document password request instead." );
+        DBG_ASSERT( aDocURL.isEmpty(), "A simple password request should not have a document URL! Use document password request instead." );
         aFTPassword.SetText( String( ResId( STR_ENTER_SIMPLE_PASSWORD, *pResourceMgr ) ) );
     }
 
commit 5738e07a78c5894d111ee6c6e0d07b56ff126b2c
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Thu Jan 19 16:25:16 2012 -0200

    Fix for fdo43460 Part XLIII getLength() to isEmpty()
    
    Part XLIII
    Modules
    unoxml

diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index 50f4dc1..f749cfd 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -553,7 +553,7 @@ namespace DOM
         ::osl::MutexGuard const g(m_Mutex);
 
         sal_Int32 i = qname.indexOf(':');
-        if (ns.getLength() == 0) throw RuntimeException();
+        if (ns.isEmpty()) throw RuntimeException();
         xmlChar *xPrefix;
         xmlChar *xName;
         OString o1, o2, o3;
@@ -805,9 +805,9 @@ namespace DOM
             OUString const aNsPrefix = xImportedNode->getPrefix();
             OUString aQName = xElement->getTagName();
             Reference< XElement > xNewElement;
-            if (aNsUri.getLength() > 0)
+            if (!aNsUri.isEmpty())
             {
-                if (aNsPrefix.getLength() > 0) {
+                if (!aNsPrefix.isEmpty()) {
                     aQName = aNsPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM(":"))
                                 + aQName;
                 }
@@ -828,9 +828,9 @@ namespace DOM
                     OUString const aAttrPrefix = curAttr->getPrefix();
                     OUString aAttrName = curAttr->getName();
                     OUString const sValue = curAttr->getValue();
-                    if (aAttrUri.getLength() > 0)
+                    if (!aAttrUri.isEmpty())
                     {
-                        if (aAttrPrefix.getLength() > 0) {
+                        if (!aAttrPrefix.isEmpty()) {
                             aAttrName = aAttrPrefix +
                                 OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + aAttrName;
                         }
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx
index 9259caa..09f3ec3 100644
--- a/unoxml/source/dom/element.cxx
+++ b/unoxml/source/dom/element.cxx
@@ -68,7 +68,7 @@ namespace DOM
             OUString prefix(reinterpret_cast<const sal_Char*>(pPrefix),
                 strlen(reinterpret_cast<const char*>(pPrefix)),
                 RTL_TEXTENCODING_UTF8);
-            OUString name = (prefix.getLength() == 0)
+            OUString name = (prefix.isEmpty())
                 ? OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns"))
                 : OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns:")) + prefix;
             const xmlChar *pHref = pNs->href;
@@ -84,14 +84,14 @@ namespace DOM
                     reinterpret_cast<xmlNodePtr>(pAttr));
             OSL_ENSURE(pNode != 0, "CNode::get returned 0");
             OUString prefix = pNode->getPrefix();
-            OUString name = (prefix.getLength() == 0)
+            OUString name = (prefix.isEmpty())
                 ? pNode->getLocalName()
                 : prefix + OUString(static_cast<sal_Unicode>(':')) + pNode->getLocalName();
             OUString val  = pNode->getNodeValue();
             pAttrs->AddAttribute(name, type, val);
         }
         OUString prefix = getPrefix();
-        OUString name = (prefix.getLength() == 0)
+        OUString name = (prefix.isEmpty())
             ? getLocalName()
             : prefix + OUString(static_cast<sal_Unicode>(':')) + getLocalName();
         Reference< XAttributeList > xAttrList(pAttrs);
@@ -510,7 +510,7 @@ namespace DOM
         }
 
         Reference< XAttr > aAttr;
-        if (oldAttr->getNamespaceURI().getLength() > 0) {
+        if (!oldAttr->getNamespaceURI().isEmpty()) {
             ::rtl::OUStringBuffer qname(oldAttr->getPrefix());
             if (0 != qname.getLength()) {
                 qname.append(sal_Unicode(':'));
@@ -667,7 +667,7 @@ namespace DOM
             OUString const& qualifiedName, OUString const& value)
         throw (RuntimeException, DOMException)
     {
-        if (namespaceURI.getLength() == 0) throw RuntimeException();
+        if (namespaceURI.isEmpty()) throw RuntimeException();
 
         ::osl::ClearableMutexGuard guard(m_rMutex);
 
@@ -778,7 +778,7 @@ namespace DOM
     void SAL_CALL CElement::setElementName(const OUString& aName)
         throw (RuntimeException, DOMException)
     {
-        if ((aName.getLength() <= 0) ||
+        if (aName.isEmpty() ||
             (0 <= aName.indexOf(OUString(RTL_CONSTASCII_USTRINGPARAM(":")))))
         {
             DOMException e;
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index 6b73cbf..fb79fff 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -318,7 +318,7 @@ namespace DOM
         Reference< XElement > aElement(aNode, UNO_QUERY);
         OUString aRefName;
         OUString aPrefix = aElement->getPrefix();
-        if (aPrefix.getLength() > 0)
+        if (!aPrefix.isEmpty())
             aRefName = aPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + aElement->getTagName();
         else
             aRefName = aElement->getTagName();
diff --git a/unoxml/source/rdf/CBlankNode.cxx b/unoxml/source/rdf/CBlankNode.cxx
index 62d5978..0a93718 100644
--- a/unoxml/source/rdf/CBlankNode.cxx
+++ b/unoxml/source/rdf/CBlankNode.cxx
@@ -113,7 +113,7 @@ void SAL_CALL CBlankNode::initialize(const css::uno::Sequence< ::com::sun::star:
     }
 
     //FIXME: what is legal?
-    if (arg.getLength() > 0) {
+    if (!arg.isEmpty()) {
         m_NodeID = arg;
     } else {
         throw css::lang::IllegalArgumentException(
diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx
index 549cee2..38e585f 100644
--- a/unoxml/source/rdf/CLiteral.cxx
+++ b/unoxml/source/rdf/CLiteral.cxx
@@ -134,7 +134,7 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u
         ::rtl::OUString arg1;
         css::uno::Reference< css::rdf::XURI > xURI;
         if ((aArguments[1] >>= arg1)) {
-            if (arg1.getLength() > 0) {
+            if (!arg1.isEmpty()) {
                 m_Language = arg1;
             } else {
                 throw css::lang::IllegalArgumentException(
@@ -160,7 +160,7 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u
 // ::com::sun::star::rdf::XNode:
 ::rtl::OUString SAL_CALL CLiteral::getStringValue() throw (css::uno::RuntimeException)
 {
-    if (m_Language.getLength()) {
+    if (!m_Language.isEmpty()) {
         ::rtl::OUStringBuffer buf(m_Value);
         buf.appendAscii("@");
         buf.append(m_Language);
diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx
index 414267f..fe40ddb 100644
--- a/unoxml/source/rdf/CURI.cxx
+++ b/unoxml/source/rdf/CURI.cxx
@@ -803,7 +803,7 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno::
     }
 
     //FIXME: what is legal?
-    if (arg0.getLength() > 0) {
+    if (!arg0.isEmpty()) {
         m_Namespace = arg0;
     } else {
         throw css::lang::IllegalArgumentException(
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index f292682..85b40e9 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -1265,7 +1265,7 @@ static bool isMetadatableWithoutMetadata(
     uno::Reference<uno::XInterface> const & i_xNode)
 {
     const uno::Reference<rdf::XMetadatable> xMeta( i_xNode, uno::UNO_QUERY );
-    return (xMeta.is() && !xMeta->getMetadataReference().Second.getLength());
+    return (xMeta.is() && xMeta->getMetadataReference().Second.isEmpty());
 }
 
 uno::Reference< container::XEnumeration > SAL_CALL
@@ -1483,7 +1483,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     // ensure that the metadatable has an XML ID
     i_xObject->ensureMetadataReference();
     const beans::StringPair mdref( i_xObject->getMetadataReference() );
-    if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) {
+    if ((mdref.First.isEmpty()) || (mdref.Second.isEmpty())) {
         throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::setStatementRDFa: "
                 "ensureMetadataReference did not")), *this);
@@ -1503,7 +1503,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     }
 
     ::osl::MutexGuard g(m_aMutex);
-    ::rtl::OUString const content( (i_rRDFaContent.getLength() == 0)
+    ::rtl::OUString const content( (i_rRDFaContent.isEmpty())
             ? xTextRange->getString()
             : i_rRDFaContent );
     uno::Reference<rdf::XNode> xContent;
@@ -1523,7 +1523,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
                 "cannot create literal")), *this, uno::makeAny(iae));
     }
     removeStatementRDFa(i_xObject);
-    if (i_rRDFaContent.getLength() == 0) {
+    if (i_rRDFaContent.isEmpty()) {
         m_RDFaXHTMLContentSet.erase(sXmlId);
     } else {
         m_RDFaXHTMLContentSet.insert(sXmlId);
@@ -1546,7 +1546,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     }
 
     const beans::StringPair mdref( i_xElement->getMetadataReference() );
-    if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) {
+    if ((mdref.First.isEmpty()) || (mdref.Second.isEmpty())) {
         return; // nothing to do...
     }
     uno::Reference<rdf::XURI> xXmlId;
@@ -1577,7 +1577,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             "librdf_Repository::getStatementRDFa: Element is null")), *this, 0);
     }
     const beans::StringPair mdref( i_xElement->getMetadataReference() );
-    if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) {
+    if ((mdref.First.isEmpty()) || (mdref.Second.isEmpty())) {
         return beans::Pair< uno::Sequence<rdf::Statement>, sal_Bool >();
     }
     ::rtl::OUString const sXmlId(mdref.First +
@@ -2065,7 +2065,7 @@ librdf_node* librdf_TypeConverter::mkNode( librdf_world* i_pWorld,
         RTL_TEXTENCODING_UTF8) );
     const uno::Reference< rdf::XURI > xType(xLiteral->getDatatype());
     librdf_node * ret(0);
-    if (lang.getLength() == 0) {
+    if (lang.isEmpty()) {
         if (!xType.is()) {
             ret = librdf_new_node_from_literal(i_pWorld,
                 reinterpret_cast<const unsigned char*> (val.getStr()),
commit 6a1390eaf6464e71668c402d262a21c9192278e9
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Thu Jan 19 16:01:33 2012 -0200

    Fix for fdo43460 Part XLII getLength() to isEmpty()
    
    Part XLII
    Modules
    unotools

diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index 8e94a92..ae5c8ad 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -185,7 +185,7 @@ PathStatus implCheckStatusOfURL(OUString const& _sURL, osl::DirectoryItem& aDirI
 
     PathStatus eStatus = Bootstrap::DATA_UNKNOWN;
 
-    if (_sURL.getLength() != 0)
+    if (!_sURL.isEmpty())
     {
         switch( DirectoryItem::get(_sURL, aDirItem) )
         {
@@ -235,7 +235,7 @@ bool implNormalizeURL(OUString & _sURL, osl::DirectoryItem& aDirItem)
 
     OUString aNormalizedURL = aFileStatus.getFileURL();
 
-    if (aNormalizedURL.getLength() == 0)
+    if (aNormalizedURL.isEmpty())
         return false;
 
     // #109863# sal/osl returns final slash for file URLs contradicting
@@ -337,7 +337,7 @@ PathStatus checkStatusAndNormalizeURL(OUString & _sURL)
 
     PathStatus eStatus = Bootstrap::DATA_UNKNOWN;
 
-    if (_sURL.getLength() == 0)
+    if (_sURL.isEmpty())
         eStatus = Bootstrap::DATA_MISSING;
 
     else if ( !implMakeAbsoluteURL(_sURL) )
@@ -372,12 +372,12 @@ PathStatus getDerivedPath(
     OUString sDerivedURL;
 
     OSL_PRECOND(!_rData.getFrom(_sBootstrapParameter,sDerivedURL),"Setting for derived path is already defined");
-    OSL_PRECOND(_sRelativeURL.getLength() != 0 && _sRelativeURL[0] != cURLSeparator,"Invalid Relative URL");
+    OSL_PRECOND(!_sRelativeURL.isEmpty() && _sRelativeURL[0] != cURLSeparator,"Invalid Relative URL");
 
     PathStatus aStatus = _aBaseStatus;
 
     // do we have a base path ?
-    if (_aBaseURL.getLength())
+    if (!_aBaseURL.isEmpty())
     {
         OSL_PRECOND(_aBaseURL[_aBaseURL.getLength()-1] != cURLSeparator,"Unexpected: base URL ends in slash");
 
@@ -649,7 +649,7 @@ OUString Bootstrap::getBuildIdData(OUString const& _sDefault)
     OUString sBuildId;
     // read buildid from version.ini (versionrc), if it doesn't exist or buildid is empty
     if ( data().getVersionValue( csBuildIdItem, sBuildId, _sDefault ) != sal_True ||
-         sBuildId.getLength() == 0 )
+         sBuildId.isEmpty() )
          // read buildid from bootstrap.ini (bootstraprc)
         sBuildId = data().getBootstrapValue( csBuildIdItem, _sDefault );
     return sBuildId;
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index eec5846..eb31e9c 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -432,7 +432,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
             OUString sProperty;
 
             ::utl::splitLastFromConfigurationPath(sName,sPath,sProperty);
-            if (!sPath.getLength() && !sProperty.getLength())
+            if (sPath.isEmpty() && sProperty.isEmpty())
             {
                 OSL_FAIL("ConfigItem::IsReadonly()\nsplitt failed\n");
                 continue;
@@ -441,7 +441,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
             Reference< XInterface >       xNode;
             Reference< XPropertySet >     xSet ;
             Reference< XPropertySetInfo > xInfo;
-            if (sPath.getLength())
+            if (!sPath.isEmpty())
             {
                 Any aNode = xHierarchyAccess->getByHierarchicalName(sPath);
                 if (!(aNode >>= xNode) || !xNode.is())
@@ -746,7 +746,7 @@ Sequence< OUString > ConfigItem::GetNodeNames(const OUString& rNode, ConfigNameF
         try
         {
             Reference<XNameAccess> xCont;
-            if(rNode.getLength())
+            if(!rNode.isEmpty())
             {
                 Any aNode = xHierarchyAccess->getByHierarchicalName(rNode);
                 aNode >>= xCont;
@@ -775,7 +775,7 @@ sal_Bool ConfigItem::ClearNodeSet(const OUString& rNode)
         try
         {
             Reference<XNameContainer> xCont;
-            if(rNode.getLength())
+            if(!rNode.isEmpty())
             {
                 Any aNode = xHierarchyAccess->getByHierarchicalName(rNode);
                 aNode >>= xCont;
@@ -814,7 +814,7 @@ sal_Bool ConfigItem::ClearNodeElements(const OUString& rNode, Sequence< OUString
         try
         {
             Reference<XNameContainer> xCont;
-            if(rNode.getLength())
+            if(!rNode.isEmpty())
             {
                 Any aNode = xHierarchyAccess->getByHierarchicalName(rNode);
                 aNode >>= xCont;
@@ -888,7 +888,7 @@ sal_Bool ConfigItem::SetSetProperties(
         try
         {
             Reference<XNameContainer> xCont;
-            if(rNode.getLength())
+            if(!rNode.isEmpty())
             {
                 Any aNode = xHierarchyAccess->getByHierarchicalName(rNode);
                 aNode >>= xCont;
@@ -930,7 +930,7 @@ sal_Bool ConfigItem::SetSetProperties(
                 Sequence< Any> aSetValues(rValues.getLength());
                 Any* pSetValues = aSetValues.getArray();
 
-                sal_Bool bEmptyNode = rNode.getLength() == 0;
+                sal_Bool bEmptyNode = rNode.isEmpty();
                 for(sal_Int32 k = 0; k < rValues.getLength(); k++)
                 {
                     pSetNames[k] =  pProperties[k].Name.copy( bEmptyNode ? 1 : 0);
@@ -987,7 +987,7 @@ sal_Bool ConfigItem::ReplaceSetProperties(
         try
         {
             Reference<XNameContainer> xCont;
-            if(rNode.getLength())
+            if(!rNode.isEmpty())
             {
                 Any aNode = xHierarchyAccess->getByHierarchicalName(rNode);
                 aNode >>= xCont;
@@ -1069,7 +1069,7 @@ sal_Bool ConfigItem::ReplaceSetProperties(
                 Sequence< Any> aSetValues(rValues.getLength());
                 Any* pSetValues = aSetValues.getArray();
 
-                sal_Bool bEmptyNode = rNode.getLength() == 0;
+                sal_Bool bEmptyNode = rNode.isEmpty();
                 for(sal_Int32 k = 0; k < rValues.getLength(); k++)
                 {
                     pSetNames[k] =  pProperties[k].Name.copy( bEmptyNode ? 1 : 0);
@@ -1162,7 +1162,7 @@ sal_Bool ConfigItem::AddNode(const rtl::OUString& rNode, const rtl::OUString& rN
         try
         {
             Reference<XNameContainer> xCont;
-            if(rNode.getLength())
+            if(!rNode.isEmpty())
             {
                 Any aNode = xHierarchyAccess->getByHierarchicalName(rNode);
                 aNode >>= xCont;
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx
index a6a4138..12c6ad0 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -173,7 +173,7 @@ namespace utl
         if (getEscape())
         {
             Reference< XStringEscape > xEscaper(m_xDirectAccess, UNO_QUERY);
-            if (xEscaper.is() && sName.getLength())
+            if (xEscaper.is() && !sName.isEmpty())
             {
                 try
                 {
@@ -414,7 +414,7 @@ namespace utl
                 // check if the name refers to a indirect descendant
                 else if (m_xHierarchyAccess.is() && m_xHierarchyAccess->hasByHierarchicalName(_rPath))
                 {
-                    OSL_ASSERT(_rPath.getLength());
+                    OSL_ASSERT(!_rPath.isEmpty());
 
                     ::rtl::OUString sParentPath, sLocalName;
 
diff --git a/unotools/source/config/configpathes.cxx b/unotools/source/config/configpathes.cxx
index 05b69b0..6a583ba 100644
--- a/unotools/source/config/configpathes.cxx
+++ b/unotools/source/config/configpathes.cxx
@@ -230,7 +230,7 @@ sal_Int32 lcl_findPrefixEnd(OUString const& _sNestedPath, OUString const& _sPref
 sal_Bool isPrefixOfConfigurationPath(OUString const& _sNestedPath,
                                      OUString const& _sPrefixPath)
 {
-    return _sPrefixPath.getLength() == 0 || lcl_findPrefixEnd(_sNestedPath,_sPrefixPath) != 0;
+    return _sPrefixPath.isEmpty() || lcl_findPrefixEnd(_sNestedPath,_sPrefixPath) != 0;
 }
 
 //----------------------------------------------------------------------------
@@ -243,7 +243,7 @@ OUString dropPrefixFromConfigurationPath(OUString const& _sNestedPath,
     }
     else
     {
-        OSL_ENSURE(_sPrefixPath.getLength() == 0,  "Path does not start with expected prefix");
+        OSL_ENSURE(_sPrefixPath.isEmpty(),  "Path does not start with expected prefix");
 
         return _sNestedPath;
     }
@@ -256,7 +256,7 @@ OUString lcl_wrapName(const OUString& _sContent, const OUString& _sType)
     const sal_Unicode * const pBeginContent = _sContent.getStr();
     const sal_Unicode * const pEndContent   = pBeginContent + _sContent.getLength();
 
-    OSL_PRECOND(_sType.getLength(), "Unexpected config type name: empty");
+    OSL_PRECOND(!_sType.isEmpty(), "Unexpected config type name: empty");
     OSL_PRECOND(pBeginContent <= pEndContent, "Invalid config name: empty");
 
     if (pBeginContent == pEndContent)
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index 84fe68b..589410a 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -189,7 +189,7 @@ void GlobalEventConfig_Impl::Commit()
     for(int i=0;it!=it_end;++it,++i)
     {
         //no point in writing out empty bindings!
-        if(it->second.getLength() == 0 )
+        if(it->second.isEmpty() )
             continue;
         sNode = sPrefix + it->first + sPostfix;
         OSL_TRACE("writing binding for: %s",::rtl::OUStringToOString(sNode , RTL_TEXTENCODING_ASCII_US ).pData->buffer);
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index b3dd31d..cab7eb3 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -249,17 +249,17 @@ OUString DefaultFontConfiguration::getDefaultFont( const Locale& rLocale, int nT
 
     OUString aType = OUString::createFromAscii( getKeyType( nType ) );
     OUString aRet = tryLocale( aLocale, aType );
-    if( ! aRet.getLength() && aLocale.Variant.getLength() )
+    if( aRet.isEmpty() && !aLocale.Variant.isEmpty() )
     {
         aLocale.Variant = OUString();
         aRet = tryLocale( aLocale, aType );
     }
-    if( ! aRet.getLength() && aLocale.Country.getLength() )
+    if( aRet.isEmpty() && !aLocale.Country.isEmpty() )
     {
         aLocale.Country = OUString();
         aRet = tryLocale( aLocale, aType );
     }
-    if( ! aRet.getLength() )
+    if( aRet.isEmpty() )
     {
         aLocale.Language = OUString( RTL_CONSTASCII_USTRINGPARAM( "en" ) );
         aRet = tryLocale( aLocale, aType );
@@ -270,12 +270,12 @@ OUString DefaultFontConfiguration::getDefaultFont( const Locale& rLocale, int nT
 OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale ) const
 {
     Locale aLocale = rLocale;
-    if( ! aLocale.Language.getLength() )
+    if( aLocale.Language.isEmpty() )
         aLocale = SvtSysLocale().GetUILocale();
 
     OUString aUIFont = getDefaultFont( aLocale, DEFAULTFONT_UI_SANS );
 
-    if( aUIFont.getLength() )
+    if( !aUIFont.isEmpty() )
         return aUIFont;
 
     // fallback mechanism (either no configuration or no entry in configuration
@@ -978,7 +978,7 @@ void FontSubstConfiguration::fillSubstVector( const com::sun::star::uno::Referen
                 while( nIndex != -1 )
                 {
                     OUString aSubst( pLine->getToken( 0, ';', nIndex ) );
-                    if( aSubst.getLength() )
+                    if( !aSubst.isEmpty() )
                     {
                         UniqueSubstHash::iterator aEntry = maSubstHash.find( aSubst );
                         if (aEntry != maSubstHash.end())
@@ -1009,7 +1009,7 @@ FontWeight FontSubstConfiguration::getSubstWeight( const com::sun::star::uno::Re
         if( aAny.getValueTypeClass() == TypeClass_STRING )
         {
             const OUString* pLine = (const OUString*)aAny.getValue();
-            if( pLine->getLength() )
+            if( !pLine->isEmpty() )
             {
                 for( weight=SAL_N_ELEMENTS(pWeightNames)-1; weight >= 0; weight-- )
                     if( pLine->equalsIgnoreAsciiCaseAscii( pWeightNames[weight].pName ) )
@@ -1041,7 +1041,7 @@ FontWidth FontSubstConfiguration::getSubstWidth( const com::sun::star::uno::Refe
         if( aAny.getValueTypeClass() == TypeClass_STRING )
         {
             const OUString* pLine = (const OUString*)aAny.getValue();
-            if( pLine->getLength() )
+            if( !pLine->isEmpty() )
             {
                 for( width=SAL_N_ELEMENTS(pWidthNames)-1; width >= 0; width-- )
                     if( pLine->equalsIgnoreAsciiCaseAscii( pWidthNames[width].pName ) )
@@ -1073,7 +1073,7 @@ unsigned long FontSubstConfiguration::getSubstType( const com::sun::star::uno::R
         if( aAny.getValueTypeClass() == TypeClass_STRING )
         {
             const OUString* pLine = (const OUString*)aAny.getValue();
-            if( pLine->getLength() )
+            if( !pLine->isEmpty() )
             {
                 sal_Int32 nIndex = 0;
                 while( nIndex != -1 )
@@ -1196,10 +1196,10 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const String& rFontNam
     aLocale.Country = rLocale.Country.toAsciiUpperCase();
     aLocale.Variant = rLocale.Variant.toAsciiUpperCase();
 
-    if( ! aLocale.Language.getLength() )
+    if( aLocale.Language.isEmpty() )
         aLocale = SvtSysLocale().GetUILocale();
 
-    while( aLocale.Language.getLength() )
+    while( !aLocale.Language.isEmpty() )
     {
         boost::unordered_map< Locale, LocaleSubst, LocaleHash >::const_iterator lang = m_aSubst.find( aLocale );
         if( lang != m_aSubst.end() )
@@ -1220,9 +1220,9 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const String& rFontNam
             }
         }
         // gradually become more unspecific
-        if( aLocale.Variant.getLength() )
+        if( !aLocale.Variant.isEmpty() )
             aLocale.Variant = OUString();
-        else if( aLocale.Country.getLength() )
+        else if( !aLocale.Country.isEmpty() )
             aLocale.Country = OUString();
         else if( ! aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "en" ) ) )
             aLocale.Language = OUString( RTL_CONSTASCII_USTRINGPARAM( "en" ) );
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 27516fb..866e142 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -92,7 +92,7 @@ static sal_Int16 lcl_CfgAnyToLanguage( const uno::Any &rVal )
 {
     OUString aTmp;
     rVal >>= aTmp;
-    return (aTmp.getLength() == 0) ? LANGUAGE_SYSTEM : MsLangId::convertIsoStringToLanguage( aTmp );
+    return (aTmp.isEmpty()) ? LANGUAGE_SYSTEM : MsLangId::convertIsoStringToLanguage( aTmp );
 }
 
 SvtLinguOptions::SvtLinguOptions()
@@ -923,7 +923,7 @@ sal_Bool SvtLinguConfig::GetSupportedDictionaryFormatsFor(
     const rtl::OUString &rSetEntry,
     uno::Sequence< rtl::OUString > &rFormatList ) const
 {
-    if (rSetName.getLength() == 0 || rSetEntry.getLength() == 0)
+    if (rSetName.isEmpty() || rSetEntry.isEmpty())
         return sal_False;
     bool bSuccess = false;
     try
@@ -974,7 +974,7 @@ static bool lcl_GetFileUrlFromOrigin(
     uno::Reference< util::XMacroExpander > &rxMacroExpander )
 {
     bool bSuccess = false;
-    if (rOrigin.getLength() > 0 && rxMacroExpander.is())
+    if (!rOrigin.isEmpty() && rxMacroExpander.is())
     {
         rtl::OUString aURL( rOrigin );
         if (( aURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( EXPAND_PROTOCOL )) == 0 ) &&
@@ -1011,7 +1011,7 @@ sal_Bool SvtLinguConfig::GetDictionaryEntry(
     const rtl::OUString &rNodeName,
     SvtLinguConfigDictionaryEntry &rDicEntry ) const
 {
-    if (rNodeName.getLength() == 0)
+    if (rNodeName.isEmpty())
         return sal_False;
     bool bSuccess = false;
     try
@@ -1029,7 +1029,7 @@ sal_Bool SvtLinguConfig::GetDictionaryEntry(
                     (xNA->getByName( aG_Format )    >>= aFormatName) &&
                     (xNA->getByName( aG_Locales )   >>= aLocaleNames);
         DBG_ASSERT( aLocations.getLength(), "Dictionary locations not set" );
-        DBG_ASSERT( aFormatName.getLength(), "Dictionary format name not set" );
+        DBG_ASSERT( !aFormatName.isEmpty(), "Dictionary format name not set" );
         DBG_ASSERT( aLocaleNames.getLength(), "No locales set for the dictionary" );
 
         // if sucessful continue
@@ -1078,7 +1078,7 @@ std::vector< SvtLinguConfigDictionaryEntry > SvtLinguConfig::GetActiveDictionari
     const rtl::OUString &rFormatName )
 {
     std::vector< SvtLinguConfigDictionaryEntry > aRes;
-    if (rFormatName.getLength() == 0)
+    if (rFormatName.isEmpty())
         return aRes;
 
     try
@@ -1106,7 +1106,7 @@ std::vector< SvtLinguConfigDictionaryEntry > SvtLinguConfig::GetActiveDictionari
 
                 if (bDicIsActive)
                 {
-                    DBG_ASSERT( aDicEntry.aFormatName.getLength(),
+                    DBG_ASSERT( !aDicEntry.aFormatName.isEmpty(),
                             "FormatName not set" );
                     DBG_ASSERT( aDicEntry.aLocations.getLength(),
                             "Locations not set" );
@@ -1204,7 +1204,7 @@ rtl::OUString SvtLinguConfig::GetSpellAndGrammarContextSuggestionImage(
 ) const
 {
     rtl::OUString   aRes;
-    if (rServiceImplName.getLength() > 0)
+    if (!rServiceImplName.isEmpty())
     {
         rtl::OUString aImageName( A2OU( "SpellAndGrammarContextMenuSuggestionImage" ));
         rtl::OUString aPath( GetVendorImageUrl_Impl( rServiceImplName, aImageName ) );
@@ -1219,7 +1219,7 @@ rtl::OUString SvtLinguConfig::GetSpellAndGrammarContextDictionaryImage(
 ) const
 {
     rtl::OUString   aRes;
-    if (rServiceImplName.getLength() > 0)
+    if (!rServiceImplName.isEmpty())
     {
         rtl::OUString aImageName( A2OU( "SpellAndGrammarContextMenuDictionaryImage" ));
         rtl::OUString aPath( GetVendorImageUrl_Impl( rServiceImplName, aImageName ) );
@@ -1234,7 +1234,7 @@ rtl::OUString SvtLinguConfig::GetSpellAndGrammarContextDictionaryImage(
 ) const
 {
     rtl::OUString   aRes;
-    if (rServiceImplName.getLength() > 0)
+    if (!rServiceImplName.isEmpty())
     {
         rtl::OUString aImageName( A2OU( "ThesaurusDialogImage" ));
         rtl::OUString aPath( GetVendorImageUrl_Impl( rServiceImplName, aImageName ) );
@@ -1249,7 +1249,7 @@ rtl::OUString SvtLinguConfig::GetSpellAndGrammarContextDictionaryImage(
 ) const
 {
     rtl::OUString   aRes;
-    if (rServiceImplName.getLength() > 0)
+    if (!rServiceImplName.isEmpty())
     {
         rtl::OUString aImageName( A2OU( "SynonymsContextMenuImage" ));
         rtl::OUString aPath( GetVendorImageUrl_Impl( rServiceImplName, aImageName ) );
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 6f7403a..c66bbff 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -158,7 +158,7 @@ struct FactoryInfo
             {
                 lProperties[nRealyChanged].Name = sNodeBase + PROPERTYNAME_TEMPLATEFILE;
 
-                if ( sTemplateFile.getLength() > 0 )
+                if ( !sTemplateFile.isEmpty() )
                 {
                     lProperties[nRealyChanged].Value
                         <<= getStringSubstitution()
@@ -235,7 +235,7 @@ struct FactoryInfo
         //---------------------------------------------------------------------------------------------------------
         void initTemplateFile( const ::rtl::OUString& sNewTemplateFile )
         {
-            if ( sNewTemplateFile.getLength() > 0 )
+            if ( !sNewTemplateFile.isEmpty() )
             {
                 sTemplateFile
                     = getStringSubstitution()
@@ -1338,7 +1338,7 @@ SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByURL(const ::rtl::O
 
     // is there already a filter inside the descriptor?
     ::rtl::OUString sFilterName = stlDesc.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName")), ::rtl::OUString());
-    if (sFilterName.getLength())
+    if (!sFilterName.isEmpty())
     {
         try
         {
@@ -1357,7 +1357,7 @@ SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByURL(const ::rtl::O
 
     // is there already a type inside the descriptor?
     ::rtl::OUString sTypeName = stlDesc.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName")), ::rtl::OUString());
-    if (!sTypeName.getLength())
+    if (sTypeName.isEmpty())
     {
         // no :-(
         // start flat detection of URL
@@ -1365,7 +1365,7 @@ SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByURL(const ::rtl::O
         sTypeName = xDetect->queryTypeByURL(sURL);
     }
 
-    if (!sTypeName.getLength())
+    if (sTypeName.isEmpty())
         return E_UNKNOWN_FACTORY;
 
     // yes - there is a type info
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index cb925a2..2b762f0 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -902,7 +902,7 @@ sal_Bool SvtSecurityOptions_Impl::IsSecureURL(  const   OUString&   sURL    ,
         // Trusted referer given?
         // NO  => bState will be false per default
         // YES => search for it in our internal url list
-        if( sReferer.getLength() > 0 )
+        if( !sReferer.isEmpty() )
         {
             // Search in internal list
             ::rtl::OUString sRef = sReferer.toAsciiLowerCase();
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx
index 7f40155..eced74b 100644
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -60,7 +60,7 @@ namespace
 com::sun::star::lang::Locale lcl_str_to_locale( const ::rtl::OUString rStr )
 {
     com::sun::star::lang::Locale aRet;
-    if ( rStr.getLength() )
+    if ( !rStr.isEmpty() )
     {
         aRet = com::sun::star::lang::Locale();
         sal_Int32 nSep = rStr.indexOf('-');
@@ -255,7 +255,7 @@ SvtSysLocaleOptions_Impl::~SvtSysLocaleOptions_Impl()
 void SvtSysLocaleOptions_Impl::MakeRealLocale()
 {
     m_aRealLocale = lcl_str_to_locale( m_aLocaleString );
-    if ( m_aRealLocale.Language.getLength() )
+    if ( !m_aRealLocale.Language.isEmpty() )
     {
         m_eRealLanguage = MsLangId::convertLocaleToLanguage( m_aRealLocale );
     }
@@ -270,7 +270,7 @@ void SvtSysLocaleOptions_Impl::MakeRealUILocale()
 {
     // as we can't switch UILocale at runtime, we only store changes in the configuration
     m_aRealUILocale = lcl_str_to_locale( m_aUILocaleString );
-    if ( m_aRealUILocale.Language.getLength() )
+    if ( !m_aRealUILocale.Language.isEmpty() )
     {
         m_eRealUILanguage = MsLangId::convertLocaleToLanguage( m_aRealUILocale );
     }
@@ -380,7 +380,7 @@ void SvtSysLocaleOptions_Impl::SetLocaleString( const OUString& rStr )
         MsLangId::setConfiguredSystemLanguage( m_eRealLanguage );
         SetModified();
         sal_uLong nHint = SYSLOCALEOPTIONS_HINT_LOCALE;
-        if ( !m_aCurrencyString.getLength() )
+        if ( m_aCurrencyString.isEmpty() )
             nHint |= SYSLOCALEOPTIONS_HINT_CURRENCY;
         NotifyListeners( nHint );
     }
@@ -434,7 +434,7 @@ void SvtSysLocaleOptions_Impl::Notify( const Sequence< rtl::OUString >& seqPrope
             seqValues[nProp] >>= m_aLocaleString;
             m_bROLocale = seqROStates[nProp];
             nHint |= SYSLOCALEOPTIONS_HINT_LOCALE;
-            if ( !m_aCurrencyString.getLength() )
+            if ( m_aCurrencyString.isEmpty() )
                 nHint |= SYSLOCALEOPTIONS_HINT_CURRENCY;
             MakeRealLocale();
         }
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index ccd42f4..3802072 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -772,7 +772,7 @@ void SvtUserOptions_Impl::SetApartment( const ::rtl::OUString& sApartment )
 
     sFullName = GetFirstName();
     sFullName.trim();
-    if ( sFullName.getLength() )
+    if ( !sFullName.isEmpty() )
         sFullName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" "));
     sFullName += GetLastName();
     sFullName.trim();
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 2e8ebf7..12aa78d 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -314,11 +314,11 @@ void LocaleDataWrapper::invalidateData()
         if (areChecksEnabled())
         {
             aDebugLocale = xLoc[i].Language;
-            if ( xLoc[i].Country.getLength() )
+            if ( !xLoc[i].Country.isEmpty() )
             {
                 aDebugLocale += '_';
                 aDebugLocale += String( xLoc[i].Country);
-                if ( xLoc[i].Variant.getLength() )
+                if ( !xLoc[i].Variant.isEmpty() )
                 {
                     aDebugLocale += '_';
                     aDebugLocale += String( xLoc[i].Variant);
@@ -326,7 +326,7 @@ void LocaleDataWrapper::invalidateData()
             }
         }
 
-        if ( xLoc[i].Variant.getLength() )
+        if ( !xLoc[i].Variant.isEmpty() )
         {
             if (areChecksEnabled())
             {
@@ -379,7 +379,7 @@ void LocaleDataWrapper::invalidateData()
                     aMsg += String::CreateFromInt32( eLang, 16 );
                     aMsg.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "  ->  " ) );
                     aMsg += String( aLanguage);
-                    if ( aCountry.getLength() )
+                    if ( !aCountry.isEmpty() )
                     {
                         aMsg += '_';
                         aMsg += String( aCountry);
diff --git a/unotools/source/ucbhelper/progresshandlerwrap.cxx b/unotools/source/ucbhelper/progresshandlerwrap.cxx
index 5ccfc39..5bbfe5f 100644
--- a/unotools/source/ucbhelper/progresshandlerwrap.cxx
+++ b/unotools/source/ucbhelper/progresshandlerwrap.cxx
@@ -51,7 +51,7 @@ sal_Bool getStatusFromAny_Impl( const Any& aAny, ::rtl::OUString& aText, sal_Int
             if( !bNumIsSet && ( aSetList[ind] >>= nNum ) )
                 bNumIsSet = sal_True;
             else
-                !aText.getLength() && ( aSetList[ind] >>= aText );
+                aText.isEmpty() && ( aSetList[ind] >>= aText );
         }
 
     return bNumIsSet;
@@ -81,7 +81,7 @@ void SAL_CALL ProgressHandlerWrap::update( const Any& Status )
 
     if( getStatusFromAny_Impl( Status, aText, nValue ) )
     {
-        if( aText.getLength() ) m_xStatusIndicator->setText( aText );
+        if( !aText.isEmpty() ) m_xStatusIndicator->setText( aText );
         m_xStatusIndicator->setValue( nValue );
     }
 }
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index cc70904..4493556 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -84,7 +84,7 @@ rtl::OUString getParentName( const rtl::OUString& aFileName )
 sal_Bool ensuredir( const rtl::OUString& rUnqPath )
 {
     rtl::OUString aPath;
-    if ( rUnqPath.getLength() < 1 )
+    if ( rUnqPath.isEmpty() )
         return sal_False;
 
     // remove trailing slash
@@ -152,7 +152,7 @@ String ConstructTempDir_Impl( const String* pParent )
             ::osl::FileBase::getFileURLFromSystemPath(
                 ::ucbhelper::getSystemPathFromFileURL( xManager, aTmp ),
                 aRet );
-            if ( aRet.getLength() )
+            if ( !aRet.isEmpty() )
             {
                 ::osl::DirectoryItem aItem;
                 sal_Int32 i = aRet.getLength();
@@ -172,7 +172,7 @@ String ConstructTempDir_Impl( const String* pParent )
     if ( !aName.Len() )
     {
         ::rtl::OUString &rTempNameBase_Impl = TempNameBase_Impl::get();
-        if (rTempNameBase_Impl.getLength() == 0)
+        if (rTempNameBase_Impl.isEmpty())
         {
             ::rtl::OUString ustrTempDirURL;
             ::osl::FileBase::RC rc = ::osl::File::getTempDirURL(
@@ -181,7 +181,7 @@ String ConstructTempDir_Impl( const String* pParent )
                 rTempNameBase_Impl = ustrTempDirURL;
         }
         // if no parent or invalid parent : use default directory
-        DBG_ASSERT( rTempNameBase_Impl.getLength(), "No TempDir!" );
+        DBG_ASSERT( !rTempNameBase_Impl.isEmpty(), "No TempDir!" );
         aName = rTempNameBase_Impl;
         ensuredir( aName );
     }
commit 55b6485978bbfe17c1355909a5e27d8c846a4ee8
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Thu Jan 19 11:51:58 2012 -0200

    Fix for fdo43460 Part XLI getLength() to isEmpty()
    
    Part XLI
    Modules
    ucbhelper, unodevtools

diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index 676acd5..59cc399 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -1094,7 +1094,7 @@ sal_Bool Content::insertNewContent( const rtl::OUString& rContentType,
                                     Content& rNewContent )
     throw( CommandAbortedException, RuntimeException, Exception )
 {
-    if ( rContentType.getLength() == 0 )
+    if ( rContentType.isEmpty() )
         return sal_False;
 
     // First, try it using "createNewContent" command -> the "new" way.
@@ -1157,7 +1157,7 @@ sal_Bool Content::insertNewContent( const rtl::OUString& rContentType,
                                     Content& rNewContent )
     throw( CommandAbortedException, RuntimeException, Exception )
 {
-    if ( rContentType.getLength() == 0 )
+    if ( rContentType.isEmpty() )
         return sal_False;
 
     // First, try it using "createNewContent" command -> the "new" way.
@@ -1438,11 +1438,11 @@ void Content_Impl::disposing( const EventObject& Source )
 //=========================================================================
 const rtl::OUString& Content_Impl::getURL() const
 {
-    if ( !m_aURL.getLength() && m_xContent.is() )
+    if ( m_aURL.isEmpty() && m_xContent.is() )
     {
         osl::MutexGuard aGuard( m_aMutex );
 
-        if ( !m_aURL.getLength() && m_xContent.is() )
+        if ( m_aURL.isEmpty() && m_xContent.is() )
         {
             Reference< XContentIdentifier > xId = m_xContent->getIdentifier();
             if ( xId.is() )
@@ -1456,11 +1456,11 @@ const rtl::OUString& Content_Impl::getURL() const
 //=========================================================================
 Reference< XContent > Content_Impl::getContent()
 {
-    if ( !m_xContent.is() && m_aURL.getLength() )
+    if ( !m_xContent.is() && !m_aURL.isEmpty() )
     {
         osl::MutexGuard aGuard( m_aMutex );
 
-        if ( !m_xContent.is() && m_aURL.getLength() )
+        if ( !m_xContent.is() && !m_aURL.isEmpty() )
         {
             ContentBroker* pBroker = ContentBroker::get();
 
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index ffc785e..61fdc12 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -495,7 +495,7 @@ const InternetProxyServer & InternetProxyDecider_Impl::getProxy(
         return m_aEmptyProxy;
     }
 
-    if ( rHost.getLength() && m_aNoProxyList.size() )
+    if ( !rHost.isEmpty() && m_aNoProxyList.size() )
     {
         //////////////////////////////////////////////////////////////////
         // First, try direct hostname match - #110515#
@@ -532,7 +532,7 @@ const InternetProxyServer & InternetProxyDecider_Impl::getProxy(
         }
 
         // Error resolving name? -> fallback.
-        if ( !aFullyQualifiedHost.getLength() )
+        if ( aFullyQualifiedHost.isEmpty() )
             aFullyQualifiedHost = aHost;
 
         if ( aFullyQualifiedHost != aHost )
@@ -558,16 +558,16 @@ const InternetProxyServer & InternetProxyDecider_Impl::getProxy(
     if ( rProtocol.toAsciiLowerCase()
             .equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ftp" ) ) )
     {
-        if ( m_aFtpProxy.aName.getLength() > 0 && m_aFtpProxy.nPort >= 0 )
+        if ( !m_aFtpProxy.aName.isEmpty() && m_aFtpProxy.nPort >= 0 )
             return m_aFtpProxy;
     }
     else if ( rProtocol.toAsciiLowerCase()
                   .equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "https" ) ) )
     {
-        if ( m_aHttpsProxy.aName.getLength() )
+        if ( !m_aHttpsProxy.aName.isEmpty() )
             return m_aHttpsProxy;
     }
-    else if ( m_aHttpProxy.aName.getLength() )
+    else if ( !m_aHttpProxy.aName.isEmpty() )
     {
         // All other protocols use the HTTP proxy.
         return m_aHttpProxy;
@@ -592,7 +592,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
         {
             const util::ElementChange& rElem = pElementChanges[ n ];
             rtl::OUString aKey;
-            if ( ( rElem.Accessor >>= aKey ) && aKey.getLength() )
+            if ( ( rElem.Accessor >>= aKey ) && !aKey.isEmpty() )
             {
                 if ( aKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
                                                     PROXY_TYPE_KEY ) ) )
@@ -702,7 +702,7 @@ void InternetProxyDecider_Impl::setNoProxyList(
 
     m_aNoProxyList.clear();
 
-    if ( rNoProxyList.getLength() )
+    if ( !rNoProxyList.isEmpty() )
     {
         // List of connection endpoints hostname[:port],
         // separated by semicolon. Wilcards allowed.
@@ -718,7 +718,7 @@ void InternetProxyDecider_Impl::setNoProxyList(
 
             rtl::OUString aToken = rNoProxyList.copy( nPos, nEnd - nPos );
 
-            if ( aToken.getLength() )
+            if ( !aToken.isEmpty() )
             {
                 rtl::OUString aServer;
                 rtl::OUString aPort;
@@ -757,7 +757,7 @@ void InternetProxyDecider_Impl::setNoProxyList(
                 }
 
                 rtl::OUStringBuffer aFullyQualifiedHost;
-                if ( aServer.getLength() )
+                if ( !aServer.isEmpty() )
                 {
                     // Remember fully qualified server name if current list
                     // entry specifies exactly one non-fully qualified server
@@ -840,7 +840,7 @@ bool InternetProxyDecider::shouldUseProxy( const rtl::OUString & rProtocol,
     const InternetProxyServer & rData = m_pImpl->getProxy( rProtocol,
                                                            rHost,
                                                            nPort );
-    return ( rData.aName.getLength() > 0 );
+    return !rData.aName.isEmpty();
 }
 
 //=========================================================================
diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx
index b422917..f66acf0 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -458,7 +458,7 @@ void SAL_CALL ContentImplHelper::addPropertiesChangeListener(
         for ( sal_Int32 n = 0; n < nCount; ++n )
         {
             const rtl::OUString& rName = pSeq[ n ];
-            if ( rName.getLength() )
+            if ( !rName.isEmpty() )
                 m_pImpl->m_pPropertyChangeListeners->addInterface(
                     rName, Listener );
         }
@@ -491,7 +491,7 @@ void SAL_CALL ContentImplHelper::removePropertiesChangeListener(
         for ( sal_Int32 n = 0; n < nCount; ++n )
         {
             const rtl::OUString& rName = pSeq[ n ];
-            if ( rName.getLength() )
+            if ( !rName.isEmpty() )
                 m_pImpl->m_pPropertyChangeListeners->removeInterface(
                     rName, Listener );
         }
@@ -780,7 +780,7 @@ uno::Reference< uno::XInterface > SAL_CALL ContentImplHelper::getParent()
     uno::Reference< uno::XInterface > xParent;
     rtl::OUString aURL = getParentURL();
 
-    if ( aURL.getLength() )
+    if ( !aURL.isEmpty() )
     {
         uno::Reference< com::sun::star::ucb::XContentIdentifier > xId(
             new ContentIdentifier( m_xSMgr, aURL ) );
diff --git a/ucbhelper/source/provider/propertyvalueset.cxx b/ucbhelper/source/provider/propertyvalueset.cxx
index 7e89d45..0ade2fe 100644
--- a/ucbhelper/source/provider/propertyvalueset.cxx
+++ b/ucbhelper/source/provider/propertyvalueset.cxx
@@ -612,7 +612,7 @@ sal_Int32 SAL_CALL PropertyValueSet::findColumn( const OUString& columnName )
 {
     osl::MutexGuard aGuard( m_aMutex );
 
-    if ( columnName.getLength() )
+    if ( !columnName.isEmpty() )
     {
         sal_Int32 nCount = m_pValues->size();
         for ( sal_Int32 n = 0; n < nCount; ++n )
diff --git a/ucbhelper/source/provider/providerhelper.cxx b/ucbhelper/source/provider/providerhelper.cxx
index d161d93..fd6cd8f 100644
--- a/ucbhelper/source/provider/providerhelper.cxx
+++ b/ucbhelper/source/provider/providerhelper.cxx
@@ -403,7 +403,7 @@ sal_Bool ContentProviderImplHelper::renameAdditionalPropertySet(
                         aOldKeyWithSlash += rtl::OUString( sal_Unicode('/') );
                         aOldKeyWithoutSlash = rOldKey;
                     }
-                    else if ( rOldKey.getLength() )
+                    else if ( !rOldKey.isEmpty() )
                         aOldKeyWithoutSlash
                             = rOldKey.copy( 0, rOldKey.getLength() - 1 );
 
@@ -490,7 +490,7 @@ sal_Bool ContentProviderImplHelper::copyAdditionalPropertySet(
                         aSrcKeyWithSlash += rtl::OUString( sal_Unicode('/') );
                         aSrcKeyWithoutSlash = rSourceKey;
                     }
-                    else if ( rSourceKey.getLength() )
+                    else if ( !rSourceKey.isEmpty() )
                         aSrcKeyWithoutSlash = rSourceKey.copy(
                             0, rSourceKey.getLength() - 1 );
 
@@ -629,7 +629,7 @@ sal_Bool ContentProviderImplHelper::removeAdditionalPropertySet(
                         aKeyWithSlash += rtl::OUString( (sal_Unicode)'/' );
                         aKeyWithoutSlash = rKey;
                     }
-                    else if ( rKey.getLength() )
+                    else if ( !rKey.isEmpty() )
                         aKeyWithoutSlash
                             = rKey.copy( 0, rKey.getLength() - 1 );
 
diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx
index e355ee8..6a6cb5e 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -1352,7 +1352,7 @@ void SAL_CALL ResultSet::setPropertyValue( const rtl::OUString& aPropertyName,
            lang::WrappedTargetException,
            uno::RuntimeException )
 {
-    if ( !aPropertyName.getLength() )
+    if ( aPropertyName.isEmpty() )
         throw beans::UnknownPropertyException();
 
     if ( aPropertyName.equals(
@@ -1381,7 +1381,7 @@ uno::Any SAL_CALL ResultSet::getPropertyValue(
            lang::WrappedTargetException,
            uno::RuntimeException )
 {
-    if ( !PropertyName.getLength() )
+    if ( PropertyName.isEmpty() )
         throw beans::UnknownPropertyException();
 
     uno::Any aValue;
@@ -1417,7 +1417,7 @@ void SAL_CALL ResultSet::addPropertyChangeListener(
 
     osl::MutexGuard aGuard( m_pImpl->m_aMutex );
 
-    if ( aPropertyName.getLength() &&
+    if ( !aPropertyName.isEmpty() &&
          !aPropertyName.equals(
                 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) &&
          !aPropertyName.equals(
@@ -1443,7 +1443,7 @@ void SAL_CALL ResultSet::removePropertyChangeListener(
 {
     osl::MutexGuard aGuard( m_pImpl->m_aMutex );
 
-    if ( aPropertyName.getLength() &&
+    if ( !aPropertyName.isEmpty() &&
          !aPropertyName.equals(
                 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) &&
          !aPropertyName.equals(
diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx
index 0166edf..2417e37 100644
--- a/ucbhelper/source/provider/resultsetmetadata.cxx
+++ b/ucbhelper/source/provider/resultsetmetadata.cxx
@@ -273,7 +273,7 @@ OUString SAL_CALL ResultSetMetaData::getColumnLabel( sal_Int32 column )
         return OUString();
 
     OUString aLabel = m_pImpl->m_aColumnData[ column - 1 ].columnLabel;
-    if ( aLabel.getLength() )
+    if ( !aLabel.isEmpty() )
         return aLabel;
 
     return m_aProps.getConstArray()[ column - 1 ].Name;
diff --git a/ucbhelper/source/provider/simpleauthenticationrequest.cxx b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
index f935365..c397446 100644
--- a/ucbhelper/source/provider/simpleauthenticationrequest.cxx
+++ b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
@@ -52,14 +52,14 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest(
     aRequest.Classification = task::InteractionClassification_ERROR;
     aRequest.ServerName     = rServerName;
 //    aRequest.Diagnostic     = // OUString
-    aRequest.HasRealm       = ( rRealm.getLength() > 0 );
+    aRequest.HasRealm       = !rRealm.isEmpty();
     if ( aRequest.HasRealm )
         aRequest.Realm = rRealm;
     aRequest.HasUserName    = sal_True;
     aRequest.UserName       = rUserName;
     aRequest.HasPassword    = sal_True;
     aRequest.Password       = rPassword;
-    aRequest.HasAccount     = ( rAccount.getLength() > 0 );
+    aRequest.HasAccount     = !rAccount.isEmpty();
     if ( aRequest.HasAccount )
         aRequest.Account = rAccount;
     aRequest.URL = rURL;
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index 97ba560..57b4613 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -572,7 +572,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
             "throw (css::uno::RuntimeException)\n{\n"
             "    ::rtl::OUString ret;\n    try {\n        "
             "::rtl::OUStringBuffer buf(funcName);\n"
-            "        if (paramName.getLength() > 0) {\n"
+            "        if (!paramName.isEmpty()) {\n"
             "            buf.appendAscii(\"/Parameters/\");\n"
             "            buf.append(paramName);\n        }\n\n"
             "        css::uno::Reference< css::beans::XPropertySet > xPropSet(\n"
@@ -924,14 +924,14 @@ void generateQueryInterface(std::ostream& o,
                             OString const & classname,
                             OString const & propertyhelper)
 {
-    if (propertyhelper.getLength() == 0)
+    if (propertyhelper.isEmpty())
         return;
 
     o << "css::uno::Any " << classname
       << "::queryInterface(css::uno::Type const & type) throw ("
         "css::uno::RuntimeException)\n{\n    ";
 
-    if (propertyhelper.getLength() >= 1)
+    if (!propertyhelper.isEmpty())
         o << "return ";
     else
         o << "css::uno::Any a(";
@@ -949,7 +949,7 @@ void generateQueryInterface(std::ostream& o,
             o << ">";
     }
 
-    if (propertyhelper.getLength() >= 1) {
+    if (!propertyhelper.isEmpty()) {
         o << "::queryInterface(type);\n";
     } else {
         o << "::queryInterface(type));\n";
@@ -1160,7 +1160,7 @@ void generateCalcAddin(ProgramOptions const & options,
     OString propertyhelper = checkPropertyHelper(
         options, manager, services, interfaces, attributes, propinterfaces);
 
-    if (propertyhelper.getLength() > 0)
+    if (!propertyhelper.isEmpty())
         std::cerr << "WARNING: interfaces specifying calc add-in functions "
             "shouldn't support attributes!\n";
 
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index a9d21d7..d68196d 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -394,7 +394,7 @@ void printMethods(std::ostream & o,
     }
 
     static OString sd(RTL_CONSTASCII_STRINGPARAM("_"));
-    bool body = ((delegate.getLength() > 0) ? true : false);
+    bool body = !delegate.isEmpty();
     bool defaultbody = ((delegate.equals(sd)) ? true : false);
 
     if (body && propertyhelper.getLength() > 1) {
@@ -496,7 +496,7 @@ void printMethods(std::ostream & o,
         printType(o, options, manager,
                   codemaker::convertString(reader.getFieldTypeName(i)), 1);
         o << " SAL_CALL ";
-        if (classname.getLength() > 0)
+        if (!classname.isEmpty())
             o << classname;
 
         o << "get"
@@ -513,7 +513,7 @@ void printMethods(std::ostream & o,
         }
         if (body) {
             if (defaultbody) {
-                if (propertyhelper.getLength() > 0) {
+                if (!propertyhelper.isEmpty()) {
                     o << "\n{\n    osl::MutexGuard g(m_aMutex);\n    return m_"
                       << codemaker::convertString(reader.getFieldName(i)).getStr()
                       << ";\n}\n\n";
@@ -547,7 +547,7 @@ void printMethods(std::ostream & o,
                 o << "virtual ";
 
             o << "void SAL_CALL ";
-            if (classname.getLength() > 0)
+            if (!classname.isEmpty())
                 o << classname;
 
             o << "set"
@@ -567,7 +567,7 @@ void printMethods(std::ostream & o,
             }
             if (body) {
                 if (defaultbody) {
-                    if (propertyhelper.getLength() > 0) {
+                    if (!propertyhelper.isEmpty()) {
                         printSetPropertyMixinBody(o, reader, i, method);
                     } else {
                         if (options.componenttype == 1) {
@@ -599,7 +599,7 @@ void printMethods(std::ostream & o,
                   codemaker::convertString(
                       reader.getMethodReturnTypeName(method)), 1);
         o << " SAL_CALL ";
-        if (classname.getLength() > 0)
+        if (!classname.isEmpty())
             o << classname;
 
         const OString methodName(codemaker::convertString(reader.getMethodName(method)));
@@ -662,7 +662,7 @@ void printConstructionMethods(std::ostream & o,
             options, manager,
             codemaker::convertString(reader.getSuperTypeName(0)), 1);
         o << ' ';
-        if (reader.getMethodName(i).getLength() == 0) {
+        if (reader.getMethodName(i).isEmpty()) {
             o << "create";
         } else {
             o << (codemaker::cpp::translateUnoToCppIdentifier(
@@ -701,7 +701,7 @@ void printServiceMembers(std::ostream & o,
         }
     }
 
-    if (delegate.getLength() == 0) {
+    if (delegate.isEmpty()) {
         o << "\n// properties of service \""<< type.getStr() << "\"\n";
         for (sal_uInt16 i = 0; i < reader.getFieldCount(); ++i) {
             OString fieldName(
@@ -755,7 +755,7 @@ void generateDocumentation(std::ostream & o,
         &arguments);
 
     bool comment=true;
-    if (delegate.getLength() > 0) {
+    if (!delegate.isEmpty()) {
         if (typeClass != RT_TYPE_INTERFACE &&
             typeClass != RT_TYPE_SERVICE )
         {
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index 1b71276..5b5a86c 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -66,7 +66,7 @@ void generateImports(std::ostream & o, ProgramOptions const & options,
         else
             o << "import com.sun.star.lib.uno.helper.WeakBase;\n";
     }
-    if (propertyhelper.getLength() > 0) {
+    if (!propertyhelper.isEmpty()) {
         if (propertyhelper.equals("_")) {
             o << "import com.sun.star.lib.uno.helper.PropertySet;\n";
             o << "import com.sun.star.beans.PropertyAttribute;\n";
@@ -938,7 +938,7 @@ void generateSkeleton(ProgramOptions const & options,
     checkDefaultInterfaces(interfaces, services, propertyhelper);
 
     if (options.componenttype == 2) {
-        if (propertyhelper.getLength() > 0)
+        if (!propertyhelper.isEmpty())
             std::cerr << "WARNING: interfaces specifying calc add-in functions "
                 "shouldn't support attributes!\n";
     }
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index ae22407..6a192ae 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -387,7 +387,7 @@ void printMethods(std::ostream & o,
     }
 
     static OString sd(RTL_CONSTASCII_STRINGPARAM("_"));
-    bool body = ((delegate.getLength() > 0) ? true : false);
+    bool body = !delegate.isEmpty();
     bool defaultbody = ((delegate.equals(sd)) ? true : false);
 
     generated.add(type);
@@ -577,7 +577,7 @@ void printConstructionMethods(std::ostream & o,
             options, manager,
             codemaker::convertString(reader.getSuperTypeName(0)), false);
         o << ' ';
-        if ( reader.getMethodName(i).getLength() == 0 ) {
+        if ( reader.getMethodName(i).isEmpty() ) {
             o << "create";
         } else {
             o << (codemaker::java::translateUnoToJavaIdentifier(
@@ -668,7 +668,7 @@ void generateDocumentation(std::ostream & o,
         &arguments);
 
     bool comment=true;
-    if ( delegate.getLength() > 0 ) {
+    if ( !delegate.isEmpty() ) {
         if ( typeClass != RT_TYPE_INTERFACE && typeClass != RT_TYPE_SERVICE )
             return;
 
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index aecb39a..a4c7651 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -248,7 +248,7 @@ void checkType(TypeManager const & manager,
                 // constructor because in this case XInitialization is not called.
                 if ( reader.getMethodCount() > 1 ||
                      ( reader.getMethodCount() == 1 &&
-                       reader.getMethodName(0).getLength() > 0 ) )
+                       !reader.getMethodName(0).isEmpty() ) )
                 {
                     OString s("com.sun.star.lang.XInitialization");
                     if ( interfaceTypes.find(s) == interfaceTypes.end() )
diff --git a/unodevtools/source/unodevtools/typeblob.cxx b/unodevtools/source/unodevtools/typeblob.cxx
index 9123bf1..b513558 100644
--- a/unodevtools/source/unodevtools/typeblob.cxx
+++ b/unodevtools/source/unodevtools/typeblob.cxx
@@ -283,7 +283,7 @@ RTFieldAccess checkPropertyFlags(short flags) {
 void* getTypeBlob(Reference< XHierarchicalNameAccess > xTDmgr,
                   const OString& typeName, sal_uInt32* blobsize)
 {
-    if ( typeName.getLength() == 0 )
+    if ( typeName.isEmpty() )
         return NULL;
 
     OUString uTypeName(OStringToOUString(typeName, RTL_TEXTENCODING_UTF8)


More information about the Libreoffice-commits mailing list