[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - include/vcl vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 8 08:45:02 UTC 2021
include/vcl/outdevmap.hxx | 10 ++++++++++
vcl/source/outdev/map.cxx | 18 +++---------------
2 files changed, 13 insertions(+), 15 deletions(-)
New commits:
commit ac407ab285b69f67e0e82bc10ea4abdbe8f9c08f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Dec 2 13:04:27 2020 +0000
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Thu Jul 8 10:44:29 2021 +0200
cid#1470369 Uninitialized scalar variable
and
cid#1470372 Uninitialized scalar variable
cid#1470364 Uninitialized scalar variable
cid#1470363 Uninitialized scalar variable
cid#1470359 Uninitialized scalar variable
cid#1470357 Uninitialized scalar variable
cid#1470355 Uninitialized scalar variable
cid#1470354 Uninitialized scalar variable
cid#1470353 Uninitialized scalar variable
Change-Id: I4a28f0f375f9108f4c43da7074f85d1fdbb3ebff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107070
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 2a988b1ecddd17f9c851b625d33fbe0c4dfa2325)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118594
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/include/vcl/outdevmap.hxx b/include/vcl/outdevmap.hxx
index d4ef27e94e91..467dd688c612 100644
--- a/include/vcl/outdevmap.hxx
+++ b/include/vcl/outdevmap.hxx
@@ -28,6 +28,16 @@ struct ImplMapRes
tools::Long mnMapScNumY; // Scaling factor - numerator in Y direction
tools::Long mnMapScDenomX; // Scaling factor - denominator in X direction
tools::Long mnMapScDenomY; // Scaling factor - denominator in Y direction
+
+ ImplMapRes()
+ : mnMapOfsX(0)
+ , mnMapOfsY(0)
+ , mnMapScNumX(1)
+ , mnMapScNumY(1)
+ , mnMapScDenomX(1)
+ , mnMapScDenomY(1)
+ {
+ }
};
#endif // INCLUDED_VCL_OUTDEVMAP_HXX
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index 3f478f2fdf88..dc7fca36fa3d 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -1344,17 +1344,11 @@ basegfx::B2DPolyPolygon OutputDevice::PixelToLogic( const basegfx::B2DPolyPolygo
return rSource; \
\
ImplMapRes aMapResSource; \
- aMapResSource.mnMapOfsX = 0; \
- aMapResSource.mnMapOfsY = 0; \
- aMapResSource.mnMapScNumX = 1; \
- aMapResSource.mnMapScNumY = 1; \
- aMapResSource.mnMapScDenomX = 1; \
- aMapResSource.mnMapScDenomY = 1; \
- ImplMapRes aMapResDest(aMapResSource); \
+ ImplMapRes aMapResDest; \
\
if ( !mbMap || pMapModeSource != &maMapMode ) \
{ \
- if ( pMapModeSource->GetMapUnit() == MapUnit::MapRelative ) \
+ if ( pMapModeSource->GetMapUnit() == MapUnit::MapRelative ) \
aMapResSource = maMapRes; \
ImplCalcMapResolution( *pMapModeSource, \
mnDPIX, mnDPIY, aMapResSource ); \
@@ -1402,13 +1396,7 @@ static void verifyUnitSourceDest( MapUnit eUnitSource, MapUnit eUnitDest )
#define ENTER4( rMapModeSource, rMapModeDest ) \
ImplMapRes aMapResSource; \
- aMapResSource.mnMapOfsX = 0; \
- aMapResSource.mnMapOfsY = 0; \
- aMapResSource.mnMapScNumX = 1; \
- aMapResSource.mnMapScNumY = 1; \
- aMapResSource.mnMapScDenomX = 1; \
- aMapResSource.mnMapScDenomY = 1; \
- ImplMapRes aMapResDest(aMapResSource); \
+ ImplMapRes aMapResDest; \
\
ImplCalcMapResolution( rMapModeSource, 72, 72, aMapResSource ); \
ImplCalcMapResolution( rMapModeDest, 72, 72, aMapResDest )
More information about the Libreoffice-commits
mailing list