[Libreoffice-commits] core.git: dbaccess/source include/sfx2 sc/source sfx2/source sw/source

Noel Grandin noel at peralex.com
Mon Apr 4 13:41:39 UTC 2016


 dbaccess/source/ui/dlg/dbadmin.cxx |    2 +-
 include/sfx2/progress.hxx          |    4 ++--
 include/sfx2/tabdlg.hxx            |    1 -
 include/sfx2/viewfrm.hxx           |    4 ----
 sc/source/core/tool/progress.cxx   |    2 +-
 sfx2/source/appl/appopen.cxx       |    4 ++--
 sfx2/source/bastyp/progress.cxx    |   13 +++++--------
 sfx2/source/dialog/tabdlg.cxx      |    3 +--
 sfx2/source/doc/iframe.cxx         |    8 +++-----
 sfx2/source/view/impviewframe.hxx  |    4 ++--
 sw/source/uibase/app/mainwn.cxx    |    4 +---
 11 files changed, 18 insertions(+), 31 deletions(-)

New commits:
commit afd3ab436bf920ef80c642891e9e63133fca41a0
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Apr 4 10:33:59 2016 +0200

    loplugin:constantparam in sfx2
    
    Change-Id: I9a5a9fd1f4f43e0b7ef13d14979cb231f6aa9d46
    Reviewed-on: https://gerrit.libreoffice.org/23801
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index 6ba1e07..b6abd36 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -159,7 +159,7 @@ void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName
         case  ::dbaccess::DST_USERDEFINE10:
             {
                 OUString aTitle(ModuleRes(STR_PAGETITLE_ADVANCED));
-                AddTabPage(PAGE_USERDRIVER, aTitle, ODriversSettings::CreateUser, nullptr, false, 1);
+                AddTabPage(PAGE_USERDRIVER, aTitle, ODriversSettings::CreateUser, nullptr, 1);
                 m_aCurrentDetailPages.push(PAGE_USERDRIVER);
             }
             break;
diff --git a/include/sfx2/progress.hxx b/include/sfx2/progress.hxx
index ba76384..60729cc 100644
--- a/include/sfx2/progress.hxx
+++ b/include/sfx2/progress.hxx
@@ -42,8 +42,8 @@ class SFX2_DLLPUBLIC SfxProgress
 public:
                             SfxProgress( SfxObjectShell* pObjSh,
                                          const rtl::OUString& rText,
-                                         sal_uIntPtr nRange, bool bAllDocs = false,
-                                         bool bWait = true );
+                                         sal_uIntPtr nRange,
+                                         bool bWait = true);
     virtual                 ~SfxProgress();
 
     bool                    SetStateText( sal_uIntPtr nVal, const rtl::OUString &rVal );
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index b328ccb..c4397fc 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -136,7 +136,6 @@ public:
                                     const OUString &rRiderText,
                                     CreateTabPage pCreateFunc,      // != 0
                                     GetTabPageRanges pRangesFunc,   // can be 0
-                                    bool bItemsOnDemand = false,
                                     sal_uInt16 nPos = TAB_APPEND);
 
     void                AddTabPage( sal_uInt16 nId,
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 2f0ec16..d02b56b 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -283,10 +283,6 @@ public:
                                 SfxPoolItem( 0 ),
                                 pFrame( pViewFrame)
                             {}
-                            SfxViewFrameItem( sal_uInt16 nWhichId, SfxViewFrame *pViewFrame ):
-                                SfxPoolItem( nWhichId ),
-                                pFrame( pViewFrame)
-                            {}
 
     virtual bool            operator==( const SfxPoolItem& ) const override;
     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = nullptr ) const override;
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx
index 789590e..7040238 100644
--- a/sc/source/core/tool/progress.cxx
+++ b/sc/source/core/tool/progress.cxx
@@ -107,7 +107,7 @@ ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
     }
     else
     {
-        pProgress = new SfxProgress( pObjSh, rText, nRange, false/*bAllDocs*/, bWait );
+        pProgress = new SfxProgress( pObjSh, rText, nRange, bWait );
         pGlobalProgress = pProgress;
         nGlobalRange = nRange;
         nGlobalPercent = 0;
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 9500ceb..9a685a0 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -1015,7 +1015,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
             if ( !pView )
                 pView = SfxViewFrame::Current();
             pView->GetViewShell()->JumpToMark( aFileName.copy(1) );
-            rReq.SetReturnValue( SfxViewFrameItem( 0, pView ) );
+            rReq.SetReturnValue( SfxViewFrameItem( pView ) );
             return;
         }
 
@@ -1093,7 +1093,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
             SfxObjectShell* pSh = pCntrFrame->GetCurrentDocument();
             DBG_ASSERT( pSh, "Controller without ObjectShell ?!" );
 
-            rReq.SetReturnValue( SfxViewFrameItem( 0, pCntrFrame->GetCurrentViewFrame() ) );
+            rReq.SetReturnValue( SfxViewFrameItem( pCntrFrame->GetCurrentViewFrame() ) );
 
             if ( bHidden )
                 pSh->RestoreNoDelete();
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 644724f..201bc06 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -56,7 +56,7 @@ struct SfxProgress_Impl
     sal_uIntPtr             nMax;
     clock_t                 nCreate;
     clock_t                 nNextReschedule;
-    bool                    bLocked, bAllDocs;
+    bool                    bLocked;
     bool                    bWaitMode;
     bool                    bAllowRescheduling;
     bool                    bRunning;
