diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-11-15 17:06:21 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2013-11-21 11:48:58 +0100 |
commit | 121df1b45c60674a11f2ebc9dd21baf4785fae83 (patch) | |
tree | 054ccff8e7b1128acd773a43f0623caffe1fee35 /sd | |
parent | m_uInt8 not m_nInt8 (diff) | |
download | core-121df1b45c60674a11f2ebc9dd21baf4785fae83.tar.gz core-121df1b45c60674a11f2ebc9dd21baf4785fae83.zip |
Related: rhbz#1014990 valgrind reports uninitialized variable
(cherry picked from commit f3660062ce8a2c65d483b83c2800d9b958d12f08)
Conflicts:
sd/source/filter/eppt/epptbase.hxx
Change-Id: Ibaa2ed0ee2f1f3f00bceec91ccced968e4913e47
Related: rhbz#1014990 valgrind reports uninitialized another variable
Change-Id: I77f082ea145b0f20daa93c3ee04067ecb6c3b108
(cherry picked from commit b7069ad07dc651f5326cd3a671588d8c1ecf2534)
Related: rhbz#1014990 valgrind reports yet another uninitialized variable
Change-Id: Idf15ee825a34aa7788c422475aa6cea8ff802581
(cherry picked from commit e0840f70565062b712e544f952640ee35cfb6a27)
Related: rhbz#1014990 valgrind reports yet another unint variable
Change-Id: Idf6a0a1e12fffee6c090add41247723f1d9cf576
(cherry picked from commit b211b8b2e14bd961a7b32033468a94cbff52b5c4)
Reviewed-on: https://gerrit.libreoffice.org/6712
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/eppt/epptbase.hxx | 3 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-stylesheet.cxx | 4 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-text.cxx | 41 | ||||
-rw-r--r-- | sd/source/filter/eppt/text.hxx | 28 |
4 files changed, 54 insertions, 22 deletions
diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx index f84360db01d6..2566b98eb9b3 100644 --- a/sd/source/filter/eppt/epptbase.hxx +++ b/sd/source/filter/eppt/epptbase.hxx @@ -157,6 +157,9 @@ struct FontCollectionEntry FontCollectionEntry( const String& rName ) : Scaling ( 1.0 ), + Family ( 0 ), + Pitch ( 0 ), + CharSet ( 0 ), Original( rName ) { ImplInit( rName ); diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx index d9fd8fd8f4c4..24e98f183e61 100644 --- a/sd/source/filter/eppt/pptx-stylesheet.cxx +++ b/sd/source/filter/eppt/pptx-stylesheet.cxx @@ -286,8 +286,8 @@ void PPTExParaSheet::SetStyleSheet( const ::com::sun::star::uno::Reference< ::co if ( !nLevel ) { - if ( ( aParagraphObj.meBullet == ::com::sun::star::beans::PropertyState_DIRECT_VALUE ) - && aParagraphObj.bExtendedParameters ) + if (aParagraphObj.bExtendedParameters && + aParagraphObj.meBullet == ::com::sun::star::beans::PropertyState_DIRECT_VALUE) { for ( sal_Int16 i = 0; i < 5; i++ ) { diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index 44614689fd2e..ca0bc9cfa934 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -628,10 +628,21 @@ PortionObj& PortionObj::operator=( const PortionObj& rPortionObj ) return *this; } -ParagraphObj::ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet, - PPTExBulletProvider& rProv ) : - maMapModeSrc ( MAP_100TH_MM ), - maMapModeDest ( MAP_INCH, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ) ) +ParagraphObj::ParagraphObj(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet, + PPTExBulletProvider& rProv) + : maMapModeSrc(MAP_100TH_MM) + , maMapModeDest(MAP_INCH, Point(), Fraction( 1, 576 ), Fraction( 1, 576 )) + , mnTextSize(0) + , mbFirstParagraph(false) + , mbLastParagraph(false) + , mnTextAdjust(0) + , mnLineSpacing(0) + , mbFixedLineSpacing(false) + , mnLineSpacingTop(0) + , mnLineSpacingBottom(0) + , mbForbiddenRules(false) + , mbParagraphPunctation(false) + , mnBiDi(0) { mXPropSet = rXPropSet; @@ -644,12 +655,22 @@ ParagraphObj::ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun:: ImplGetParagraphValues( rProv, sal_False ); } - ParagraphObj::ParagraphObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & rXTextContent, - ParaFlags aParaFlags, FontCollection& rFontCollection, PPTExBulletProvider& rProv ) : - maMapModeSrc ( MAP_100TH_MM ), - maMapModeDest ( MAP_INCH, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ) ), - mbFirstParagraph ( aParaFlags.bFirstParagraph ), - mbLastParagraph ( aParaFlags.bLastParagraph ) +ParagraphObj::ParagraphObj(::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & rXTextContent, + ParaFlags aParaFlags, FontCollection& rFontCollection, PPTExBulletProvider& rProv ) + : maMapModeSrc(MAP_100TH_MM) + , maMapModeDest(MAP_INCH, Point(), Fraction( 1, 576 ), Fraction( 1, 576 )) + , mnTextSize(0) + , mbIsBullet(false) + , mbFirstParagraph( aParaFlags.bFirstParagraph ) + , mbLastParagraph( aParaFlags.bLastParagraph ) + , mnTextAdjust(0) + , mnLineSpacing(0) + , mbFixedLineSpacing(false) + , mnLineSpacingTop(0) + , mnLineSpacingBottom(0) + , mbForbiddenRules(false) + , mbParagraphPunctation(false) + , mnBiDi(0) { bExtendedParameters = sal_False; diff --git a/sd/source/filter/eppt/text.hxx b/sd/source/filter/eppt/text.hxx index 06bc4e0769fa..c60ae43a323d 100644 --- a/sd/source/filter/eppt/text.hxx +++ b/sd/source/filter/eppt/text.hxx @@ -26,6 +26,7 @@ #include <rtl/textenc.h> #include <com/sun/star/awt/FontDescriptor.hpp> #include <com/sun/star/lang/Locale.hpp> +#include <editeng/svxenum.hxx> #include <boost/shared_ptr.hpp> @@ -62,17 +63,24 @@ struct SOParagraph sal_Bool bNumberingIsNumber; SOParagraph() + : bExtendedParameters(false) + , nParaFlags(0) + , nBulletFlags(0) + , nNumberingType(SVX_NUM_NUMBER_NONE) + , nHorzAdjust(0) + , nBulletColor(0) + , nBulletOfs(0) + , nStartWith(0) + , nTextOfs(0) + , nBulletRealSize(0) + , nDepth(0) + , cBulletId(0) + , bExtendedBulletsUsed(false) + , nBulletId(0xffff) + , nMappedNumType(0) + , bNumberingIsNumber(true) { - nDepth = 0; - bExtendedParameters = sal_False; - nParaFlags = 0; - nBulletFlags = 0; - nBulletOfs = 0; - nTextOfs = 0; - bExtendedBulletsUsed = sal_False; - nBulletId = 0xffff; - bNumberingIsNumber = sal_True; - }; + } }; class PropStateValue : public PropValue |