[Libreoffice-commits] core.git: desktop/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 9 15:26:41 UTC 2019
desktop/source/lib/init.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 7ba2d77dc2b920978f6084ae6223b6828f32bcd3
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Dec 9 15:18:06 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Dec 9 16:25:23 2019 +0100
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 at redhat.com>
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;
}
}
More information about the Libreoffice-commits
mailing list