svx/source/dialog/_contdlg.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 5da687891223488f46d08d705585ace1900ba0f4 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Mar 4 12:59:09 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Mar 4 13:34:25 2020 +0100 tdf#131015 crash using the pipette in Edit Contour dialog regression from commit 52fece12345161911da2a531213b7d5541192aad Date: Wed Jan 15 12:43:19 2020 +0200 tweak GetBitmap methods in BitmapEx we end up self-assigning, and with a little bit of optimisation, we can up overwriting parts of the graphic we need to construct the new graphic. Change-Id: Ie7e9ce3f9a69f1fe954079873c206985b81db68a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89954 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index fe08cad1fed7..d82004f475bb 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -623,17 +623,15 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void ) { if ( rWnd.IsClickValid() ) { - Bitmap aMask; const Color& rColor = rWnd.GetPipetteColor(); weld::WaitObject aWaitObj(&m_rDialog); if( aGraphic.GetType() == GraphicType::Bitmap ) { - const Bitmap & rBmp( aGraphic.GetBitmapEx().GetBitmap() ); const long nTol = static_cast<long>(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255 / 100); - aMask = rBmp.CreateMask( rColor, nTol ); + Bitmap aMask = aGraphic.GetBitmapEx().GetBitmap().CreateMask( rColor, nTol ); if( aGraphic.IsTransparent() ) aMask.CombineSimple( aGraphic.GetBitmapEx().GetMask(), BmpCombine::Or ); @@ -647,7 +645,8 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void ) aRedoGraphic = Graphic(); aUndoGraphic = aGraphic; - aGraphic = Graphic( BitmapEx( rBmp, aMask ) ); + Bitmap aBmp = aGraphic.GetBitmapEx().GetBitmap(); + aGraphic = Graphic( BitmapEx( aBmp, aMask ) ); mnGrfChanged++; bNewContour = (xQBox->run() == RET_YES); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits