sc/source/ui/docshell/docsh.cxx   |    7 ++++++-
 sc/source/ui/inc/docsh.hxx        |    4 +++-
 vcl/source/gdi/TypeSerializer.cxx |   16 ++++++++++------
 3 files changed, 19 insertions(+), 8 deletions(-)

New commits:
commit 58db061502241585b12e37618eddc508d41ecf5f
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Feb 7 09:08:29 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Feb 7 16:00:08 2024 +0100

    cid#1401342 silence Uncaught exception
    
    Change-Id: I63d9cb5dee8900427c86448f2e19c0aa91e753dc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163085
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 21c5cc68026c..1cfd3778d6be 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -3274,7 +3274,7 @@ ScDocShellModificator::ScDocShellModificator( ScDocShell& 
rDS )
     rDoc.EnableIdle(false);
 }
 
-ScDocShellModificator::~ScDocShellModificator() COVERITY_NOEXCEPT_FALSE
+void ScDocShellModificator::ImplDestroy()
 {
     ScDocument& rDoc = rDocShell.GetDocument();
     rDoc.SetAutoCalcShellDisabled( bAutoCalcShellDisabled );
@@ -3283,6 +3283,11 @@ ScDocShellModificator::~ScDocShellModificator() 
COVERITY_NOEXCEPT_FALSE
     rDoc.EnableIdle(bIdleEnabled);
 }
 
+ScDocShellModificator::~ScDocShellModificator()
+{
+    suppress_fun_call_w_exception(ImplDestroy());
+}
+
 void ScDocShellModificator::SetDocumentModified()
 {
     ScDocument& rDoc = rDocShell.GetDocument();
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 12e6414262ae..2a87da31ee69 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -472,9 +472,11 @@ class ScDocShellModificator
     ScDocShellModificator( const ScDocShellModificator& ) = delete;
     ScDocShellModificator&  operator=( const ScDocShellModificator& ) = delete;
 
+    void ImplDestroy();
+
 public:
     explicit ScDocShellModificator( ScDocShell& );
-    ~ScDocShellModificator() COVERITY_NOEXCEPT_FALSE;
+    ~ScDocShellModificator();
     void            SetDocumentModified();
 };
 
commit 81be82cce8774f6b29af627b738112ae068c2b76
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Feb 7 09:03:13 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Feb 7 16:00:01 2024 +0100

    cid#1591747 Unsigned compared against 0
    
    and
    
    cid#1591746 Operands don't affect result
    
    Change-Id: I4fbaec75c535ec7db94fc8928020bb93b8ea9a2b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163084
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/source/gdi/TypeSerializer.cxx 
b/vcl/source/gdi/TypeSerializer.cxx
index d8522bad3615..68e072892183 100644
--- a/vcl/source/gdi/TypeSerializer.cxx
+++ b/vcl/source/gdi/TypeSerializer.cxx
@@ -447,16 +447,20 @@ static bool UselessScaleForMapMode(const Fraction& rScale)
 bool TypeSerializer::readMapMode(MapMode& rMapMode)
 {
     VersionCompatRead aCompat(mrStream);
-    sal_uInt16 nUnit(0);
-    Point aOrigin;
-    Fraction aScaleX;
-    Fraction aScaleY;
-    bool bSimple(true);
 
-    mrStream.ReadUInt16(nUnit);
+    sal_Int16 nUnit(0);
+    mrStream.ReadInt16(nUnit);
+
+    Point aOrigin;
     readPoint(aOrigin);
+
+    Fraction aScaleX;
     readFraction(aScaleX);
+
+    Fraction aScaleY;
     readFraction(aScaleY);
+
+    bool bSimple(true);
     mrStream.ReadCharAsBool(bSimple);
 
     if (nUnit < sal_Int16(MapUnit::Map100thMM) || nUnit > 
sal_Int16(MapUnit::LAST))

Reply via email to