summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-03 13:15:59 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-12-03 20:21:12 +0100
commit4b8ed95e336257e4821985435b5c59faa59e4588 (patch)
treeb510beaeebfd187a8fd931656677c94b8e651427 /vcl/qt5
parentf552271514fa5feaaed167f72d16b20108cc5438 (diff)
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@redhat.com>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/Qt5AccessibleWidget.cxx15
1 files changed, 6 insertions, 9 deletions
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;
}
}