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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 3 20:31:38 UTC 2019


 sc/source/filter/oox/workbookhelper.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 1bfd91e1b319012b93fca144b9133d816150c27e
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 3 13:35:49 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Dec 3 21:30:07 2019 +0100

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

diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 4925c7841ee2..dd74d30523bc 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/document/XDocumentProperties.hpp>
 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
 #include <com/sun/star/document/XViewDataSupplier.hpp>
+#include <o3tl/any.hxx>
 #include <osl/thread.h>
 #include <osl/diagnose.h>
 #include <oox/helper/progressbar.hxx>
@@ -761,14 +762,12 @@ void WorkbookHelper::finalizeWorkbookImport()
                             OUString sName(rProp.Name);
                             if (sName == SC_POSITIONLEFT)
                             {
-                                SCCOL nPosLeft;
-                                rProp.Value >>= nPosLeft;
+                                SCCOL nPosLeft = *o3tl::doAccess<SCCOL>(rProp.Value);
                                 getScDocument().SetPosLeft(nPosLeft);
                             }
                             else if (sName == SC_POSITIONTOP)
                             {
-                                SCROW nPosTop;
-                                rProp.Value >>= nPosTop;
+                                SCROW nPosTop = *o3tl::doAccess<SCROW>(rProp.Value);
                                 getScDocument().SetPosTop(nPosTop);
                             }
                         }


More information about the Libreoffice-commits mailing list