diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-29 13:37:14 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-01 08:30:27 +0200 |
commit | 595f46344e18fd6275ff7b862269e4c131449591 (patch) | |
tree | 0de2d2e300399b9aa9c0fea2dd6ca2155f8a231a | |
parent | tdf#97960 - .doc: preserve font size in empty cells (diff) | |
download | core-595f46344e18fd6275ff7b862269e4c131449591.tar.gz core-595f46344e18fd6275ff7b862269e4c131449591.zip |
loplugin:unuseddefaultparam in svx (part1)
Change-Id: I0fc8d00447491e8474508952c21d07aa22b6f055
57 files changed, 151 insertions, 266 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index de84d1c7f29f..baef86748e7c 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -614,17 +614,17 @@ void AbstractSvxObjectNameDialog_Impl::GetName(OUString& rName) pDlg->GetName(rName); } -void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink, bool bCheckImmediately) +void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink) { aCheckNameHdl = rLink; if(rLink.IsSet()) { - pDlg->SetCheckNameHdl(LINK(this, AbstractSvxObjectNameDialog_Impl, CheckNameHdl), bCheckImmediately); + pDlg->SetCheckNameHdl(LINK(this, AbstractSvxObjectNameDialog_Impl, CheckNameHdl)); } else { - pDlg->SetCheckNameHdl(Link<SvxObjectNameDialog&,bool>(), bCheckImmediately); + pDlg->SetCheckNameHdl(Link<SvxObjectNameDialog&,bool>()); } } @@ -933,8 +933,7 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabDialog( sal_uInt32 nR // TabDialog that use functionality of the drawing layer SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTextTabDialog( vcl::Window* pParent, const SfxItemSet* pAttrSet, - SdrView* pView, - SdrModel* ) + SdrView* pView ) { VclPtrInstance<SvxTextTabDialog> pDlg( pParent, pAttrSet, pView ); return new CuiAbstractTabDialog_Impl( pDlg ); @@ -951,10 +950,9 @@ AbstractSvxCaptionDialog* AbstractDialogFactory_Impl::CreateCaptionDialog( AbstractSvxDistributeDialog* AbstractDialogFactory_Impl::CreateSvxDistributeDialog(vcl::Window* pParent, const SfxItemSet& rAttr, - SvxDistributeHorizontal eHor , - SvxDistributeVertical eVer) + SvxDistributeHorizontal eHor) { - VclPtrInstance<SvxDistributeDialog> pDlg( pParent, rAttr, eHor, eVer); + VclPtrInstance<SvxDistributeDialog> pDlg( pParent, rAttr, eHor, SvxDistributeVerticalNone); return new AbstractSvxDistributeDialog_Impl( pDlg ); } diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index c71f014fec7a..418b507c0590 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -342,7 +342,7 @@ class AbstractSvxObjectNameDialog_Impl :public AbstractSvxObjectNameDialog { DECL_ABSTDLG_BASE(AbstractSvxObjectNameDialog_Impl, SvxObjectNameDialog) virtual void GetName(OUString& rName) override ; - virtual void SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink, bool bCheckImmediately = false) override; + virtual void SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink) override; private: Link<AbstractSvxObjectNameDialog&,bool> aCheckNameHdl; @@ -507,8 +507,7 @@ public: const OUString *pUserButtonText=nullptr ) override; virtual SfxAbstractTabDialog* CreateTextTabDialog( vcl::Window* pParent, const SfxItemSet* pAttrSet, - SdrView* pView, - SdrModel* pModel=nullptr ) override; + SdrView* pView ) override; virtual SfxAbstractTabDialog* CreateTabItemDialog(vcl::Window* pParent, const SfxItemSet& rSet) override; virtual AbstractSvxCaptionDialog* CreateCaptionDialog( vcl::Window* pParent, @@ -516,8 +515,7 @@ public: sal_uInt16 nAnchorTypes = 0 ) override; virtual AbstractSvxDistributeDialog* CreateSvxDistributeDialog(vcl::Window* pParent, const SfxItemSet& rAttr, - SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone, - SvxDistributeVertical eVer = SvxDistributeVerticalNone) override; + SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone) override; virtual SfxAbstractInsertObjectDialog* CreateInsertObjectDialog( vcl::Window* pParent, const OUString& rCommmand, const css::uno::Reference < css::embed::XStorage >& xStor, const SvObjectServerList* pList = nullptr ) override; diff --git a/include/svx/SvxColorValueSet.hxx b/include/svx/SvxColorValueSet.hxx index 20643128cdae..0b9f53366cb5 100644 --- a/include/svx/SvxColorValueSet.hxx +++ b/include/svx/SvxColorValueSet.hxx @@ -37,7 +37,7 @@ public: static sal_uInt32 getColumnCount(); void addEntriesForXColorList(const XColorList& rXColorList, sal_uInt32 nStartIndex = 1); - void addEntriesForColorSet(const std::set<Color>& rColorSet, const OUString& rNamePrefix, sal_uInt32 nStartIndex = 1); + void addEntriesForColorSet(const std::set<Color>& rColorSet, const OUString& rNamePrefix); Size layoutAllVisible(sal_uInt32 nEntryCount); Size layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount); }; diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx index 104d9a161622..fa5f749d6714 100644 --- a/include/svx/svdedtv.hxx +++ b/include/svx/svdedtv.hxx @@ -323,10 +323,8 @@ public: // Subsequently mark the new group . If the group spawns multiple // pages a group is created per page. // All groups created are subsequently marked. - // Using pUserGrp an own group object can be set. - // This is not used immediately, but via Clone copied. - // The method creates SdrObjGroup-instancess if NULL is passed, - void GroupMarked(const SdrObject* pUserGrp=nullptr); + // The method creates SdrObjGroup-instances. + void GroupMarked(); // All marked object groups are dissolved (1 level). // Now all previously marked member objects are marked. @@ -348,8 +346,7 @@ public: void ConvertMarkedToPolyObj(bool bLineToArea); // Align all marked objects vertically. Normally the SnapRect of an object is used. - // If bBoundRects=sal_True then BoundRects is used instead of SnapRect. - void AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, bool bBoundRects=false); + void AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert); bool IsAlignPossible() const; // move marked objects "up" diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx index 157bb0f9de19..6f92187dcb53 100644 --- a/include/svx/svdetc.hxx +++ b/include/svx/svdetc.hxx @@ -183,7 +183,7 @@ public: unsigned GetLinkCount() const { return (unsigned)aList.size(); } Link<SdrObjFactory*,void>& GetLink(unsigned nNum) { return aList[nNum]; } const Link<SdrObjFactory*,void>& GetLink(unsigned nNum) const { return aList[nNum]; } - void InsertLink(const Link<SdrObjFactory*,void>& rLink, unsigned nPos=0xFFFF); + void InsertLink(const Link<SdrObjFactory*,void>& rLink); void RemoveLink(const Link<SdrObjFactory*,void>& rLink); }; diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx index b9df48548676..9afb4c05e3c3 100644 --- a/include/svx/svdhdl.hxx +++ b/include/svx/svdhdl.hxx @@ -465,7 +465,7 @@ public: // AddHdl takes ownership of the handle. It should be on the Heap // as Clear() deletes it. - void AddHdl(SdrHdl* pHdl, bool bAtBegin=false); + void AddHdl(SdrHdl* pHdl); SdrHdl* RemoveHdl(size_t nNum); void RemoveAllByKind(SdrHdlKind eKind); diff --git a/include/svx/svdlayer.hxx b/include/svx/svdlayer.hxx index 78b98e77983b..1f0b43c8fe02 100644 --- a/include/svx/svdlayer.hxx +++ b/include/svx/svdlayer.hxx @@ -85,7 +85,7 @@ public: // A SdrLayer should be considered the standard Layer. It shall then set the // appropriate country-specific name. SetName() sets the "StandardLayer" flag // and if necessary returns "Userdefined". - void SetStandardLayer(bool bStd = true); + void SetStandardLayer(); }; // When Changing the layer data you currently have to set the Modify flag manually diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index b6ec9bca2bb8..07d7b35933f2 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -404,7 +404,7 @@ public: static void TakeUnitStr(FieldUnit eUnit, OUString& rStr); void TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars = false, sal_Int32 nNumDigits = -1) const; static void TakeAngleStr(long nAngle, OUString& rStr, bool bNoDegChar = false); - static void TakePercentStr(const Fraction& rVal, OUString& rStr, bool bNoPercentChar = false); + static void TakePercentStr(const Fraction& rVal, OUString& rStr); // RecalcPageNums is ordinarily only called by the Page. bool IsPagNumsDirty() const { return bPagNumsDirty; }; @@ -444,7 +444,7 @@ public: // For that to work, override the virtual method GetDocumentStream(). // Default=FALSE. Flag is not persistent. bool IsSwapGraphics() const { return bSwapGraphics; } - void SetSwapGraphics(bool bJa = true); + void SetSwapGraphics(); void SetSwapGraphicsMode(SdrSwapGraphicsMode nMode) { nSwapGraphicsMode = nMode; } SdrSwapGraphicsMode GetSwapGraphicsMode() const { return nSwapGraphicsMode; } diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx index 39da95499ef0..d72df2944555 100644 --- a/include/svx/svdmrkv.hxx +++ b/include/svx/svdmrkv.hxx @@ -273,7 +273,7 @@ public: bool IsMarkedObjHit(const Point& rPnt, short nTol=-2) const; // Pick: Supported options for nOptions are SEARCH_NEXT, SEARCH_BACKWARD (ni) - SdrHdl* PickHandle(const Point& rPnt, SdrSearchOptions nOptions=SdrSearchOptions::NONE, SdrHdl* pHdl0=nullptr) const; + SdrHdl* PickHandle(const Point& rPnt, SdrSearchOptions nOptions=SdrSearchOptions::NONE) const; // Pick: Supported options for nOptions are: // SdrSearchOptions::DEEP SdrSearchOptions::ALSOONMASTER SdrSearchOptions::TESTMARKABLE SdrSearchOptions::TESTTEXTEDIT @@ -380,8 +380,7 @@ public: // (Handlers are just situated at marked gluepoints ) // Attention: With each change of the glue point status the handle list is re-calculated. // All previously saved SdrHdl* became invalid by this, the same with the point IDs! - // Pick: Supported options for nOptions are SEARCH_NEXT, SEARCH_BACKWARD - bool PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16& rnId, SdrPageView*& rpPV, SdrSearchOptions nOptions=SdrSearchOptions::NONE) const; + bool PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16& rnId, SdrPageView*& rpPV) const; bool MarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, const SdrPageView* pPV, bool bUnmark=false); void UnmarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, const SdrPageView* pPV) { MarkGluePoint(pObj,nId,pPV,true); } bool IsGluePointMarked(const SdrObject* pObj, sal_uInt16 nId) const; diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx index c7628fb06c2c..4187119513ff 100644 --- a/include/svx/svdoashp.hxx +++ b/include/svx/svdoashp.hxx @@ -230,7 +230,7 @@ public: void SuggestTextFrameSize(Size aSuggestedTextFrameSize); virtual bool AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt = true, bool bWdt = true) const override; virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true) override; - virtual bool AdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true) override; + virtual bool AdjustTextFrameWidthAndHeight(bool bHgt = true) override; virtual bool IsAutoGrowHeight() const override; virtual bool IsAutoGrowWidth() const override; virtual void SetVerticalWriting( bool bVertical ) override; diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 742a7b45472e..9b0d57da6f10 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -375,12 +375,12 @@ protected: Rectangle ImpDragCalcRect(const SdrDragStat& rDrag) const; // for GetDragComment - void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 nVal=0) const; + void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr) const; void ImpForcePlusData(); - OUString GetAngleStr(long nAngle, bool bNoDegChar = false) const; - OUString GetMetrStr(long nVal, MapUnit eWantMap=MAP_MM, bool bNoUnitChars = false) const; + OUString GetAngleStr(long nAngle) const; + OUString GetMetrStr(long nVal, MapUnit eWantMap=MAP_MM) const; /// @param bNotMyself = true: set only ObjList to dirty, don't mark this object as dirty. /// diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx index d596d22a256e..9e7bf069300c 100644 --- a/include/svx/svdograf.hxx +++ b/include/svx/svdograf.hxx @@ -155,7 +155,7 @@ public: const OUString& GetFileName() const { return aFileName;} const OUString& GetFilterName() const { return aFilterName;} - void StartAnimation(OutputDevice* pOutDev, const Point& rPoint, const Size& rSize, long nExtraData=0L); + void StartAnimation(OutputDevice* pOutDev, const Point& rPoint, const Size& rSize); virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override; virtual sal_uInt16 GetObjIdentifier() const override; diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx index 322c5a8c3627..74f5f3cf65da 100644 --- a/include/svx/svdotable.hxx +++ b/include/svx/svdotable.hxx @@ -190,7 +190,7 @@ public: virtual void SetChanged() override; virtual bool AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt = true, bool bWdt = true) const override; - virtual bool AdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true) override; + virtual bool AdjustTextFrameWidthAndHeight(bool bHgt = true) override; virtual OUString TakeObjNameSingul() const override; virtual OUString TakeObjNamePlural() const override; virtual SdrTableObj* Clone() const override; diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index a60629e3b076..a794b856df6e 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -292,7 +292,7 @@ private: protected: bool ImpCanConvTextToCurve() const; - SdrObject* ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier, bool bNoSetAttr = false) const; + SdrObject* ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier) const; SdrObject* ImpConvertAddText(SdrObject* pObj, bool bBezier) const; void ImpSetTextStyleSheetListeners(); static void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXKorreg); @@ -347,7 +347,7 @@ public: virtual bool AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt = true, bool bWdt = true) const; virtual bool NbcAdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true); - virtual bool AdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true); + virtual bool AdjustTextFrameWidthAndHeight(bool bHgt = true); bool IsTextFrame() const { return bTextFrame; } bool IsOutlText() const { return bTextFrame && (eTextKind==OBJ_OUTLINETEXT || eTextKind==OBJ_TITLETEXT); } /// returns true if the PPT autofit of text into shape bounds is enabled. implies IsFitToSize()==false! diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx index f8ea42c696ab..d6e1c713bc0c 100644 --- a/include/svx/svdpagv.hxx +++ b/include/svx/svdpagv.hxx @@ -227,7 +227,7 @@ public: //void SetHelpLinePos(sal_uInt16 nNum, const Point& rNewPos); void SetHelpLine(sal_uInt16 nNum, const SdrHelpLine& rNewHelpLine); void DeleteHelpLine(sal_uInt16 nNum); - void InsertHelpLine(const SdrHelpLine& rHL, sal_uInt16 nNum=0xFFFF); + void InsertHelpLine(const SdrHelpLine& rHL); /// At least one member must be visible for the Group object and /// it must not be locked diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index 06396966e4f0..a3d00a04ea1b 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -355,7 +355,7 @@ public: SdrPaintWindow* BeginDrawLayers(OutputDevice* pOut, const vcl::Region& rReg, bool bDisableIntersect = false); // Used when the region passed to BeginDrawLayers needs to be changed - void UpdateDrawLayersRegion(OutputDevice* pOut, const vcl::Region& rReg, bool bDisableIntersect = false); + void UpdateDrawLayersRegion(OutputDevice* pOut, const vcl::Region& rReg); void EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer); protected: @@ -425,7 +425,7 @@ public: const Size& GetGridFine() const { return maGridFin; } void InvalidateAllWin(); - void InvalidateAllWin(const Rectangle& rRect, bool bPlus1Pix=false); + void InvalidateAllWin(const Rectangle& rRect); /// If the View should not call Invalidate() on the windows, override /// the following 2 methods and do something else. diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx index f9931b04b756..a305fb80702a 100644 --- a/include/svx/svdtrans.hxx +++ b/include/svx/svdtrans.hxx @@ -59,7 +59,7 @@ inline void MovePoint(Point& rPnt, const Size& S) { rPnt.X()+=S.Width(); inline void MovePoly(tools::Polygon& rPoly, const Size& S) { rPoly.Move(S.Width(),S.Height()); } void MoveXPoly(XPolygon& rPoly, const Size& S); -SVX_DLLPUBLIC void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bNoJustify = false); +SVX_DLLPUBLIC void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& xFact, const Fraction& yFact); inline void ResizePoint(Point& rPnt, const Point& rRef, Fraction xFact, Fraction yFact); void ResizePoly(tools::Polygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact); void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact); @@ -73,7 +73,7 @@ void MirrorPoint(Point& rPnt, const Point& rRef1, const Point& rRef2); void MirrorXPoly(XPolygon& rPoly, const Point& rRef1, const Point& rRef2); inline void ShearPoint(Point& rPnt, const Point& rRef, double tn, bool bVShear = false); -SVX_DLLPUBLIC void ShearPoly(tools::Polygon& rPoly, const Point& rRef, double tn, bool bVShear = false); +SVX_DLLPUBLIC void ShearPoly(tools::Polygon& rPoly, const Point& rRef, double tn); void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, bool bVShear = false); /** diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx index 26cb62a2f118..21404446077d 100644 --- a/include/svx/svdundo.hxx +++ b/include/svx/svdundo.hxx @@ -550,7 +550,7 @@ protected: protected: SdrUndoPage(SdrPage& rNewPg); - static void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 n=0, bool bRepeat = false); + static void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 n=0); }; /** diff --git a/include/svx/svdxcgv.hxx b/include/svx/svdxcgv.hxx index 0ad977b16587..5377870b2fd8 100644 --- a/include/svx/svdxcgv.hxx +++ b/include/svx/svdxcgv.hxx @@ -111,12 +111,6 @@ public: bool Paste(const OUString& rStr, const Point& rPos, SdrObjList* pLst=nullptr, SdrInsertFlags nOptions=SdrInsertFlags::NONE); bool Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt16 eFormat, const Point& rPos, SdrObjList* pLst=nullptr, SdrInsertFlags nOptions=SdrInsertFlags::NONE); - - static bool Cut( sal_uIntPtr nFormat = SDR_ANYFORMAT ); - - static bool Yank( sal_uIntPtr nFormat = SDR_ANYFORMAT ); - - static bool Paste( vcl::Window* pWin = nullptr, sal_uIntPtr nFormat = SDR_ANYFORMAT ); }; #endif // INCLUDED_SVX_SVDXCGV_HXX diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index cf39d68d7cb8..02bc055b84b0 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -169,7 +169,7 @@ class AbstractSvxObjectNameDialog :public VclAbstractDialog { public: virtual void GetName(OUString& rName) = 0; - virtual void SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink, bool bCheckImmediately = false) = 0; + virtual void SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink) = 0; }; class AbstractSvxObjectTitleDescDialog :public VclAbstractDialog @@ -277,8 +277,7 @@ public: virtual SfxAbstractTabDialog* CreateTextTabDialog( vcl::Window* pParent, const SfxItemSet* pAttrSet, - SdrView* pView, - SdrModel* pModel=nullptr ) = 0 ; + SdrView* pView ) = 0 ; virtual AbstractSvxCaptionDialog* CreateCaptionDialog( vcl::Window* pParent, const SdrView* pView, @@ -286,8 +285,7 @@ public: virtual AbstractSvxDistributeDialog* CreateSvxDistributeDialog(vcl::Window* pParent, const SfxItemSet& rAttr, - SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone, - SvxDistributeVertical eVer = SvxDistributeVerticalNone)= 0; + SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone)= 0; virtual AbstractFmShowColsDialog * CreateFmShowColsDialog( vcl::Window* pParent ) = 0; diff --git a/include/svx/txencbox.hxx b/include/svx/txencbox.hxx index edbfc429feb8..41a5c329b56b 100644 --- a/include/svx/txencbox.hxx +++ b/include/svx/txencbox.hxx @@ -84,15 +84,13 @@ public: */ void FillWithMimeAndSelectBest(); - void InsertTextEncoding( const rtl_TextEncoding nEnc, - sal_Int32 nPos = LISTBOX_APPEND ); + void InsertTextEncoding( const rtl_TextEncoding nEnc ); void InsertTextEncoding( const rtl_TextEncoding nEnc, const OUString& rEntry, sal_Int32 nPos = LISTBOX_APPEND ); - void SelectTextEncoding( const rtl_TextEncoding nEnc, - bool bSelect = true ); + void SelectTextEncoding( const rtl_TextEncoding nEnc ); rtl_TextEncoding GetSelectTextEncoding() const; }; diff --git a/include/svx/view3d.hxx b/include/svx/view3d.hxx index 2f2fe088fc04..0a58ab0cfbd7 100644 --- a/include/svx/view3d.hxx +++ b/include/svx/view3d.hxx @@ -126,8 +126,8 @@ public: bool IsBreak3DObjPossible() const; void Break3DObj(); - SfxItemSet Get3DAttributes(E3dScene* pInScene = nullptr, bool bOnly3DAttr=false) const; - void Set3DAttributes(const SfxItemSet& rAttr, E3dScene* pInScene = nullptr, bool bOnly3DAttr=false); + SfxItemSet Get3DAttributes(E3dScene* pInScene = nullptr) const; + void Set3DAttributes(const SfxItemSet& rAttr, E3dScene* pInScene = nullptr); }; #endif // INCLUDED_SVX_VIEW3D_HXX diff --git a/include/svx/xcolit.hxx b/include/svx/xcolit.hxx index bb229b0806f8..3acdf0f00f0c 100644 --- a/include/svx/xcolit.hxx +++ b/include/svx/xcolit.hxx @@ -52,7 +52,7 @@ public: virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override; virtual SvStream& Store(SvStream& rOut, sal_uInt16 nItemVersion ) const override; - const Color& GetColorValue(const XColorList* pTable = nullptr) const; + const Color& GetColorValue() const; void SetColorValue(const Color& rNew) { aColor = rNew; Detach(); } }; diff --git a/include/svx/xpoly.hxx b/include/svx/xpoly.hxx index 6dfb0af507b5..8015ac346e2c 100644 --- a/include/svx/xpoly.hxx +++ b/include/svx/xpoly.hxx @@ -132,10 +132,8 @@ public: ~XPolyPolygon(); - void Insert( const XPolygon& rXPoly, - sal_uInt16 nPos = XPOLYPOLY_APPEND ); - void Insert( const XPolyPolygon& rXPoly, - sal_uInt16 nPos=XPOLYPOLY_APPEND ); + void Insert( const XPolygon& rXPoly ); + void Insert( const XPolyPolygon& rXPoly ); XPolygon Remove( sal_uInt16 nPos ); const XPolygon& GetObject( sal_uInt16 nPos ) const; diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index cf8e50f5c997..2d1b0296e611 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -187,7 +187,7 @@ namespace accessibility // lock solar mutex before SvxViewForwarder& GetViewForwarder() const; // lock solar mutex before - SvxEditViewForwarder& GetEditViewForwarder( bool bCreate = false ) const; + SvxEditViewForwarder& GetEditViewForwarder() const; // are we in edit mode? bool IsActive() const; @@ -306,29 +306,23 @@ namespace accessibility throw uno::RuntimeException("View forwarder is invalid, model might be dead", mxFrontEnd); } - SvxEditViewForwarder& AccessibleTextHelper_Impl::GetEditViewForwarder( bool bCreate ) const + SvxEditViewForwarder& AccessibleTextHelper_Impl::GetEditViewForwarder() const { if( !maEditSource.IsValid() ) throw uno::RuntimeException("Unknown edit source", mxFrontEnd); - SvxEditViewForwarder* pViewForwarder = maEditSource.GetEditViewForwarder( bCreate ); + SvxEditViewForwarder* pViewForwarder = maEditSource.GetEditViewForwarder(); if( !pViewForwarder ) { - if( bCreate ) - throw uno::RuntimeException("Unable to fetch edit view forwarder, model might be dead", mxFrontEnd); - else - throw uno::RuntimeException("No edit view forwarder, object not in edit mode", mxFrontEnd); + throw uno::RuntimeException("No edit view forwarder, object not in edit mode", mxFrontEnd); } if( pViewForwarder->IsValid() ) return *pViewForwarder; else { - if( bCreate ) - throw uno::RuntimeException("View forwarder is invalid, model might be dead", mxFrontEnd); - else - throw uno::RuntimeException("View forwarder is invalid, object not in edit mode", mxFrontEnd); + throw uno::RuntimeException("View forwarder is invalid, object not in edit mode", mxFrontEnd); } } diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index 69288d85e542..358265234673 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -630,10 +630,10 @@ void SvxRectCtlAccessibleContext::selectChild( long nNew, bool bFireFocus ) } } -void SvxRectCtlAccessibleContext::selectChild(RECT_POINT eButton, bool bFireFocus ) +void SvxRectCtlAccessibleContext::selectChild(RECT_POINT eButton ) { // no guard -> is done in next selectChild - selectChild(PointToIndex( eButton, mbAngleMode ), bFireFocus); + selectChild(PointToIndex( eButton, mbAngleMode )); } void SvxRectCtlAccessibleContext::CommitChange( const AccessibleEventObject& rEvent ) diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx index b91442bc7b42..f167a134e2ed 100644 --- a/svx/source/dialog/txencbox.cxx +++ b/svx/source/dialog/txencbox.cxx @@ -201,11 +201,11 @@ void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, } -void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, sal_Int32 nPos ) +void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc ) { const OUString& rEntry = m_pEncTable->GetTextString( nEnc ); if ( !rEntry.isEmpty() ) - InsertTextEncoding( nEnc, rEntry, nPos ); + InsertTextEncoding( nEnc, rEntry ); else SAL_WARN( "svx.dialog", "SvxTextEncodingBox::InsertTextEncoding: no resource string for text encoding: " << static_cast<sal_Int32>( nEnc ) ); } @@ -222,12 +222,12 @@ rtl_TextEncoding SvxTextEncodingBox::GetSelectTextEncoding() const } -void SvxTextEncodingBox::SelectTextEncoding( const rtl_TextEncoding nEnc, bool bSelect ) +void SvxTextEncodingBox::SelectTextEncoding( const rtl_TextEncoding nEnc ) { sal_Int32 nAt = EncodingToPos_Impl( nEnc ); if ( nAt != LISTBOX_ENTRY_NOTFOUND ) - SelectEntryPos( nAt, bSelect ); + SelectEntryPos( nAt ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx index 0a8c6fc5d18c..9da8e3ff6a61 100644 --- a/svx/source/engine3d/view3d1.cxx +++ b/svx/source/engine3d/view3d1.cxx @@ -96,7 +96,7 @@ void Imp_E3dView_InorderRun3DObjects(const SdrObject* pObj, sal_uInt32& rMask) } } -SfxItemSet E3dView::Get3DAttributes(E3dScene* pInScene, bool /*bOnly3DAttr*/) const +SfxItemSet E3dView::Get3DAttributes(E3dScene* pInScene) const { // Creating itemset with corresponding field SfxItemSet aSet( @@ -151,13 +151,13 @@ SfxItemSet E3dView::Get3DAttributes(E3dScene* pInScene, bool /*bOnly3DAttr*/) co return aSet; } -void E3dView::Set3DAttributes( const SfxItemSet& rAttr, E3dScene* pInScene, bool bReplaceAll) +void E3dView::Set3DAttributes( const SfxItemSet& rAttr, E3dScene* pInScene) { sal_uInt32 nSelectedItems(0L); if(pInScene) { - pInScene->SetMergedItemSetAndBroadcast(rAttr, bReplaceAll); + pInScene->SetMergedItemSetAndBroadcast(rAttr); } else { @@ -165,7 +165,7 @@ void E3dView::Set3DAttributes( const SfxItemSet& rAttr, E3dScene* pInScene, bool // They are not needed here, they are already handled in SetAttrToMarked // set at selected objects - SetAttrToMarked(rAttr, bReplaceAll); + SetAttrToMarked(rAttr, false/*bReplaceAll*/); // old run const SdrMarkList& rMarkList = GetMarkedObjectList(); diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index a403d0834a4c..20df477fff51 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -253,7 +253,7 @@ namespace _map->put( makeAny( xControlModel ), makeAny( xControlShape ) ); } - static void lcl_removeFormObject_throw( const FmFormObj& _object, const Reference< XMap >& _map, bool i_ignoreNonExistence = false ) + static void lcl_removeFormObject_throw( const FmFormObj& _object, const Reference< XMap >& _map ) { // the control model Reference< XControlModel > xControlModel( _object.GetUnoControlModel(), UNO_QUERY ); @@ -263,10 +263,9 @@ namespace return; } - Any aOldAssignment = - _map->remove( makeAny( xControlModel ) ); - OSL_ENSURE( !i_ignoreNonExistence || - ( aOldAssignment == makeAny( Reference< XControlShape >( const_cast< FmFormObj& >( _object ).getUnoShape(), UNO_QUERY ) ) ), + Any aOldAssignment = _map->remove( makeAny( xControlModel ) ); + OSL_ENSURE( + aOldAssignment == makeAny( Reference< XControlShape >( const_cast< FmFormObj& >( _object ).getUnoShape(), UNO_QUERY ) ), "lcl_removeFormObject: map was inconsistent!" ); } } diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 9c0cc8b60adb..00f9e1687f25 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -1769,40 +1769,37 @@ void FmXFormView::startMarkListWatching() } -void FmXFormView::saveMarkList( bool _bSmartUnmark ) +void FmXFormView::saveMarkList() { if ( m_pView ) { m_aMark = m_pView->GetMarkedObjectList(); - if ( _bSmartUnmark ) + const size_t nCount = m_aMark.GetMarkCount( ); + for ( size_t i = 0; i < nCount; ++i ) { - const size_t nCount = m_aMark.GetMarkCount( ); - for ( size_t i = 0; i < nCount; ++i ) - { - SdrMark* pMark = m_aMark.GetMark(i); - SdrObject* pObj = pMark->GetMarkedSdrObj(); + SdrMark* pMark = m_aMark.GetMark(i); + SdrObject* pObj = pMark->GetMarkedSdrObj(); - if ( m_pView->IsObjMarked( pObj ) ) + if ( m_pView->IsObjMarked( pObj ) ) + { + if ( pObj->IsGroupObject() ) { - if ( pObj->IsGroupObject() ) + SdrObjListIter aIter( *pObj->GetSubList() ); + bool bMixed = false; + while ( aIter.IsMore() && !bMixed ) + bMixed = ( aIter.Next()->GetObjInventor() != FmFormInventor ); + + if ( !bMixed ) { - SdrObjListIter aIter( *pObj->GetSubList() ); - bool bMixed = false; - while ( aIter.IsMore() && !bMixed ) - bMixed = ( aIter.Next()->GetObjInventor() != FmFormInventor ); - - if ( !bMixed ) - { - // all objects in the group are form objects - m_pView->MarkObj( pMark->GetMarkedSdrObj(), pMark->GetPageView(), true /* unmark! */ ); - } + // all objects in the group are form objects + m_pView->MarkObj( pMark->GetMarkedSdrObj(), pMark->GetPageView(), true /* unmark! */ ); } - else - { - if ( pObj->GetObjInventor() == FmFormInventor ) - { // this is a form layer object - m_pView->MarkObj( pMark->GetMarkedSdrObj(), pMark->GetPageView(), true /* unmark! */ ); - } + } + else + { + if ( pObj->GetObjInventor() == FmFormInventor ) + { // this is a form layer object + m_pView->MarkObj( pMark->GetMarkedSdrObj(), pMark->GetPageView(), true /* unmark! */ ); } } } diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx index 05d6c73bd798..ada3cf9a33f8 100644 --- a/svx/source/form/navigatortreemodel.cxx +++ b/svx/source/form/navigatortreemodel.cxx @@ -219,12 +219,12 @@ namespace svxform } - void NavigatorTreeModel::SetModified( bool bMod ) + void NavigatorTreeModel::SetModified() { if( !m_pFormShell ) return; SfxObjectShell* pObjShell = m_pFormShell->GetFormModel()->GetObjectShell(); if( !pObjShell ) return; - pObjShell->SetModified( bMod ); + pObjShell->SetModified(); } diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx index 7ea2e9829e2d..f09df36bafb9 100644 --- a/svx/source/inc/fmexpl.hxx +++ b/svx/source/inc/fmexpl.hxx @@ -371,7 +371,7 @@ namespace svxform static bool Rename( FmEntryData* pEntryData, const OUString& rNewText ); void Clear(); - void SetModified( bool bMod=true ); + void SetModified(); css::uno::Reference< css::form::XForms > GetForms() const; FmFormShell* GetFormShell() const { return m_pFormShell; } diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx index d4010f7385db..cb6c7e21e424 100644 --- a/svx/source/inc/fmvwimp.hxx +++ b/svx/source/inc/fmvwimp.hxx @@ -183,7 +183,7 @@ protected: FmXFormView( FmFormView* _pView ); virtual ~FmXFormView(); - void saveMarkList( bool _bSmartUnmark = true ); + void saveMarkList(); void restoreMarkList( SdrMarkList& _rRestoredMarkList ); void stopMarkListWatching(); void startMarkListWatching(); diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx index c0082a6be418..acac415799ef 100644 --- a/svx/source/inc/svxrectctaccessiblecontext.hxx +++ b/svx/source/inc/svxrectctaccessiblecontext.hxx @@ -225,7 +225,7 @@ public: @param eButton Button which belongs to the child which should be selected. */ - void selectChild( RECT_POINT ePoint, bool bFireFocus = true ); + void selectChild( RECT_POINT ePoint ); void FireChildFocus( RECT_POINT eButton ); protected: diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 20fa36595097..ec09febd39e4 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1752,7 +1752,7 @@ bool SdrEditView::IsAlignPossible() const return bOneOrMoreMovable; // otherwise: MarkCount>=2 } -void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, bool bBoundRects) +void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert) { if (eHor==SDRHALIGN_NONE && eVert==SDRVALIGN_NONE) return; @@ -1807,7 +1807,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, bool pObj->TakeObjInfo(aInfo); if (!aInfo.bMoveAllowed || pObj->IsMoveProtect()) { - Rectangle aObjRect(bBoundRects?pObj->GetCurrentBoundRect():pObj->GetSnapRect()); + Rectangle aObjRect(pObj->GetSnapRect()); aBound.Union(aObjRect); bHasFixed=true; } @@ -1838,10 +1838,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, bool } else { - if (bBoundRects) - aBound=GetMarkedObjBoundRect(); - else - aBound=GetMarkedObjRect(); + aBound=GetMarkedObjRect(); } } Point aCenter(aBound.Center()); @@ -1855,7 +1852,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, bool { long nXMov=0; long nYMov=0; - Rectangle aObjRect(bBoundRects?pObj->GetCurrentBoundRect():pObj->GetSnapRect()); + Rectangle aObjRect(pObj->GetSnapRect()); switch (eVert) { case SDRVALIGN_TOP : nYMov=aBound.Top() -aObjRect.Top() ; break; diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 3c9d41cbecfa..511c3cbf981b 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -1715,7 +1715,7 @@ void SdrEditView::DismantleMarkedObjects(bool bMakeLines) // Group -void SdrEditView::GroupMarked(const SdrObject* pUserGrp) +void SdrEditView::GroupMarked() { if (AreObjectsMarked()) { @@ -1763,8 +1763,6 @@ void SdrEditView::GroupMarked(const SdrObject* pUserGrp) { if (pGrp==nullptr) { - if (pUserGrp!=nullptr) - pGrp=pUserGrp->Clone(); if (pGrp==nullptr) pGrp=new SdrObjGroup; pDstLst=pGrp->GetSubList(); diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index d79f6d25de68..bc10c23a19b1 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -269,15 +269,12 @@ unsigned SdrLinkList::FindEntry(const Link<SdrObjFactory*,void>& rLink) const return 0xFFFF; } -void SdrLinkList::InsertLink(const Link<SdrObjFactory*,void>& rLink, unsigned nPos) +void SdrLinkList::InsertLink(const Link<SdrObjFactory*,void>& rLink) { unsigned nFnd=FindEntry(rLink); if (nFnd==0xFFFF) { if (rLink.IsSet()) { - if(nPos==0xFFFF) - aList.push_back(rLink); - else - aList.insert(aList.begin() + nPos, rLink); + aList.push_back(rLink); } else { OSL_FAIL("SdrLinkList::InsertLink(): Tried to insert a link that was not set already."); } diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 36340c67a252..3ff61f75a818 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -2171,18 +2171,11 @@ size_t SdrHdlList::GetHdlNum(const SdrHdl* pHdl) const return it - aList.begin(); } -void SdrHdlList::AddHdl(SdrHdl* pHdl, bool bAtBegin) +void SdrHdlList::AddHdl(SdrHdl* pHdl) { if (pHdl!=nullptr) { - if (bAtBegin) - { - aList.push_front(pHdl); - } - else - { - aList.push_back(pHdl); - } + aList.push_back(pHdl); pHdl->SetHdlList(this); } } diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index f74cbb92bc03..8e0ed0287a6e 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -97,12 +97,10 @@ SdrLayer::SdrLayer(SdrLayerID nNewID, const OUString& rNewName) : { } -void SdrLayer::SetStandardLayer(bool bStd) +void SdrLayer::SetStandardLayer() { - nType=(sal_uInt16)bStd; - if (bStd) { - maName = ImpGetResStr(STR_StandardLayerName); - } + nType=(sal_uInt16)true; + maName = ImpGetResStr(STR_StandardLayerName); if (pModel!=nullptr) { SdrHint aHint(HINT_LAYERCHG); pModel->Broadcast(aHint); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index bed33984f045..d899f81943e8 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -320,9 +320,9 @@ SdrModel::~SdrModel() delete mpImpl; } -void SdrModel::SetSwapGraphics( bool bSwap ) +void SdrModel::SetSwapGraphics() { - bSwapGraphics = bSwap; + bSwapGraphics = true; } bool SdrModel::IsReadOnly() const @@ -1372,7 +1372,7 @@ void SdrModel::TakeAngleStr(long nAngle, OUString& rStr, bool bNoDegChar) rStr = aBuf.makeStringAndClear(); } -void SdrModel::TakePercentStr(const Fraction& rVal, OUString& rStr, bool bNoPercentChar) +void SdrModel::TakePercentStr(const Fraction& rVal, OUString& rStr) { sal_Int32 nMul(rVal.GetNumerator()); sal_Int32 nDiv(rVal.GetDenominator()); @@ -1396,8 +1396,7 @@ void SdrModel::TakePercentStr(const Fraction& rVal, OUString& rStr, bool bNoPerc if(bNeg) rStr = "-" + rStr; - if(!bNoPercentChar) - rStr += "%"; + rStr += "%"; } void SdrModel::SetChanged(bool bFlg) diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 82129509957d..b01c62131c4c 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1338,7 +1338,7 @@ bool SdrMarkView::IsMarkedObjHit(const Point& rPnt, short nTol) const return bRet; } -SdrHdl* SdrMarkView::PickHandle(const Point& rPnt, SdrSearchOptions nOptions, SdrHdl* pHdl0) const +SdrHdl* SdrMarkView::PickHandle(const Point& rPnt, SdrSearchOptions nOptions) const { if (mbSomeObjChgdFlag) { // recalculate handles, if necessary FlushComeBackTimer(); @@ -1346,7 +1346,7 @@ SdrHdl* SdrMarkView::PickHandle(const Point& rPnt, SdrSearchOptions nOptions, Sd bool bBack(nOptions & SdrSearchOptions::BACKWARD); bool bNext(nOptions & SdrSearchOptions::NEXT); Point aPt(rPnt); - return maHdlList.IsHdlListHit(aPt,bBack,bNext,pHdl0); + return maHdlList.IsHdlListHit(aPt,bBack,bNext); } bool SdrMarkView::MarkObj(const Point& rPnt, short nTol, bool bToggle, bool bDeep) diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx index 298a12a1295a..68201cc02e78 100644 --- a/svx/source/svdraw/svdmrkv1.cxx +++ b/svx/source/svdraw/svdmrkv1.cxx @@ -466,33 +466,25 @@ bool SdrMarkView::MarkGluePoints(const Rectangle* pRect, bool bUnmark) return bChgd; } -bool SdrMarkView::PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16& rnId, SdrPageView*& rpPV, SdrSearchOptions nOptions) const +bool SdrMarkView::PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16& rnId, SdrPageView*& rpPV) const { - SdrObject* pObj0=rpObj; sal_uInt16 nId0=rnId; rpObj=nullptr; rpPV=nullptr; rnId=0; if (!IsGluePointEditMode()) return false; - bool bBack(nOptions & SdrSearchOptions::BACKWARD); - bool bNext(nOptions & SdrSearchOptions::NEXT); OutputDevice* pOut=mpActualOutDev.get(); if (pOut==nullptr) pOut=GetFirstOutputDevice(); if (pOut==nullptr) return false; SortMarkedObjects(); const size_t nMarkCount=GetMarkedObjectCount(); - size_t nMarkNum=bBack ? 0 : nMarkCount; - if (bNext) { - nMarkNum=TryToFindMarkedObject(pObj0); - if (nMarkNum==SAL_MAX_SIZE) return false; - if (!bBack) nMarkNum++; - } - while (bBack ? nMarkNum<nMarkCount : nMarkNum>0) { - if (!bBack) nMarkNum--; + size_t nMarkNum=nMarkCount; + while (nMarkNum>0) { + nMarkNum--; const SdrMark* pM=GetSdrMarkByIndex(nMarkNum); SdrObject* pObj=pM->GetMarkedSdrObj(); SdrPageView* pPV=pM->GetPageView(); const SdrGluePointList* pGPL=pObj->GetGluePointList(); if (pGPL!=nullptr) { - sal_uInt16 nNum=pGPL->HitTest(rPnt,*pOut,pObj,bBack,bNext,nId0); + sal_uInt16 nNum=pGPL->HitTest(rPnt,*pOut,pObj,false/*bBack*/,false/*bNext*/,nId0); if (nNum!=SDRGLUEPOINT_NOTFOUND) { // #i38892# @@ -507,8 +499,6 @@ bool SdrMarkView::PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16 } } } - bNext=false; // HitNextGluePoint only for the first Obj - if (bBack) nMarkNum++; } return false; } diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 80dd6fd6cac1..cac8a5291e4e 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -2513,9 +2513,9 @@ bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) } return bRet; } -bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) +bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(bool bHgt) { - Rectangle aNewTextRect = ImpCalculateTextFrame( bHgt, bWdt ); + Rectangle aNewTextRect = ImpCalculateTextFrame( bHgt, true/*bWdt*/ ); bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != maRect ); if ( bRet ) { diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 7e2c4d90a07b..43ceb636d9cd 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1018,7 +1018,7 @@ OUString SdrObject::TakeObjNamePlural() const return ImpGetResStr(STR_ObjNamePluralNONE); } -void SdrObject::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 nVal) const +void SdrObject::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr) const { rStr = ImpGetResStr(nStrCacheID); sal_Int32 nPos = rStr.indexOf("%1"); @@ -1032,8 +1032,7 @@ void SdrObject::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sa nPos = rStr.indexOf("%2"); if (nPos >= 0) // Replace '%2' with the passed value. - rStr = rStr.replaceAt( - nPos, 2, OUString::number(nVal)); + rStr = rStr.replaceAt(nPos, 2, "0"); } void SdrObject::ImpForcePlusData() @@ -1042,20 +1041,20 @@ void SdrObject::ImpForcePlusData() pPlusData = NewPlusData(); } -OUString SdrObject::GetAngleStr(long nAngle, bool bNoDegChar) const +OUString SdrObject::GetAngleStr(long nAngle) const { OUString aStr; if (pModel!=nullptr) { - SdrModel::TakeAngleStr(nAngle,aStr,bNoDegChar); + SdrModel::TakeAngleStr(nAngle,aStr); } return aStr; } -OUString SdrObject::GetMetrStr(long nVal, MapUnit /*eWantMap*/, bool bNoUnitChars) const +OUString SdrObject::GetMetrStr(long nVal, MapUnit /*eWantMap*/) const { OUString aStr; if (pModel!=nullptr) { - pModel->TakeMetricStr(nVal,aStr,bNoUnitChars); + pModel->TakeMetricStr(nVal,aStr); } return aStr; } diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 1ffb9dc1bbdb..ddfef8c9abed 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -1003,7 +1003,7 @@ void SdrGrafObj::SetModel( SdrModel* pNewModel ) ImpLinkAnmeldung(); } -void SdrGrafObj::StartAnimation( OutputDevice* /*pOutDev*/, const Point& /*rPoint*/, const Size& /*rSize*/, long /*nExtraData*/) +void SdrGrafObj::StartAnimation( OutputDevice* /*pOutDev*/, const Point& /*rPoint*/, const Size& /*rSize*/) { SetGrafAnimationAllowed(true); } diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 87eca7696a01..c587c4411017 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -274,10 +274,10 @@ bool SdrTextObj::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) return bRet; } -bool SdrTextObj::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) +bool SdrTextObj::AdjustTextFrameWidthAndHeight(bool bHgt) { Rectangle aNeuRect(maRect); - bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt,bWdt); + bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt); if (bRet) { Rectangle aBoundRect0; if (pUserCall!=nullptr) aBoundRect0=GetLastBoundRect(); maRect = aNeuRect; diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index fb8ba7e101d2..03c141603ed7 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -421,7 +421,7 @@ bool SdrTextObj::ImpCanConvTextToCurve() const return !IsOutlText(); } -SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier, bool bNoSetAttr) const +SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier) const { SdrObjKind ePathKind = bClosed ? OBJ_PATHFILL : OBJ_PATHLINE; basegfx::B2DPolyPolygon aB2DPolyPolygon(rPolyPolygon); @@ -448,15 +448,12 @@ SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPol { pPathObj->SetModel(pModel); - if(!bNoSetAttr) - { - sdr::properties::ItemChangeBroadcaster aC(*pPathObj); + sdr::properties::ItemChangeBroadcaster aC(*pPathObj); - pPathObj->ClearMergedItem(); - pPathObj->SetMergedItemSet(GetObjectItemSet()); - pPathObj->GetProperties().BroadcastItemChange(aC); - pPathObj->NbcSetStyleSheet(GetStyleSheet(), true); - } + pPathObj->ClearMergedItem(); + pPathObj->SetMergedItemSet(GetObjectItemSet()); + pPathObj->GetProperties().BroadcastItemChange(aC); + pPathObj->NbcSetStyleSheet(GetStyleSheet(), true); } return pPathObj; diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index 93788cf0dcec..d6b02d200430 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -767,10 +767,9 @@ void SdrPageView::DeleteHelpLine(sal_uInt16 nNum) } } -void SdrPageView::InsertHelpLine(const SdrHelpLine& rHL, sal_uInt16 nNum) +void SdrPageView::InsertHelpLine(const SdrHelpLine& rHL) { - if (nNum > aHelpLines.GetCount()) - nNum = aHelpLines.GetCount(); + sal_uInt16 nNum = aHelpLines.GetCount(); aHelpLines.Insert(rHL,nNum); if (GetView().IsHlplVisible()) ImpInvalidateHelpLineArea(nNum); diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index ee86bbb0ac7a..47996d76c935 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -795,7 +795,7 @@ void SdrPaintView::EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLa } } -void SdrPaintView::UpdateDrawLayersRegion(OutputDevice* pOut, const vcl::Region& rReg, bool bDisableIntersect) +void SdrPaintView::UpdateDrawLayersRegion(OutputDevice* pOut, const vcl::Region& rReg) { SdrPaintWindow* pPaintWindow = FindPaintWindow(*pOut); OSL_ENSURE(pPaintWindow, "SdrPaintView::UpdateDrawLayersRegion: No SdrPaintWindow (!)"); @@ -806,7 +806,7 @@ void SdrPaintView::UpdateDrawLayersRegion(OutputDevice* pOut, const vcl::Region& if(pKnownTarget) { - vcl::Region aOptimizedRepaintRegion = OptimizeDrawLayersRegion( pOut, rReg, bDisableIntersect ); + vcl::Region aOptimizedRepaintRegion = OptimizeDrawLayersRegion( pOut, rReg, false/*bDisableIntersect*/ ); pKnownTarget->GetPaintWindow().SetRedrawRegion(aOptimizedRepaintRegion); mpPageView->setPreparedPageWindow(pKnownTarget); // already set actually } @@ -911,7 +911,7 @@ void SdrPaintView::InvalidateAllWin() } } -void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, bool bPlus1Pix) +void SdrPaintView::InvalidateAllWin(const Rectangle& rRect) { const sal_uInt32 nWindowCount(PaintWindowCount()); @@ -924,16 +924,6 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, bool bPlus1Pix) OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); Rectangle aRect(rRect); - if(bPlus1Pix) - { - Size aPixSiz(1,1); - Size aSiz(rOutDev.PixelToLogic(aPixSiz)); - aRect.Left ()-=aSiz.Width(); - aRect.Top ()-=aSiz.Height(); - aRect.Right ()+=aSiz.Width(); - aRect.Bottom()+=aSiz.Height(); - } - Point aOrg(rOutDev.GetMapMode().GetOrigin()); aOrg.X()=-aOrg.X(); aOrg.Y()=-aOrg.Y(); Rectangle aOutRect(aOrg, rOutDev.GetOutputSize()); diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index 53b5685ea593..c14ede928427 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -32,7 +32,7 @@ void MoveXPoly(XPolygon& rPoly, const Size& S) rPoly.Move(S.Width(),S.Height()); } -void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact, bool bNoJustify) +void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact) { Fraction xFact(rxFact); Fraction yFact(ryFact); @@ -55,7 +55,7 @@ void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, con rRect.Top() = rRef.Y() + svx::Round( (rRect.Top() - rRef.Y()) * double(yFact) ); rRect.Bottom() = rRef.Y() + svx::Round( (rRect.Bottom() - rRef.Y()) * double(yFact) ); - if (!bNoJustify) rRect.Justify(); + rRect.Justify(); } @@ -141,11 +141,11 @@ void MirrorXPoly(XPolygon& rPoly, const Point& rRef1, const Point& rRef2) } } -void ShearPoly(tools::Polygon& rPoly, const Point& rRef, double tn, bool bVShear) +void ShearPoly(tools::Polygon& rPoly, const Point& rRef, double tn) { sal_uInt16 nCount=rPoly.GetSize(); for (sal_uInt16 i=0; i<nCount; i++) { - ShearPoint(rPoly[i],rRef,tn,bVShear); + ShearPoint(rPoly[i],rRef,tn); } } diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index b33fadc0161b..7c5e3bab2843 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -1413,7 +1413,7 @@ void SdrUndoPage::ImpMovePage(sal_uInt16 nOldNum, sal_uInt16 nNewNum) } } -void SdrUndoPage::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 /*n*/, bool /*bRepeat*/) +void SdrUndoPage::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 /*n*/) { rStr = ImpGetResStr(nStrCacheID); } diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index e1dbaa3a30d5..66816b426960 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -177,9 +177,6 @@ bool SdrView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin) if (!bRet && !IsExtendedKeyInputDispatcherEnabled()) { bRet = true; switch (rKEvt.GetKeyCode().GetFullFunction()) { - case KeyFuncType::CUT : Cut(); break; - case KeyFuncType::COPY : Yank(); break; - case KeyFuncType::PASTE : Paste(pWin); break; case KeyFuncType::DELETE: DeleteMarked(); break; case KeyFuncType::UNDO: mpModel->Undo(); break; case KeyFuncType::REDO: mpModel->Redo(); break; @@ -192,9 +189,6 @@ bool SdrView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin) if (pWin!=nullptr) pWin->ReleaseMouse(); } break; case KEY_DELETE: DeleteMarked(); break; - case KEY_CUT: case KEY_DELETE+KEY_SHIFT: Cut(); break; - case KEY_COPY: case KEY_INSERT+KEY_MOD1: Yank(); break; - case KEY_PASTE: case KEY_INSERT+KEY_SHIFT: Paste(pWin); break; case KEY_UNDO: case KEY_BACKSPACE+KEY_MOD2: mpModel->Undo(); break; case KEY_BACKSPACE+KEY_MOD2+KEY_SHIFT: mpModel->Redo(); break; case KEY_REPEAT: case KEY_BACKSPACE+KEY_MOD2+KEY_MOD1: mpModel->Repeat(*this); break; diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 51d91c1cb19c..96aa08b6171e 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -769,24 +769,4 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const } -bool SdrExchangeView::Cut( sal_uIntPtr /*nFormat */) -{ - OSL_FAIL( "SdrExchangeView::Cut: Not supported any more." ); - return false; -} - - -bool SdrExchangeView::Yank(sal_uIntPtr /*nFormat*/) -{ - OSL_FAIL( "SdrExchangeView::Yank: Not supported any more." ); - return false; -} - - -bool SdrExchangeView::Paste(vcl::Window* /*pWin*/, sal_uIntPtr /*nFormat*/) -{ - OSL_FAIL( "SdrExchangeView::Paste: Not supported any more." ); - return false; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 6692ef7020fb..bd961faacdea 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -1894,10 +1894,10 @@ void SdrTableObj::NbcResize(const Point& rRef, const Fraction& xFact, const Frac } -bool SdrTableObj::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) +bool SdrTableObj::AdjustTextFrameWidthAndHeight(bool bHgt) { Rectangle aNeuRect(maLogicRect); - bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt,bWdt); + bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt); if (bRet) { Rectangle aBoundRect0; diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx index 6d9c108745bd..52ee3f7c3a3d 100644 --- a/svx/source/tbxctrls/SvxColorValueSet.cxx +++ b/svx/source/tbxctrls/SvxColorValueSet.cxx @@ -80,8 +80,9 @@ void SvxColorValueSet::addEntriesForXColorList(const XColorList& rXColorList, sa } } -void SvxColorValueSet::addEntriesForColorSet(const std::set<Color>& rColorSet, const OUString& rNamePrefix, sal_uInt32 nStartIndex) +void SvxColorValueSet::addEntriesForColorSet(const std::set<Color>& rColorSet, const OUString& rNamePrefix) { + sal_uInt32 nStartIndex = 1; if(rNamePrefix.getLength() != 0) { for(std::set<Color>::const_iterator it = rColorSet.begin(); diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index 881b6af78fad..ae5819ba0f2c 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -926,22 +926,15 @@ void XPolyPolygon::CheckReference() } } -void XPolyPolygon::Insert( const XPolygon& rXPoly, sal_uInt16 nPos ) +void XPolyPolygon::Insert( const XPolygon& rXPoly ) { CheckReference(); XPolygon* pXPoly = new XPolygon( rXPoly ); - if ( nPos < pImpXPolyPolygon->aXPolyList.size() ) - { - XPolygonList::iterator it = pImpXPolyPolygon->aXPolyList.begin(); - ::std::advance( it, nPos ); - pImpXPolyPolygon->aXPolyList.insert( it, pXPoly ); - } - else - pImpXPolyPolygon->aXPolyList.push_back( pXPoly ); + pImpXPolyPolygon->aXPolyList.push_back( pXPoly ); } /// insert all XPolygons of a XPolyPolygon -void XPolyPolygon::Insert( const XPolyPolygon& rXPolyPoly, sal_uInt16 nPos ) +void XPolyPolygon::Insert( const XPolyPolygon& rXPolyPoly ) { CheckReference(); @@ -949,15 +942,7 @@ void XPolyPolygon::Insert( const XPolyPolygon& rXPolyPoly, sal_uInt16 nPos ) { XPolygon* pXPoly = new XPolygon( rXPolyPoly[i] ); - if ( nPos < pImpXPolyPolygon->aXPolyList.size() ) - { - XPolygonList::iterator it = pImpXPolyPolygon->aXPolyList.begin(); - ::std::advance( it, nPos ); - pImpXPolyPolygon->aXPolyList.insert( it, pXPoly ); - nPos++; - } - else - pImpXPolyPolygon->aXPolyList.push_back( pXPoly ); + pImpXPolyPolygon->aXPolyList.push_back( pXPoly ); } } diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 3e80ccec62dc..73e2c41b4d25 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -330,12 +330,10 @@ SvStream& XColorItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const return rOut; } -const Color& XColorItem::GetColorValue(const XColorList* pTable) const +const Color& XColorItem::GetColorValue() const { - if (!IsIndex()) - return aColor; - else - return pTable->GetColor(GetIndex())->GetColor(); + assert(!IsIndex()); + return aColor; } |