[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 8 commits - codemaker/source comphelper/source default_images/introabout instsetoo_native/util ooo_custom_images/dev scp2/source setup_native/prj setup_native/source solenv/bin sw/source xmloff/source

Jürgen Schmidt jsc at apache.org
Wed Feb 12 06:09:07 PST 2014


 codemaker/source/bonobowrappermaker/corbamaker.cxx                |    2 
 codemaker/source/bonobowrappermaker/corbatype.cxx                 |   40 -
 codemaker/source/codemaker/global.cxx                             |    8 
 codemaker/source/codemaker/unotype.cxx                            |    2 
 codemaker/source/cppumaker/cppumaker.cxx                          |    2 
 codemaker/source/cppumaker/cpputype.cxx                           |   46 -
 codemaker/source/cppumaker/includes.cxx                           |    2 
 codemaker/source/cunomaker/cunomaker.cxx                          |    2 
 codemaker/source/cunomaker/cunotype.cxx                           |   46 -
 codemaker/source/idlmaker/idlmaker.cxx                            |    2 
 codemaker/source/idlmaker/idltype.cxx                             |   42 -
 codemaker/source/javamaker/classfile.cxx                          |    8 
 codemaker/source/javamaker/javamaker.cxx                          |    2 
 codemaker/source/javamaker/javatype.cxx                           |    4 
 comphelper/source/container/embeddedobjectcontainer.cxx           |   32 
 comphelper/source/eventattachermgr/eventattachermgr.cxx           |    2 
 comphelper/source/misc/docpasswordhelper.cxx                      |   16 
 comphelper/source/misc/documentinfo.cxx                           |   18 
 comphelper/source/misc/locale.cxx                                 |    6 
 comphelper/source/misc/logging.cxx                                |    4 
 comphelper/source/misc/mediadescriptor.cxx                        |    4 
 comphelper/source/misc/mimeconfighelper.cxx                       |   42 -
 comphelper/source/misc/numbers.cxx                                |    2 
 comphelper/source/misc/regpathhelper.cxx                          |    8 
 comphelper/source/misc/sequenceashashmap.cxx                      |    4 
 comphelper/source/misc/storagehelper.cxx                          |    2 
 comphelper/source/misc/string.cxx                                 |    2 
 comphelper/source/officeinstdir/officeinstallationdirectories.cxx |   10 
 comphelper/source/property/genericpropertyset.cxx                 |    4 
 comphelper/source/property/propagg.cxx                            |    2 
 comphelper/source/property/propertybag.cxx                        |    2 
 comphelper/source/streaming/otransactedfilestream.cxx             |    2 
 comphelper/source/xml/ofopxmlhelper.cxx                           |   16 
 default_images/introabout/intro.png                               |binary
 instsetoo_native/util/makefile.mk                                 |    2 
 ooo_custom_images/dev/introabout/intro.png                        |binary
 scp2/source/ooo/scpaction_ooo.scp                                 |    5 
 scp2/source/sdkoo/sdkoo.scp                                       |    2 
 setup_native/prj/d.lst                                            |    2 
 setup_native/source/mac/ooo/DS_Store                              |binary
 setup_native/source/mac/ooo/DS_Store_Langpack                     |binary
 setup_native/source/mac/ooo/osxdndinstall.png                     |binary
 setup_native/source/mac/ooo/osxdndinstall_lang.png                |binary
 setup_native/source/mac/sdk/DS_Store_SDK                          |binary
 setup_native/source/mac/sdk/osxdndinstall_sdk.png                 |binary
 setup_native/source/win32/nsis/ooobitmap.bmp                      |binary
 setup_native/source/win32/nsis/ooosdkbitmap.bmp                   |binary
 solenv/bin/build_release.pl                                       |  363 +++++++---
 solenv/bin/make_installer.pl                                      |   41 -
 solenv/bin/modules/installer/windows/msiglobal.pm                 |    6 
 solenv/bin/release_prepare.pl                                     |   36 
 sw/source/core/doc/dbgoutsw.cxx                                   |    4 
 sw/source/filter/ww8/wrtww8.cxx                                   |   79 +-
 xmloff/source/draw/xexptran.cxx                                   |   13 
 54 files changed, 575 insertions(+), 364 deletions(-)

New commits:
commit a5037095caacbf0b74b0247c7b972617c3fee84d
Author: Jürgen Schmidt <jsc at apache.org>
Date:   Wed Feb 12 13:15:48 2014 +0000

    #124224# replace images and adapt DS_Store file

diff --git a/default_images/introabout/intro.png b/default_images/introabout/intro.png
index c8863f4..767a177 100755
Binary files a/default_images/introabout/intro.png and b/default_images/introabout/intro.png differ
diff --git a/ooo_custom_images/dev/introabout/intro.png b/ooo_custom_images/dev/introabout/intro.png
index c2975f0..9e9b893 100755
Binary files a/ooo_custom_images/dev/introabout/intro.png and b/ooo_custom_images/dev/introabout/intro.png differ
diff --git a/scp2/source/ooo/scpaction_ooo.scp b/scp2/source/ooo/scpaction_ooo.scp
old mode 100644
new mode 100755
index abdc769..bb62a8f
--- a/scp2/source/ooo/scpaction_ooo.scp
+++ b/scp2/source/ooo/scpaction_ooo.scp
@@ -318,9 +318,10 @@ End
 #ifdef MACOSX
 ScpAction scp_Copy_Dmg_Background_Image
     Copy = "osxdndinstall.png";
-    Name = "background.png";
+    LangPackCopy = "osxdndinstall_lang.png";
+	Name = "background.png";
     UnixRights = 444;
-    Styles = ();
+    Styles = (FORCELANGUAGEPACK);
     Subdir = ".background";
 End
 
diff --git a/scp2/source/sdkoo/sdkoo.scp b/scp2/source/sdkoo/sdkoo.scp
old mode 100755
new mode 100644
index 48e2e2c..0fa752e
--- a/scp2/source/sdkoo/sdkoo.scp
+++ b/scp2/source/sdkoo/sdkoo.scp
@@ -216,7 +216,7 @@ End
 
 #ifdef MACOSX
 ScpAction scp_Copy_Dmg_Background_Image
-    Copy = "osxdndinstall.png";
+    Copy = "osxdndinstall_sdk.png";
     Name = "background.png";
     UnixRights = 444;
     Styles = ();
diff --git a/setup_native/prj/d.lst b/setup_native/prj/d.lst
old mode 100644
new mode 100755
index 266f830..98f2da6
--- a/setup_native/prj/d.lst
+++ b/setup_native/prj/d.lst
@@ -32,11 +32,13 @@ mkdir: %_DEST%\bin%_EXT%\osolsmf
 ..\source\mac\*.icns %_DEST%\bin%_EXT%\*.icns
 ..\source\mac\Info.plist.langpack %_DEST%\bin%_EXT%\Info.plist.langpack
 ..\source\mac\ooo\osxdndinstall.png %_DEST%\bin%_EXT%\osl\osxdndinstall.png
+..\source\mac\ooo\osxdndinstall_lang.png %_DEST%\bin%_EXT%\osl\osxdndinstall_lang.png
 ..\source\mac\ooo\osxdndinstall_nologo.png %_DEST%\bin%_EXT%\osl\osxdndinstall_nologo.png
 ..\source\mac\ooo\DS_Store %_DEST%\bin%_EXT%\osl\DS_Store
 ..\source\mac\ooo\DS_Store_Dev %_DEST%\bin%_EXT%\osl\DS_Store_Dev
 ..\source\mac\ooo\DS_Store_Langpack %_DEST%\bin%_EXT%\osl\DS_Store_Langpack
 ..\source\mac\sdk\DS_Store_SDK %_DEST%\bin%_EXT%\osl\DS_Store_SDK
+..\source\mac\sdk\osxdndinstall_sdk.png %_DEST%\bin%_EXT%\osl\osxdndinstall_sdk.png
 ..\source\java\openofficeorg_setup.gif %_DEST%\bin%_EXT%\osl\Setup.gif
 ..\source\java\javaversion.dat %_DEST%\bin%_EXT%\javaversion.dat
 ..\source\java\javaversion2.dat %_DEST%\bin%_EXT%\javaversion2.dat
diff --git a/setup_native/source/mac/ooo/DS_Store b/setup_native/source/mac/ooo/DS_Store
old mode 100644
new mode 100755
index c04303f..c1e3a68
Binary files a/setup_native/source/mac/ooo/DS_Store and b/setup_native/source/mac/ooo/DS_Store differ
diff --git a/setup_native/source/mac/ooo/DS_Store_Langpack b/setup_native/source/mac/ooo/DS_Store_Langpack
old mode 100644
new mode 100755
index b63ea63..8a2abd5
Binary files a/setup_native/source/mac/ooo/DS_Store_Langpack and b/setup_native/source/mac/ooo/DS_Store_Langpack differ
diff --git a/setup_native/source/mac/ooo/osxdndinstall.png b/setup_native/source/mac/ooo/osxdndinstall.png
old mode 100755
new mode 100644
index ebb1000..c7a594b
Binary files a/setup_native/source/mac/ooo/osxdndinstall.png and b/setup_native/source/mac/ooo/osxdndinstall.png differ
diff --git a/setup_native/source/mac/ooo/osxdndinstall_lang.png b/setup_native/source/mac/ooo/osxdndinstall_lang.png
old mode 100755
new mode 100644
index bc4985e..c82b215
Binary files a/setup_native/source/mac/ooo/osxdndinstall_lang.png and b/setup_native/source/mac/ooo/osxdndinstall_lang.png differ
diff --git a/setup_native/source/mac/sdk/DS_Store_SDK b/setup_native/source/mac/sdk/DS_Store_SDK
index 07a90dc..663c113 100644
Binary files a/setup_native/source/mac/sdk/DS_Store_SDK and b/setup_native/source/mac/sdk/DS_Store_SDK differ
diff --git a/setup_native/source/mac/sdk/osxdndinstall_sdk.png b/setup_native/source/mac/sdk/osxdndinstall_sdk.png
index bc4985e..c82b215 100755
Binary files a/setup_native/source/mac/sdk/osxdndinstall_sdk.png and b/setup_native/source/mac/sdk/osxdndinstall_sdk.png differ
diff --git a/setup_native/source/win32/nsis/ooobitmap.bmp b/setup_native/source/win32/nsis/ooobitmap.bmp
index da145cb..57ca123 100644
Binary files a/setup_native/source/win32/nsis/ooobitmap.bmp and b/setup_native/source/win32/nsis/ooobitmap.bmp differ
diff --git a/setup_native/source/win32/nsis/ooosdkbitmap.bmp b/setup_native/source/win32/nsis/ooosdkbitmap.bmp
index 51f8892..b2a3f3e 100644
Binary files a/setup_native/source/win32/nsis/ooosdkbitmap.bmp and b/setup_native/source/win32/nsis/ooosdkbitmap.bmp differ
commit c4224d2651ed3d6267f2cb3efa6dc974e5fb0808
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Wed Feb 12 13:01:07 2014 +0000

    124177: assure existence and up-to-date for all export filters based on <MSWordExportBase>

diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 57b7e44..e59ca58 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -635,7 +635,9 @@ String lcl_dbg_out(const SwNode & rNode)
             aTmpStr += String("(", RTL_TEXTENCODING_ASCII_US);
             aTmpStr += String::CreateFromInt32
                 //(static_cast<SwTxtFmtColl *>(pColl)->GetOutlineLevel());//#outline level,zhaojianwei
-                (static_cast<SwTxtFmtColl *>(pColl)->GetAssignedOutlineStyleLevel());//<-end,zhaojianwei
+                (static_cast<SwTxtFmtColl *>(pColl)->IsAssignedToListLevelOfOutlineStyle()
+                 ? static_cast<SwTxtFmtColl *>(pColl)->GetAssignedOutlineStyleLevel()
+                 : 0);//<-end,zhaojianwei
 
             const SwNumRuleItem & rItem =
                 static_cast<const SwNumRuleItem &>
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index ee95971..f08b55c 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -122,9 +122,11 @@
 #include "WW8Sttbf.hxx"
 #include <editeng/charrotateitem.hxx>
 #include "WW8FibData.hxx"
-#ifndef _NUMRULE_HXX
-#include "numrule.hxx"//For i120928
-#endif
+#include "numrule.hxx"
+
+#include <boost/scoped_ptr.hpp>
+
+
 using namespace sw::util;
 using namespace sw::types;
 
@@ -2097,8 +2099,8 @@ void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
     const SwTableLine * pTabLine = pTabBox->GetUpper();
     const SwTableBoxes & rTblBoxes = pTabLine->GetTabBoxes();
 
-    sal_uInt8 nBoxes = rTblBoxes.Count();
-    for ( sal_uInt8 n = 0; n < nBoxes; n++ )
+    const sal_uInt16 nBoxes = rTblBoxes.Count();
+    for ( sal_uInt16 n = 0; n < nBoxes; n++ )
     {
         const SwTableBox * pTabBox1 = rTblBoxes[n];
         const SwFrmFmt * pFrmFmt = pTabBox1->GetFrmFmt();
@@ -2289,16 +2291,16 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
         m_rWW8Export.pO->Insert( 1, m_rWW8Export.pO->Count() );
     }
 
-    ww8::TableBoxVectorPtr pTableBoxes =
-        pTableTextNodeInfoInner->getTableBoxesOfRow();
+    ww8::TableBoxVectorPtr pTableBoxes = pTableTextNodeInfoInner->getTableBoxesOfRow();
     // number of cell written
-    sal_uInt32 nBoxes = pTableBoxes->size();
-    if (nBoxes > ww8::MAXTABLECELLS)
-        nBoxes = ww8::MAXTABLECELLS;
+    const sal_uInt16 nBoxes =
+            pTableBoxes->size() > ww8::MAXTABLECELLS
+            ? ww8::MAXTABLECELLS
+            : static_cast< sal_uInt16 >(pTableBoxes->size());
 
     // sprm header
     m_rWW8Export.InsUInt16( NS_sprm::LN_TDefTable );
-    sal_uInt16 nSprmSize = 2 + (nBoxes + 1) * 2 + nBoxes * 20;
+    const sal_uInt16 nSprmSize = 2 + (nBoxes + 1) * 2 + nBoxes * 20;
     m_rWW8Export.InsUInt16( nSprmSize ); // length
 
     // number of boxes
@@ -2338,9 +2340,9 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
                 break;
 
             default:
-                nTblOffset = rHori.GetPos();
+                nTblOffset = static_cast< sal_uInt16 >(rHori.GetPos());
                 const SvxLRSpaceItem& rLRSp = pFmt->GetLRSpace();
-                nTblOffset += rLRSp.GetLeft();
+                nTblOffset += static_cast< sal_uInt16 >(rLRSp.GetLeft());
                 break;
         }
     }
