svx/source/dialog/_contdlg.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 64269e5482613fdcca51e0378599a4b217fa1ef7
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Nov 21 08:52:21 2025 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sat Nov 22 21:02:46 2025 +0100

    cid#1667085 silence Overflowed constant
    
    Change-Id: Iae3aa9791c34fddc0c7140d32636439cb0654434
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194365
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index f4ce6c42e0ca..9d7c87a13854 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -24,6 +24,7 @@
 #include <sfx2/ctrlitem.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/module.hxx>
+#include <o3tl/untaint.hxx>
 #include <unotools/localedatawrapper.hxx>
 
 #include <svx/svxids.hrc>
@@ -635,7 +636,8 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, 
ContourWindow&, rWnd, void )
 
         if( aGraphic.GetType() == GraphicType::Bitmap )
         {
-            const tools::Long  nTol = 
static_cast<tools::Long>(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255 / 
100);
+            const auto nPercentage = 
o3tl::sanitizing_cast<sal_uInt16>(m_xMtfTolerance->get_value(FieldUnit::PERCENT));
+            const auto nTol = nPercentage * 255 / 100;
 
             AlphaMask aMask = 
aGraphic.GetBitmap().CreateColorBitmap().CreateAlphaMask( rColor, nTol );
 

Reply via email to