From 8bfcb53c3d1389632fc7f1eca53d73187a489dfa Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 8 Sep 2016 14:20:31 +0200 Subject: loplugin:constantparam in svx Change-Id: Id08850b90a0e286ff837dd6b0c1691fa7dc793fa Reviewed-on: https://gerrit.libreoffice.org/28746 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/svx/bmpmask.hxx | 2 +- include/svx/camera3d.hxx | 4 ++-- include/svx/colrctrl.hxx | 2 +- include/svx/framelink.hxx | 2 +- include/svx/imapdlg.hxx | 2 +- include/svx/itemwin.hxx | 7 +++---- include/svx/obj3d.hxx | 2 +- include/svx/pagenumberlistbox.hxx | 2 +- include/svx/papersizelistbox.hxx | 2 +- include/svx/samecontentlistbox.hxx | 2 +- include/svx/sdgcpitm.hxx | 5 ++--- .../sdr/contact/objectcontactofobjlistpainter.hxx | 4 +--- include/svx/sdr/table/tablecontroller.hxx | 2 +- include/svx/sidebar/ValueSetWithTextControl.hxx | 8 +------- include/svx/spacinglistbox.hxx | 2 +- include/svx/svdcrtv.hxx | 4 ++-- include/svx/svdglev.hxx | 8 ++++---- include/svx/svdpoev.hxx | 4 ++-- include/svx/svdsnpv.hxx | 2 +- include/svx/svxdlg.hxx | 21 +++++++-------------- include/svx/svxgrahicitem.hxx | 2 +- include/svx/xpoly.hxx | 2 +- include/svx/xpool.hxx | 2 -- 23 files changed, 37 insertions(+), 56 deletions(-) (limited to 'include/svx') diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx index b8c404e1b8fd..3630f394b065 100644 --- a/include/svx/bmpmask.hxx +++ b/include/svx/bmpmask.hxx @@ -46,7 +46,7 @@ protected: const SfxPoolItem* pState ) override; public: - SvxBmpMaskSelectItem( sal_uInt16 nId, SvxBmpMask& rMask, + SvxBmpMaskSelectItem( SvxBmpMask& rMask, SfxBindings& rBindings ); }; diff --git a/include/svx/camera3d.hxx b/include/svx/camera3d.hxx index 2d8021a64aa4..b6fd288edd97 100644 --- a/include/svx/camera3d.hxx +++ b/include/svx/camera3d.hxx @@ -46,11 +46,11 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC Camera3D : public Viewport3D public: Camera3D(const basegfx::B3DPoint& rPos, const basegfx::B3DPoint& rLookAt, - double fFocalLen = 35.0, double fBankAng = 0); + double fFocalLen = 35.0); Camera3D(); void SetDefaults(const basegfx::B3DPoint& rPos, const basegfx::B3DPoint& rLookAt, - double fFocalLen, double fBankAng = 0); + double fFocalLen); void SetViewWindow(double fX, double fY, double fW, double fH); diff --git a/include/svx/colrctrl.hxx b/include/svx/colrctrl.hxx index 20fc1f8145bc..dbefc7f0cbfa 100644 --- a/include/svx/colrctrl.hxx +++ b/include/svx/colrctrl.hxx @@ -59,7 +59,7 @@ protected: DECL_LINK_TYPED(ExecDragHdl, void*, void); public: - SvxColorValueSet_docking( vcl::Window* pParent, WinBits nWinStyle = WB_ITEMBORDER ); + SvxColorValueSet_docking( vcl::Window* pParent ); bool IsLeftButton() const { return mbLeftButton; } }; diff --git a/include/svx/framelink.hxx b/include/svx/framelink.hxx index bbe5234b7a5e..451c6573a072 100644 --- a/include/svx/framelink.hxx +++ b/include/svx/framelink.hxx @@ -115,7 +115,7 @@ public: explicit Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor, double nP, double nD, double nS, editeng::SvxBorderStyle nType ); /** Constructs a frame style from the passed SvxBorderLine struct. Clears the style, if pBorder is 0. */ - explicit Style( const editeng::SvxBorderLine* pBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 ); + explicit Style( const editeng::SvxBorderLine* pBorder, double fScale = 1.0 ); inline RefMode GetRefMode() const { return meRefMode; } inline const Color& GetColorPrim() const { return maColorPrim; } diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx index e191a25dfb54..c55fb1e7230b 100644 --- a/include/svx/imapdlg.hxx +++ b/include/svx/imapdlg.hxx @@ -71,7 +71,7 @@ protected: public: - SvxIMapDlgItem( sal_uInt16 nId, SvxIMapDlg& rIMapDlg, SfxBindings& rBindings ); + SvxIMapDlgItem( SvxIMapDlg& rIMapDlg, SfxBindings& rBindings ); }; class IMapOwnData; diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx index 450a51155599..f6a50c3d967d 100644 --- a/include/svx/itemwin.hxx +++ b/include/svx/itemwin.hxx @@ -47,8 +47,7 @@ class SvxLineBox : public LineLB public: SvxLineBox( vcl::Window* pParent, - const css::uno::Reference< css::frame::XFrame >& rFrame, - WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ); + const css::uno::Reference< css::frame::XFrame >& rFrame ); void FillControl(); @@ -95,7 +94,7 @@ public: class SVX_DLLPUBLIC SvxFillTypeBox : public FillTypeLB { public: - SvxFillTypeBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ); + SvxFillTypeBox( vcl::Window* pParent ); void Selected() { bSelect = true; } @@ -116,7 +115,7 @@ private: class SVX_DLLPUBLIC SvxFillAttrBox : public FillAttrLB { public: - SvxFillAttrBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ); + SvxFillAttrBox( vcl::Window* pParent ); protected: virtual bool PreNotify( NotifyEvent& rNEvt ) override; diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx index 7c6d38aa1d82..a17dd6b5490c 100644 --- a/include/svx/obj3d.hxx +++ b/include/svx/obj3d.hxx @@ -81,7 +81,7 @@ class E3dObjList : public SdrObjList E3dObjList &operator=(const E3dObjList& rSrcList) = delete; public: - E3dObjList(SdrModel* pNewModel = nullptr, SdrPage* pNewPage = nullptr, E3dObjList* pNewUpList = nullptr); + E3dObjList(); SVX_DLLPUBLIC virtual ~E3dObjList(); virtual E3dObjList* Clone() const override; diff --git a/include/svx/pagenumberlistbox.hxx b/include/svx/pagenumberlistbox.hxx index 72424e07aa72..1f0b4f107269 100644 --- a/include/svx/pagenumberlistbox.hxx +++ b/include/svx/pagenumberlistbox.hxx @@ -26,7 +26,7 @@ class SVX_DLLPUBLIC PageNumberListBox : public ListBox { public: - PageNumberListBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN ); + PageNumberListBox( vcl::Window* pParent ); void SetSelection( sal_uInt16 ); sal_uInt16 GetSelection() const; diff --git a/include/svx/papersizelistbox.hxx b/include/svx/papersizelistbox.hxx index 2d2cf5b694b7..b477e63eb304 100644 --- a/include/svx/papersizelistbox.hxx +++ b/include/svx/papersizelistbox.hxx @@ -33,7 +33,7 @@ enum class PaperSizeApp class SVX_DLLPUBLIC PaperSizeListBox : public ListBox { public: - PaperSizeListBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN ); + PaperSizeListBox( vcl::Window* pParent ); void FillPaperSizeEntries( PaperSizeApp eApp ); void SetSelection( Paper eSize ); diff --git a/include/svx/samecontentlistbox.hxx b/include/svx/samecontentlistbox.hxx index 576ebdfdbd7c..1996d757b2be 100644 --- a/include/svx/samecontentlistbox.hxx +++ b/include/svx/samecontentlistbox.hxx @@ -27,7 +27,7 @@ class SVX_DLLPUBLIC SameContentListBox : public ListBox { public: - SameContentListBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN ); + SameContentListBox( vcl::Window* pParent ); Size GetOptimalSize() const override; }; diff --git a/include/svx/sdgcpitm.hxx b/include/svx/sdgcpitm.hxx index ccdaa9388242..47b3bf6a70ee 100644 --- a/include/svx/sdgcpitm.hxx +++ b/include/svx/sdgcpitm.hxx @@ -33,9 +33,8 @@ public: SdrGrafCropItem( sal_Int32 nLeftCrop = 0, sal_Int32 nTopCrop = 0, - sal_Int32 nRightCrop = 0, sal_Int32 nBottomCrop = 0, - sal_uInt16 nWhichId = SDRATTR_GRAFCROP ) : - SvxGrfCrop( nLeftCrop, nRightCrop, nTopCrop, nBottomCrop, nWhichId ) {} + sal_Int32 nRightCrop = 0, sal_Int32 nBottomCrop = 0 ) : + SvxGrfCrop( nLeftCrop, nRightCrop, nTopCrop, nBottomCrop, SDRATTR_GRAFCROP ) {} virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override; virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const override; diff --git a/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx index f584f6787833..640193123cbb 100644 --- a/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx +++ b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx @@ -99,9 +99,7 @@ protected: public: // basic constructor - ObjectContactOfPagePainter( - const SdrPage* pPage, - ObjectContact& rOriginalObjectContact); + ObjectContactOfPagePainter(ObjectContact& rOriginalObjectContact); virtual ~ObjectContactOfPagePainter(); // set another page diff --git a/include/svx/sdr/table/tablecontroller.hxx b/include/svx/sdr/table/tablecontroller.hxx index aec0bbcb3ea0..76a7d338e0ed 100644 --- a/include/svx/sdr/table/tablecontroller.hxx +++ b/include/svx/sdr/table/tablecontroller.hxx @@ -134,7 +134,7 @@ private: SVX_DLLPRIVATE void MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow ); - SVX_DLLPRIVATE void EditCell( const CellPos& rPos, vcl::Window* pWindow, const css::awt::MouseEvent* pMouseEvent, sal_uInt16 nAction = 0 ); + SVX_DLLPRIVATE void EditCell( const CellPos& rPos, vcl::Window* pWindow, sal_uInt16 nAction = 0 ); SVX_DLLPRIVATE void StopTextEdit(); SVX_DLLPRIVATE sal_uInt16 getKeyboardAction( const KeyEvent& rKEvt, vcl::Window* pWindow ); diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx b/include/svx/sidebar/ValueSetWithTextControl.hxx index 9e991555caa1..20be24d51963 100644 --- a/include/svx/sidebar/ValueSetWithTextControl.hxx +++ b/include/svx/sidebar/ValueSetWithTextControl.hxx @@ -54,24 +54,18 @@ public: // add item for control type IMAGE_TEXT // if control type does not match IMAGE_TEXT no item is added. - // @param pSelectedItemImage - // selection item image is optional. if not provided, it is the same as the image item // @param pItemHelpText // help text is optional. if not provided, it is the same as the item text void AddItem( const Image& rItemImage, - const Image* pSelectedItemImage, const OUString& rItemText, const OUString* pItemHelpText ); // add item for control type TEXT_TEXT // if control type does not match TEXT_TEXT no item is added. - // @param pItemHelpText - // help text is optional. if not provided, it is the same as the item text void AddItem( const OUString& rItemText, - const OUString& rItemText2, - const OUString* pItemHelpText ); + const OUString& rItemText2 ); virtual void UserDraw( const UserDrawEvent& rUDEvt ) override; diff --git a/include/svx/spacinglistbox.hxx b/include/svx/spacinglistbox.hxx index eb8ebe427439..2e2ca5280398 100644 --- a/include/svx/spacinglistbox.hxx +++ b/include/svx/spacinglistbox.hxx @@ -27,7 +27,7 @@ class SVX_DLLPUBLIC SpacingListBox : public ListBox { public: - SpacingListBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN ); + SpacingListBox( vcl::Window* pParent ); Size GetOptimalSize() const override; }; diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx index 7eab87729dc6..085f235ea6aa 100644 --- a/include/svx/svdcrtv.hxx +++ b/include/svx/svdcrtv.hxx @@ -105,7 +105,7 @@ public: sal_uInt16 GetCurrentObjIdentifier() const { return nAktIdent; } // Beginning the regular Create - bool BegCreateObj(const Point& rPnt, OutputDevice* pOut=nullptr, short nMinMov=-3, SdrPageView* pPV=nullptr); + bool BegCreateObj(const Point& rPnt, OutputDevice* pOut=nullptr, short nMinMov=-3); bool BegCreatePreparedObject(const Point& rPnt, sal_Int16 nMinMov, SdrObject* pPreparedFactoryObject); void MovCreateObj(const Point& rPnt); bool EndCreateObj(SdrCreateCmd eCmd); @@ -117,7 +117,7 @@ public: // BegCreateCaptionObj() creates a SdrCaptionObj (legend item). // rObjSiz is the initial size of the legend text frame. // Only the length of the tip is dragged - bool BegCreateCaptionObj(const Point& rPnt, const Size& rObjSiz, OutputDevice* pOut=nullptr, short nMinMov=-3, SdrPageView* pPV=nullptr); + bool BegCreateCaptionObj(const Point& rPnt, const Size& rObjSiz, OutputDevice* pOut=nullptr, short nMinMov=-3); // Create a circle/rectangle/text frame with the first Point being // the center of the object instead of the upper-left corner. diff --git a/include/svx/svdglev.hxx b/include/svx/svdglev.hxx index 6559ddb4b4fd..a1f84c0c24e6 100644 --- a/include/svx/svdglev.hxx +++ b/include/svx/svdglev.hxx @@ -33,10 +33,10 @@ class SVX_DLLPUBLIC SdrGlueEditView: public SdrPolyEditView { // copy marked GluePoints and mark instead of the old ones void ImpCopyMarkedGluePoints(); - typedef void (*PGlueDoFunc)(SdrGluePoint&, const SdrObject* pObj, const void*, const void*, const void*, const void*, const void*); - typedef void (*PGlueTrFunc)(Point&, const void*, const void*, const void*, const void*, const void*); - void ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, bool bConst, const void* p1, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr, const void* p5=nullptr); - void ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const void* p1, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr, const void* p5=nullptr); + typedef void (*PGlueDoFunc)(SdrGluePoint&, const SdrObject* pObj, const void*, const void*, const void*, const void*); + typedef void (*PGlueTrFunc)(Point&, const void*, const void*, const void*, const void*); + void ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, bool bConst, const void* p1, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr); + void ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const void* p1, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr); protected: // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView diff --git a/include/svx/svdpoev.hxx b/include/svx/svdpoev.hxx index 524c3710011d..7cb2e95bb42e 100644 --- a/include/svx/svdpoev.hxx +++ b/include/svx/svdpoev.hxx @@ -41,8 +41,8 @@ private: SVX_DLLPRIVATE void ImpResetPolyPossibilityFlags(); SVX_DLLPRIVATE void ImpCheckPolyPossibilities(); - typedef void (*PPolyTrFunc)(Point&, Point*, Point*, const void*, const void*, const void*, const void*, const void*); - SVX_DLLPRIVATE void ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* p1, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr, const void* p5=nullptr); + typedef void (*PPolyTrFunc)(Point&, Point*, Point*, const void*, const void*, const void*, const void*); + SVX_DLLPRIVATE void ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* p1, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr); protected: // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView diff --git a/include/svx/svdsnpv.hxx b/include/svx/svdsnpv.hxx index 2c484ad916f7..621b03f63826 100644 --- a/include/svx/svdsnpv.hxx +++ b/include/svx/svdsnpv.hxx @@ -155,7 +155,7 @@ public: // SdrSnap::YSNAPPED or SdrSnap::XYSNAPPED SdrSnap SnapPos(Point& rPnt, const SdrPageView* pPV) const; Point GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const; - void CheckSnap(const Point& rPt, const SdrPageView* pPV, long& nBestXSnap, long& nBestYSnap, bool& bXSnapped, bool& bYSnapped) const; + void CheckSnap(const Point& rPt, long& nBestXSnap, long& nBestYSnap, bool& bXSnapped, bool& bYSnapped) const; // All attitudes to snap are persistent. bool IsSnapEnabled() const { return bSnapEnab; } diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index af4ea643ce17..9131821778ec 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -334,7 +334,6 @@ public: virtual SfxAbstractTabDialog* CreateSchTransformTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const SdrView* pSdrView, - sal_uInt32 nResId, bool bSizeTabPage )=0; virtual AbstractSvxJSearchOptionsDialog * CreateSvxJSearchOptionsDialog( vcl::Window* pParent, @@ -343,8 +342,7 @@ public: virtual AbstractFmInputRecordNoDialog * CreateFmInputRecordNoDialog() = 0; virtual AbstractSvxNewDictionaryDialog* CreateSvxNewDictionaryDialog( vcl::Window* pParent ) = 0; virtual VclAbstractDialog * CreateSvxEditDictionaryDialog( vcl::Window* pParent, - const OUString& rName, - sal_uInt32 nResId) = 0; + const OUString& rName) = 0; virtual AbstractSvxNameDialog * CreateSvxNameDialog( vcl::Window* pParent, const OUString& rName, const OUString& rDesc ) = 0; @@ -361,23 +359,18 @@ public: sal_Int16 nInitialContext, const Link& lnkContextSupplier)=0; virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss(vcl::Window* pParent, - const Graphic& rGraphic, - RectPoint eLightSource)=0; + const Graphic& rGraphic)=0; virtual AbstractGraphicFilterDialog * CreateGraphicFilterPoster(vcl::Window* pParent, - const Graphic& rGraphic, - sal_uInt16 nCount)=0; + const Graphic& rGraphic)=0; virtual AbstractGraphicFilterDialog * CreateGraphicFilterSepia (vcl::Window* pParent, - const Graphic& rGraphic, - sal_uInt16 nCount)=0; + const Graphic& rGraphic)=0; virtual AbstractGraphicFilterDialog * CreateGraphicFilterSmooth (vcl::Window* pParent, const Graphic& rGraphic, double nRadius)=0; virtual AbstractGraphicFilterDialog * CreateGraphicFilterSolarize (vcl::Window* pParent, - const Graphic& rGraphic, - sal_uInt8 nGreyThreshold)=0; + const Graphic& rGraphic)=0; virtual AbstractGraphicFilterDialog * CreateGraphicFilterMosaic (vcl::Window* pParent, - const Graphic& rGraphic, - sal_uInt16 nTileWidth, sal_uInt16 nTileHeight)=0; + const Graphic& rGraphic)=0; virtual AbstractSvxAreaTabDialog* CreateSvxAreaTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, @@ -421,7 +414,7 @@ public: virtual SfxAbstractTabDialog* CreateSvxFormatCellsDialog( const SfxItemSet* pAttr, SdrModel* pModel, const SdrObject* pObj )=0; - virtual SvxAbstractSplittTableDialog* CreateSvxSplittTableDialog( vcl::Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )=0; + virtual SvxAbstractSplittTableDialog* CreateSvxSplittTableDialog( vcl::Window* pParent, bool bIsTableVertical, long nMaxVertical )=0; virtual SvxAbstractNewTableDialog* CreateSvxNewTableDialog() = 0; diff --git a/include/svx/svxgrahicitem.hxx b/include/svx/svxgrahicitem.hxx index e42fd9b8e971..a5f417feaa66 100644 --- a/include/svx/svxgrahicitem.hxx +++ b/include/svx/svxgrahicitem.hxx @@ -30,7 +30,7 @@ class SVX_DLLPUBLIC SvxGraphicItem: public SfxPoolItem Graphic aGraphic; public: - SvxGraphicItem( sal_uInt16 nWhich ,const Graphic& rGraphic); + SvxGraphicItem( const Graphic& rGraphic); SvxGraphicItem( const SvxGraphicItem& ); diff --git a/include/svx/xpoly.hxx b/include/svx/xpoly.hxx index 07e2f5bef6f0..e9fe31f67ff0 100644 --- a/include/svx/xpoly.hxx +++ b/include/svx/xpoly.hxx @@ -61,7 +61,7 @@ protected: static bool CheckAngles(sal_uInt16& nStart, sal_uInt16 nEnd, sal_uInt16& nA1, sal_uInt16& nA2); public: - XPolygon( sal_uInt16 nSize=16, sal_uInt16 nResize=16 ); + XPolygon( sal_uInt16 nSize=16 ); XPolygon( const XPolygon& rXPoly ); XPolygon( XPolygon&& rXPoly ); XPolygon( const tools::Polygon& rPoly ); diff --git a/include/svx/xpool.hxx b/include/svx/xpool.hxx index 4fdbdbd6d76e..7233f919c041 100644 --- a/include/svx/xpool.hxx +++ b/include/svx/xpool.hxx @@ -39,8 +39,6 @@ protected: public: XOutdevItemPool( SfxItemPool* pMaster = nullptr, - sal_uInt16 nAttrStart = XATTR_START, - sal_uInt16 nAttrEnd = XATTR_END, bool bLoadRefCounts = true); XOutdevItemPool(const XOutdevItemPool& rPool); -- cgit