@@ -2510,7 +2512,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
     const SwTableLine * pTabLine = pTabBox->GetUpper();
     const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes();
 
-    sal_uInt8 nBoxes = rTabBoxes.Count();
+    const sal_uInt16 nBoxes = rTabBoxes.Count();
     if ( m_rWW8Export.bWrtWW8 )
         m_rWW8Export.InsUInt16( NS_sprm::LN_TDefTableShd );
     else
@@ -2538,18 +2540,19 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
 
     if ( m_rWW8Export.bWrtWW8 )
     {
-        sal_uInt32 aSprmIds[] = {NS_sprm::LN_TCellShd, NS_sprm::LN_TCellShadow};
-        sal_uInt8 nBoxes0 = rTabBoxes.Count();
+        const sal_uInt16 aSprmIds[] = { NS_sprm::LN_TCellShd, NS_sprm::LN_TCellShadow };
+        sal_uInt16 nBoxes0 = rTabBoxes.Count();
         if (nBoxes0 > 21)
             nBoxes0 = 21;
 
-        for (sal_uInt32 m = 0; m < 2; m++)
+        for ( sal_uInt32 m = 0; m < 2; m++ )
         {
             m_rWW8Export.InsUInt16( aSprmIds[m] );
-            m_rWW8Export.pO->Insert( static_cast<sal_uInt8>(nBoxes0 * 10),
-                                     m_rWW8Export.pO->Count() );
+            m_rWW8Export.pO->Insert(
+                static_cast< sal_uInt8 >( nBoxes0 * 10 ),
+                m_rWW8Export.pO->Count() );
 
-        for ( sal_uInt8 n = 0; n < nBoxes0; n++ )
+        for ( sal_uInt16 n = 0; n < nBoxes0; n++ )
         {
             const SwTableBox * pBox1 = rTabBoxes[n];
             const SwFrmFmt * pFrmFmt = pBox1->GetFrmFmt();
@@ -3107,9 +3110,6 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
     pFlyOffset = 0;
     eNewAnchorType = FLY_AT_PAGE;
     nTxtTyp = TXT_MAINTEXT;
-    // --> OD 2007-04-19 #i43447# - removed
-//    nFlyWidth = nFlyHeight = 0;
-    // <--
     nStyleBeforeFly = nLastFmtId = 0;
     pStyAttr = 0;
     pCurrentStyle = NULL;
@@ -3119,6 +3119,22 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
     if ( aTOXArr.Count() )
         aTOXArr.Remove( 0, aTOXArr.Count() );
 
+    // update layout as it is needed for the export - e.g. for the export of tables
+    boost::scoped_ptr< ViewShell > pTemporaryViewShell( 0 );
+    {
+        ViewShell* pViewShell = NULL;
+        pDoc->GetEditShell( &pViewShell );
+        if ( pViewShell == NULL )
+        {
+            pTemporaryViewShell.reset( new ViewShell( *pDoc, 0 ) );
+            pViewShell = pTemporaryViewShell.get();
+        }
+        if ( pViewShell != NULL )
+        {
+            pViewShell->CalcLayout();
+        }
+    }
+
     if ( !pOLEExp )
     {
         sal_uInt32 nSvxMSDffOLEConvFlags = 0;
@@ -3141,10 +3157,8 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
     if ( !pOCXExp )
         pOCXExp = new SwMSConvertControls( pDoc->GetDocShell(), pCurPam );
 
-    // --> OD 2007-10-08 #i81405#
     // Collect anchored objects before changing the redline mode.
     maFrames = GetFrames( *pDoc, bWriteAll? NULL : pOrigPam );
-    // <--
 
     mnRedlineMode = pDoc->GetRedlineMode();
     if ( pDoc->GetRedlineTbl().Count() )
@@ -3509,12 +3523,6 @@ void WW8Export::PrepareStorage()
 
 sal_uLong SwWW8Writer::WriteStorage()
 {
-    // #i34818# #120099# - update layout (if present), for SwWriteTable
-    ViewShell* pViewShell = NULL;
-    pDoc->GetEditShell( &pViewShell );
-    if( pViewShell != NULL )
-        pViewShell->CalcLayout();
-
     long nMaxNode = pDoc->GetNodes().Count();
     ::StartProgress( STR_STATSTR_W4WWRITE, 0, nMaxNode, pDoc->GetDocShell() );
 
@@ -3575,9 +3583,12 @@ MSWordExportBase::~MSWordExportBase()
     delete pOleMap;
 }
 
-WW8Export::WW8Export( SwWW8Writer *pWriter,
-        SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam,
-        bool bIsWW8 )
+WW8Export::WW8Export(
+    SwWW8Writer *pWriter,
+    SwDoc *pDocument,
+    SwPaM *pCurrentPam,
+    SwPaM *pOriginalPam,
+    bool bIsWW8 )
     : MSWordExportBase( pDocument, pCurrentPam, pOriginalPam ),
       pO( NULL ),
       mpTableAt( NULL ),
commit 6c68ec977289b381a1407c9025ee40d689f75aaa
Author: Andre Fischer <af at apache.org>
Date:   Wed Feb 12 12:00:11 2014 +0000

    124142: Cleanup of data format and implementation.

diff --git a/solenv/bin/build_release.pl b/solenv/bin/build_release.pl
index bdb49f6..d5f9b06 100755
--- a/solenv/bin/build_release.pl
+++ b/solenv/bin/build_release.pl
@@ -21,6 +21,7 @@
 #**************************************************************
 
 use strict;
+use warnings;
 use XML::LibXML;
 use open OUT => ":utf8";
 use LWP::Simple;
@@ -219,7 +220,39 @@ my %EnUSBasedLanguages = (
     );
 
 
-sub GetInstallationPackageName ($$$$$);
+sub ProcessCommandline (@);
+sub PrintUsageAndExit ();
+sub Trim ($);
+sub ReadReleaseDescription ($$);
+sub ProcessBuildDescription ($$$);
+sub ProcessPlatformDescription ($$);
+sub ProcessDownloadDescription ($$);
+sub ProcessPackageDescription ($$);
+sub ProcessWikiPackageDescription ($$$);
+sub ProcessLanguageDescription ($$);
+sub PostprocessLanguageList ($$);
+sub PostprocessPlatformList ($$);
+sub CheckLanguageSet ($@);
+sub WriteMakefile ($$);
+sub Upload ($$);
+sub PrepareUploadArea ($@);
+sub UploadFilesViaRsync ($$@);
+sub CollectDownloadSets ($);
+sub ProvideChecksums ($@);
+sub IsOlderThan ($$);
+sub GetInstallationPackageName ($$$$);
+sub ResolveTemplate ($$$$$);
+sub GetCurrentPlatformDescriptor ($);
+sub Wiki ($$);
+sub GetTableList ($);
+sub GetPackagesForTable ($$);
+sub GetLanguagesForTable ($@);
+sub GetPlatformsForTable ($@);
+sub WriteDownloadLinks ($$$$$$$);
+sub FindDownload ($$$$$);
+sub CreateLink ($$$);
+sub CheckLink ($);
+sub SignFile ($$);
 
 sub ProcessCommandline (@)
 {
@@ -286,11 +319,11 @@ sub ProcessCommandline (@)
         elsif ( ! defined $command)
         {
             $command = $argument;
-        if ($command eq "build-missing")
-        {
-            $command = "build";
-            $build_only_missing = 1;
-        }
+            if ($command eq "build-missing")
+            {
+                $command = "build";
+                $build_only_missing = 1;
+            }
             elsif ($command !~ /^(build|build-missing|upload|wiki)$/)
             {
                 printf STDERR "unknown command '%s'\n", $command;
@@ -312,7 +345,12 @@ sub ProcessCommandline (@)
     {
         $error = 1;
     }
-    if ($command =~ /^(wiki)$/)
+    if (! defined $command)
+    {
+        printf STDERR "ERROR: no command\n";
+        $error = 1;
+    }
+    elsif ($command =~ /^(wiki)$/)
     {
         if ( ! defined $output_filename)
         {
@@ -398,6 +436,7 @@ sub ReadReleaseDescription ($$)
     my $release = {
         'name' => $root->getAttribute("name"),
         'version' => $root->getAttribute("version"),
+        'previous-version' => $root->getAttribute("previous-version"),
         'builds' => [],
         'languages' => {},
         'language-ids' => [],
@@ -434,6 +473,15 @@ sub ReadReleaseDescription ($$)
     }
     printf "%d packages\n", scalar keys %{$release->{'packages'}};
 
+    # Platform specific the package descriptions.
+    for my $package_element ($root->getChildrenByTagName("platform-package"))
+    {
+        my $package_descriptor = ProcessPlatformPackageDescription($package_element, $context);
+        my $key = $package_descriptor->{'platform-id'} . "/" . $package_descriptor->{'package-id'};
+        $release->{'platform-packages'}->{$key} = $package_descriptor;
+    }
+    printf "%d platform packages\n", scalar keys %{$release->{'platform-packages'}};
+
     # Process the download descriptions.
     for my $download_element ($root->getChildrenByTagName("download"))
     {
@@ -547,9 +595,12 @@ sub ProcessPlatformDescription ($$)
     # Optional tags.
     foreach my $id ("extension", "add-package-type-to-archive-name")
     {
-        $descriptor->{$id} = $element->getAttribute($id);
+        my $value = $element->getAttribute($id);
+        $descriptor->{$id} = $value if defined $value;
     }
 
+    $descriptor->{'add-package-type-to-archive-name'} = 0
+        unless defined $descriptor->{'add-package-type-to-archive-name'};
     $descriptor->{'package-types'} = [split(/;/, $descriptor->{'package-types'})];
 
     return $descriptor;
@@ -591,14 +642,14 @@ sub ProcessDownloadDescription ($$)
     The corresponding package descriptor is returned as a hash.
 
 =cut
-sub ProcessPackageDescription ($$$)
+sub ProcessPackageDescription ($$)
 {
-    my ($element, $context, $release_descriptor) = @_;
+    my ($element, $context) = @_;
 
     my $descriptor = {};
 
     # Mandatory tags.
-    foreach my $id ("id", "target", "archive-name", "display-name")
+    foreach my $id ("id", "target", "archive-path", "archive-name", "display-name")
     {
         $descriptor->{$id} = $element->getAttribute($id);
         die "release/package has no attribute $id" unless defined $descriptor->{$id};
@@ -607,7 +658,45 @@ sub ProcessPackageDescription ($$$)
     # Optional tags.
     foreach my $id ("link-tooltip", "link-URL", "download-extension")
     {
+        my $value = $element->getAttribute($id);
+        $descriptor->{$id} = $value if defined $value;
+    }
+
+    return $descriptor;
+}
+
+
+
+
+=head2 ProcessPlatformPackageDescription ($element, $context)
+
+    Process one <platform-package> element.
+
+    The corresponding package descriptor is returned as a hash.
+
+=cut
+sub ProcessPlatformPackageDescription ($$)
+{
+    my ($element, $context) = @_;
+
+    my $descriptor = {};
+
+    # Mandatory tags.
+    foreach my $id ("platform-id", "package-id")
+    {
         $descriptor->{$id} = $element->getAttribute($id);
+        die "release/package has no attribute $id" unless defined $descriptor->{$id};
+        die "release/package attribute $id is empty" unless $descriptor->{$id} !~ /^\s*$/;
+    }
+    # Optional tags.
+    foreach my $id ("extension", "package-types")
+    {
+        my $value = $element->getAttribute($id);
+        $descriptor->{$id} = $value if defined $value;
+    }
+    if (defined $descriptor->{'package-types'})
+    {
+        $descriptor->{'package-types'} = [split(/;/, $descriptor->{'package-types'})];
     }
 
     return $descriptor;
@@ -784,7 +873,7 @@ sub CheckLanguageSet ($@)
 
 
 
-=head2 WriteMakefile ($release_description, $context)
+=head2 WriteMakefile ($release_descriptor, $context)
 
     Write a makefile with all targets that match the <build> elements.
 
@@ -799,7 +888,7 @@ sub CheckLanguageSet ($@)
 =cut
 sub WriteMakefile ($$)
 {
-    my ($release_description, $context) = @_;
+    my ($release_descriptor, $context) = @_;
 
     my $filename = $context->{'output-filename'};
     if ( ! defined $filename)
@@ -809,13 +898,18 @@ sub WriteMakefile ($$)
 
     # Collect the targets to make.
     my @targets = ();
-    foreach my $build (@{$release_description->{'builds'}})
+    foreach my $build (@{$release_descriptor->{'builds'}})
     {
-        my $platform_descriptor = GetCurrentPlatformDescriptor($release_description);
-        my $package_descriptor = $release_description->{'packages'}->{$build->{'package-id'}};
+        my $platform_descriptor = GetCurrentPlatformDescriptor($release_descriptor);
+        my $package_descriptor = $release_descriptor->{'packages'}->{$build->{'package-id'}};
+        my $platform_package_descriptor = GetPlatformPackage(
+            $release_descriptor,
+            $platform_descriptor,
+            $package_descriptor);
+
         foreach my $language_id (@{$build->{'language-list'}})
         {
-            foreach my $package_format (@{$platform_descriptor->{'package-types'}})
+            foreach my $package_format (@{$platform_package_descriptor->{'package-types'}})
             {
                 my $full_target = sprintf("%s_%s.%s",
                     $package_descriptor->{'target'},
@@ -823,22 +917,21 @@ sub WriteMakefile ($$)
                     $package_format);
                 if ($context->{'build-only-missing'})
                 {
-                    my $source_path = GetInstallationPackagePath(
-                        $platform_descriptor,
-                        $package_format,
-                        $language_id);
-                    my $archive_name = GetInstallationPackageName(
-                        $release_description,
-                        $package_descriptor,
+                    my ($archive_path, $archive_name) = GetInstallationPackageName(
+                        $release_descriptor,
+                        $platform_package_descriptor,
                         $package_format,
-                        $platform_descriptor,
                         $language_id);
-                    my $candidate = $source_path . "/" . $archive_name;
+                    my $candidate = $archive_path . "/" . $archive_name;
                     if (-f $candidate)
                     {
                         printf "download set for %s already exists, skipping\n", $full_target;
                         next;
                     }
+                    else
+                    {
+                        printf "%s  %s\n", $archive_path, $archive_name;
+                    }
                 }
                 push @targets, $full_target;
             }
@@ -892,7 +985,7 @@ sub WriteMakefile ($$)
 
 sub Upload ($$)
 {
-    my ($release_description, $context) = @_;
+    my ($release_descriptor, $context) = @_;
 
     if ( ! defined $context->{'upload-destination'})
     {
@@ -900,7 +993,7 @@ sub Upload ($$)
         PrintUsageAndExit();
     }
 
-    my @download_sets = CollectDownloadSets($release_description);
+    my @download_sets = CollectDownloadSets($release_descriptor);
 
     ProvideChecksums($context, @download_sets);
     my $source_path = PrepareUploadArea($context, @download_sets);
@@ -935,12 +1028,15 @@ sub PrepareUploadArea ($@)
         foreach my $extension ("", ".md5", ".sha256", ".asc")
         {
             my $basename = sprintf("%s%s", $download_set->{'archive-name'}, $extension);
-            my $source = sprintf("%s/%s", $download_set->{'source-path'}, $basename);
-            my $target_path = sprintf("%s/%s/%s", $tmpdir, $download_set->{'destination-path'});
+            my $source_path = $download_set->{'source-path'};
+            my $source = sprintf("%s/%s", $source_path, $basename);
+            my $target_path = sprintf("%s/%s", $tmpdir, $download_set->{'destination-path'});
             my $target = sprintf("%s/%s", $target_path, $basename);
             if ($context->{'dry-run'})
             {
                 printf "would create link for %s\n", $basename;
+                printf "    %s\n", $source_path;
+                printf " to %s\n", $target_path;
             }
             else
             {
@@ -1016,11 +1112,11 @@ sub UploadFilesViaRsync ($$@)
 
 sub CollectDownloadSets ($)
 {
-    my ($release_description) = @_;
+    my ($release_descriptor) = @_;
 
     my @download_sets = ();
 
-    foreach my $platform_descriptor (values %{$release_description->{'platforms'}})
+    foreach my $platform_descriptor (values %{$release_descriptor->{'platforms'}})
     {
         my $platform_path = sprintf("%s/instsetoo_native/%s",
             $ENV{'SOLARSRC'},
@@ -1030,39 +1126,39 @@ sub CollectDownloadSets ($)
             printf "ignoring missing %s\n", $platform_path;
             next;
         }
-        for my $package_descriptor (values %{$release_description->{'packages'}})
+        for my $package_descriptor (values %{$release_descriptor->{'packages'}})
         {
-
+            my $platform_package_descriptor = GetPlatformPackage(
+                $release_descriptor,
+                $platform_descriptor,
+                $package_descriptor);
             my @package_formats = @{$platform_descriptor->{'package-types'}};
             for my $package_format (@package_formats)
             {
-                for my $language_id (@{$release_description->{'language-ids'}})
+                for my $language_id (@{$release_descriptor->{'language-ids'}})
                 {
-                    my $source_path = GetInstallationPackagePath(
-                        $platform_descriptor,
-                        $package_format,
-                        $language_id);
-                    my $archive_name = GetInstallationPackageName(
-                        $release_description,
-                        $package_descriptor,
+                    my ($archive_path, $archive_name) = GetInstallationPackageName(
+                        $release_descriptor,
+                        $platform_package_descriptor,
                         $package_format,
-                        $platform_descriptor,
                         $language_id);
-                    my $candidate = $source_path."/".$archive_name;
+                    my $candidate = $archive_path."/".$archive_name;
                     if ( ! -f $candidate)
                     {
 #                        printf STDERR "ERROR: can not find download set '%s'\n", $candidate;
                         next;
                     }
                     printf "adding %s\n", $archive_name;
-                    push @download_sets, {
-                        'source-path' => $source_path,
+                    my $download_set = {
+                        'source-path' => $archive_path,
                         'archive-name' => $archive_name,
-                        'platform' => $platform_descriptor->{'pack-platform'},
+                        'platform' => $platform_descriptor->{'archive-platform'},
                         'destination-path' => sprintf("developer-snapshots/%s/%s",
-                            $release_description->{'name'},
-                            $platform_descriptor->{'pack-platform'})
+                            $release_descriptor->{'name'},
+                            $platform_descriptor->{'archive-platform'})
                     };
+                    printf "    %s\n", $download_set->{'destination-path'};
+                    push @download_sets, $download_set;
                 }
             }
         }
@@ -1101,12 +1197,12 @@ sub ProvideChecksums ($@)
             else
             {
                 my $digest = Digest::MD5->new();
-                open my $in, $full_archive_name;
+                open my ($in), $full_archive_name;
                 $digest->addfile($in);
                 my $checksum = $digest->hexdigest();
                 close $in;
 
-                open my $out, ">", $md5_filename;
+                open my ($out), ">", $md5_filename;
                 printf $out "%s *%s", $checksum, $download_set->{'archive-name'};
                 close $out;
 
@@ -1128,12 +1224,12 @@ sub ProvideChecksums ($@)
             else
             {
                 my $digest = Digest::SHA->new("sha256");
-                open my $in, $full_archive_name;
+                open my ($in), $full_archive_name;
                 $digest->addfile($in);
                 my $checksum = $digest->hexdigest();
                 close $in;
 
-                open my $out, ">", $sha256_filename;
+                open my ($out), ">", $sha256_filename;
                 printf $out "%s *%s", $checksum, $download_set->{'archive-name'};
                 close $out;
 
@@ -1190,45 +1286,80 @@ sub IsOlderThan ($$)
 
 
 
-sub GetInstallationPackageName ($$$$$)
+sub GetInstallationPackageName ($$$$)
 {
-    my ($release_description, $package_descriptor, $package_format, $platform_descriptor, $language) = @_;
-
-    my $name = $package_descriptor->{'archive-name'};
+    my ($release_descriptor, $platform_package_descriptor, $package_format, $language) = @_;
 
-    my $archive_package_type = "";
-    if ($platform_descriptor->{'add-package-type-to-archive-name'} =~ /^(1|true|yes)$/i)
-    {
-        $archive_package_type = "-".$package_format;
-    }
+    my $path = ResolveTemplate(
+        $platform_package_descriptor->{'archive-path'},
+        $release_descriptor,
+        $platform_package_descriptor,
+        $package_format,
+        $language);
+    my $name = ResolveTemplate(
+        $platform_package_descriptor->{'archive-name'},
+        $release_descriptor,
+        $platform_package_descriptor,
+        $package_format,
+        $language);
 
-    $name =~ s/%V/$release_description->{'version'}/g;
-    $name =~ s/%P/$platform_descriptor->{'archive-platform'}/g;
-    $name =~ s/%T/$archive_package_type/g;
-    $name =~ s/%L/$language/g;
-    $name =~ s/%E/$platform_descriptor->{'extension'}/g;
-    return $name;
+    return ($path, $name);
 }
 
 
 
 
-sub GetInstallationPackagePath ($$$)
+sub ResolveTemplate ($$$$$)
 {
-    my ($product_descriptor, $package_format, $language) = @_;
+    my ($template, $release_descriptor, $platform_package_descriptor, $package_format, $language) = @_;
 
+    my $archive_package_type = "";
+    if ($platform_package_descriptor->{'add-package-type-to-archive-name'} =~ /^(1|true|yes)$/i)
+    {
+        $archive_package_type = "-".$package_format;
+    }
     my $full_language = $language;
     if ($EnUSBasedLanguages{$language})
     {
         $full_language = "en-US_".$language;
     }
+    my $extension = $platform_package_descriptor->{'download-extension'};
+    if ( ! defined $extension)
+    {
+        $extension = $platform_package_descriptor->{'extension'};
+    }
 
-    return sprintf("%s/instsetoo_native/%s/Apache_OpenOffice%s/%s/install/%s_download",
-        $ENV{'SOLARSRC'},
-        $ENV{'INPATH'},
-        $product_descriptor->{'product-name-tail'},
-        $package_format,
-        $full_language);
+    my $old_to_new_version_dash = sprintf(
+        "v-%s_v-%s",
+        $release_descriptor->{'previous-version'},
+        $release_descriptor->{'version'});
+    $old_to_new_version_dash =~ s/\./-/g;
+    my $old_to_new_version_dots = sprintf(
+        "%s-%s",
+        $release_descriptor->{'previous-version'},
+        $release_descriptor->{'version'});
+
+
+    my $name = $template;
+
+    # Resolve %? template paramters.
+    $name =~ s/%V/$release_descriptor->{'version'}/g;
+    $name =~ s/%W/$old_to_new_version_dash/g;
+    $name =~ s/%w/$old_to_new_version_dots/g;
+    $name =~ s/%P/$platform_package_descriptor->{'archive-platform'}/g;
+    $name =~ s/%t/$archive_package_type/g;
+    $name =~ s/%T/$package_format/g;
+    $name =~ s/%l/$full_language/g;
+    $name =~ s/%L/$language/g;
+    $name =~ s/%E/$extension/g;
+
+    # Resolve $name environment references.
+    while ($name =~ /^(.*?)\$([a-zA-Z0-9_]+)(.*)$/)
+    {
+        $name = $1 . $ENV{$2} . $3;
+    }
+
+    return $name;
 }
 
 
@@ -1236,9 +1367,9 @@ sub GetInstallationPackagePath ($$$)
 
 sub GetCurrentPlatformDescriptor ($)
 {
-    my ($release_description) = @_;
+    my ($release_descriptor) = @_;
 
-    my $platform_descriptor = $release_description->{'platforms'}->{$ENV{'INPATH'}};
+    my $platform_descriptor = $release_descriptor->{'platforms'}->{$ENV{'INPATH'}};
     if ( ! defined $platform_descriptor)
     {
         printf STDERR "ERROR: platform '%s' is not supported\n", $ENV{'INPATH'};
@@ -1249,6 +1380,29 @@ sub GetCurrentPlatformDescriptor ($)
 
 
 
+sub GetPlatformPackage ($$$)
+{
+    my ($release_descriptor, $platform_descriptor, $package_descriptor) = @_;
+    my $key = sprintf("%s/%s", $platform_descriptor->{'id'}, $package_descriptor->{'id'});
+
+    my $platform_package = $release_descriptor->{'platform-packages'}->{$key};
+    $platform_package = {}
+        unless defined $platform_package;
+
+    my $joined_descriptor = {
+        %$platform_descriptor,
+        %$package_descriptor,
+        %$platform_package,
+        'id' => $key,
+        'platform-id' => $platform_descriptor->{'id'},
+        'package-id' => $package_descriptor->{'id'}
+    };
+    return $joined_descriptor;
+}
+
+
+
+
 sub Wiki ($$)
 {
     my ($release_descriptor, $context) = @_;
@@ -1288,7 +1442,7 @@ sub Wiki ($$)
             if ($context->{'check-links'})
             {
                 $| = 1;
-                printf "%-5%s: ", $language_descriptor->{'id'};
+                printf "%-5s: ", $language_descriptor->{'id'};
             }
 
             print $out "|-\n";
@@ -1323,16 +1477,20 @@ sub Wiki ($$)
 
                 foreach my $platform_descriptor (@table_platforms)
                 {
-                    foreach my $package_type (@{$platform_descriptor->{'package-types'}})
+                    my $platform_package_descriptor = GetPlatformPackage(
+                        $release_descriptor,
+                        $platform_descriptor,
+                        $package_descriptor);
+
+                    foreach my $package_type (@{$platform_package_descriptor->{'package-types'}})
                     {
                         WriteDownloadLinks(
                             $out,
                             $release_descriptor,
                             $context,
-                            $release_descriptor,
                             $language_descriptor,
                             $wiki_package_descriptor,
-                            $platform_descriptor,
+                            $platform_package_descriptor,
                             $package_type);
                     }
                 }
@@ -1472,42 +1630,39 @@ sub WriteDownloadLinks ($$$$$$$)
     my ($out,
         $release_descriptor,
         $context,
-        $release_descriptor,
         $language_descriptor,
         $wiki_package_descriptor,
-        $platform_descriptor,
+        $platform_package_descriptor,
         $package_type) = @_;
 
-    my $package_descriptor = $wiki_package_descriptor->{'package'};
-
     # Check if the current language and platform match the package.
-    if (defined $wiki_package_descriptor->{'platforms'}->{$platform_descriptor->{'id'}}
+    my $platform_id = $platform_package_descriptor->{'platform-id'};
+    if (defined $wiki_package_descriptor->{'platforms'}->{$platform_id}
         && defined $wiki_package_descriptor->{'languages'}->{$language_descriptor->{'id'}})
     {
         my $archive_package_name = "";
         my $extension = $package_type;
-        if (defined $platform_descriptor->{'extension'})
+        if (defined $platform_package_descriptor->{'extension'})
         {
-            $extension = $platform_descriptor->{'extension'};
+            $extension = $platform_package_descriptor->{'extension'};
         }
-        if (defined $package_descriptor->{'download-extension'})
+        if (defined $platform_package_descriptor->{'download-extension'})
         {
-            $extension = $package_descriptor->{'download-extension'};
+            $extension = $platform_package_descriptor->{'download-extension'};
         }
         $archive_package_name = "-".$package_type if ($package_type =~ /deb|rpm/);
 
-        my $archive_name = GetInstallationPackageName(
+        my ($archive_path, $archive_name) = GetInstallationPackageName(
             $release_descriptor,
-            $package_descriptor,
+            $platform_package_descriptor,
             $package_type,
-            $platform_descriptor,
             $language_descriptor->{'id'});
 
         printf $out "| align=\"center\" | ";
         my $download = FindDownload(
             $context,
             $release_descriptor,
-            $platform_descriptor,
+            $platform_package_descriptor,
             $package_type,
             $archive_name);
         if (defined $download)
@@ -1537,14 +1692,14 @@ sub WriteDownloadLinks ($$$$$$$)
 sub FindDownload ($$$$$)
 {
     my ($context,
-    $release_descriptor,
-    $platform_descriptor,
-    $package_type,
+        $release_descriptor,
+        $platform_package_descriptor,
+        $package_type,
         $archive_name) = @_;
 
     foreach my $download (@{$release_descriptor->{'downloads'}})
     {
-        if ($download->{'platform-id'} eq $platform_descriptor->{'id'})
+        if ($download->{'platform-id'} eq $platform_package_descriptor->{'platform-id'})
         {
             my $url = $download->{'base-url'} . "/". $archive_name;
             if ($context->{'check-links'})
@@ -1629,7 +1784,7 @@ sub CreateLink ($$$)
     This is determined by downloading only the header.
 
 =cut
-my $LastCheckedURL = undef;
+my $LastCheckedURL = "";
 my $LastCheckedResult = undef;
 sub CheckLink ($)
 {
@@ -1662,16 +1817,16 @@ sub SignFile ($$)
 
 
 my $context = ProcessCommandline(@ARGV);
-my $release_description = ReadReleaseDescription($context->{'filename'}, $context);
+my $release_descriptor = ReadReleaseDescription($context->{'filename'}, $context);
 if ($context->{'command'} eq "build")
 {
-    WriteMakefile($release_description, $context);
+    WriteMakefile($release_descriptor, $context);
 }
 elsif ($context->{'command'} eq "upload")
 {
-    Upload($release_description, $context);
+    Upload($release_descriptor, $context);
 }
 elsif ($context->{'command'} eq "wiki")
 {
-    Wiki($release_description, $context);
+    Wiki($release_descriptor, $context);
 }
commit 58a92efd46a09984af5e956c0ba1752c6d78ad03
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed Feb 12 10:42:37 2014 +0000

    #i123862# use O*String's isEmpty() method to check for emptiness in the comphelper module
    
    Patch-by: j.nitschke at ok.de
    Review-by: hdu at apache.org

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 069d2cb..4a02119 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -321,7 +321,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::GetEmbeddedOb
 {
     RTL_LOGFILE_CONTEXT( aLog, "comphelper (mv76033) comphelper::EmbeddedObjectContainer::GetEmbeddedObject" );
 
-    OSL_ENSURE( rName.getLength(), "Empty object name!");
+    OSL_ENSURE( !rName.isEmpty(), "Empty object name!");
 
     uno::Reference < embed::XEmbeddedObject > xObj;
     EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.find( rName );
@@ -399,7 +399,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CreateEmbedde
 {
     RTL_LOGFILE_CONTEXT( aLog, "comphelper (mv76033) comphelper::EmbeddedObjectContainer::CreateEmbeddedObject" );
 
-    if ( !rNewName.getLength() )
+    if ( rNewName.isEmpty() )
         rNewName = CreateUniqueObjectName();
 
     OSL_ENSURE( !HasEmbeddedObject(rNewName), "Object to create already exists!");
@@ -441,7 +441,7 @@ void EmbeddedObjectContainer::AddEmbeddedObject( const ::com::sun::star::uno::Re
     RTL_LOGFILE_CONTEXT( aLog, "comphelper (mv76033) comphelper::EmbeddedObjectContainer::AddEmbeddedObject" );
 
 #if OSL_DEBUG_LEVEL > 1
-    OSL_ENSURE( rName.getLength(), "Added object doesn't have a name!");
+    OSL_ENSURE( !rName.isEmpty(), "Added object doesn't have a name!");
     uno::Reference < container::XNameAccess > xAccess( pImpl->mxStorage, uno::UNO_QUERY );
     uno::Reference < embed::XEmbedPersist > xEmb( xObj, uno::UNO_QUERY );
     uno::Reference < embed::XLinkageSupport > xLink( xEmb, uno::UNO_QUERY );
@@ -505,7 +505,7 @@ sal_Bool EmbeddedObjectContainer::StoreEmbeddedObject( const uno::Reference < em
     RTL_LOGFILE_CONTEXT( aLog, "comphelper (mv76033) comphelper::EmbeddedObjectContainer::StoreEmbeddedObject" );
 
     uno::Reference < embed::XEmbedPersist > xPersist( xObj, uno::UNO_QUERY );
-    if ( !rName.getLength() )
+    if ( rName.isEmpty() )
         rName = CreateUniqueObjectName();
 
 #if OSL_DEBUG_LEVEL > 1
@@ -558,7 +558,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbedde
 {
     RTL_LOGFILE_CONTEXT( aLog, "comphelper (mv76033) comphelper::EmbeddedObjectContainer::InsertEmbeddedObject( InputStream )" );
 
-    if ( !rNewName.getLength() )
+    if ( rNewName.isEmpty() )
         rNewName = CreateUniqueObjectName();
 
     // store it into the container storage
@@ -620,7 +620,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbedde
 {
     RTL_LOGFILE_CONTEXT( aLog, "comphelper (mv76033) comphelper::EmbeddedObjectContainer::InsertEmbeddedObject( MediaDescriptor )" );
 
-    if ( !rNewName.getLength() )
+    if ( rNewName.isEmpty() )
         rNewName = CreateUniqueObjectName();
 
     uno::Reference < embed::XEmbeddedObject > xObj;
@@ -655,7 +655,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbedde
 {
     RTL_LOGFILE_CONTEXT( aLog, "comphelper (mv76033) comphelper::EmbeddedObjectContainer::InsertEmbeddedLink" );
 
-    if ( !rNewName.getLength() )
+    if ( rNewName.isEmpty() )
         rNewName = CreateUniqueObjectName();
 
     uno::Reference < embed::XEmbeddedObject > xObj;
@@ -695,7 +695,7 @@ sal_Bool EmbeddedObjectContainer::TryToCopyGraphReplacement( EmbeddedObjectConta
 
     sal_Bool bResult = sal_False;
 
-    if ( ( &rSrc != this || !aOrigName.equals( aTargetName ) ) && aOrigName.getLength() && aTargetName.getLength() )
+    if ( ( &rSrc != this || !aOrigName.equals( aTargetName ) ) && !aOrigName.isEmpty() && !aTargetName.isEmpty() )
     {
         ::rtl::OUString aMediaType;
         uno::Reference < io::XInputStream > xGrStream = rSrc.GetGraphicStream( aOrigName, &aMediaType );
@@ -719,7 +719,7 @@ sal_Bool EmbeddedObjectContainer::CopyEmbeddedObject( EmbeddedObjectContainer& r
     if ( xPersist.is() )
         aOrigName = xPersist->getEntryName();
 
-    if ( !rName.getLength() )
+    if ( rName.isEmpty() )
         rName = CreateUniqueObjectName();
 
     if ( StoreEmbeddedObject( xObj, rName, sal_True ) )
@@ -748,7 +748,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb
     catch( uno::Exception& )
     {}
 
-    if ( !rName.getLength() )
+    if ( rName.isEmpty() )
         rName = CreateUniqueObjectName();
 
     // objects without persistance are not really stored by the method
@@ -766,7 +766,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb
                 {
                     // this is a OOo link, it has no persistence
                     ::rtl::OUString aURL = xOrigLinkage->getLinkURL();
-                    if ( !aURL.getLength() )
+                    if ( aURL.isEmpty() )
                         throw uno::RuntimeException();
 
                     // create new linked object from the URL the link is based on
@@ -868,7 +868,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb
     if ( xResult.is() )
     {
         // the object is successfully copied, try to copy graphical replacement
-        if ( aOrigName.getLength() )
+        if ( !aOrigName.isEmpty() )
             TryToCopyGraphReplacement( rSrc, aOrigName, rName );
 
         // the object might need the size to be set
@@ -1086,7 +1086,7 @@ sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < e
                         static const ::rtl::OUString s_sMediaType(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
                         xStorProps->getPropertyValue( s_sMediaType ) >>= aOrigStorMediaType;
 
-                        OSL_ENSURE( aOrigStorMediaType.getLength(), "No valuable media type in the storage!\n" );
+                        OSL_ENSURE( !aOrigStorMediaType.isEmpty(), "No valuable media type in the storage!\n" );
 
                         uno::Reference< beans::XPropertySet > xTargetStorProps(
                                                                     pImpl->mpTempObjectContainer->pImpl->mxStorage,
@@ -1206,8 +1206,8 @@ uno::Reference < io::XInputStream > EmbeddedObjectContainer::GetGraphicStream( c
 
     uno::Reference < io::XInputStream > xStream;
 
-    OSL_ENSURE( aName.getLength(), "Retrieving graphic for unknown object!" );
-    if ( aName.getLength() )
+    OSL_ENSURE( !aName.isEmpty(), "Retrieving graphic for unknown object!" );
+    if ( !aName.isEmpty() )
     {
         try
         {
@@ -1344,7 +1344,7 @@ namespace {
                                             const uno::Reference< io::XInputStream >& xInStream,
                                             const ::rtl::OUString& aStreamName )
     {
-        OSL_ENSURE( aStreamName.getLength() && xInStream.is() && xDocStor.is(), "Misuse of the method!\n" );
+        OSL_ENSURE( !aStreamName.isEmpty() && xInStream.is() && xDocStor.is(), "Misuse of the method!\n" );
 
         try
         {
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 15c2d0c..c9b3850 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -342,7 +342,7 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const AllEventObject& Even
 
                 case TypeClass_STRING:
                     // none empty string -> return
-                    if( ((OUString*)aRet.getValue())->getLength() > 0 )
+                    if( ((OUString*)aRet.getValue())->isEmpty() == false )
                         return aRet;
                     break;
 
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index b1a8a55..7bde555 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -53,7 +53,7 @@ static uno::Sequence< sal_Int8 > GeneratePBKDF2Hash( const ::rtl::OUString& aPas
 {
     uno::Sequence< sal_Int8 > aResult;
 
-    if ( aPassword.getLength() && aSalt.getLength() && nCount && nHashLength )
+    if ( !aPassword.isEmpty() && aSalt.getLength() && nCount && nHashLength )
     {
         ::rtl::OString aBytePass = ::rtl::OUStringToOString( aPassword, RTL_TEXTENCODING_UTF8 );
         aResult.realloc( 16 );
@@ -104,7 +104,7 @@ uno::Sequence< beans::PropertyValue > DocPasswordHelper::GenerateNewModifyPasswo
 sal_Bool DocPasswordHelper::IsModifyPasswordCorrect( const ::rtl::OUString& aPassword, const uno::Sequence< beans::PropertyValue >& aInfo )
 {
     sal_Bool bResult = sal_False;
-    if ( aPassword.getLength() && aInfo.getLength() )
+    if ( !aPassword.isEmpty() && aInfo.getLength() )
     {
         ::rtl::OUString sAlgorithm;
         uno::Sequence< sal_Int8 > aSalt;
@@ -238,7 +238,7 @@ sal_uInt16 DocPasswordHelper::GetXLHashAsUINT16(
 
     ::rtl::OString aString = ::rtl::OUStringToOString( aUString, nEnc );
 
-    if ( aString.getLength() && aString.getLength() <= SAL_MAX_UINT16 )
+    if ( !aString.isEmpty() && aString.getLength() <= SAL_MAX_UINT16 )
     {
         for ( sal_Int32 nInd = aString.getLength() - 1; nInd >= 0; nInd-- )
         {
@@ -287,7 +287,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
 /*static*/ uno::Sequence< sal_Int8 > DocPasswordHelper::GenerateStd97Key( const ::rtl::OUString& aPassword, const uno::Sequence< sal_Int8 >& aDocId )
 {
     uno::Sequence< sal_Int8 > aResultKey;
-    if ( aPassword.getLength() && aDocId.getLength() == 16 )
+    if ( !aPassword.isEmpty() && aDocId.getLength() == 16 )
     {
         sal_uInt16 pPassData[16];
         rtl_zeroMemory( pPassData, sizeof(pPassData) );
@@ -377,8 +377,8 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
     {
         for( ::std::vector< OUString >::const_iterator aIt = pDefaultPasswords->begin(), aEnd = pDefaultPasswords->end(); (eResult == DocPasswordVerifierResult_WRONG_PASSWORD) && (aIt != aEnd); ++aIt )
         {
-            OSL_ENSURE( aIt->getLength() > 0, "DocPasswordHelper::requestAndVerifyDocPassword - unexpected empty default password" );
-            if( aIt->getLength() > 0 )
+            OSL_ENSURE( !aIt->isEmpty(), "DocPasswordHelper::requestAndVerifyDocPassword - unexpected empty default password" );
+            if( !aIt->isEmpty() )
             {
                 eResult = rVerifier.verifyPassword( *aIt, aEncData );
                 if( pbIsDefaultPassword )
@@ -401,7 +401,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
     // try media password (skip, if result is OK or ABORT)
     if( eResult == DocPasswordVerifierResult_WRONG_PASSWORD )
     {
-        if( rMediaPassword.getLength() > 0 )
+        if( !rMediaPassword.isEmpty() )
             eResult = rVerifier.verifyPassword( rMediaPassword, aEncData );
     }
 
@@ -416,7 +416,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
             rxInteractHandler->handle( xRequest );
             if( pRequest->isPassword() )
             {
-                if( pRequest->getPassword().getLength() > 0 )
+                if( !pRequest->getPassword().isEmpty() )
                     eResult = rVerifier.verifyPassword( pRequest->getPassword(), aEncData );
             }
             else
diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx
index 9bc95d4..54d8332 100644
--- a/comphelper/source/misc/documentinfo.cxx
+++ b/comphelper/source/misc/documentinfo.cxx
@@ -95,12 +95,12 @@ namespace comphelper {
         {
             // 1. ask the model and the controller for their XTitle::getTitle
             sTitle = lcl_getTitle( _rxDocument );
-            if ( sTitle.getLength() )
+            if ( !sTitle.isEmpty() )
                 return sTitle;
 
             Reference< XController > xController( _rxDocument->getCurrentController() );
             sTitle = lcl_getTitle( xController );
-            if ( sTitle.getLength() )
+            if ( !sTitle.isEmpty() )
                 return sTitle;
 
             // work around a problem with embedded objects, which sometimes return
@@ -110,13 +110,13 @@ namespace comphelper {
                 sDocURL = ::rtl::OUString();
 
             // 2. if the document is not saved, yet, check the frame title
-            if ( sDocURL.getLength() == 0 )
+            if ( sDocURL.isEmpty() )
             {
                 Reference< XFrame > xFrame;
                 if ( xController.is() )
                     xFrame.set( xController->getFrame() );
                 sTitle = lcl_getTitle( xFrame );
-                if ( sTitle.getLength() )
+                if ( !sTitle.isEmpty() )
                     return sTitle;
             }
 
@@ -128,14 +128,14 @@ namespace comphelper {
                     xDPS->getDocumentProperties(), UNO_QUERY_THROW );
                 OSL_ENSURE(xDocProps.is(), "no DocumentProperties");
                 sTitle = xDocProps->getTitle();
-                if ( sTitle.getLength() )
+                if ( !sTitle.isEmpty() )
                     return sTitle;
             }
 
             // 4. try model arguments
             NamedValueCollection aModelArgs( _rxDocument->getArgs() );
             sTitle = aModelArgs.getOrDefault( "Title", sTitle );
-            if ( sTitle.getLength() )
+            if ( !sTitle.isEmpty() )
                 return sTitle;
 
             // 5. try the last segment of the document URL
@@ -143,7 +143,7 @@ namespace comphelper {
             // but since we moved this code to comphelper, we do not have access to an INetURLObject anymore
             // This heuristics here should be sufficient - finally, we will get an UNO title API in a not
             // too distant future (hopefully), then  this complete class is superfluous)
-            if ( sDocURL.getLength() == 0 )
+            if ( sDocURL.isEmpty() )
             {
                 Reference< XStorable > xDocStorable( _rxDocument, UNO_QUERY_THROW );
                 sDocURL = xDocStorable->getLocation();
@@ -156,7 +156,7 @@ namespace comphelper {
             }
             sTitle = sDocURL.copy( nLastSepPos + 1 );
 
-            if ( sTitle.getLength() != 0 )
+            if ( !sTitle.isEmpty() )
                 return sTitle;
 
             // 5.
@@ -165,7 +165,7 @@ namespace comphelper {
             Reference< XTitle > xTitle( _rxDocument, UNO_QUERY );
             if ( xTitle.is() )
             {
-                if ( xTitle->getTitle().getLength() != 0 )
+                if ( !xTitle->getTitle().isEmpty() )
                     return xTitle->getTitle();
             }
         }
diff --git a/comphelper/source/misc/locale.cxx b/comphelper/source/misc/locale.cxx
index bb98277..c16e14d 100644
--- a/comphelper/source/misc/locale.cxx
+++ b/comphelper/source/misc/locale.cxx
@@ -472,12 +472,12 @@ void Locale::fromISO(const ::rtl::OUString& sISO)
     ::rtl::OUStringBuffer sISO(64);
 
     sISO.append(m_sLanguage);
-    if (m_sCountry.getLength())
+    if ( !m_sCountry.isEmpty() )
     {
         sISO.append(SEPERATOR_LC);
         sISO.append(m_sCountry);
 
-        if (m_sVariant.getLength())
+        if ( !m_sVariant.isEmpty() )
         {
             sISO.append(SEPERATOR_CV);
             sISO.append(m_sVariant);
@@ -635,7 +635,7 @@ sal_Bool Locale::getFallback(Locale& aLocale)
 
     // d) remove country from incoming locale
     //    e.g. "de-DE" => "de" or "en-US" => "en"!
-    if (aLocale.getCountry().getLength())
+    if ( !aLocale.getCountry().isEmpty())
     {
         aLocale.setCountry(::rtl::OUString());
         return sal_True;
diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index dc4bcf9..f0f01fd 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -91,7 +91,7 @@ namespace comphelper
         try
         {
             Reference< XLoggerPool > xPool( LoggerPool::get( m_aContext.getUNOContext() ), UNO_QUERY_THROW );
-            if ( m_sLoggerName.getLength() )
+            if ( !m_sLoggerName.isEmpty() )
                 m_xLogger = xPool->getNamedLogger( m_sLoggerName );
             else
                 m_xLogger = xPool->getDefaultLogger();
@@ -383,7 +383,7 @@ namespace comphelper
         ::rtl::OUString sMessage;
         if ( lcl_loadBundle_nothrow( m_pImpl->getContext(), *m_pData ) )
             sMessage = lcl_loadString_nothrow( m_pData->xBundle, _nMessageResID );
-        if ( sMessage.getLength() == 0 )
+        if ( sMessage.isEmpty() )
         {
             ::rtl::OUStringBuffer aBuffer;
             aBuffer.appendAscii( "<invalid event resource: '" );
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index 53cb3b3..bb7e52f 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -596,7 +596,7 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool bLockFile )
 
         // b) ... or we must get it from the given URL
         ::rtl::OUString sURL = getUnpackedValueOrDefault(MediaDescriptor::PROP_URL(), ::rtl::OUString());
-        if (!sURL.getLength())
+        if ( sURL.isEmpty() )
             throw css::uno::Exception(
                     ::rtl::OUString::createFromAscii("Found no URL."),
                     css::uno::Reference< css::uno::XInterface >());
@@ -645,7 +645,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference
 
     // media type
     ::rtl::OUString sMediaType = getUnpackedValueOrDefault(MediaDescriptor::PROP_MEDIATYPE(), ::rtl::OUString());
-    if (!sMediaType.getLength())
+    if ( sMediaType.isEmpty() )
     {
         sMediaType = ::rtl::OUString::createFromAscii("application/x-www-form-urlencoded");
         (*this)[MediaDescriptor::PROP_MEDIATYPE()] <<= sMediaType;
diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index 2ea54ea..5100ec2 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -204,7 +204,7 @@ sal_Int32 MimeConfigurationHelper::GetFilterFlags( const ::rtl::OUString& aFilte
     sal_Int32 nFlags = 0;
     try
     {
-        if ( aFilterName.getLength() )
+        if ( !aFilterName.isEmpty() )
         {
             uno::Reference< container::XNameAccess > xFilterFactory(
                 GetFilterFactory(),
@@ -277,10 +277,10 @@ sal_Int32 MimeConfigurationHelper::GetFilterFlags( const ::rtl::OUString& aFilte
                     {
                         ::rtl::OUString aFilterName;
                         if ( aType[nInd].Name.equalsAscii( "PreferredFilter" )
-                          && ( aType[nInd].Value >>= aFilterName ) && aFilterName.getLength() )
+                          && ( aType[nInd].Value >>= aFilterName ) && !aFilterName.isEmpty() )
                         {
                             ::rtl::OUString aDocumentName = GetDocServiceNameFromFilter( aFilterName );
-                            if ( aDocumentName.getLength() )
+                            if ( !aDocumentName.isEmpty() )
                                 return aDocumentName;
                         }
                     }
@@ -442,7 +442,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByClas
     }
 
     ::rtl::OUString aStringClassID = GetStringClassIDRepresentation( aClassID );
-    if ( aStringClassID.getLength() )
+    if ( !aStringClassID.isEmpty() )
     {
         uno::Reference< container::XNameAccess > xObjConfig = GetObjConfiguration();
         uno::Reference< container::XNameAccess > xObjectProps;
@@ -468,7 +468,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByMedi
         return aObject;
 
     ::rtl::OUString aDocumentName = GetDocServiceNameFromMediaType( aMediaType );
-    if ( aDocumentName.getLength() )
+    if ( !aDocumentName.isEmpty() )
         return GetObjectPropsByDocumentName( aDocumentName );
 
     return uno::Sequence< beans::NamedValue >();
@@ -478,7 +478,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByMedi
 uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByFilter( const ::rtl::OUString& aFilterName )
 {
     ::rtl::OUString aDocumentName = GetDocServiceNameFromFilter( aFilterName );
-    if ( aDocumentName.getLength() )
+    if ( !aDocumentName.isEmpty() )
         return GetObjectPropsByDocumentName( aDocumentName );
 
     return uno::Sequence< beans::NamedValue >();
@@ -487,7 +487,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByFilt
 //-----------------------------------------------------------------------
 uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocumentName( const ::rtl::OUString& aDocName )
 {
-    if ( aDocName.getLength() )
+    if ( !aDocName.isEmpty() )
     {
         uno::Reference< container::XNameAccess > xObjConfig = GetObjConfiguration();
         if ( xObjConfig.is() )
@@ -529,7 +529,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
 {
     ::rtl::OUString aResult;
 
-    if ( aStringClassID.getLength() )
+    if ( !aStringClassID.isEmpty() )
     {
         uno::Reference< container::XNameAccess > xObjConfig = GetObjConfiguration();
         uno::Reference< container::XNameAccess > xObjectProps;
@@ -554,7 +554,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
 {
     ::rtl::OUString aResult;
 
-    if ( aDocName.getLength() )
+    if ( !aDocName.isEmpty() )
     {
         uno::Reference< container::XNameAccess > xObjConfig = GetObjConfiguration();
         if ( xObjConfig.is() )
@@ -591,10 +591,10 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
 {
     ::rtl::OUString aResult = GetFactoryNameByStringClassID( GetExplicitlyRegisteredObjClassID( aMediaType ) );
 
-    if ( !aResult.getLength() )
+    if ( aResult.isEmpty() )
     {
         ::rtl::OUString aDocumentName = GetDocServiceNameFromMediaType( aMediaType );
-        if ( aDocumentName.getLength() )
+        if ( !aDocumentName.isEmpty() )
             aResult = GetFactoryNameByDocumentName( aDocumentName );
     }
 
@@ -612,7 +612,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
         if ( aMediaDescr[nInd].Name.equalsAscii( "FilterName" ) )
             aMediaDescr[nInd].Value >>= aFilterName;
 
-    if ( !aFilterName.getLength() )
+    if ( aFilterName.isEmpty() )
     {
         // filter name is not specified, so type detection should be done
 
@@ -634,7 +634,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
             if ( aTempMD[nInd].Name.equalsAscii( "FilterName" ) )
                 aTempMD[nInd].Value >>= aFilterName;
 
-        if ( aFilterName.getLength() )
+        if ( !aFilterName.isEmpty() )
         {
             sal_Int32 nOldLen = aMediaDescr.getLength();
             aMediaDescr.realloc( nOldLen + 1 );
@@ -642,7 +642,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
             aMediaDescr[ nOldLen ].Value <<= aFilterName;
 
         }
-        else if ( aTypeName.getLength() && !bIgnoreType )
+        else if ( !aTypeName.isEmpty() && !bIgnoreType )
         {
             uno::Reference< container::XNameAccess > xNameAccess( xTypeDetection, uno::UNO_QUERY );
             uno::Sequence< beans::PropertyValue > aTypes;
@@ -679,7 +679,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu
             break;
         }
 
-    OSL_ENSURE( aDocName.getLength(), "The name must exist at this point!\n" );
+    OSL_ENSURE( !aDocName.isEmpty(), "The name must exist at this point!\n" );
 
 
     sal_Bool bNeedsAddition = sal_True;
@@ -708,7 +708,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
     sal_Bool bResult = sal_False;
 
     ::rtl::OUString aFilterName = UpdateMediaDescriptorWithFilterName( aMediaDescr, sal_False );
-    if ( aFilterName.getLength() )
+    if ( !aFilterName.isEmpty() )
     {
         sal_Int32 nFlags = GetFilterFlags( aFilterName );
         // check the OWN flag
@@ -723,7 +723,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
 {
     rtl::OUString aResult;
 
-    if ( aServiceName.getLength() && nVersion )
+    if ( !aServiceName.isEmpty() && nVersion )
         try
         {
             uno::Reference< container::XContainerQuery > xFilterQuery(
@@ -757,7 +757,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
                         {
                             // if there are more than one filter the preffered one should be used
                             // if there is no preffered filter the first one will be used
-                            if ( !aResult.getLength() || ( nFlags & SFX_FILTER_PREFERED ) )
+                            if ( aResult.isEmpty() || ( nFlags & SFX_FILTER_PREFERED ) )
                                 aResult = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Name" ),
                                                                                 ::rtl::OUString() );
                             if ( nFlags & SFX_FILTER_PREFERED )
@@ -779,7 +779,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
 
     try
     {
-        if ( aImportFilterName.getLength() )
+        if ( !aImportFilterName.isEmpty() )
         {
             uno::Reference< container::XNameAccess > xFilterFactory(
                 GetFilterFactory(),
@@ -808,8 +808,8 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
                     ::rtl::OUString aDocumentServiceName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "DocumentService" ), ::rtl::OUString() );
                     ::rtl::OUString aTypeName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Type" ), ::rtl::OUString() );
 
-                    OSL_ENSURE( aDocumentServiceName.getLength() && aTypeName.getLength(), "Incomplete filter data!" );
-                    if ( aDocumentServiceName.getLength() && aTypeName.getLength() )
+                    OSL_ENSURE( !aDocumentServiceName.isEmpty() && !aTypeName.isEmpty(), "Incomplete filter data!" );
+                    if ( !aDocumentServiceName.isEmpty() && !aTypeName.isEmpty() )
                     {
                         uno::Sequence< beans::NamedValue > aSearchRequest( 2 );
                         aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "Type" );
diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx
index 73e9bef..d354142 100644
--- a/comphelper/source/misc/numbers.cxx
+++ b/comphelper/source/misc/numbers.cxx
@@ -115,7 +115,7 @@ Any getNumberFormatProperty( const Reference< XNumberFormatter >& _rxFormatter,
 {
     Any aReturn;
 
-    OSL_ENSURE( _rxFormatter.is() && _rPropertyName.getLength(), "getNumberFormatProperty: invalid arguments!" );
+    OSL_ENSURE( _rxFormatter.is() && !_rPropertyName.isEmpty(), "getNumberFormatProperty: invalid arguments!" );
     try
     {
         Reference< XNumberFormatsSupplier > xSupplier;
diff --git a/comphelper/source/misc/regpathhelper.cxx b/comphelper/source/misc/regpathhelper.cxx
index 80e7330..160f8f1 100644
--- a/comphelper/source/misc/regpathhelper.cxx
+++ b/comphelper/source/misc/regpathhelper.cxx
@@ -103,7 +103,7 @@ static OUString getDefaultLocalRegistry()
 
     if ( bIsPortalUser )
        {
-        if(  portalUserDir.getLength() )
+        if( !portalUserDir.isEmpty() )
         {
             FileBase::getFileURLFromSystemPath( portalUserDir , portalUserDir );
             userRegistryName = portalUserDir;
@@ -157,7 +157,7 @@ OUString getPathToUserRegistry()
 
     // search the environment STAR_USER_REGISTRY
     OString sBuffer( getenv(USER_REGISTRY_NAME_ENV) );
-    if ( sBuffer.getLength() > 0 )
+    if ( !sBuffer.isEmpty() )
     {
         f = fopen( sBuffer.getStr(), "r" );
 
@@ -168,7 +168,7 @@ OUString getPathToUserRegistry()
         }
     }
 
-    if ( !userRegistryName.getLength() )
+    if ( userRegistryName.isEmpty() )
     {
         userRegistryName = getDefaultLocalRegistry();
     }
@@ -206,7 +206,7 @@ OUString getPathToSystemRegistry()
     {
         // search the environment STAR_REGISTRY
         OString tmpStr( getenv(SYSTEM_REGISTRY_NAME_ENV) );
-        if ( tmpStr.getLength() > 0 )
+        if ( !tmpStr.isEmpty() )
         {
             f = fopen(tmpStr.getStr(), "r");
 
diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx
index 01adb07..51bcea4f 100644
--- a/comphelper/source/misc/sequenceashashmap.cxx
+++ b/comphelper/source/misc/sequenceashashmap.cxx
@@ -126,7 +126,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
         if (lSource[i] >>= lP)
         {
             if (
-                (!lP.Name.getLength()) ||
+                (lP.Name.isEmpty()) ||
                 (!lP.Value.hasValue())
                )
                 throw css::beans::IllegalTypeException(
@@ -140,7 +140,7 @@ void SequenceAsHashMap::operator<<(const css::uno::Sequence< css::uno::Any >& lS
         if (lSource[i] >>= lN)
         {
             if (
-                (!lN.Name.getLength()) ||
+                (lN.Name.isEmpty()) ||
                 (!lN.Value.hasValue())
                )
                 throw css::beans::IllegalTypeException(
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index fa3ae01..94cd188 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -426,7 +426,7 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData(
     // TODO/LATER: Should not the method be part of DocPasswordHelper?
     uno::Sequence< beans::NamedValue > aEncryptionData;
     sal_Int32 nSha1Ind = 0;
-    if ( aPassword.getLength() )
+    if ( !aPassword.isEmpty() )
     {
         // generate SHA256 start key
         try
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx
index ddfb037..81be751 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -109,7 +109,7 @@ rtl::OUString searchAndReplaceAsciiL(
       ::rtl::OUString kw =
         i_rString.getToken(0, static_cast<sal_Unicode> (','), idx);
       kw = kw.trim();
-      if (kw.getLength() > 0) {
+      if ( !kw.isEmpty() ) {
           vec.push_back(kw);
       }
     } while (idx >= 0);
diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
index 5796d15..e56d12f 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
@@ -69,7 +69,7 @@ static bool makeCanonicalFileURL( rtl::OUString & rURL )
             {
                 aNormalizedURL = aFileStatus.getFileURL();
 
-                if ( aNormalizedURL.getLength() > 0 )
+                if ( !aNormalizedURL.isEmpty() )
                 {
                     if ( aNormalizedURL
                             .getStr()[ aNormalizedURL.getLength() - 1 ]
@@ -146,7 +146,7 @@ rtl::OUString SAL_CALL
 OfficeInstallationDirectories::makeRelocatableURL( const rtl::OUString& URL )
     throw ( uno::RuntimeException )
 {
-    if ( URL.getLength() > 0 )
+    if ( !URL.isEmpty() )
     {
         initDirs();
 
@@ -193,7 +193,7 @@ rtl::OUString SAL_CALL
 OfficeInstallationDirectories::makeAbsoluteURL( const rtl::OUString& URL )
     throw ( uno::RuntimeException )
 {
-    if ( URL.getLength() > 0 )
+    if ( !URL.isEmpty() )
     {
         sal_Int32 nIndex = URL.indexOf( m_aOfficeBrandDirMacro );
         if ( nIndex != -1 )
@@ -345,7 +345,7 @@ void OfficeInstallationDirectories::initDirs()
                     xExpander->expandMacros(
                          rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "$OOO_BASE_DIR" ) ) );
 
-                OSL_ENSURE( m_pOfficeBrandDir->getLength() > 0,
+                OSL_ENSURE( !m_pOfficeBrandDir->isEmpty(),
                             "Unable to obtain office brand installation directory!" );
 
                 makeCanonicalFileURL( *m_pOfficeBrandDir );
@@ -365,7 +365,7 @@ void OfficeInstallationDirectories::initDirs()
                         rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
                             "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE( "bootstrap" ) ":UserInstallation}" ) ) );
 
-                OSL_ENSURE( m_pUserDir->getLength() > 0,
+                OSL_ENSURE( !m_pUserDir->isEmpty(),
                             "Unable to obtain office user data directory!" );
 
                 makeCanonicalFileURL( *m_pUserDir );
diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx
index 27dfabe..e80978a 100644
--- a/comphelper/source/property/genericpropertyset.cxx
+++ b/comphelper/source/property/genericpropertyset.cxx
@@ -114,7 +114,7 @@ void SAL_CALL GenericPropertySet::addPropertyChangeListener( const ::rtl::OUStri
     Reference < XPropertySetInfo > xInfo = getPropertySetInfo(  );
     if ( xInfo.is() )
     {
-        if ( !aPropertyName.getLength() )
+        if ( aPropertyName.isEmpty() )
         {
             Sequence< Property> aSeq = xInfo->getProperties();
             const Property* pIter = aSeq.getConstArray();
@@ -138,7 +138,7 @@ void SAL_CALL GenericPropertySet::removePropertyChangeListener( const ::rtl::OUS
     aGuard.clear();
     if ( xInfo.is() )
     {
-        if ( !aPropertyName.getLength() )
+        if ( aPropertyName.isEmpty() )
         {
             Sequence< Property> aSeq = xInfo->getProperties();
             const Property* pIter = aSeq.getConstArray();
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index 901c348..7178524 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -509,7 +509,7 @@ void SAL_CALL OPropertySetAggregationHelper::propertiesChange(const  ::com::sun:
     if (1 == nLen)
     {
         const  ::com::sun::star::beans::PropertyChangeEvent& evt = _rEvents.getConstArray()[0];
-        OSL_ENSURE(evt.PropertyName.getLength() > 0, "OPropertySetAggregationHelper::propertiesChange : invalid event !");
+        OSL_ENSURE( !evt.PropertyName.isEmpty(), "OPropertySetAggregationHelper::propertiesChange : invalid event !");
             // we had a bug where this assertion would have us saved a whole day :) (72514)
         sal_Int32 nHandle = rPH.getHandleByName( evt.PropertyName );
 
diff --git a/comphelper/source/property/propertybag.cxx b/comphelper/source/property/propertybag.cxx
index daf5d75..cee3a94 100644
--- a/comphelper/source/property/propertybag.cxx
+++ b/comphelper/source/property/propertybag.cxx
@@ -88,7 +88,7 @@ namespace comphelper
     {
         void    lcl_checkForEmptyName( const bool _allowEmpty, const ::rtl::OUString& _name )
         {
-            if ( !_allowEmpty && !_name.getLength() )
+            if ( !_allowEmpty && _name.isEmpty() )
                 throw IllegalArgumentException(
                         ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The property name must not be empty." ) ),
                         // TODO: resource
diff --git a/comphelper/source/streaming/otransactedfilestream.cxx b/comphelper/source/streaming/otransactedfilestream.cxx
index 9983267b..c6811e5 100644
--- a/comphelper/source/streaming/otransactedfilestream.cxx
+++ b/comphelper/source/streaming/otransactedfilestream.cxx
@@ -219,7 +219,7 @@ void OTruncatedTransactedFileStream::CloseAll_Impl()
         delete m_pStreamData;
         m_pStreamData = NULL;
 
-        if ( bDelete && xFileAccess.is() && aURL.getLength() )
+        if ( bDelete && xFileAccess.is() && !aURL.isEmpty() )
         {
             // delete the file
             try
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index 312b4e2..2b5ac56 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -303,7 +303,7 @@ void SAL_CALL OFOPXMLHelper::startElement( const ::rtl::OUString& aName, const u
             m_aResultSeq[nNewEntryNum-1].realloc( 4 ); // the maximal expected number of arguments is 4
 
             ::rtl::OUString aIDValue = xAttribs->getValueByName( m_aIDAttr );
-            if ( !aIDValue.getLength() )
+            if ( aIDValue.isEmpty() )
                 throw xml::sax::SAXException(); // TODO: the ID value must present
 
             ::rtl::OUString aTypeValue = xAttribs->getValueByName( m_aTypeAttr );
@@ -313,19 +313,19 @@ void SAL_CALL OFOPXMLHelper::startElement( const ::rtl::OUString& aName, const u
             m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aIDAttr;
             m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aIDValue;
 
-            if ( aTypeValue.getLength() )
+            if ( !aTypeValue.isEmpty() )
             {
                 m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aTypeAttr;
                 m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aTypeValue;
             }
 
-            if ( aTargetValue.getLength() )
+            if ( !aTargetValue.isEmpty() )
             {
                 m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aTargetAttr;
                 m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aTargetValue;
             }
 
-            if ( aTargetModeValue.getLength() )
+            if ( !aTargetModeValue.isEmpty() )
             {
                 m_aResultSeq[nNewEntryNum-1][++nAttrNum - 1].First = m_aTargetModeAttr;
                 m_aResultSeq[nNewEntryNum-1][nAttrNum - 1].Second = aTargetModeValue;
@@ -369,11 +369,11 @@ void SAL_CALL OFOPXMLHelper::startElement( const ::rtl::OUString& aName, const u
                 throw uno::RuntimeException();
 
             ::rtl::OUString aExtensionValue = xAttribs->getValueByName( m_aExtensionAttr );
-            if ( !aExtensionValue.getLength() )
+            if ( aExtensionValue.isEmpty() )
                 throw xml::sax::SAXException(); // TODO: the Extension value must present
 
             ::rtl::OUString aContentTypeValue = xAttribs->getValueByName( m_aContentTypeAttr );
-            if ( !aContentTypeValue.getLength() )
+            if ( aContentTypeValue.isEmpty() )
                 throw xml::sax::SAXException(); // TODO: the ContentType value must present
 
             sal_Int32 nNewResultLen = m_aResultSeq[0].getLength() + 1;
@@ -398,11 +398,11 @@ void SAL_CALL OFOPXMLHelper::startElement( const ::rtl::OUString& aName, const u
                 throw uno::RuntimeException();
 
             ::rtl::OUString aPartNameValue = xAttribs->getValueByName( m_aPartNameAttr );
-            if ( !aPartNameValue.getLength() )
+            if ( aPartNameValue.isEmpty() )
                 throw xml::sax::SAXException(); // TODO: the PartName value must present
 
             ::rtl::OUString aContentTypeValue = xAttribs->getValueByName( m_aContentTypeAttr );
-            if ( !aContentTypeValue.getLength() )
+            if ( aContentTypeValue.isEmpty() )
                 throw xml::sax::SAXException(); // TODO: the ContentType value must present
 
             sal_Int32 nNewResultLen = m_aResultSeq[1].getLength() + 1;
commit 6137307b89fdf6227e1888113349faa2d15e4f42
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed Feb 12 10:41:04 2014 +0000

    #i123862# use O*String's isEmpty() method to check for emptiness in the codemaker module
    
    Patch-by: j.nitschke at ok.de
    Review-by: hdu at apache.org

diff --git a/codemaker/source/bonobowrappermaker/corbamaker.cxx b/codemaker/source/bonobowrappermaker/corbamaker.cxx
index 43feb4d..02fe050 100644
--- a/codemaker/source/bonobowrappermaker/corbamaker.cxx
+++ b/codemaker/source/bonobowrappermaker/corbamaker.cxx
@@ -167,7 +167,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
                     } else
                     {
                         tmpName = typeName.copy(0, typeName.lastIndexOf('.')).replace('.', '/');
-                        if (tmpName.getLength() == 0)
+                        if ( tmpName.isEmpty() )
                             tmpName = "/";
                         else
                             tmpName.replace('.', '/');
diff --git a/codemaker/source/bonobowrappermaker/corbatype.cxx b/codemaker/source/bonobowrappermaker/corbatype.cxx
index 1e52361..c41920c 100644
--- a/codemaker/source/bonobowrappermaker/corbatype.cxx
+++ b/codemaker/source/bonobowrappermaker/corbatype.cxx
@@ -104,7 +104,7 @@ sal_Bool CorbaType::dumpDependedTypes(CorbaOptions* pOptions, FileStream& o, Typ
         if ((index = typeName.lastIndexOf(']')) > 0)
             typeName = typeName.copy(index + 1);
 
-        if (getUnoBaseType(typeName).getLength() == 0)
+        if ( getUnoBaseType(typeName).isEmpty() )
         {
             if (!produceType(typeName,
                 m_typeMgr,
@@ -302,7 +302,7 @@ void CorbaType::dumpInclude(FileStream& o, TypeSet* allreadyDumped, const OStrin
                     realTypeName = "";
                 }
             }
-            while (realTypeName.getLength() > 0);
+            while ( !realTypeName.isEmpty() );
 
             o << "}; // namespace bonobobridge\n";
         }
@@ -341,8 +341,8 @@ void CorbaType::dumpDepIncludes(FileStream& o, TypeSet* allreadyDumped, const OS
                 bSequenceDumped = sal_True;
             }
 
-            if (getUnoBaseType(relType).getLength() == 0 &&
-                m_typeName != relType)
+            if ( getUnoBaseType(relType).isEmpty() &&
+                 m_typeName != relType)
             {
                 if (m_typeMgr.getTypeClass(relType) == RT_TYPE_INTERFACE
                     && sPrefix.equals("HDL"))
@@ -377,7 +377,7 @@ void CorbaType::dumpNameSpace(FileStream& o, sal_Bool bOpen, sal_Bool bFull, con
 {
     OString typeName(type);
     sal_Bool bOneLine = sal_True;
-    if (typeName.getLength() == 0)
+    if ( typeName.isEmpty() )
     {
         typeName = m_typeName;
         bOneLine = sal_False;
@@ -448,7 +448,7 @@ sal_uInt32 CorbaType::checkInheritedMemberCount(const TypeReader* pReader)
 
     sal_uInt32 count = 0;
     OString superType(pReader->getSuperTypeName());
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
         if ( aSuperReader.isValid() )
@@ -486,10 +486,10 @@ sal_uInt32 CorbaType::getInheritedMemberCount()
 
 OString CorbaType::getTypeClass(const OString& type, sal_Bool bCStyle)
 {
-    OString     typeName = (type.getLength() > 0 ? type : m_typeName);
+    OString     typeName = ( !type.isEmpty() ? type : m_typeName);
     RTTypeClass rtTypeClass = RT_TYPE_INVALID;
 
-    if (type.getLength() > 0)
+    if ( !type.isEmpty() )
     {
         typeName = type;
         rtTypeClass = m_typeMgr.getTypeClass(typeName);
@@ -599,7 +599,7 @@ OString CorbaType::printUnoType(const OString& type, sal_Bool bConst, sal_Bool b
     case RT_TYPE_INVALID:
     {
         OString tmp(getUnoBaseType(relType));
-        if (tmp.getLength() > 0)
+        if ( !tmp.isEmpty() )
         {
             ret.append(getUnoBaseType(relType));
         } else
@@ -674,7 +674,7 @@ OString CorbaType::printCorbaType(const OString& type, sal_Bool bConst, sal_Bool
     case RT_TYPE_INVALID:
     {
         OString tmp(getUnoBaseType(relType));
-        if (tmp.getLength() > 0)
+        if ( !tmp.isEmpty() )
             ret.append(getCorbaBaseType(relType));
         else
             throw CannotDumpException("Unknown type '" + relType + "', incomplete type library. ("+type+")");
@@ -749,7 +749,7 @@ sal_Bool CorbaType::isPassedAsPointer(const OString& type)
 sal_Bool CorbaType::isDerivedFromUnknown(const ::rtl::OString& typeName)
 {
     sal_Bool ret = sal_True;
-    if (typeName.getLength() == 0)
+    if ( typeName.isEmpty() )
         ret = sal_False;
     else if (typeName.equals("Bonobo/NullInterface"))
         ret = sal_False;
@@ -839,7 +839,7 @@ OString CorbaType::printCorbaParameter(const OString& type, sal_Bool bOut)
     case RT_TYPE_INVALID:
     {
         OString tmp(getUnoBaseType(relType));
-        if (tmp.getLength() > 0)
+        if ( !tmp.isEmpty() )
         {
             ret.append(getCorbaBaseType(relType));
         } else
@@ -1824,7 +1824,7 @@ void InterfaceType::dumpFunctions(FileStream& o)
 
     initBuffer.insert(0, OString("&bonobobridge_") + printCorbaType(m_typeName, sal_False, sal_False) + OString("_epv"));
 
-    while(superName.getLength() != 0)
+    while( !superName.isEmpty() )
     {
         if (superName.equals("Bonobo/NullInterface"))
         {
@@ -1996,7 +1996,7 @@ sal_uInt32 InterfaceType::checkInheritedMemberCount(const TypeReader* pReader)
 
     sal_uInt32 count = 0;
     OString superType(pReader->getSuperTypeName());
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
         if (aSuperReader.isValid())
@@ -2162,7 +2162,7 @@ void StructureType::dumpFunctions(FileStream& o)
     }
     else
     {
-        if (superType.getLength() > 0)
+        if ( !superType.isEmpty() )
         {
             o << "  ret = bonobobridge::cpp_convert_b2u((";
             dumpUnoType(o, superType, sal_False, sal_False);
@@ -2210,7 +2210,7 @@ void StructureType::dumpFunctions(FileStream& o)
         o << "  // fix me: union !!!!\n  ret = sal_False;\n";
     else
     {
-        if (superType.getLength() > 0)
+        if ( !superType.isEmpty() )
         {
             o << "  ret = bonobobridge::cpp_convert_u2b((";
             dumpCorbaType(o, superType, sal_False, sal_False);
@@ -2268,7 +2268,7 @@ sal_Bool StructureType::dumpSuperMember(FileStream& o, const OString& superType,
 {
     sal_Bool hasMember = sal_False;
 
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
 
@@ -2359,7 +2359,7 @@ void ExceptionType::dumpFunctions(FileStream& o)
     sal_Int32    cIndex;
     OString      corbaFieldName;
 
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         o << "  ret = bonobobridge::cpp_convert_b2u((";
         dumpUnoType(o, superType, sal_False, sal_False);
@@ -2404,7 +2404,7 @@ void ExceptionType::dumpFunctions(FileStream& o)
     dumpCorbaType(o, m_typeName, sal_False, sal_False);
     o << "*) pOut;\n\n";
 
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         o << "  ret = bonobobridge::cpp_convert_u2b((";
         dumpCorbaType(o, superType, sal_False, sal_False);
@@ -2463,7 +2463,7 @@ sal_Bool ExceptionType::dumpSuperMember(FileStream& o, const OString& superType,
 {
     sal_Bool hasMember = sal_False;
 
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
 
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index 1f51c26..3a45abf 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -113,7 +113,7 @@ OString createFileNameFromType( const OString& destination,
         nameBuffer.append("/", 1);
 
     OString tmpStr(type);
-    if (prefix.getLength() > 0)
+    if ( !prefix.isEmpty() )
     {
         tmpStr = type.replaceAt(type.lastIndexOf('/')+1, 0, prefix);
     }
@@ -295,7 +295,7 @@ FileStream::FileStream()
 FileStream::FileStream(const OString& name, FileAccessMode mode)
     : m_file(NULL)
 {
-    if ( name.getLength() > 0 )
+    if ( !name.isEmpty() )
     {
         OUString sUrl(convertToFileUrl(name));
 #ifdef SAL_UNX
@@ -335,7 +335,7 @@ void FileStream::createTempFile(const OString& sPath)
     OUString sTmpPath;
     OUString sTmpName;
 
-    if (sPath.getLength() > 0)
+    if ( !sPath.isEmpty() )
         sTmp = sPath;
 
     sTmpPath = convertToFileUrl(sTmp);
@@ -361,7 +361,7 @@ void FileStream::createTempFile(const OString& sPath)
 
 void FileStream::open(const OString& name, FileAccessMode mode)
 {
-    if ( name.getLength() > 0 )
+    if ( !name.isEmpty() )
     {
         oslFileError ret =  osl_File_E_None;
         if ((ret = osl_openFile(convertToFileUrl(name).pData, &m_file, checkAccessMode(mode))) == osl_File_E_None)
diff --git a/codemaker/source/codemaker/unotype.cxx b/codemaker/source/codemaker/unotype.cxx
index 22e1747..a7c24e5 100644
--- a/codemaker/source/codemaker/unotype.cxx
+++ b/codemaker/source/codemaker/unotype.cxx
@@ -53,7 +53,7 @@ codemaker::UnoType::Sort codemaker::UnoType::getSort(rtl::OString const & type)
 }
 
 bool codemaker::UnoType::isSequenceType(rtl::OString const & type) {
-    return type.getLength() > 0 && type[0] == '[';
+    return ( !type.isEmpty() && type[0] == '[' );
 }
 
 rtl::OString codemaker::UnoType::decompose(
diff --git a/codemaker/source/cppumaker/cppumaker.cxx b/codemaker/source/cppumaker/cppumaker.cxx
index 8d4f29b..2d6085c 100644
--- a/codemaker/source/cppumaker/cppumaker.cxx
+++ b/codemaker/source/cppumaker/cppumaker.cxx
@@ -198,7 +198,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
                     } else
                     {
                         tmpName = typeName.copy(0, typeName.lastIndexOf('.')).replace('.', '/');
-                        if (tmpName.getLength() == 0)
+                        if ( tmpName.isEmpty() )
                             tmpName = "/";
                         else
                             tmpName.replace('.', '/');
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index c93e04f..3f0de05 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -243,7 +243,7 @@ sal_Bool CppuType::dumpFile(CppuOptions* pOptions,
     }
 
     OString sFileName = createFileNameFromType(sOutPath, sName, sExtension);
-    if (sFileName.getLength() == 0)
+    if ( sFileName.isEmpty() )
         return sal_False;
 
     sal_Bool bFileExists = fileExists( sFileName );
@@ -492,7 +492,7 @@ void CppuType::dumpNormalGetCppuType(FileStream& o)
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
     sal_Bool bIsBaseException = sal_False;
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         if ( superType.equals("com/sun/star/uno/Exception") )
         {
@@ -552,7 +552,7 @@ void CppuType::dumpNormalGetCppuType(FileStream& o)
 
     o << indent() << "typelib_static_compound_type_init( &the_type, "
       << getTypeClass(m_typeName, sal_True) << ", \"" << m_typeName.replace('/', '.') << "\", ";
-    if ( superType.getLength() > 0 || bIsBaseException )
+    if ( !superType.isEmpty() || bIsBaseException )
     {
         if ( bIsBaseException )
         {
@@ -606,7 +606,7 @@ void CppuType::dumpComprehensiveGetCppuType(FileStream& o)
         superType = rtl::OUStringToOString(
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
-    if (superType.getLength() > 0) {
+    if ( !superType.isEmpty() ) {
         o << indent()
           << "const ::com::sun::star::uno::Type& rSuperType = ::cppu::UnoType< ";
         dumpType(o, superType, false, false, false, true);
@@ -660,7 +660,7 @@ void CppuType::dumpComprehensiveGetCppuType(FileStream& o)
     o << indent() << "&pTD,\n" << indent() << "(typelib_TypeClass)"
       << getTypeClass() << ", sTypeName.pData,\n";
 
-    if (superType.getLength() > 0) {
+    if ( !superType.isEmpty() ) {
         o << indent() << "rSuperType.getTypeLibType(),\n";
     } else {
         o << indent() << "0,\n";
@@ -755,7 +755,7 @@ sal_uInt32 CppuType::checkInheritedMemberCount(const typereg::Reader* pReader)
         superType = rtl::OUStringToOString(
             pReader->getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         typereg::Reader aSuperReader(m_typeMgr.getTypeReader(superType));
         if ( aSuperReader.isValid() )
@@ -795,10 +795,10 @@ sal_uInt32 CppuType::getInheritedMemberCount()
 
 OString CppuType::getTypeClass(const OString& type, sal_Bool bCStyle)
 {
-    OString     typeName = (type.getLength() > 0 ? type : m_typeName);
+    OString     typeName = (!type.isEmpty() ? type : m_typeName);
     RTTypeClass rtTypeClass = RT_TYPE_INVALID;
 
-    if (type.getLength() > 0)
+    if ( !type.isEmpty() )
     {
         typeName = type;
         rtTypeClass = m_typeMgr.getTypeClass(typeName);
@@ -905,7 +905,7 @@ void CppuType::dumpType(FileStream& o, const OString& type,
         case RT_TYPE_INVALID:
             {
                 OString tmp(translateSimpleUnoType(relType, cppuUnoType));
-                if (tmp.getLength() > 0)
+                if ( !tmp.isEmpty() )
                 {
                     o << tmp;
                 } else
@@ -2374,9 +2374,9 @@ sal_Bool StructureType::dumpDeclaration(FileStream& o)
     if (m_reader.getSuperTypeCount() != 0) {
         base = rtl::OUStringToOString(
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
-        OSL_ASSERT(base.getLength() > 0); //TODO
+        OSL_ASSERT( !base.isEmpty() ); //TODO
     }
-    if (base.getLength() > 0) {
+    if ( !base.isEmpty() ) {
         o << ": public " << scopedCppName(base);
     }
     o << " {\n";
@@ -2426,7 +2426,7 @@ sal_Bool StructureType::dumpDeclaration(FileStream& o)
             o << " "
                 << rtl::OUStringToOString(
                     m_reader.getFieldName(i), RTL_TEXTENCODING_UTF8);
-            if (i == 0 && base.getLength() > 0 && type != "double"
+            if (i == 0 && !base.isEmpty() && type != "double"
                 && type != "hyper" && type != "unsigned hyper")
             {
                 OSL_ASSERT(!parameterized);
@@ -2473,7 +2473,7 @@ sal_Bool StructureType::dumpHxxFile(
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
     sal_Bool first = sal_True;
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         o << indent() << ": " << scopedCppName(superType) << "()\n";
         first = sal_False;
@@ -2549,7 +2549,7 @@ sal_Bool StructureType::dumpHxxFile(
 
         inc();
         first = sal_True;
-        if (superType.getLength() > 0)
+        if ( !superType.isEmpty() )
         {
             o << indent() << ": " << scopedCppName(superType) << "(";
             dumpSuperMember(o, superType, sal_False);
@@ -2927,7 +2927,7 @@ sal_Bool StructureType::dumpSuperMember(FileStream& o, const OString& superType,
 {
     sal_Bool hasMember = sal_False;
 
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         typereg::Reader aSuperReader(m_typeMgr.getTypeReader(superType));
 
@@ -3127,7 +3127,7 @@ sal_Bool ExceptionType::dumpDeclaration(FileStream& o)
         superType = rtl::OUStringToOString(
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
                     o << " : public " << scopedCppName(superType);
 
     o << "\n{\npublic:\n";
@@ -3191,7 +3191,7 @@ sal_Bool ExceptionType::dumpDeclaration(FileStream& o)
         o << indent();
         dumpType(o, fieldType);
         o << " " << fieldName;
-        if (i == 0 && superType.getLength() &&
+        if (i == 0 && !superType.isEmpty() &&
             !fieldType.equals("double") && !fieldType.equals("hyper") && !fieldType.equals("unsigned hyper"))
         {
             o << " CPPU_GCC3_ALIGN( " << scopedCppName(superType) << " )";
@@ -3230,7 +3230,7 @@ sal_Bool ExceptionType::dumpHxxFile(
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
     sal_Bool first = sal_True;
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         o << indent() << ": " << scopedCppName(superType) << "()\n";
         first = sal_False;
@@ -3306,7 +3306,7 @@ sal_Bool ExceptionType::dumpHxxFile(
 
         inc();
         first = sal_True;
-        if (superType.getLength() > 0)
+        if ( !superType.isEmpty() )
         {
             o << indent() << ": " << scopedCppName(superType) << "(";
             dumpSuperMember(o, superType, sal_False);
@@ -3351,7 +3351,7 @@ sal_Bool ExceptionType::dumpHxxFile(
     o << indent() << m_name << "::" << m_name << "(" << m_name
       << " const & the_other)";
     first = true;
-    if (superType.getLength() > 0) {
+    if ( !superType.isEmpty() ) {
         o << ": " << scopedCppName(superType) << "(the_other)";
         first = false;
     }
@@ -3370,7 +3370,7 @@ sal_Bool ExceptionType::dumpHxxFile(
     o << indent()
       << ("//TODO: Just like its implicitly-defined counterpart, this function"
           " definition is not exception-safe\n");
-    if (superType.getLength() > 0) {
+    if ( !superType.isEmpty() ) {
         o << indent() << scopedCppName(superType)
           << "::operator =(the_other);\n";
     }
@@ -3399,7 +3399,7 @@ sal_Bool ExceptionType::dumpSuperMember(FileStream& o, const OString& superType,
 {
     sal_Bool hasMember = sal_False;
 
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         typereg::Reader aSuperReader(m_typeMgr.getTypeReader(superType));
 
@@ -4094,7 +4094,7 @@ void ServiceType::addSpecialDependencies() {
 }
 
 bool ServiceType::isDefaultConstructor(sal_uInt16 ctorIndex) const {
-    return m_reader.getMethodName(ctorIndex).getLength() == 0;
+    return m_reader.getMethodName(ctorIndex).isEmpty();
 }
 
 bool ServiceType::hasRestParameter(sal_uInt16 ctorIndex) const {
diff --git a/codemaker/source/cppumaker/includes.cxx b/codemaker/source/cppumaker/includes.cxx
index 1efedac..7b40431 100644
--- a/codemaker/source/cppumaker/includes.cxx
+++ b/codemaker/source/cppumaker/includes.cxx
@@ -265,7 +265,7 @@ void Includes::dumpInclude(
 {
     static char const * extension[2] = { "hdl", "hpp" };
     out << "#include \"" << registryType;
-    if (suffix.getLength() > 0) {
+    if ( !suffix.isEmpty() ) {
         out << "/" << suffix;
     }
     out << "." << extension[hpp] << "\"\n";
diff --git a/codemaker/source/cunomaker/cunomaker.cxx b/codemaker/source/cunomaker/cunomaker.cxx
index ef6c6d5..a28691a 100644
--- a/codemaker/source/cunomaker/cunomaker.cxx
+++ b/codemaker/source/cunomaker/cunomaker.cxx
@@ -136,7 +136,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
                     } else
                     {
                         tmpName = typeName.copy(0, typeName.lastIndexOf('.')).replace('.', '/');
-                        if (tmpName.getLength() == 0)
+                        if ( tmpName.isEmpty() )
                             tmpName = "/";
                         else
                             tmpName.replace('.', '/');
diff --git a/codemaker/source/cunomaker/cunotype.cxx b/codemaker/source/cunomaker/cunotype.cxx
index 43d5622..6771945 100644
--- a/codemaker/source/cunomaker/cunotype.cxx
+++ b/codemaker/source/cunomaker/cunotype.cxx
@@ -233,7 +233,7 @@ sal_Bool CunoType::dumpDependedTypes(CunoOptions* pOptions)
         if ((index = typeName.lastIndexOf(']')) > 0)
             typeName = typeName.copy(index + 1);
 
-        if (getBaseType(typeName).getLength() == 0)
+        if ( getBaseType(typeName).isEmpty() )
         {
             if (!produceType(typeName,
                                 m_typeMgr,
@@ -393,7 +393,7 @@ void CunoType::dumpDepIncludes(FileStream& o, const OString& typeName, sal_Char*
                   << ">\n#endif\n";
             }
 
-            if (getBaseType(relType).getLength() == 0 &&
+            if (getBaseType(relType).isEmpty() &&
                 m_typeName != relType)
             {
                 if (m_typeMgr.getTypeClass(relType) == RT_TYPE_INTERFACE
@@ -582,7 +582,7 @@ void CunoType::dumpGetCunoType(FileStream& o)
 
         OString superType(m_reader.getSuperTypeName());
         sal_Bool bIsBaseException = sal_False;
-        if (superType.getLength() > 0)
+        if ( !superType.isEmpty() )
         {
             if ( superType.equals("com/sun/star/uno/Exception") )
             {
@@ -642,7 +642,7 @@ void CunoType::dumpGetCunoType(FileStream& o)
 
         o << indent() << "typelib_static_compound_type_init( &s_pType_" << typeName << ", "
           << getTypeClass(m_typeName, sal_True) << ", \"" << m_typeName.replace('/', '.') << "\", ";
-        if ( superType.getLength() > 0 || bIsBaseException )
+        if ( !superType.isEmpty() || bIsBaseException )
         {
             if ( bIsBaseException )
             {
@@ -703,7 +703,7 @@ void CunoType::dumpCGetCunoType(FileStream& o)
        << indent() << "typelib_TypeDescription * pTD = 0;\n";
 
     OString superType(m_reader.getSuperTypeName());
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
         o << indent() << "typelib_TypeDescriptionReference * pSuperType = 0;\n";
 
     sal_uInt32      count = getMemberCount();
@@ -728,7 +728,7 @@ void CunoType::dumpCGetCunoType(FileStream& o)
 
     o << indent() << "rtl_uString_newFromAscii( &pTypeName, \"" << m_typeName.replace('/', '.') << "\" );\n";
 
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         o << indent() << "typelib_typedescriptionreference_newByAsciiName(&pSuperType, typelib_TypeClass_INTERFACE, \""
           << superType.replace('/', '.') << "\" );\n";
@@ -766,7 +766,7 @@ void CunoType::dumpCGetCunoType(FileStream& o)
         o << indent() << "&pTD,\n" << indent()
           << getTypeClass(OString(), sal_True) << ", pTypeName,\n";
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list