[Libreoffice-commits] core.git: include/svx svx/source sw/source

Noel Grandin noel at peralex.com
Mon Apr 4 09:10:17 UTC 2016


 include/svx/ctredlin.hxx          |    2 +-
 include/svx/dbaexchange.hxx       |    1 -
 include/svx/dlgctrl.hxx           |    4 ++--
 include/svx/fillctrl.hxx          |    2 +-
 include/svx/fmtools.hxx           |    2 +-
 include/svx/gridctrl.hxx          |    2 +-
 include/svx/svdglue.hxx           |    2 +-
 include/svx/svdmodel.hxx          |    3 +--
 include/svx/svdmrkv.hxx           |    3 +--
 svx/source/dialog/ctredlin.cxx    |    4 ++--
 svx/source/dialog/dlgctrl.cxx     |    8 ++++----
 svx/source/fmcomp/dbaexchange.cxx |    3 +--
 svx/source/fmcomp/gridctrl.cxx    |    6 +++---
 svx/source/form/fmtools.cxx       |    4 ++--
 svx/source/svdraw/svddrgmt.cxx    |    2 +-
 svx/source/svdraw/svdmodel.cxx    |   12 ++++++------
 svx/source/svdraw/svdmrkv.cxx     |    4 ++--
 svx/source/svdraw/svdview.cxx     |    4 ++--
 svx/source/tbxctrls/fillctrl.cxx  |    4 ++--
 sw/source/uibase/dbui/dbtree.cxx  |    1 -
 20 files changed, 34 insertions(+), 39 deletions(-)

New commits:
commit b62e6b011a3c9a340353546b73ff2eda0e793215
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Apr 1 15:06:14 2016 +0200

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

diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index e0dcf18..01fe64a 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -265,7 +265,7 @@ public:
     // Methods for Calc {
     void            SetRefHdl( const Link<SvxTPFilter*,void>& rLink ) { aRefLink = rLink; }
 
-    void            Enable( bool bEnable = true, bool bChild = true );
+    void            Enable( bool bEnable = true );
     void            Disable();
     // } Methods for Calc
 };
diff --git a/include/svx/dbaexchange.hxx b/include/svx/dbaexchange.hxx
index 19fe21a..b76ad73 100644
--- a/include/svx/dbaexchange.hxx
+++ b/include/svx/dbaexchange.hxx
@@ -63,7 +63,6 @@ namespace svx
         OColumnTransferable(
              const OUString& _rDatasource
             ,const OUString& _rConnectionResource
-            ,const sal_Int32        _nCommandType
             ,const OUString& _rCommand
             ,const OUString& _rFieldName
             ,ColumnTransferFormatFlags  _nFormats
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 7ee7e53..cbbcb8f 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -108,9 +108,9 @@ protected:
     Point               GetApproxLogPtFromPixPt( const Point& rRoughPixelPoint ) const;
 public:
     SvxRectCtl( vcl::Window* pParent, RECT_POINT eRpt = RP_MM,
-                sal_uInt16 nBorder = 200, sal_uInt16 nCircle = 80, CTL_STYLE eStyle = CS_RECT );
+                sal_uInt16 nBorder = 200, sal_uInt16 nCircle = 80 );
     void SetControlSettings(RECT_POINT eRpt = RP_MM, sal_uInt16 nBorder = 200,
-        sal_uInt16 nCircle = 80, CTL_STYLE eStyle = CS_RECT);
+        sal_uInt16 nCircle = 80);
     virtual ~SvxRectCtl();
     virtual void dispose() override;
 
diff --git a/include/svx/fillctrl.hxx b/include/svx/fillctrl.hxx
index 5276d28..98a662c 100644
--- a/include/svx/fillctrl.hxx
+++ b/include/svx/fillctrl.hxx
@@ -88,7 +88,7 @@ private:
     virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
 
 public:
-    FillControl(vcl::Window* pParent, WinBits nStyle = 0);
+    FillControl(vcl::Window* pParent);
     virtual ~FillControl();
     virtual void dispose() override;
 
diff --git a/include/svx/fmtools.hxx b/include/svx/fmtools.hxx
index 4aa1fd6..48b296d 100644
--- a/include/svx/fmtools.hxx
+++ b/include/svx/fmtools.hxx
@@ -178,7 +178,7 @@ class SAL_WARN_UNUSED FmXDisposeMultiplexer : public ::cppu::WeakImplHelper1< cs
 
     virtual ~FmXDisposeMultiplexer();
 public:
-    FmXDisposeMultiplexer(FmXDisposeListener* _pListener, const css::uno::Reference< css::lang::XComponent>& _rxObject, sal_Int16 _nId = -1);
+    FmXDisposeMultiplexer(FmXDisposeListener* _pListener, const css::uno::Reference< css::lang::XComponent>& _rxObject);
 
 // css::lang::XEventListener
     virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException, std::exception) override;
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index 13fb9da..f4540571 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -181,7 +181,7 @@ public:
             RECORD_NEW
         };
 
-        NavigationBar(vcl::Window* pParent, WinBits nStyle = 0);
+        NavigationBar(vcl::Window* pParent);
         virtual ~NavigationBar();
         virtual void dispose() override;
 
diff --git a/include/svx/svdglue.hxx b/include/svx/svdglue.hxx
index bb91f9b..ed82bf5 100644
--- a/include/svx/svdglue.hxx
+++ b/include/svx/svdglue.hxx
@@ -77,7 +77,7 @@ class SVX_DLLPUBLIC SdrGluePoint {
     bool bUserDefined:1; // #i38892#
 public:
     SdrGluePoint(): nEscDir(SdrEscapeDirection::SMART),nId(0),nAlign(SdrAlign::NONE),bNoPercent(false),bReallyAbsolute(false),bUserDefined(true) {}
-    SdrGluePoint(const Point& rNewPos, bool bNewPercent=true, SdrAlign nNewAlign = SdrAlign::HORZ_CENTER): aPos(rNewPos),nEscDir(SdrEscapeDirection::SMART),nId(0),nAlign(nNewAlign),bNoPercent(!bNewPercent),bReallyAbsolute(false),bUserDefined(true) {}
+    SdrGluePoint(const Point& rNewPos): aPos(rNewPos),nEscDir(SdrEscapeDirection::SMART),nId(0),nAlign(SdrAlign::NONE),bNoPercent(false),bReallyAbsolute(false),bUserDefined(true) {}
     const Point& GetPos() const                             { return aPos; }
     void         SetPos(const Point& rNewPos)               { aPos=rNewPos; }
     SdrEscapeDirection GetEscDir() const                          { return nEscDir; }
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 3e58f11..a6d5aaf 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -261,8 +261,7 @@ private:
     SVX_DLLPRIVATE void ImpReformatAllTextObjects();
     SVX_DLLPRIVATE void ImpReformatAllEdgeObjects();
     SVX_DLLPRIVATE void ImpCreateTables();
-    SVX_DLLPRIVATE void ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable,
-        bool bLoadRefCounts = true);
+    SVX_DLLPRIVATE void ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable);
 
 
     // this is a weak reference to a possible living api wrapper for this model
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index 7ed149c..2a62ec8 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -160,12 +160,11 @@ protected:
     void ForceRefToMarked();
     void ForceUndirtyMrkPnt() const                                       { if (mbMrkPntDirty) UndirtyMrkPnt(); }
 
-    //HMHvoid ImpShowMarkHdl(bool bNoRefHdl);
     virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay) const;
     SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const;
     SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const;
     bool ImpIsFrameHandles() const;
-    void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 nVal=0, ImpTakeDescriptionOptions nOpt=ImpTakeDescriptionOptions::NONE) const;
+    void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, ImpTakeDescriptionOptions nOpt=ImpTakeDescriptionOptions::NONE) const;
 
     // Generates a string including degrees symbol, from an angel specification in 1/100deg
     bool ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark);
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index fba5c46..a744182 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -997,9 +997,9 @@ void SvxTPFilter::DeactivatePage()
     TabPage::DeactivatePage();
 }
 
-void SvxTPFilter::Enable( bool bEnable, bool bChild)
+void SvxTPFilter::Enable( bool bEnable)
 {
-    TabPage::Enable(bEnable,bChild);
+    TabPage::Enable(bEnable);
     if(m_pCbDate->IsEnabled())
     {
         RowEnableHdl(m_pCbDate);
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 90f2ef5..69dbc1e 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -68,13 +68,13 @@ Bitmap& SvxRectCtl::GetRectBitmap()
 }
 
 SvxRectCtl::SvxRectCtl(vcl::Window* pParent, RECT_POINT eRpt,
-    sal_uInt16 nBorder, sal_uInt16 nCircle, CTL_STYLE eStyle)
+    sal_uInt16 nBorder, sal_uInt16 nCircle)
     : Control(pParent, WB_BORDER | WB_TABSTOP)
     , pAccContext(nullptr)
     , nBorderWidth(nBorder)
     , nRadius(nCircle)
     , eDefRP(eRpt)
-    , eCS(eStyle)
+    , eCS(CS_RECT)
     , pBitmap(nullptr)
     , m_nState(CTL_STATE::NONE)
     , mbCompleteDisable(false)
