Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please find attached a partial fix for Easy Hack FDO43460,

Part II
Module basctl
- -- 
Olivier Hallot
Founder, Board of Directors Member - The Document Foundation
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJO4qf6AAoJEJp3R7nH3vLxDf4H/iBCn2M/oc14esTdjPdlAphq
TDX7am464b4Wsk9W21nvEZw0HYYzOPbsuU8ubteG0MiCMEI1GCAV4vW9PqHuglZY
SBrfeGzlNuMwIw6xibS0LZiOFbRBI4b8PL61wovFOiHrYfKkjbvkRxtT1tj1jOeC
duHFZncd/gD7pL8yG4J8I654O+S6JTWQMXl793Okrcs8bysN2IQTT+7t8lTBjPcv
wNJSVMArTNpbu4qYbAPcoSrRjfv4ILL0JILuExa1lpq2QFinX8wGHCvNxiGRSfqC
sqq90OmECjEBbfEM+PcviO/EukjiH14wWXBcwuImUFpDhS+7DOLaMNlhnx8gMSM=
=eSsc
-----END PGP SIGNATURE-----
From c151aa1538099da87ce029e267fa115ee3c39d8f Mon Sep 17 00:00:00 2001
From: Olivier Hallot <olivier.hallot@alta.org.br>
Date: Fri, 9 Dec 2011 22:23:22 -0200
Subject: [PATCH] Fix for fdo43460 Part II getLength to isEmpty

Part II
Module
basctl
---
 basctl/source/basicide/basicrenderable.cxx |    4 ++--
 basctl/source/basicide/baside2.cxx         |    2 +-
 basctl/source/basicide/bastype2.cxx        |    2 +-
 basctl/source/basicide/localizationmgr.cxx |    6 +++---
 basctl/source/basicide/moduldl2.cxx        |    2 +-
 basctl/source/basicide/scriptdocument.cxx  |    6 +++---
 basctl/source/dlged/dlgedobj.cxx           |    2 +-
 7 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx
index 1da202f..d2de323 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -120,7 +120,7 @@ sal_Int32 SAL_CALL BasicRenderable::getRendererCount (
             if( nContent == 1 )
             {
                 rtl::OUString aPageRange( getStringValue( "PageRange" ) );
-                if( aPageRange.getLength() )
+                if( !aPageRange.isEmpty() )
                 {
                     StringRangeEnumerator aRangeEnum( aPageRange, 0, nCount-1 );
                     sal_Int32 nSelCount = aRangeEnum.size();
@@ -179,7 +179,7 @@ void SAL_CALL BasicRenderable::render (
             if( nContent == 1 )
             {
                 rtl::OUString aPageRange( getStringValue( "PageRange" ) );
-                if( aPageRange.getLength() )
+                if( !aPageRange.isEmpty() )
                 {
                     sal_Int32 nPageCount = mpWindow->countPages( pPrinter );
                     StringRangeEnumerator aRangeEnum( aPageRange, 0, nPageCount-1 );
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index d1a1589..cf245ca 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -341,7 +341,7 @@ sal_Bool ModulWindow::BasicExecute()
             if ( !pMethod )
             {
                 // If not in a method then prompt the user
-                return ( BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), sal_False, 
rtl::OUString() ).getLength() > 0 ) ? sal_True : sal_False;
+                return ( !BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), sal_False, 
rtl::OUString() ).isEmpty() );
             }
             if ( pMethod )
             {
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index c3ce38a..abacd01 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -773,7 +773,7 @@ void BasicTreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Ima
             }
         }
 
-        if ( sFactoryURL.getLength() )
+        if ( !sFactoryURL.isEmpty() )
         {
             rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), 
sal_False );
         }
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index cf034d8..59f2316 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -185,7 +185,7 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
     aPureIdStr += aDot;
     aPureIdStr += aDialogName;
     aPureIdStr += aDot;
-    if( aCtrlName.getLength() )
+    if( !aCtrlName.isEmpty() )
     {
         aPureIdStr += aCtrlName;
         aPureIdStr += aDot;
@@ -245,7 +245,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
                     // Replace string by id, add id+string to StringResource
                     if( eMode == SET_IDS )
                     {
-                        bool bEscAlreadyExisting = (aPropStr.getLength() && aPropStr.getStr()[0] 
== '&' );
+                        bool bEscAlreadyExisting = (!aPropStr.isEmpty() && aPropStr.getStr()[0] == 
'&' );
                         if( bEscAlreadyExisting )
                             continue;
 
@@ -435,7 +435,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
                         for ( i = 0; i < nPropStringCount; ++i )
                         {
                             ::rtl::OUString aPropStr = pPropStrings[i];
-                            bool bEscAlreadyExisting = (aPropStr.getLength() && 
aPropStr.getStr()[0] == '&' );
+                            bool bEscAlreadyExisting = (!aPropStr.isEmpty() && 
aPropStr.getStr()[0] == '&' );
                             if( bEscAlreadyExisting )
                             {
                                 pIdStrings[i] = aPropStr;
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index ebc662c..c8960a4 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1332,7 +1332,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
 
         Sequence< ::rtl::OUString > aFiles = xFP->getFiles();
         INetURLObject aURL( aFiles[0] );
-        if( !aURL.getExtension().getLength() )
+        if( aURL.getExtension().isEmpty() )
             aURL.setExtension( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "oxt" ) ) );
 
         ::rtl::OUString aPackageURL( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 38bf926..2794520 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -975,7 +975,7 @@ namespace basctl
                 }
             }
 
-            if ( aFileURL.getLength() )
+            if ( !aFileURL.isEmpty() )
             {
                 ::osl::DirectoryItem aFileItem;
                 ::osl::FileStatus aFileStatus( osl_FileStatus_Mask_FileURL );
@@ -1129,7 +1129,7 @@ namespace basctl
     ScriptDocument ScriptDocument::getDocumentWithURLOrCaption( const ::rtl::OUString& 
_rUrlOrCaption )
     {
         ScriptDocument aDocument( getApplicationScriptDocument() );
-        if ( _rUrlOrCaption.getLength() == 0 )
+        if ( _rUrlOrCaption.isEmpty() )
             return aDocument;
 
         docs::Documents aDocuments;
@@ -1486,7 +1486,7 @@ namespace basctl
     LibraryLocation ScriptDocument::getLibraryLocation( const ::rtl::OUString& _rLibName ) const
     {
         LibraryLocation eLocation = LIBRARY_LOCATION_UNKNOWN;
-        if ( _rLibName.getLength() )
+        if ( !_rLibName.isEmpty() )
         {
             if ( isDocument() )
             {
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index eb06efe..1941df0 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -509,7 +509,7 @@ void SAL_CALL DlgEdObj::NameChange( const  ::com::sun::star::beans::PropertyChan
         Reference< container::XNameAccess > xNameAcc((GetDlgEdForm()->GetUnoControlModel()), 
UNO_QUERY);
         if ( xNameAcc.is() && xNameAcc->hasByName(aOldName) )
         {
-            if ( !xNameAcc->hasByName(aNewName) && aNewName.getLength() != 0 )
+            if ( !xNameAcc->hasByName(aNewName) && !aNewName.isEmpty())
             {
                 // remove the control by the old name and insert the control by the new name in 
the container
                 Reference< container::XNameContainer > xCont(xNameAcc, UNO_QUERY );
-- 
1.7.5.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.