[Libreoffice-commits] core.git: vcl/qt5

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 3 19:22:54 UTC 2019


 vcl/qt5/Qt5AccessibleWidget.cxx |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

New commits:
commit 4b8ed95e336257e4821985435b5c59faa59e4588
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 3 13:15:59 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Dec 3 20:21:12 2019 +0100

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

diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx
index 6a828865036e..dd062e369c46 100644
--- a/vcl/qt5/Qt5AccessibleWidget.cxx
+++ b/vcl/qt5/Qt5AccessibleWidget.cxx
@@ -50,6 +50,7 @@
 #include <com/sun/star/uno/Sequence.hxx>
 
 #include <comphelper/AccessibleImplementationHelper.hxx>
+#include <o3tl/any.hxx>
 #include <sal/log.hxx>
 #include <vcl/popupmenuwindow.hxx>
 
@@ -853,23 +854,19 @@ QString Qt5AccessibleWidget::attributes(int offset, int* startOffset, int* endOf
     {
         if (pValues[i].Name == "CharFontName")
         {
-            OUString aStr;
-            pValues[i].Value >>= aStr;
-            aRet += "font-family:" + aStr + ";";
+            aRet += "font-family:" + *o3tl::doAccess<OUString>(pValues[i].Value) + ";";
             continue;
         }
         if (pValues[i].Name == "CharHeight")
         {
-            double fHeight;
-            pValues[i].Value >>= fHeight;
-            aRet += "font-size:" + OUString::number(fHeight) + "pt;";
+            aRet += "font-size:" + OUString::number(*o3tl::doAccess<double>(pValues[i].Value))
+                    + "pt;";
             continue;
         }
         if (pValues[i].Name == "CharWeight")
         {
-            double fWeight;
-            pValues[i].Value >>= fWeight;
-            aRet += "font-weight:" + lcl_convertFontWeight(fWeight) + ";";
+            aRet += "font-weight:"
+                    + lcl_convertFontWeight(*o3tl::doAccess<double>(pValues[i].Value)) + ";";
             continue;
         }
     }


More information about the Libreoffice-commits mailing list