@@ -85,12 +85,12 @@ SvxRectCtl::SvxRectCtl(vcl::Window* pParent, RECT_POINT eRpt,
     Resize_Impl();
 }
 
-void SvxRectCtl::SetControlSettings(RECT_POINT eRpt, sal_uInt16 nBorder, sal_uInt16 nCircle, CTL_STYLE eStyle)
+void SvxRectCtl::SetControlSettings(RECT_POINT eRpt, sal_uInt16 nBorder, sal_uInt16 nCircle)
 {
     nBorderWidth = nBorder;
     nRadius = nCircle;
     eDefRP = eRpt;
-    eCS = eStyle;
+    eCS = CS_RECT;
     Resize_Impl();
 }
 
diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx
index 88f888a..bd7ba5a 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -45,13 +45,12 @@ namespace svx
 
     OColumnTransferable::OColumnTransferable(const OUString& _rDatasource
                                             ,const OUString& _rConnectionResource
-                                            ,const sal_Int32        _nCommandType
                                             ,const OUString& _rCommand
                                             ,const OUString& _rFieldName
                                             ,ColumnTransferFormatFlags _nFormats)
         :m_nFormatFlags(_nFormats)
     {
-        implConstruct(_rDatasource,_rConnectionResource,_nCommandType, _rCommand, _rFieldName);
+        implConstruct(_rDatasource,_rConnectionResource, css::sdb::CommandType::TABLE, _rCommand, _rFieldName);
     }
 
 
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 9d1768c..8ec0779 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -214,7 +214,7 @@ DisposeListenerGridBridge::DisposeListenerGridBridge(DbGridControl& _rParent, co
 
     if (_rxObject.is())
     {
-        m_pRealListener = new FmXDisposeMultiplexer(this, _rxObject, 0);
+        m_pRealListener = new FmXDisposeMultiplexer(this, _rxObject);
         m_pRealListener->acquire();
     }
 }
@@ -332,8 +332,8 @@ void DbGridControl::NavigationBar::PositionDataSource(sal_Int32 nRecord)
     m_bPositioning = false;
 }
 
-DbGridControl::NavigationBar::NavigationBar(vcl::Window* pParent, WinBits nStyle)
-          :Control(pParent, nStyle)
+DbGridControl::NavigationBar::NavigationBar(vcl::Window* pParent)
+          :Control(pParent, 0)
           ,m_aRecordText(VclPtr<FixedText>::Create(this, WB_VCENTER))
           ,m_aAbsolute(VclPtr<DbGridControl::NavigationBar::AbsolutePos>::Create(this, WB_CENTER | WB_VCENTER))
           ,m_aRecordOf(VclPtr<FixedText>::Create(this, WB_VCENTER))
diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx
index b1a5a75..897b3c7 100644
--- a/svx/source/form/fmtools.cxx
+++ b/svx/source/form/fmtools.cxx
@@ -299,10 +299,10 @@ void FmXDisposeListener::setAdapter(FmXDisposeMultiplexer* pAdapter)
 }
 
 
-FmXDisposeMultiplexer::FmXDisposeMultiplexer(FmXDisposeListener* _pListener, const Reference< css::lang::XComponent>& _rxObject, sal_Int16 _nId)
+FmXDisposeMultiplexer::FmXDisposeMultiplexer(FmXDisposeListener* _pListener, const Reference< css::lang::XComponent>& _rxObject)
     :m_xObject(_rxObject)
     ,m_pListener(_pListener)
-    ,m_nId(_nId)
+    ,m_nId(0)
 {
     m_pListener->setAdapter(this);
 
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 56fa3ea..0ce6a14 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -560,7 +560,7 @@ void SdrDragMethod::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr
     } else if (IsDraggingGluePoints()) {
         nOpt=ImpTakeDescriptionOptions::GLUEPOINTS;
     }
-    getSdrDragView().ImpTakeDescriptionStr(nStrCacheID,rStr,0,nOpt);
+    getSdrDragView().ImpTakeDescriptionStr(nStrCacheID,rStr,nOpt);
 }
 
 SdrObject* SdrDragMethod::GetDragObj() const
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 0698824..b50f5e3 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -105,7 +105,7 @@ struct SdrModelImpl
 
 
 void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbeddedHelper,
