[Libreoffice-commits] core.git: 8 commits - include/svl vcl/generic vcl/inc vcl/source
Caolán McNamara
caolanm at redhat.com
Fri Jan 24 07:05:30 PST 2014
include/svl/undo.hxx | 2 -
vcl/generic/glyphs/gcach_ftyp.cxx | 7 ++++
vcl/generic/glyphs/graphite_serverfont.cxx | 8 ++---
vcl/inc/fontmanager.hxx | 42 +++++++++++++++--------------
vcl/inc/generic/glyphcache.hxx | 4 ++
vcl/inc/generic/printergfx.hxx | 7 +++-
vcl/source/gdi/outmap.cxx | 16 +++++++++--
7 files changed, 56 insertions(+), 30 deletions(-)
New commits:
commit 39ebf9c164962949509adf0752dabca2cbac072a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 24 14:33:57 2014 +0000
coverity#1028320 Uninitialized scalar variable
coverity#1028319 Uninitialized scalar variable
coverity#707576 Uninitialized scalar variable
coverity#707575 Uninitialized scalar variable
coverity#707568 Uninitialized scalar variable
coverity#707567 Uninitialized scalar variable
coverity#707566 Uninitialized scalar variable
coverity#707565 Uninitialized scalar variable
coverity#707564 Uninitialized scalar variable
covierty#707563 Uninitialized scalar variable
Change-Id: I62c39b0e054f209117aab926d87339dc00a531f0
diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx
index ce5990e..83234c2 100644
--- a/vcl/source/gdi/outmap.cxx
+++ b/vcl/source/gdi/outmap.cxx
@@ -1776,7 +1776,13 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion, const MapMode& r
ENTER0( rSource, pMapModeSource, pMapModeDest ); \
\
ImplMapRes aMapResSource; \
- ImplMapRes aMapResDest; \
+ aMapResSource.mnMapOfsX = 0; \
+ aMapResSource.mnMapOfsY = 0; \
+ aMapResSource.mnMapScNumX = 1; \
+ aMapResSource.mnMapScNumY = 1; \
+ aMapResSource.mnMapScDenomX = 1; \
+ aMapResSource.mnMapScDenomY = 1; \
+ ImplMapRes aMapResDest(aMapResSource); \
\
if ( !mbMap || pMapModeSource != &maMapMode ) \
{ \
@@ -1836,7 +1842,13 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion, const MapMode& r
#define ENTER4( rMapModeSource, rMapModeDest ) \
ImplMapRes aMapResSource; \
- ImplMapRes aMapResDest; \
+ aMapResSource.mnMapOfsX = 0; \
+ aMapResSource.mnMapOfsY = 0; \
+ aMapResSource.mnMapScNumX = 1; \
+ aMapResSource.mnMapScNumY = 1; \
+ aMapResSource.mnMapScDenomX = 1; \
+ aMapResSource.mnMapScDenomY = 1; \
+ ImplMapRes aMapResDest(aMapResSource); \
\
ImplCalcMapResolution( rMapModeSource, 72, 72, aMapResSource ); \
ImplCalcMapResolution( rMapModeDest, 72, 72, aMapResDest )
commit 12a7203b2cd54d6ec0bb0969322a8dc2c4edccfd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 24 14:23:44 2014 +0000
coverity#708575 Uninitialized scalar field
Change-Id: I8bf17ed4d0def478168311b82faffc7eed74fea4
diff --git a/vcl/inc/generic/printergfx.hxx b/vcl/inc/generic/printergfx.hxx
index e56183d..77ac467 100644
--- a/vcl/inc/generic/printergfx.hxx
+++ b/vcl/inc/generic/printergfx.hxx
@@ -53,8 +53,11 @@ private:
public:
- PrinterColor () :
- meColorspace(eInvalid)
+ PrinterColor()
+ : mnRed(0)
+ , mnGreen(0)
+ , mnBlue(0)
+ , meColorspace(eInvalid)
{}
PrinterColor (sal_uInt16 nRed, sal_uInt16 nGreen,
sal_uInt16 nBlue) :
commit 2bcd43bcc2e7dc9ea155271f819d797a23159366
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 24 14:21:57 2014 +0000
coverity#708212 Uninitialized scalar field
Change-Id: Ib87858db74f393c1e52a78db822cb8e906cc57e9
diff --git a/vcl/inc/fontmanager.hxx b/vcl/inc/fontmanager.hxx
index a028a20..94ce3b2 100644
--- a/vcl/inc/fontmanager.hxx
+++ b/vcl/inc/fontmanager.hxx
@@ -72,31 +72,33 @@ enum type {
struct FastPrintFontInfo
{
- fontID m_nID; // FontID
- fonttype::type m_eType;
+ fontID m_nID; // FontID
+ fonttype::type m_eType;
// font attributes
OUString m_aFamilyName;
OUString m_aStyleName;
std::list< OUString > m_aAliases;
- FontFamily m_eFamilyStyle;
- FontItalic m_eItalic;
- FontWidth m_eWidth;
- FontWeight m_eWeight;
- FontPitch m_ePitch;
- rtl_TextEncoding m_aEncoding;
- bool m_bSubsettable;
- bool m_bEmbeddable;
-
- FastPrintFontInfo() :
- m_nID( 0 ),
- m_eType( fonttype::Unknown ),
- m_eFamilyStyle( FAMILY_DONTKNOW ),
- m_eItalic( ITALIC_DONTKNOW ),
- m_eWidth( WIDTH_DONTKNOW ),
- m_eWeight( WEIGHT_DONTKNOW ),
- m_ePitch( PITCH_DONTKNOW ),
- m_aEncoding( RTL_TEXTENCODING_DONTKNOW )
+ FontFamily m_eFamilyStyle;
+ FontItalic m_eItalic;
+ FontWidth m_eWidth;
+ FontWeight m_eWeight;
+ FontPitch m_ePitch;
+ rtl_TextEncoding m_aEncoding;
+ bool m_bSubsettable;
+ bool m_bEmbeddable;
+
+ FastPrintFontInfo()
+ : m_nID(0)
+ , m_eType(fonttype::Unknown)
+ , m_eFamilyStyle(FAMILY_DONTKNOW)
+ , m_eItalic(ITALIC_DONTKNOW)
+ , m_eWidth(WIDTH_DONTKNOW)
+ , m_eWeight(WEIGHT_DONTKNOW)
+ , m_ePitch(PITCH_DONTKNOW)
+ , m_aEncoding(RTL_TEXTENCODING_DONTKNOW)
+ , m_bSubsettable(false)
+ , m_bEmbeddable(false)
{}
};
commit 2812a4eea7f209123ff5419f497f47fff2aa22f0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 24 14:20:10 2014 +0000
coverity#738922 Uninitialized scalar field
Change-Id: I22ca430d8737834655e6f8c30ecf489a50e00ba1
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index f6e6e89..9454700 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -115,6 +115,8 @@ private:
class GlyphMetric
{
public:
+ GlyphMetric() : mnAdvanceWidth(0) {}
+
Point GetOffset() const { return maOffset; }
Point GetDelta() const { return maDelta; }
Size GetSize() const { return maSize; }
@@ -153,10 +155,7 @@ struct ExtGlyphData
class GlyphData
{
public:
- mnLruValue()
- : mnLruValue(0)
- {
- }
+ GlyphData() : mnLruValue(0) {}
const GlyphMetric& GetMetric() const { return maMetric; }
Size GetSize() const { return maMetric.GetSize(); }
commit 88aeba2d0ed2cb2eda7a24ec971792b629506ffd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 24 14:18:33 2014 +0000
coverity#738923 Uninitialized scalar field
Change-Id: I37e6fac75c5919a187c49490814d409d4c44006b
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index 99274d1..f6e6e89 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -153,6 +153,11 @@ struct ExtGlyphData
class GlyphData
{
public:
+ mnLruValue()
+ : mnLruValue(0)
+ {
+ }
+
const GlyphMetric& GetMetric() const { return maMetric; }
Size GetSize() const { return maMetric.GetSize(); }
commit afb90e554c074a306d06a5c6c3e59e4c38a4ff66
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 24 14:16:14 2014 +0000
coverity#738921 Uninitialized pointer field
Change-Id: I607a8d75b9ee60015a382ee4111c5ca8bac6a1f8
diff --git a/vcl/generic/glyphs/graphite_serverfont.cxx b/vcl/generic/glyphs/graphite_serverfont.cxx
index 42d98ad..d548f5d 100644
--- a/vcl/generic/glyphs/graphite_serverfont.cxx
+++ b/vcl/generic/glyphs/graphite_serverfont.cxx
@@ -46,10 +46,10 @@ float freetypeServerFontAdvance(const void* appFontHandle, gr_uint16 glyphId)
//
GraphiteServerFontLayout::GraphiteServerFontLayout(ServerFont& rServerFont) throw()
- : ServerFontLayout(rServerFont),
- maImpl(rServerFont.GetGraphiteFace()->face(),
- rServerFont),
- mpFeatures(NULL)
+ : ServerFontLayout(rServerFont),
+ maImpl(rServerFont.GetGraphiteFace()->face(), rServerFont)
+ , mpFeatures(NULL)
+ , mpStr(NULL)
{
gr_font * pFont = rServerFont.GetGraphiteFace()->font(rServerFont.GetFontSelData().mnHeight);
if (!pFont)
commit 5b0395948e52b1e224ca605d453a8b27a7adc61e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 24 14:11:44 2014 +0000
coverity#735339 Unchecked return value from library
Change-Id: Ia6567cb6f779669c738469ba68b7ad675e99d71a
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index d6017db..42be836 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -172,7 +172,12 @@ bool FtFontFile::Map()
return false;
struct stat aStat;
- fstat( nFile, &aStat );
+ int nRet = fstat( nFile, &aStat );
+ if (nRet < 0)
+ {
+ close (nFile);
+ return false;
+ }
mnFileSize = aStat.st_size;
mpFileMap = (const unsigned char*)
mmap( NULL, mnFileSize, PROT_READ, MAP_SHARED, nFile, 0 );
commit 6a0f957968bab9f72295ad17d5d1b77aecef2d75
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 24 14:04:07 2014 +0000
coverity#708952 Non-virtual destructor
Change-Id: I4b09b3d6e11225d616a7a6f84eff6626a2490cd0
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 8da6edf..5c3b29e 100644
--- a/include/svl/undo.hxx
+++ b/include/svl/undo.hxx
@@ -142,7 +142,7 @@ struct SVL_DLLPUBLIC SfxUndoArray
SfxUndoArray(size_t nMax=0):
nMaxUndoActions(nMax), nCurUndoAction(0),
pFatherUndoArray(0) {}
- ~SfxUndoArray();
+ virtual ~SfxUndoArray();
};
//=========================================================================
More information about the Libreoffice-commits
mailing list