canvas/source/tools/canvastools.cxx | 13 +------------ canvas/source/vcl/canvashelper.cxx | 19 +------------------ include/canvas/canvastools.hxx | 3 +-- vcl/source/image/Image.cxx | 2 +- 4 files changed, 4 insertions(+), 33 deletions(-)
New commits: commit 87a553be37fc7acf32fb5371b81d717e5bf1211e Author: Caolán McNamara <[email protected]> AuthorDate: Tue Sep 2 10:30:22 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Sep 2 16:15:37 2025 +0200 cid#1665198 'Constant' variable guards dead code dead code now since: commit e7b460f9197a57360dd017481dc747170e6a729f Date: Sat Aug 30 15:23:11 2025 +0200 BitmapEx->Bitmap in canvas now that Bitmap supports transparency Change-Id: Ibc296ea82953e571390eea01628adfa71a4f6ab9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190517 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx index 49bb5169a2b5..31a89e24492a 100644 --- a/canvas/source/tools/canvastools.cxx +++ b/canvas/source/tools/canvastools.cxx @@ -1133,8 +1133,7 @@ namespace canvastools void clipOutDev(const rendering::ViewState& viewState, const rendering::RenderState& renderState, - OutputDevice& rOutDev, - OutputDevice* p2ndOutDev) + OutputDevice& rOutDev) { // accumulate non-empty clips into one region vcl::Region aClipRegion(true); @@ -1189,19 +1188,9 @@ namespace canvastools // are empty, aClipRegion remains default-constructed, // i.e. empty, too. if( aClipRegion.IsNull() ) - { rOutDev.SetClipRegion(); - - if( p2ndOutDev ) - p2ndOutDev->SetClipRegion(); - } else - { rOutDev.SetClipRegion( aClipRegion ); - - if( p2ndOutDev ) - p2ndOutDev->SetClipRegion( aClipRegion ); - } } void extractExtraFontProperties(const uno::Sequence<beans::PropertyValue>& rExtraFontProperties, diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 295661ce83a7..154551120411 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -910,7 +910,6 @@ namespace vclcanvas eColorType == IGNORE_COLOR ? 0 : 3 ); OutputDevice& rOutDev( mpOutDevProvider->getOutDev() ); - OutputDevice* p2ndOutDev = nullptr; rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( AntialiasingFlags::Enable ); @@ -919,7 +918,7 @@ namespace vclcanvas // TODO(P2): Don't change clipping all the time, maintain current clip // state and change only when update is necessary - ::canvastools::clipOutDev(viewState, renderState, rOutDev, p2ndOutDev); + ::canvastools::clipOutDev(viewState, renderState, rOutDev); Color aColor( COL_WHITE ); @@ -941,30 +940,15 @@ namespace vclcanvas case LINE_COLOR: rOutDev.SetLineColor( aColor ); rOutDev.SetFillColor(); - - if( p2ndOutDev ) - { - p2ndOutDev->SetLineColor( aColor ); - p2ndOutDev->SetFillColor(); - } break; case FILL_COLOR: rOutDev.SetFillColor( aColor ); rOutDev.SetLineColor(); - - if( p2ndOutDev ) - { - p2ndOutDev->SetFillColor( aColor ); - p2ndOutDev->SetLineColor(); - } break; case TEXT_COLOR: rOutDev.SetTextColor( aColor ); - - if( p2ndOutDev ) - p2ndOutDev->SetTextColor( aColor ); break; default: @@ -1008,7 +992,6 @@ namespace vclcanvas aVCLFont.SetColor( aColor ); aVCLFont.SetFillColor( aColor ); - // no need to replicate this for mp2ndOutDev, we're modifying only aVCLFont here. if( !vclcanvastools::setupFontTransform( o_rOutPos, aVCLFont, viewState, renderState, rOutDev ) ) return false; diff --git a/include/canvas/canvastools.hxx b/include/canvas/canvastools.hxx index 310a968e32b5..a33ee36fea7b 100644 --- a/include/canvas/canvastools.hxx +++ b/include/canvas/canvastools.hxx @@ -534,8 +534,7 @@ namespace canvastools CANVASTOOLS_DLLPUBLIC void clipOutDev(const css::rendering::ViewState& viewState, const css::rendering::RenderState& renderState, - OutputDevice& rOutDev, - OutputDevice* p2ndOutDev=nullptr); + OutputDevice& rOutDev); CANVASTOOLS_DLLPUBLIC void extractExtraFontProperties(const css::uno::Sequence<css::beans::PropertyValue>& rExtraFontProperties, sal_uInt32& rEmphasisMark); commit 325cf2232dfb8995fead9c9c227a074a41bf51b0 Author: Caolán McNamara <[email protected]> AuthorDate: Tue Sep 2 10:26:04 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Sep 2 16:15:23 2025 +0200 cid#1665199 Variable copied when it could be moved Change-Id: Ibcda574263358ab31cb80d304aa505033ffc8c51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190516 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx index 03e298a39c00..f8c9ae0c073d 100644 --- a/vcl/source/image/Image.cxx +++ b/vcl/source/image/Image.cxx @@ -162,7 +162,7 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle sal_uInt8 cErase = 128; aTempBitmap = Bitmap(aTempBitmap, AlphaMask(aTempBitmap.GetSizePixel(), &cErase)); } - aRenderBmp = aTempBitmap; + aRenderBmp = std::move(aTempBitmap); } }