-    bool bUseExtColorTable, bool bLoadRefCounts)
+    bool bUseExtColorTable)
 {
     mpImpl = new SdrModelImpl;
     mpImpl->mpUndoManager=nullptr;
@@ -188,9 +188,9 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
 
     if ( pPool == nullptr )
     {
-        pItemPool=new SdrItemPool(nullptr, bLoadRefCounts);
+        pItemPool=new SdrItemPool(nullptr, false/*bLoadRefCounts*/);
         // Outliner doesn't have its own Pool, so use the EditEngine's
-        SfxItemPool* pOutlPool=EditEngine::CreatePool( bLoadRefCounts );
+        SfxItemPool* pOutlPool=EditEngine::CreatePool( false/*bLoadRefCounts*/ );
         // OutlinerPool as SecondaryPool of SdrPool
         pItemPool->SetSecondaryPool(pOutlPool);
         // remember that I created both pools myself
@@ -236,14 +236,14 @@ SdrModel::SdrModel():
     maMaPag(),
     maPages()
 {
-    ImpCtor(nullptr, nullptr, false, false);
+    ImpCtor(nullptr, nullptr, false);
 }
 
 SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable):
     maMaPag(),
     maPages()
 {
-    ImpCtor(pPool,pPers,bUseExtColorTable, false/*bLoadRefCounts*/);
+    ImpCtor(pPool,pPers,bUseExtColorTable);
 }
 
 SdrModel::SdrModel(const OUString& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable):
@@ -251,7 +251,7 @@ SdrModel::SdrModel(const OUString& rPath, SfxItemPool* pPool, ::comphelper::IEmb
     maPages(),
     aTablePath(rPath)
 {
-    ImpCtor(pPool,pPers,bUseExtColorTable, false/*bLoadRefCounts*/);
+    ImpCtor(pPool,pPers,bUseExtColorTable);
 }
 
 SdrModel::~SdrModel()
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 1fcd763..ac14c709 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -2010,7 +2010,7 @@ const Rectangle& SdrMarkView::GetMarkedObjRect() const
 }
 
 
-void SdrMarkView::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 nVal, ImpTakeDescriptionOptions nOpt) const
+void SdrMarkView::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, ImpTakeDescriptionOptions nOpt) const
 {
     rStr = ImpGetResStr(nStrCacheID);
     sal_Int32 nPos = rStr.indexOf("%1");
@@ -2031,7 +2031,7 @@ void SdrMarkView::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr,
         }
     }
 
-    rStr = rStr.replaceFirst("%2", OUString::number( nVal ));
+    rStr = rStr.replaceFirst("%2", "0");
 }
 
 
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 24c6339..064b2d0 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1271,11 +1271,11 @@ OUString SdrView::GetStatusText()
             ImpTakeDescriptionStr(STR_ViewMarked,aStr);
             if (IsGluePointEditMode()) {
                 if (HasMarkedGluePoints()) {
-                    ImpTakeDescriptionStr(STR_ViewMarked,aStr,0,ImpTakeDescriptionOptions::GLUEPOINTS);
+                    ImpTakeDescriptionStr(STR_ViewMarked,aStr,ImpTakeDescriptionOptions::GLUEPOINTS);
                 }
             } else {
                 if (HasMarkedPoints()) {
-                    ImpTakeDescriptionStr(STR_ViewMarked,aStr,0,ImpTakeDescriptionOptions::POINTS);
+                    ImpTakeDescriptionStr(STR_ViewMarked,aStr,ImpTakeDescriptionOptions::POINTS);
                 }
             }
         } else {
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index 12224cb..3fe70b5 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -560,8 +560,8 @@ VclPtr<vcl::Window> SvxFillToolBoxControl::CreateItemWindow(vcl::Window *pParent
     return VclPtr<vcl::Window>();
 }
 
-FillControl::FillControl(vcl::Window* pParent,WinBits nStyle)
-    : Window(pParent,nStyle | WB_DIALOGCONTROL)
+FillControl::FillControl(vcl::Window* pParent)
+    : Window(pParent, WB_DIALOGCONTROL)
     , mpLbFillType(VclPtr<SvxFillTypeBox>::Create(this))
     , mpToolBoxColor(VclPtr<sfx2::sidebar::SidebarToolBox>::Create(this))
     , mpLbFillAttr(VclPtr<SvxFillAttrBox>::Create(this))
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 45d704d..f97f05b 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -468,7 +468,6 @@ void SwDBTreeList::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
             uno::Reference< svx::OColumnTransferable > xColTransfer( new svx::OColumnTransferable(
                             sDBName,
                             OUString(),
-                            sdb::CommandType::TABLE,
                             sTableName,
                             sColumnName,
                             (ColumnTransferFormatFlags::FIELD_DESCRIPTOR|ColumnTransferFormatFlags::COLUMN_DESCRIPTOR) ) );


More information about the Libreoffice-commits mailing list