From eecccbf2a99f9bae366cffd0a5c53e525ef90916 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 9 Dec 2019 15:18:06 +0100 Subject: Use o3tl::doAccess, prevent -Werror=maybe-uninitialized Change-Id: Id30119c03dbbe0b3befe17cdb0bdb5f2943097ce Reviewed-on: https://gerrit.libreoffice.org/84753 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit 7ba2d77dc2b920978f6084ae6223b6828f32bcd3) --- desktop/source/lib/init.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 88e82c0ee3f1..39f7b9e89b79 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -3485,17 +3486,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(rPropValue.Value); rPropValue.Value <<= value - nLeft; } else if (rPropValue.Name == "TransformPosY" || rPropValue.Name == "TransformRotationY") { - rPropValue.Value >>= value; + auto const value = *o3tl::doAccess(rPropValue.Value); rPropValue.Value <<= value - nTop; } } -- cgit