chart2/source/model/template/ChartTypeManager.cxx | 8 +++--- chart2/source/model/template/HistogramChartTypeTemplate.cxx | 4 +-- chart2/source/model/template/HistogramChartTypeTemplate.hxx | 2 - chart2/source/model/template/PieChartTypeTemplate.cxx | 3 -- chart2/source/model/template/PieChartTypeTemplate.hxx | 3 -- sw/source/core/doc/notxtfrm.cxx | 2 - sw/source/core/inc/cellfrm.hxx | 3 -- sw/source/core/inc/flyfrm.hxx | 3 -- sw/source/core/inc/frame.hxx | 3 -- sw/source/core/inc/layfrm.hxx | 3 -- sw/source/core/inc/notxtfrm.hxx | 3 -- sw/source/core/inc/rootfrm.hxx | 3 -- sw/source/core/inc/tabfrm.hxx | 3 -- sw/source/core/inc/txtfrm.hxx | 3 -- sw/source/core/layout/paintfrm.cxx | 16 ++++++------ sw/source/core/layout/unusedf.cxx | 2 - sw/source/core/text/frmpaint.cxx | 2 - 17 files changed, 28 insertions(+), 38 deletions(-)
New commits: commit 0210aac7f9f52701a3b3b74d4de8eaf86a52e8b5 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Sep 30 14:03:14 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Oct 1 11:17:03 2024 +0200 loplugin:constantparam Change-Id: I114331d1cb7860087d5f5bee77af771e537b0616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174301 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx index 4ec856c822f0..b81e47ee3884 100644 --- a/chart2/source/model/template/ChartTypeManager.cxx +++ b/chart2/source/model/template/ChartTypeManager.cxx @@ -426,22 +426,22 @@ rtl::Reference< ::chart::ChartTypeTemplate > ChartTypeManager::createTemplate( case TEMPLATE_THREEDPIE: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, chart2::PieChartOffsetMode_NONE, false, - chart2::PieChartSubType_NONE, 2, 3 )); + chart2::PieChartSubType_NONE, 3 )); break; case TEMPLATE_THREEDPIEALLEXPLODED: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, chart2::PieChartOffsetMode_ALL_EXPLODED, false, - chart2::PieChartSubType_NONE, 2, 3 )); + chart2::PieChartSubType_NONE, 3 )); break; case TEMPLATE_THREEDDONUT: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, chart2::PieChartOffsetMode_NONE, true, - chart2::PieChartSubType_NONE, 2, 3 )); + chart2::PieChartSubType_NONE, 3 )); break; case TEMPLATE_THREEDDONUTALLEXPLODED: xTemplate.set( new PieChartTypeTemplate( m_xContext, aServiceSpecifier, chart2::PieChartOffsetMode_ALL_EXPLODED, true, - chart2::PieChartSubType_NONE, 2, 3 )); + chart2::PieChartSubType_NONE, 3 )); break; case TEMPLATE_SCATTERLINESYMBOL: diff --git a/chart2/source/model/template/HistogramChartTypeTemplate.cxx b/chart2/source/model/template/HistogramChartTypeTemplate.cxx index 0bc41d56fc7b..97dc001d9550 100644 --- a/chart2/source/model/template/HistogramChartTypeTemplate.cxx +++ b/chart2/source/model/template/HistogramChartTypeTemplate.cxx @@ -61,10 +61,10 @@ namespace chart { HistogramChartTypeTemplate::HistogramChartTypeTemplate( Reference<uno::XComponentContext> const& xContext, const OUString& rServiceName, - StackMode eStackMode, sal_Int32 nDim /* = 2 */) + StackMode eStackMode) : ChartTypeTemplate(xContext, rServiceName) , m_eStackMode(eStackMode) - , m_nDim(nDim) + , m_nDim(2) { } diff --git a/chart2/source/model/template/HistogramChartTypeTemplate.hxx b/chart2/source/model/template/HistogramChartTypeTemplate.hxx index 292cdce32f33..519292f6107f 100644 --- a/chart2/source/model/template/HistogramChartTypeTemplate.hxx +++ b/chart2/source/model/template/HistogramChartTypeTemplate.hxx @@ -21,7 +21,7 @@ class HistogramChartTypeTemplate : public ChartTypeTemplate, public ::property:: public: explicit HistogramChartTypeTemplate( css::uno::Reference<css::uno::XComponentContext> const& xContext, - const OUString& rServiceName, StackMode eStackMode, sal_Int32 nDim = 2); + const OUString& rServiceName, StackMode eStackMode); /// merge XInterface implementations DECLARE_XINTERFACE() diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index 0ae474623f37..6bd4d3bb6efb 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -140,7 +140,6 @@ PieChartTypeTemplate::PieChartTypeTemplate( chart2::PieChartOffsetMode eMode, bool bRings, chart2::PieChartSubType eSubType, - sal_Int32 nCompositeSize, sal_Int32 nDim /* = 2 */ ) : ChartTypeTemplate( xContext, rServiceName ) { @@ -148,7 +147,7 @@ PieChartTypeTemplate::PieChartTypeTemplate( setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_DIMENSION, uno::Any( nDim )); setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_USE_RINGS, uno::Any( bRings )); setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_SUB_PIE_TYPE, uno::Any( eSubType )); - setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_COMPOSITE_SIZE, uno::Any( nCompositeSize )); + setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_COMPOSITE_SIZE, uno::Any( sal_Int32(2) )); } PieChartTypeTemplate::~PieChartTypeTemplate() diff --git a/chart2/source/model/template/PieChartTypeTemplate.hxx b/chart2/source/model/template/PieChartTypeTemplate.hxx index 5e5d2539969d..c7b3b9b6951c 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.hxx +++ b/chart2/source/model/template/PieChartTypeTemplate.hxx @@ -39,8 +39,7 @@ public: css::chart2::PieChartOffsetMode eMode, bool bRings, css::chart2::PieChartSubType eSubType, - sal_Int32 nCompositeSize, - sal_Int32 nDim = 2 ); + sal_Int32 nDim ); virtual ~PieChartTypeTemplate() override; /// merge XInterface implementations commit 3bffef8f40a0259df390575929261248f36b695f Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Sep 30 14:02:59 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Oct 1 11:16:55 2024 +0200 PaintSwFrame is always called with a nullptr for pPrintData ever since commit 3735d43955a000db8b6fff04a2214793be649c4b Author: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> Date: Wed Jun 5 09:14:23 2024 +0200 tdf#161340 Revert partially 6cdf523f179f3e7ed94267502a5fe3d1247398cc Change-Id: I2f01ad09e6d0f758ff4e51be96008e93750e9f8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174300 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index f785718035fe..34ad78e64cdb 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -214,7 +214,7 @@ static void lcl_ClearArea( const SwFrame &rFrame, } } -void SwNoTextFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode, SwPrintData const*const) const +void SwNoTextFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode) const { if ( getFrameArea().IsEmpty() ) return; diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx index 0d1575a83695..3fad18e7fcec 100644 --- a/sw/source/core/inc/cellfrm.hxx +++ b/sw/source/core/inc/cellfrm.hxx @@ -42,8 +42,7 @@ public: SwCellFrame( const SwTableBox &, SwFrame*, bool bInsertContent ); virtual bool GetModelPositionForViewPoint( SwPosition *, Point&, SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL ) const override; virtual void CheckDirection( bool bVert ) override; // #i103961# diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index 831cf7fecea8..ef04e91419f6 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -170,8 +170,7 @@ protected: public: // #i26791# - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL ) const override; virtual Size ChgSize( const Size& aNewSize ) override; virtual bool GetModelPositionForViewPoint( SwPosition *, Point&, SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index d1b801f4c993..16e69f4e9484 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -865,8 +865,7 @@ public: SwCursorMoveState* = nullptr, bool bTestBackground = false ) const; virtual bool GetCharRect( SwRect &, const SwPosition&, SwCursorMoveState* = nullptr, bool bAllowFarAway = true ) const; - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode eMode = PAINT_ALL, - SwPrintData const*const pPrintData = nullptr ) const; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode eMode = PAINT_ALL ) const; // HACK: shortcut between frame and formatting // It's your own fault if you cast void* incorrectly! In any case check diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx index cc3704b866f8..3a48ae163915 100644 --- a/sw/source/core/inc/layfrm.hxx +++ b/sw/source/core/inc/layfrm.hxx @@ -97,8 +97,7 @@ public: SwLayoutFrame( SwFrameFormat*, SwFrame* ); - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL ) const override; const SwFrame *Lower() const { return m_pLower; } SwFrame *Lower() { return m_pLower; } bool ContainsDeleteForbiddenLayFrame() const; diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx index 12dc3691ef09..dbd2d3cae1f6 100644 --- a/sw/source/core/inc/notxtfrm.hxx +++ b/sw/source/core/inc/notxtfrm.hxx @@ -82,8 +82,7 @@ public: virtual bool LeftMargin(SwPaM *) const override; virtual bool RightMargin(SwPaM *, bool bAPI = false) const override; - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL ) const override; virtual bool GetCharRect( SwRect &, const SwPosition&, SwCursorMoveState* = nullptr, bool bAllowFarAway = true ) const override; virtual bool GetModelPositionForViewPoint(SwPosition* pPos, Point& aPoint, diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index 43d51b2dba6a..d41484ea7576 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -240,8 +240,7 @@ public: SW_DLLPUBLIC virtual bool GetModelPositionForViewPoint( SwPosition *, Point&, SwCursorMoveState* = nullptr, bool bTestBackground = false ) const override; - SW_DLLPUBLIC virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL, - SwPrintData const*const pPrintData = nullptr ) const override; + SW_DLLPUBLIC virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL ) const override; virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; virtual SwTwips GrowFrame(SwTwips, SwResizeLimitReason&, bool bTst, bool bInfo) override; #ifdef DBG_UTIL diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index 633f02806fbf..b442f5c66ddb 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -144,8 +144,7 @@ public: inline SwTabFrame *GetFollow(); SwTabFrame* FindMaster( bool bFirstMaster = false ) const; - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL ) const override; virtual void CheckDirection( bool bVert ) override; virtual void Cut() override; diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index 6bd719c8a257..182809007213 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -417,8 +417,7 @@ public: void PaintExtraData( const SwRect & rRect ) const; /// Page number etc. SwRect GetPaintSwRect(); - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, PaintFrameMode mode = PAINT_ALL ) const override; /** * Layout oriented cursor travelling: diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index de4c8cb522e8..e6088c22a778 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3268,7 +3268,7 @@ namespace * 3. Paint the document content (text) * 4. Paint the draw layer that is above the document |*/ -void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode, SwPrintData const*const pPrintData) const +void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode) const { OSL_ENSURE( Lower() && Lower()->IsPageFrame(), "Lower of root is no page." ); @@ -3479,7 +3479,7 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& gProp.pSLines->LockLines( true ); const IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess(); pSh->Imp()->PaintLayer( rIDDMA.GetHellId(), - pPrintData, + /*pPrintData*/nullptr, *pPage, pPage->getFrameArea(), &aPageBackgrdColor, pPage->IsRightToLeft(), @@ -3496,7 +3496,7 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& gProp.pSLines->LockLines( true ); const IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess(); pSh->Imp()->PaintLayer( rIDDMA.GetHeaderFooterHellId(), - pPrintData, + /*pPrintData*/nullptr, *pPage, pPage->getFrameArea(), &aPageBackgrdColor, pPage->IsRightToLeft(), @@ -3542,7 +3542,7 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& if ( pSh->Imp()->HasDrawView() ) { pSh->Imp()->PaintLayer( pSh->GetDoc()->getIDocumentDrawModelAccess().GetHeavenId(), - pPrintData, + /*pPrintData*/nullptr, *pPage, pPage->getFrameArea(), &aPageBackgrdColor, pPage->IsRightToLeft(), @@ -3716,7 +3716,7 @@ SwShortCut::SwShortCut( const SwFrame& rFrame, const SwRect& rRect ) } } -void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode ePaintFrameMode, SwPrintData const*const) const +void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode ePaintFrameMode) const { if (!getFramePrintArea().HasArea()) { @@ -4255,7 +4255,7 @@ bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) return bPaint; } -void SwCellFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode, SwPrintData const*const) const +void SwCellFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode) const { if ( GetLayoutRowSpan() >= 1 ) SwLayoutFrame::PaintSwFrame( rRenderContext, rRect ); @@ -4294,7 +4294,7 @@ void SwFrame::SetDrawObjsAsDeleted( bool bDeleted ) } } -void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode, SwPrintData const*const) const +void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode) const { //optimize thumbnail generation and store procedure to improve odt saving performance, #i120030# SwViewShell *pShell = getRootFrame()->GetCurrShell(); @@ -4671,7 +4671,7 @@ void SwTextFrame::PaintOutlineContentVisibilityButton() const UpdateOutlineContentVisibilityButton(pWrtSh); } -void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode, SwPrintData const*const) const +void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode) const { if (!getFramePrintArea().HasArea()) { diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx index fbb80dbfef71..79c2502e351c 100644 --- a/sw/source/core/layout/unusedf.cxx +++ b/sw/source/core/layout/unusedf.cxx @@ -27,7 +27,7 @@ void SwFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttr OSL_FAIL( "Format() of the base class called." ); } -void SwFrame::PaintSwFrame(vcl::RenderContext&, SwRect const&, PaintFrameMode, SwPrintData const*const) const +void SwFrame::PaintSwFrame(vcl::RenderContext&, SwRect const&, PaintFrameMode ) const { OSL_FAIL( "PaintSwFrame() of the base class called." ); } diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index 4b82ea4a1380..85d4bb03828e 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -642,7 +642,7 @@ bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const return false; } -void SwTextFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode, SwPrintData const*const) const +void SwTextFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& rRect, PaintFrameMode) const { ResetRepaint();