[Libreoffice-commits] .: 24 commits - basegfx/source connectivity/source dbaccess/source desktop/source framework/source hwpfilter/source l10ntools/source sal/osl sal/workben scripting/source sc/source sdext/source sd/source svtools/source testtools/source tools/source ucb/source vcl/win xmerge/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Tue Feb 21 11:57:32 PST 2012


 basegfx/source/polygon/b2dpolypolygoncutter.cxx                                 |   24 ----------
 connectivity/source/drivers/postgresql/pq_tools.cxx                             |    3 -
 dbaccess/source/filter/xml/xmlStyleImport.cxx                                   |    4 -
 desktop/source/deployment/gui/dp_gui_updatedialog.cxx                           |    2 
 framework/source/helper/titlebarupdate.cxx                                      |    2 
 framework/source/layoutmanager/uielement.cxx                                    |    4 -
 framework/source/uielement/statusbarmanager.cxx                                 |   17 ++-----
 framework/source/uielement/toolbarsmenucontroller.cxx                           |    2 
 hwpfilter/source/hwpreader.cxx                                                  |    5 --
 l10ntools/source/export.cxx                                                     |    6 --
 l10ntools/source/help/HelpLinker.cxx                                            |    1 
 sal/osl/unx/module.c                                                            |    3 -
 sal/workben/clipboardwben/testcopy/cbcpytest.cxx                                |    1 
 sc/source/core/data/dptabres.cxx                                                |    7 --
 sc/source/filter/excel/excform.cxx                                              |    4 -
 scripting/source/provider/ScriptImpl.hxx                                        |    7 +-
 scripting/source/runtimemgr/ScriptNameResolverImpl.cxx                          |    2 
 scripting/source/runtimemgr/ScriptNameResolverImpl.hxx                          |    9 +--
 scripting/source/runtimemgr/ScriptRuntimeManager.hxx                            |   11 ++--
 scripting/source/runtimemgr/StorageBridge.hxx                                   |    7 +-
 scripting/source/runtimemgr/StorageBridgeFactory.hxx                            |    3 -
 sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx |    2 
 sdext/source/presenter/PresenterPaneBorderPainter.cxx                           |    2 
 svtools/source/control/toolbarmenu.cxx                                          |   16 +-----
 testtools/source/performance/ubtest.cxx                                         |    1 
 tools/source/fsys/dirent.cxx                                                    |    1 
 ucb/source/ucp/webdav/LockSequence.cxx                                          |    2 
 vcl/win/source/window/salframe.cxx                                              |    5 --
 xmerge/source/activesync/XMergeFilter.cpp                                       |    2 
 29 files changed, 37 insertions(+), 118 deletions(-)

New commits:
commit 41e8fe179f10f224433b26daba105ee92c661ac4
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 20:47:54 2012 +0100

    WaE: remove variable scope

diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 00c5a0c..56aed72 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -862,11 +862,12 @@ void fillAttnum2attnameMap(
 ::rtl::OString extractSingleTableFromSelect( const OStringVector &vec )
 {
     rtl::OString ret;
-    size_t token = 0;
 
     if( 0 == rtl_str_shortenedCompareIgnoreAsciiCase_WithLength(
             vec[0].pData->buffer, vec[0].pData->length, "select" , 6 , 6 ) )
     {
+        size_t token = 0;
+
         for( token = 1; token < vec.size() ; token ++ )
         {
             if( 0 == rtl_str_shortenedCompareIgnoreAsciiCase_WithLength(
commit a3bf3451a9c7859848d02bc56a616df3f9adf0a4
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 20:42:17 2012 +0100

    WaE: arrayIndexOutOfBounds

diff --git a/testtools/source/performance/ubtest.cxx b/testtools/source/performance/ubtest.cxx
index 87394c2..a8ca0e0 100644
--- a/testtools/source/performance/ubtest.cxx
+++ b/testtools/source/performance/ubtest.cxx
@@ -1121,7 +1121,6 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs )
                 aArgs[6].pData,
                 aArgs[7].pData,
                 aArgs[8].pData,
-                aArgs[9].pData,
             };
 
             out( "\n> executing: \"uno" );
commit 9d5bcff31cfc511bfead51ee1a743300c520b243
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 20:32:24 2012 +0100

    WaE: unreadVariable

diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c
index b88080b..ea41a7e 100644
--- a/sal/osl/unx/module.c
+++ b/sal/osl/unx/module.c
@@ -55,7 +55,6 @@ static sal_Bool getModulePathFromAddress(void * address, rtl_String ** path) {
 /* Bah, we do want to use dladdr here also on iOS, I think? */
 #if !defined(NO_DL_FUNCTIONS) || defined(IOS)
 #if defined(AIX)
-    int i;
     int size = 4 * 1024;
     char *buf, *filename=NULL;
     struct ld_info *lp;
@@ -63,7 +62,7 @@ static sal_Bool getModulePathFromAddress(void * address, rtl_String ** path) {
     if ((buf = malloc(size)) == NULL)
         return result;
 
-    while((i = loadquery(L_GETINFO, buf, size)) == -1 && errno == ENOMEM)
+    while(loadquery(L_GETINFO, buf, size) == -1 && errno == ENOMEM)
     {
         size += 4 * 1024;
         if ((buf = malloc(size)) == NULL)
commit a055963389661e252b4a39dd1d7e5f566bd954bb
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 20:24:07 2012 +0100

    WaE: unreadVariable

diff --git a/xmerge/source/activesync/XMergeFilter.cpp b/xmerge/source/activesync/XMergeFilter.cpp
index 1811d1a..66223b0 100644
--- a/xmerge/source/activesync/XMergeFilter.cpp
+++ b/xmerge/source/activesync/XMergeFilter.cpp
@@ -338,8 +338,6 @@ TCHAR* CXMergeFilter::GetJavaBaseDir()
     HKEY hKey = NULL;
     HKEY hDataKey = NULL;
 
-    TCHAR szClassName[_MAX_PATH] = "\0";
-    TCHAR szKeyName[_MAX_PATH]   = "\0";
     TCHAR szCurrentJava[_MAX_PATH] = "\0";
     DWORD dwClassName            = _MAX_PATH;
     DWORD dwKeyName              = _MAX_PATH;
commit 85596c5cf63d5af6116eb87f9a653e83366c43c1
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 20:18:00 2012 +0100

    WaE: unreadVariable

diff --git a/sal/workben/clipboardwben/testcopy/cbcpytest.cxx b/sal/workben/clipboardwben/testcopy/cbcpytest.cxx
index e1c5885..7e84811 100644
--- a/sal/workben/clipboardwben/testcopy/cbcpytest.cxx
+++ b/sal/workben/clipboardwben/testcopy/cbcpytest.cxx
@@ -239,7 +239,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
     {
         case WM_COMMAND:
             wmId    = LOWORD(wParam);
-            int wmEvent = HIWORD(wParam);
             // Menüauswahlen analysieren:
             switch( wmId )
             {
commit 46a4ccb02e0cc1f4b10df1966e1dbf538838c1ae
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 20:09:47 2012 +0100

    WaE: unreadVariable

diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index 8cbc214..eea87d5 100644
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -539,7 +539,6 @@ void HelpLinker::link() throw( HelpProcessingException )
             throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
         }
 
-        const std::string documentBaseId = streamTable.document_id;
         std::string documentPath = streamTable.document_path;
         if (documentPath.find("/") == 0)
             documentPath = documentPath.substr(1);
commit e6773662df70742db888c006db60b5c9a1ad9f5d
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 20:04:35 2012 +0100

    WaE: duplicateBranch

diff --git a/sdext/source/presenter/PresenterPaneBorderPainter.cxx b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
index 4ddcf74..5d8ec96 100644
--- a/sdext/source/presenter/PresenterPaneBorderPainter.cxx
+++ b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
@@ -877,8 +877,6 @@ RendererPaneStyle::RendererPaneStyle (
             meFontAnchor = AnchorLeft;
         else if (sAnchor == OUString(RTL_CONSTASCII_USTRINGPARAM("Right")))
             meFontAnchor = AnchorRight;
-        else if (sAnchor == OUString(RTL_CONSTASCII_USTRINGPARAM("Center")))
-            meFontAnchor = AnchorCenter;
         else
             meFontAnchor = AnchorCenter;
 
commit e001ca128010317f30f88def27625768043b1fa7
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 20:03:59 2012 +0100

    WaE: duplicateBranch

diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index f81a92f..54cc3ea 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -917,8 +917,6 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly )
                 dp_misc::DescriptionInfoset aInfoset( m_context, aUpdData.aUpdateInfo );
                 aItem[1] = aInfoset.getVersion();
             }
-            else if ( p->m_eKind == DISABLED_UPDATE )
-                continue;
             else
                 continue;
 
commit cbdcc55b6d18d8a8c79441e4604fac90423a0d22
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:59:18 2012 +0100

    WaE: duplicateBranch

diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 6cc561a..2301201 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -119,8 +119,6 @@ sal_Bool CompareToolBarEntry( const ToolBarEntry& aOne, const ToolBarEntry& aTwo
 
     if ( nComp < 0 )
         return sal_True;
-    else if ( nComp > 0 )
-        return sal_False;
     else
         return sal_False;
 }
commit 7dc7a33a30efad050d5619c8f51622fe32e5e1b4
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:58:13 2012 +0100

    WaE: duplicateBranch

diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx
index 4d44a70..9463ebe 100644
--- a/dbaccess/source/filter/xml/xmlStyleImport.cxx
+++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx
@@ -309,10 +309,6 @@ sal_Int32 OTableStylesContext::GetIndex(const sal_Int16 nContextID)
                 GetImportPropertyMapper(XML_STYLE_FAMILY_TABLE_TABLE)->getPropertySetMapper()->FindEntryIndex(nContextID);
         return nMasterPageNameIndex;
     }
-    else if ( nContextID == CTF_DB_ISVISIBLE )
-    {
-        return -1;
-    }
     else
         return -1;
 }
commit a38828d33c0b2d4fe1d353b5bec65b5ecefec8d1
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:57:44 2012 +0100

    WaE: duplicateBranch

diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index d027a1a..4c1659b 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -222,8 +222,6 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
                   aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.TableDesign")) ||
                   aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.DataSourceBrowser")) )
             sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("base"));
-        else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.frame.StartModule")) )
-            sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("startcenter"));
         else
             sDesktopName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("startcenter"));
         sApplicationID = utl::ConfigManager::getProductName().
commit c94460d43cc4be450c4bee03b39328491a7f1d23
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:57:05 2012 +0100

    WaE: duplicateBranch and unused var

diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index a527fa7..c5d2228 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -895,7 +895,6 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
     sal_uInt16          nUINT16;
     sal_uInt8           nByte;
     sal_Bool            bError = false;
-    sal_Bool            bArrayFormula = false;
     const sal_Bool      bRangeName = eFT == FT_RangeName;
     const sal_Bool      bSharedFormula = eFT == FT_SharedFormula;
     const sal_Bool      bRNorSF = bRangeName || bSharedFormula;
@@ -931,7 +930,6 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
             case 0x01: // Array Formula                         [325    ]
                        // Array Formula or Shared Formula       [    277]
                 nIgnore = (meBiff == EXC_BIFF2) ? 3 : 4;
-                bArrayFormula = sal_True;
                 break;
             case 0x02: // Data Table                            [325 277]
                 nIgnore = (meBiff == EXC_BIFF2) ? 3 : 4;
@@ -1302,8 +1300,6 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
         eRet = ConvErrCount;
     else if( bExternName )
         eRet = ConvErrExternal;
-    else if( bArrayFormula )
-        eRet = ConvOK;
     else
         eRet = ConvOK;
 
commit 0f42e7c83369d8e13e4770ed4ad18d50a1c0bd5b
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:48:28 2012 +0100

    WaE: duplicateBranch

diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 55630a8..5e82f5a 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -4745,10 +4745,7 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
             clrPrevText = SetTextColor( pDI->hDC, GetSysColor( fSelected ? COLOR_HIGHLIGHTTEXT : COLOR_MENUTEXT ) );
 
         DWORD colBackground = GetSysColor( fSelected ? COLOR_HIGHLIGHT : COLOR_MENU );
-        if ( fSelected )
-            clrPrevBkgnd = SetBkColor( pDI->hDC, colBackground );
-        else
-            clrPrevBkgnd = SetBkColor( pDI->hDC, colBackground );
+        clrPrevBkgnd = SetBkColor( pDI->hDC, colBackground );
 
         hbrOld = (HBRUSH)SelectObject( pDI->hDC, CreateSolidBrush( GetBkColor( pDI->hDC ) ) );
 
commit 5f78d1d9ac9850f8a9fd25d5189b226e90a49bb2
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:47:38 2012 +0100

    WaE: duplicateBranch

diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
index 6689c7b..f2b2353 100644
--- a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
@@ -343,8 +343,6 @@ bool ConfigurationControllerResourceManager::ResourceComparator::operator() (
         return rxId1->compareTo(rxId2)<0;
     else if (rxId1.is())
         return true;
-    else if (rxId2.is())
-        return false;
     else
         return false;
 }
commit 45ad6029e1422c659e627bb30ecda50ccb61060c
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:46:36 2012 +0100

    WaE: duplicateBranch and use sal_False

diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 5c4039a..7d98440 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -174,12 +174,7 @@ static sal_Bool lcl_IsLess( const ScDPDataMember* pDataMember1, const ScDPDataMe
     sal_Bool bError1 = pAgg1 && pAgg1->HasError();
     sal_Bool bError2 = pAgg2 && pAgg2->HasError();
     if ( bError1 )
-    {
-        if ( bError2 )
-            return false;       // equal
-        else
-            return false;       // errors are always sorted at the end
-    }
+        return sal_False;       // equal
     else if ( bError2 )
         return sal_True;            // errors are always sorted at the end
     else
commit 4b91a8fb34e4be7c3bcb64c50b806a432b79d15d
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:44:44 2012 +0100

    WaE: duplicateBranch

diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index de23486..d09344c 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -1015,7 +1015,7 @@ void ToolbarMenu::MouseMove( const MouseEvent& rMEvt )
 
 // --------------------------------------------------------------------
 
-void ToolbarMenu::implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown )
+void ToolbarMenu::implHighlightEntry( const MouseEvent& rMEvt, bool /*bMBDown*/ )
 {
     long nMouseY = rMEvt.GetPosPixel().Y();
     Size aOutSz = GetOutputSizePixel();
@@ -1038,19 +1038,9 @@ void ToolbarMenu::implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown )
                 {
                     if ( ( nOldY <= nMouseY ) && ( nY > nMouseY ) )
                     {
-                        if( bMBDown )
+                        if( nEntry != mpImpl->mnHighlightedEntry )
                         {
-                            if( nEntry != mpImpl->mnHighlightedEntry )
-                            {
-                                implChangeHighlightEntry( nEntry );
-                            }
-                        }
-                        else
-                        {
-                            if ( nEntry != mpImpl->mnHighlightedEntry )
-                            {
-                                implChangeHighlightEntry( nEntry );
-                            }
+                            implChangeHighlightEntry( nEntry );
                         }
                         bHighlighted = true;
                     }
commit a2a2e45c3e11191b13edfe707543b063a639ab74
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:42:25 2012 +0100

    WaE: duplicateBranch

diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 5e977dc..19cd8ec 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -4364,10 +4364,7 @@ void HwpReader::makePictureDRAW(HWPDrawingObject *drawobj, Picture * hbox)
 
                     if (drawobj->u.freeform.npt > 2){
                               int n, i;
-                              if( bIsNatural == sal_True )
-                                  n = drawobj->u.freeform.npt;
-                              else
-                                  n = drawobj->u.freeform.npt ;
+                              n = drawobj->u.freeform.npt;
 
                               double *xarr = new double[n+1];
                               double *yarr = new double[n+1];
commit f9cac2a31dc0c797f35af082072676f3381e718f
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:40:32 2012 +0100

    WaE: duplicateBranch

diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 3c0bff9..60c4a73 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -1271,11 +1271,7 @@ void Export::InsertListEntry(const rtl::OString &rText, const rtl::OString &rLin
         (*pCurEntry)[ m_sListLang ] = rText;
 
     if ( Export::isSourceLanguage( m_sListLang ) ) {
-        if( nList == LIST_PAIRED ){
-            (*pCurEntry)[ SOURCE_LANGUAGE ] = rLine;
-        }
-        else
-            (*pCurEntry)[ SOURCE_LANGUAGE ] = rLine;
+        (*pCurEntry)[ SOURCE_LANGUAGE ] = rLine;
 
         pList->NewSourceLanguageListEntry();
     }
commit 4e83223da4b960e25a8afd818e8622ab12aa0d60
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:39:40 2012 +0100

    WaE: duplicateBranch

diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index 8745241..8675b01 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -233,17 +233,7 @@ namespace basegfx
                     if(aPrevA.equal(aPrevB))
                     {
                         // common edge in same direction
-                        if(aNextA.equal(aNextB))
-                        {
-                            // common edge in same direction continues
-                            return;
-                        }
-                        else
-                        {
-                            // common edge in same direction leave
-                            // action is done on enter
-                            return;
-                        }
+                        return;
                     }
                     else if(aPrevA.equal(aNextB))
                     {
@@ -359,17 +349,7 @@ namespace basegfx
                     if(rPrevA.equal(rPrevB))
                     {
                         // common edge in same direction
-                        if(rNextA.equal(rNextB))
-                        {
-                            // common edge in same direction continues
-                            return;
-                        }
-                        else
-                        {
-                            // common edge in same direction leave
-                            // action is done on enter
-                            return;
-                        }
+                        return;
                     }
                     else if(rPrevA.equal(rNextB))
                     {
commit 155f694da8b1db4b3199c9b545d6bbaa071b4c40
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:37:52 2012 +0100

    WaE: duplicateBranch

diff --git a/framework/source/layoutmanager/uielement.cxx b/framework/source/layoutmanager/uielement.cxx
index a2796c0..faf282a 100644
--- a/framework/source/layoutmanager/uielement.cxx
+++ b/framework/source/layoutmanager/uielement.cxx
@@ -92,8 +92,6 @@ namespace framework
                         {
                             if ( m_bUserActive && !aUIElement.m_bUserActive )
                                 return sal_True;
-                            else if ( !m_bUserActive && aUIElement.m_bUserActive )
-                                return sal_False;
                             else
                                 return sal_False;
                         }
@@ -112,8 +110,6 @@ namespace framework
                         {
                             if ( m_bUserActive && !aUIElement.m_bUserActive )
                                 return sal_True;
-                            else if ( !m_bUserActive && aUIElement.m_bUserActive )
-                                return sal_False;
                             else
                                 return sal_False;
                         }
commit 4853bc9ac54243a65e82debfad45f99b0e51913e
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:28:52 2012 +0100

    WaE: Same expression on both sides of '||'

diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 1a60e0c..1bf8122 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -1694,7 +1694,6 @@ sal_Bool DirEntry::MakeDir( sal_Bool bSloppy ) const
 
                 // das Dir selbst erzeugen
                 if ( pNewDir->eFlag == FSYS_FLAG_ABSROOT ||
-                         pNewDir->eFlag == FSYS_FLAG_ABSROOT ||
                          pNewDir->eFlag == FSYS_FLAG_VOLUME )
                         return sal_True;
                 else
commit d66991e1f50a85e312562ae71f2407556d7ba330
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 19:20:54 2012 +0100

    WaE: Same expression on both sides of '||'

diff --git a/ucb/source/ucp/webdav/LockSequence.cxx b/ucb/source/ucp/webdav/LockSequence.cxx
index 464245b..3b31b1f 100644
--- a/ucb/source/ucp/webdav/LockSequence.cxx
+++ b/ucb/source/ucp/webdav/LockSequence.cxx
@@ -298,7 +298,7 @@ extern "C" int LockSequence_endelement_callback(
             break;
 
         case STATE_ACTIVELOCK:
-            if ( !pCtx->hasLockType || !pCtx->hasLockType || !pCtx->hasDepth )
+            if ( !pCtx->hasLockType || !pCtx->hasDepth )
                 return 1; // abort
             break;
 
commit 6998c635b06dca7b5a335c71b74ed0862e9d7910
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 14:20:32 2012 +0100

    expand and remove css_ui macro

diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 9fd22cd..95ed4c1 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -72,9 +72,6 @@ using namespace ::com::sun::star;
 #ifndef css
 #define css ::com::sun::star
 #endif
-#ifndef css_ui
-#define css_ui ::com::sun::star::ui
-#endif
 
 static const char HELPID_PREFIX[] = "helpid:";
 
@@ -93,23 +90,23 @@ static sal_uInt16 impl_convertItemStyleToItemBits( sal_Int16 nStyle )
 {
     sal_uInt16 nItemBits( 0 );
 
-    if (( nStyle & css_ui::ItemStyle::ALIGN_RIGHT ) == css_ui::ItemStyle::ALIGN_RIGHT )
+    if (( nStyle & ::com::sun::star::ui::ItemStyle::ALIGN_RIGHT ) == ::com::sun::star::ui::ItemStyle::ALIGN_RIGHT )
         nItemBits |= SIB_RIGHT;
-    else if ( nStyle & css_ui::ItemStyle::ALIGN_LEFT )
+    else if ( nStyle & ::com::sun::star::ui::ItemStyle::ALIGN_LEFT )
         nItemBits |= SIB_LEFT;
     else
         nItemBits |= SIB_CENTER;
 
-    if (( nStyle & css_ui::ItemStyle::DRAW_FLAT ) == css_ui::ItemStyle::DRAW_FLAT )
+    if (( nStyle & ::com::sun::star::ui::ItemStyle::DRAW_FLAT ) == ::com::sun::star::ui::ItemStyle::DRAW_FLAT )
         nItemBits |= SIB_FLAT;
-    else if ( nStyle & css_ui::ItemStyle::DRAW_OUT3D )
+    else if ( nStyle & ::com::sun::star::ui::ItemStyle::DRAW_OUT3D )
         nItemBits |= SIB_OUT;
     else
         nItemBits |= SIB_IN;
 
-    if (( nStyle & css_ui::ItemStyle::AUTO_SIZE ) == css_ui::ItemStyle::AUTO_SIZE )
+    if (( nStyle & ::com::sun::star::ui::ItemStyle::AUTO_SIZE ) == ::com::sun::star::ui::ItemStyle::AUTO_SIZE )
         nItemBits |= SIB_AUTOSIZE;
-    if ( nStyle & css_ui::ItemStyle::OWNER_DRAW )
+    if ( nStyle & ::com::sun::star::ui::ItemStyle::OWNER_DRAW )
         nItemBits |= SIB_USERDRAW;
 
     return nItemBits;
@@ -485,7 +482,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc
         sal_Int16                               nOffset( 0 );
         sal_Int16                               nStyle( 0 );
         sal_Int16                               nWidth( 0 );
-        sal_uInt16                              nType( css_ui::ItemType::DEFAULT );
+        sal_uInt16                              nType( ::com::sun::star::ui::ItemType::DEFAULT );
 
         try
         {
commit 8361d62aa9d497b60c575ff04ff1f88847e84863
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Tue Feb 21 14:18:00 2012 +0100

    expand and remove dcsssf macro

diff --git a/scripting/source/provider/ScriptImpl.hxx b/scripting/source/provider/ScriptImpl.hxx
index be90c11..b49f245 100644
--- a/scripting/source/provider/ScriptImpl.hxx
+++ b/scripting/source/provider/ScriptImpl.hxx
@@ -45,11 +45,10 @@ namespace func_provider
 {
 // for simplification
 #define css ::com::sun::star
-#define dcsssf ::drafts::com::sun::star::script::framework
 
 
 class ScriptImpl :
-            public ::cppu::WeakImplHelper1 < dcsssf::provider::XScript >
+            public ::cppu::WeakImplHelper1 < ::drafts::com::sun::star::script::framework::provider::XScript >
 {
 
 public:
@@ -60,7 +59,7 @@ public:
     */
     ScriptImpl(
         const css::uno::Reference< css::beans::XPropertySet > & scriptingContext,
-        const css::uno::Reference< dcsssf::runtime::XScriptInvocation > & runtimeMgr,
+        const css::uno::Reference< ::drafts::com::sun::star::script::framework::runtime::XScriptInvocation > & runtimeMgr,
         const ::rtl::OUString& scriptURI )
     throw ( css::uno::RuntimeException );
 
@@ -102,7 +101,7 @@ public:
 
 private:
     css::uno::Reference< css::beans::XPropertySet > m_XScriptingContext;
-    css::uno::Reference < dcsssf::runtime::XScriptInvocation > m_RunTimeManager;
+    css::uno::Reference < ::drafts::com::sun::star::script::framework::runtime::XScriptInvocation > m_RunTimeManager;
     ::rtl::OUString m_ScriptURI;
 
     /* copy ctor disabled, i.e. not defined */
diff --git a/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx b/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
index 1ee7580..68f6001 100644
--- a/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
+++ b/scripting/source/runtimemgr/ScriptNameResolverImpl.cxx
@@ -502,7 +502,7 @@ const ::rtl::OUString & permissionURI ) SAL_THROW ( ( RuntimeException, css::sec
         Reference< XInterface > xInterface( m_xContext->getValueByName(
                     OUString::createFromAscii( SCRIPTSTORAGEMANAGER_SERVICE ) ), UNO_QUERY_THROW );
         // check that we have permissions for this storage
-        Reference< dcsssf::security::XScriptSecurity > xScriptSecurity( xInterface, UNO_QUERY_THROW );
+        Reference< ::drafts::com::sun::star::script::framework::security::XScriptSecurity > xScriptSecurity( xInterface, UNO_QUERY_THROW );
         scripting_constants::ScriptingConstantsPool& scriptingConstantsPool =
                 scripting_constants::ScriptingConstantsPool::instance();
         // if we dealing with a document storage (ie. not user or share
diff --git a/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx b/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx
index 09611e4..4a068ed 100644
--- a/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx
+++ b/scripting/source/runtimemgr/ScriptNameResolverImpl.hxx
@@ -45,10 +45,9 @@ namespace scripting_runtimemgr
 {
 // for simplification
 #define css ::com::sun::star
-#define dcsssf ::drafts::com::sun::star::script::framework
 
 class ScriptNameResolverImpl : public
-    ::cppu::WeakImplHelper1 < dcsssf::runtime::XScriptNameResolver >
+    ::cppu::WeakImplHelper1 < ::drafts::com::sun::star::script::framework::runtime::XScriptNameResolver >
 {
 public:
     /**********************************************
@@ -80,17 +79,17 @@ public:
      @exception NullPointerException
      @return  the resolved XScriptURI
     */
-    css::uno::Reference < dcsssf::storage::XScriptInfo > SAL_CALL resolve(
+    css::uno::Reference < ::drafts::com::sun::star::script::framework::storage::XScriptInfo > SAL_CALL resolve(
         const ::rtl::OUString & scriptURI,
         css::uno::Any& invocationCtx )
         throw( css::script::CannotConvertException, css::lang::IllegalArgumentException,
            css::uno::RuntimeException );
 private:
-    css::uno::Reference < dcsssf::storage::XScriptInfo >
+    css::uno::Reference < ::drafts::com::sun::star::script::framework::storage::XScriptInfo >
     resolveURIFromStorageID( sal_Int32 sid, const rtl::OUString & docURI,
         const ::rtl::OUString & nameToResolve )
         SAL_THROW ( ( css::lang::IllegalArgumentException, css::uno::RuntimeException ) );
-    css::uno::Reference< dcsssf::storage::XScriptInfoAccess >
+    css::uno::Reference< ::drafts::com::sun::star::script::framework::storage::XScriptInfoAccess >
     getStorageInstance( sal_Int32 sid, const rtl::OUString & permissionURI)
         SAL_THROW ( ( css::uno::RuntimeException ) );
     ::rtl::OUString
diff --git a/scripting/source/runtimemgr/ScriptRuntimeManager.hxx b/scripting/source/runtimemgr/ScriptRuntimeManager.hxx
index 0358ce7..33fea58 100644
--- a/scripting/source/runtimemgr/ScriptRuntimeManager.hxx
+++ b/scripting/source/runtimemgr/ScriptRuntimeManager.hxx
@@ -48,14 +48,13 @@ namespace scripting_runtimemgr
 {
 // for simplification
 #define css ::com::sun::star
-#define dcsssf ::drafts::com::sun::star::script::framework
 
 /**
  * Class responsible for managing the various ScriptRuntime implementations.
  */
 class ScriptRuntimeManager : public
-    ::cppu::WeakImplHelper3< dcsssf::runtime::XScriptInvocation, css::lang::XServiceInfo,
-    dcsssf::runtime::XScriptNameResolver >
+    ::cppu::WeakImplHelper3< ::drafts::com::sun::star::script::framework::runtime::XScriptInvocation, css::lang::XServiceInfo,
+    ::drafts::com::sun::star::script::framework::runtime::XScriptNameResolver >
 {
 public:
     explicit ScriptRuntimeManager(
@@ -128,17 +127,17 @@ public:
      same as the documentStorageID.
      * @return the resolved URI
      */
-    virtual css::uno::Reference< dcsssf::storage::XScriptInfo > SAL_CALL resolve(
+    virtual css::uno::Reference< ::drafts::com::sun::star::script::framework::storage::XScriptInfo > SAL_CALL resolve(
         const ::rtl::OUString& scriptUri,
         css::uno::Any& invocationCtx )
         throw( css::lang::IllegalArgumentException, css::script::CannotConvertException,
            css::uno::RuntimeException );
 
 private:
-    css::uno::Reference< dcsssf::runtime::XScriptInvocation > SAL_CALL getScriptRuntime(
+    css::uno::Reference< ::drafts::com::sun::star::script::framework::runtime::XScriptInvocation > SAL_CALL getScriptRuntime(
         const css::uno::Reference< css::uno::XInterface > & scriptInfo )
         throw( css::uno::RuntimeException );
-    css::uno::Reference< dcsssf::runtime::XScriptNameResolver > SAL_CALL getScriptNameResolver()
+    css::uno::Reference< ::drafts::com::sun::star::script::framework::runtime::XScriptNameResolver > SAL_CALL getScriptNameResolver()
         throw( css::uno::RuntimeException );
 
     css::uno::Reference< css::uno::XComponentContext > m_xContext;
diff --git a/scripting/source/runtimemgr/StorageBridge.hxx b/scripting/source/runtimemgr/StorageBridge.hxx
index 052102d..153d174 100644
--- a/scripting/source/runtimemgr/StorageBridge.hxx
+++ b/scripting/source/runtimemgr/StorageBridge.hxx
@@ -40,9 +40,8 @@ namespace scripting_runtimemgr
 {
 // for simplification
 #define css ::com::sun::star
-#define dcsssf ::drafts::com::sun::star::script::framework
 
-class StorageBridge : public ::cppu::WeakImplHelper1< dcsssf::storage::XScriptInfoAccess >
+class StorageBridge : public ::cppu::WeakImplHelper1< ::drafts::com::sun::star::script::framework::storage::XScriptInfoAccess >
 {
     friend class StorageBridgeFactory;
 public:
@@ -57,7 +56,7 @@ public:
      * @return XScriptURI
      *      The URIs of the implementations
      */
-    virtual css::uno::Sequence< css::uno::Reference< dcsssf::storage::XScriptInfo > >
+    virtual css::uno::Sequence< css::uno::Reference< ::drafts::com::sun::star::script::framework::storage::XScriptInfo > >
         SAL_CALL getImplementations(
             const ::rtl::OUString& queryURI )
         throw ( css::lang::IllegalArgumentException,
@@ -78,7 +77,7 @@ private:
 
     void initStorage() throw ( css::uno::RuntimeException );
     css::uno::Reference< css::uno::XComponentContext > m_xContext;
-    css::uno::Reference< dcsssf::storage::XScriptInfoAccess > m_xScriptInfoAccess;
+    css::uno::Reference< ::drafts::com::sun::star::script::framework::storage::XScriptInfoAccess > m_xScriptInfoAccess;
     sal_Int32 m_sid;
 };
 }
diff --git a/scripting/source/runtimemgr/StorageBridgeFactory.hxx b/scripting/source/runtimemgr/StorageBridgeFactory.hxx
index 591fe6d..35f774d 100644
--- a/scripting/source/runtimemgr/StorageBridgeFactory.hxx
+++ b/scripting/source/runtimemgr/StorageBridgeFactory.hxx
@@ -41,7 +41,6 @@ namespace scripting_runtimemgr
 {
 // for simplification
 #define css ::com::sun::star
-#define dcsssf ::drafts::com::sun::star::script::framework
 
 class StorageBridgeFactory
 {
@@ -49,7 +48,7 @@ class StorageBridgeFactory
 public:
     explicit StorageBridgeFactory(
         const css::uno::Reference < css::uno::XComponentContext > & xContext );
-    css::uno::Reference < dcsssf::storage::XScriptInfoAccess >
+    css::uno::Reference < ::drafts::com::sun::star::script::framework::storage::XScriptInfoAccess >
         getStorageInstance( sal_Int32 sid );
 private:
     StorageBridgeFactory(); // No definition for default ctor


More information about the Libreoffice-commits mailing list