sw/source/uibase/uiview/view.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1071db05c2b5a5a9974ec9ece12f60217ab86db6
Author:     Caolán McNamara <[email protected]>
AuthorDate: Sat Jun 1 20:16:17 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Jun 2 00:42:16 2024 +0200

    ofz#69356 Integer-overflow
    
    Change-Id: I5ce3b5858306dbc0f7bd8258dc306dc1195a8ce2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168335
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 6578944aa4a8..29fa3f3281ef 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1430,23 +1430,23 @@ void SwView::ReadUserDataSequence ( const uno::Sequence 
< beans::PropertyValue >
         if ( rValue.Name == "ViewLeft" )
         {
            rValue.Value >>= nX;
-           nX = o3tl::toTwips(nX, o3tl::Length::mm100);
+           nX = o3tl::convertSaturate(nX, o3tl::Length::mm100, 
o3tl::Length::twip);
         }
         else if ( rValue.Name == "ViewTop" )
         {
            rValue.Value >>= nY;
-           nY = o3tl::toTwips(nY, o3tl::Length::mm100);
+           nY = o3tl::convertSaturate(nY, o3tl::Length::mm100, 
o3tl::Length::twip);
         }
         else if ( rValue.Name == "VisibleLeft" )
         {
            rValue.Value >>= nLeft;
-           nLeft = o3tl::toTwips(nLeft, o3tl::Length::mm100);
+           nLeft = o3tl::convertSaturate(nLeft, o3tl::Length::mm100, 
o3tl::Length::twip);
            bGotVisibleLeft = true;
         }
         else if ( rValue.Name == "VisibleTop" )
         {
            rValue.Value >>= nTop;
-           nTop = o3tl::toTwips(nTop, o3tl::Length::mm100);
+           nTop = o3tl::convertSaturate(nTop, o3tl::Length::mm100, 
o3tl::Length::twip);
            bGotVisibleTop = true;
         }
         else if ( rValue.Name == "ZoomType" )

Reply via email to