[Libreoffice-commits] core.git: filter/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 4 17:01:07 UTC 2019


 filter/source/msfilter/msdffimp.cxx |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

New commits:
commit be3a818301a3ed1871bf6d7f57db39ddb6b67ab9
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Dec 4 16:33:54 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Dec 4 18:00:05 2019 +0100

    Use o3tl::doAccess, prevent -Werror=maybe-uninitialized
    
    Change-Id: Iff932423bfd1964fa5fa2dfa74de9b7c9b6701f3
    Reviewed-on: https://gerrit.libreoffice.org/84423
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 3d791bbb9bc8..27b87f1bf4ef 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -23,6 +23,8 @@
 #include <math.h>
 #include <limits.h>
 #include <vector>
+
+#include <o3tl/any.hxx>
 #include <osl/endian.h>
 #include <osl/file.hxx>
 #include <tools/solar.h>
@@ -4639,11 +4641,14 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
                         pAny = aGeometryItem.GetPropertyValueByName( sPath, sCoordinates );
                         if (pAny && (*pAny >>= seqCoordinates) && (seqCoordinates.getLength() >= 2))
                         {
-                            sal_Int32 nL, nT, nR, nB;
-                            seqCoordinates[0].First.Value >>= nL;
-                            seqCoordinates[0].Second.Value >>= nT;
-                            seqCoordinates[1].First.Value >>= nR;
-                            seqCoordinates[1].Second.Value >>= nB;
+                            auto const nL
+                                = *o3tl::doAccess<sal_Int32>(seqCoordinates[0].First.Value);
+                            auto const nT
+                                = *o3tl::doAccess<sal_Int32>(seqCoordinates[0].Second.Value);
+                            auto const nR
+                                = *o3tl::doAccess<sal_Int32>(seqCoordinates[1].First.Value);
+                            auto const nB
+                                = *o3tl::doAccess<sal_Int32>(seqCoordinates[1].Second.Value);
                             aEllipseRect_MS = basegfx::B2DRectangle(nL, nT, nR, nB);
                         }
 


More information about the Libreoffice-commits mailing list