summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-09 15:18:06 +0100
committerAndras Timar <andras.timar@collabora.com>2021-03-22 22:34:04 +0100
commit54d9c0d3e7cfd2776987535b45b20376a62ecd59 (patch)
tree5e8cc04d764043ad5ea0135de6b6e9150673ec33
parent8e19fb1aa51ae01ae1b4b301e841af42392defb9 (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> (cherry picked from commit 7ba2d77dc2b920978f6084ae6223b6828f32bcd3)
-rw-r--r--desktop/source/lib/init.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 3e25780e00cb..8c484bfa8897 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>
@@ -3980,17 +3981,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;
}
}