diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-12-04 16:33:54 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-03-22 22:34:03 +0100 |
commit | 6222b35340481f98374a276f4ae1cf8251bdc59d (patch) | |
tree | dc6569a0e456e5ba7419613a385a3c13a6453537 | |
parent | aea8c002f961dbb551b793e68e2094427a909358 (diff) |
Use o3tl::doAccess, prevent -Werror=maybe-uninitialized
Change-Id: Iff932423bfd1964fa5fa2dfa74de9b7c9b6701f3
Reviewed-on: https://gerrit.libreoffice.org/84423
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit be3a818301a3ed1871bf6d7f57db39ddb6b67ab9)
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index fbb718b732c7..6f660566dac8 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -23,6 +23,8 @@ #include <math.h> #include <limits.h> #include <vector> + +#include <o3tl/any.hxx> #include <osl/endian.h> #include <osl/file.hxx> #include <tools/solar.h> @@ -4630,11 +4632,14 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r pAny = aGeometryItem.GetPropertyValueByName( sPath, sCoordinates ); if (pAny && (*pAny >>= seqCoordinates) && (seqCoordinates.getLength() >= 2)) { - sal_Int32 nL, nT, nR, nB; - seqCoordinates[0].First.Value >>= nL; - seqCoordinates[0].Second.Value >>= nT; - seqCoordinates[1].First.Value >>= nR; - seqCoordinates[1].Second.Value >>= nB; + auto const nL + = *o3tl::doAccess<sal_Int32>(seqCoordinates[0].First.Value); + auto const nT + = *o3tl::doAccess<sal_Int32>(seqCoordinates[0].Second.Value); + auto const nR + = *o3tl::doAccess<sal_Int32>(seqCoordinates[1].First.Value); + auto const nB + = *o3tl::doAccess<sal_Int32>(seqCoordinates[1].Second.Value); aEllipseRect_MS = basegfx::B2DRectangle(nL, nT, nR, nB); } |