@@ -74,8 +74,8 @@ struct SfxProgress_Impl
 
 void SfxProgress_Impl::Enable_Impl()
 {
-    SfxObjectShell* pDoc = bAllDocs ? nullptr : static_cast<SfxObjectShell*>(xObjSh);
-    SfxViewFrame *pFrame= SfxViewFrame::GetFirst(pDoc);
+    SfxObjectShell* pDoc = static_cast<SfxObjectShell*>(xObjSh);
+    SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pDoc);
     while ( pFrame )
     {
         pFrame->Enable(true/*bEnable*/);
@@ -99,7 +99,6 @@ SfxProgress_Impl::SfxProgress_Impl( const OUString &/*rTitle*/ )
     , nCreate(0)
     , nNextReschedule(0)
     , bLocked(false)
-    , bAllDocs(false)
     , bWaitMode(false)
     , bAllowRescheduling(false)
     , bRunning(false)
@@ -122,7 +121,6 @@ SfxProgress::SfxProgress
 
     sal_uIntPtr         nRange, /* Max value for range  */
 
-    bool                bAll,    /* Disable all documents or only the document of the ViewFram */
     bool                bWait    /* Activate the wait-Pointer initially (TRUE) */
 )
 
@@ -153,7 +151,6 @@ SfxProgress::SfxProgress
         "sfx.bastyp",
         "SfxProgress: created for '" << rText << "' at " << pImp->nCreate
             << "ds");
-    pImp->bAllDocs = bAll;
     pImp->pWorkWin = nullptr;
     pImp->pView = nullptr;
 
@@ -333,7 +330,7 @@ void SfxProgress::Resume()
 
         if ( pImp->bWaitMode )
         {
-            if ( pImp->xObjSh.Is() && !pImp->bAllDocs )
+            if ( pImp->xObjSh.Is() )
             {
                 for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pImp->xObjSh);
                         pFrame;
@@ -377,7 +374,7 @@ void SfxProgress::Suspend()
             pImp->xStatusInd->reset();
         }
 
-        if ( pImp->xObjSh.Is() && !pImp->bAllDocs )
+        if ( pImp->xObjSh.Is() )
         {
             for ( SfxViewFrame *pFrame =
                     SfxViewFrame::GetFirst(pImp->xObjSh);
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 1780f84..0e0cab9 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -631,7 +631,6 @@ void SfxTabDialog::AddTabPage
     const OUString& rRiderText,
     CreateTabPage pCreateFunc,
     GetTabPageRanges pRangesFunc,
-    bool bItemsOnDemand,
     sal_uInt16 nPos
 )
 {
@@ -639,7 +638,7 @@ void SfxTabDialog::AddTabPage
                 "Double Page-Ids in the Tabpage" );
     m_pTabCtrl->InsertPage( nId, rRiderText, nPos );
     pImpl->aData.push_back(
-        new Data_Impl( nId, pCreateFunc, pRangesFunc, bItemsOnDemand ) );
+        new Data_Impl( nId, pCreateFunc, pRangesFunc, false/*bItemsOnDemand*/ ) );
 }
 
 void SfxTabDialog::RemoveTabPage( sal_uInt16 nId )
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 4b2d79d..32c312e 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -107,13 +107,11 @@ public:
 class IFrameWindow_Impl : public vcl::Window
 {
 public:
-    IFrameWindow_Impl( vcl::Window *pParent,
-                       bool bHasBorder,
-                       WinBits nWinBits = 0 );
+    IFrameWindow_Impl( vcl::Window *pParent, bool bHasBorder );
 };
 
-IFrameWindow_Impl::IFrameWindow_Impl( vcl::Window *pParent, bool bHasBorder, WinBits nWinBits )
-    : Window( pParent, nWinBits | WB_CLIPCHILDREN | WB_NODIALOGCONTROL | WB_DOCKBORDER )
+IFrameWindow_Impl::IFrameWindow_Impl( vcl::Window *pParent, bool bHasBorder )
+    : Window( pParent, WB_CLIPCHILDREN | WB_NODIALOGCONTROL | WB_DOCKBORDER )
 {
     if ( !bHasBorder )
         SetBorderStyle( WindowBorderStyle::NOBORDER );
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index d9c5e9b..6b128ea 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -79,8 +79,8 @@ class SfxFrameViewWindow_Impl : public vcl::Window
     SfxViewFrame*   pFrame;
 
 public:
-                        SfxFrameViewWindow_Impl( SfxViewFrame* p, vcl::Window& rParent, WinBits nBits=0 ) :
-                            Window( &rParent, nBits | WB_CLIPCHILDREN ),
+                        SfxFrameViewWindow_Impl( SfxViewFrame* p, vcl::Window& rParent ) :
+                            Window( &rParent, WB_CLIPCHILDREN ),
                             pFrame( p )
                         {
                             p->GetFrame().GetWindow().SetBorderStyle( WindowBorderStyle::NOBORDER );
diff --git a/sw/source/uibase/app/mainwn.cxx b/sw/source/uibase/app/mainwn.cxx
index f842fb4..b61d681 100644
--- a/sw/source/uibase/app/mainwn.cxx
+++ b/sw/source/uibase/app/mainwn.cxx
@@ -66,9 +66,7 @@ void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue,
             pProgress = new SwProgress;
             pProgress->pProgress = new SfxProgress( pDocShell,
                                                     SW_RESSTR(nMessResId),
-                                                    nEndValue - nStartValue,
-                                                    false,
-                                                    true );
+                                                    nEndValue - nStartValue );
             pProgress->nStartCount = 1;
             pProgress->pDocShell = pDocShell;
             pProgressContainer->insert( pProgressContainer->begin(), pProgress );


More information about the Libreoffice-commits mailing list