vcl/source/bitmap/bitmappaint.cxx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
New commits: commit aa1ab957c5c5f728dd0f05028e156bc7f4fd1f4b Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Apr 6 13:41:50 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Apr 6 15:45:54 2021 +0200 no need to check mxSalBmp here we have checked for IsEmpty() and if it is not empty, than it has a mxSalBmp Change-Id: I096c92f6d9edd710c4a541074c00916a0284d4f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113663 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx index e8a2a03c57b1..847dd4171b18 100644 --- a/vcl/source/bitmap/bitmappaint.cxx +++ b/vcl/source/bitmap/bitmappaint.cxx @@ -36,17 +36,14 @@ bool Bitmap::Erase(const Color& rFillColor) if (IsEmpty()) return true; - if (mxSalBmp) + // implementation specific replace + std::shared_ptr<SalBitmap> xImpBmp(ImplGetSVData()->mpDefInst->CreateSalBitmap()); + if (xImpBmp->Create(*mxSalBmp) && xImpBmp->Erase(rFillColor)) { - // implementation specific replace - std::shared_ptr<SalBitmap> xImpBmp(ImplGetSVData()->mpDefInst->CreateSalBitmap()); - if (xImpBmp->Create(*mxSalBmp) && xImpBmp->Erase(rFillColor)) - { - ImplSetSalBitmap(xImpBmp); - maPrefMapMode = MapMode(MapUnit::MapPixel); - maPrefSize = xImpBmp->GetSize(); - return true; - } + ImplSetSalBitmap(xImpBmp); + maPrefMapMode = MapMode(MapUnit::MapPixel); + maPrefSize = xImpBmp->GetSize(); + return true; } BitmapScopedWriteAccess pWriteAcc(*this); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits