diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-12-09 15:18:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-12-09 16:25:23 +0100 |
commit | 7ba2d77dc2b920978f6084ae6223b6828f32bcd3 (patch) | |
tree | af9d6bd39a8a2f6c3f05e1ad23327dca6f8a4f22 /desktop | |
parent | 9631f5d35d1870faf4ca2a19fe30b827a1f59905 (diff) |
Use o3tl::doAccess, prevent -Werror=maybe-uninitialized
Change-Id: Id30119c03dbbe0b3befe17cdb0bdb5f2943097ce
Reviewed-on: https://gerrit.libreoffice.org/84753
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b527f2cdeb92..bd11c2ad6fc7 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -41,6 +41,7 @@ #include <sal/log.hxx> #include <vcl/errinf.hxx> #include <vcl/lok.hxx> +#include <o3tl/any.hxx> #include <osl/file.hxx> #include <osl/process.h> #include <osl/thread.h> @@ -3488,17 +3489,16 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma int nLeft = OutputDevice::LogicToLogic(aChartBB.Left(), MapUnit::MapTwip, MapUnit::Map100thMM); int nTop = OutputDevice::LogicToLogic(aChartBB.Top(), MapUnit::MapTwip, MapUnit::Map100thMM); - sal_Int32 value; for (beans::PropertyValue& rPropValue: aPropertyValuesVector) { if (rPropValue.Name == "TransformPosX" || rPropValue.Name == "TransformRotationX") { - rPropValue.Value >>= value; + auto const value = *o3tl::doAccess<sal_Int32>(rPropValue.Value); rPropValue.Value <<= value - nLeft; } else if (rPropValue.Name == "TransformPosY" || rPropValue.Name == "TransformRotationY") { - rPropValue.Value >>= value; + auto const value = *o3tl::doAccess<sal_Int32>(rPropValue.Value); rPropValue.Value <<= value - nTop; } } |