chart2/source/view/axes/Tickmarks.cxx | 2 +- chart2/source/view/axes/Tickmarks.hxx | 7 ++----- filter/source/msfilter/escherex.cxx | 4 ++-- include/filter/msfilter/escherex.hxx | 6 +++--- oox/source/drawingml/diagram/diagramlayoutatoms.hxx | 10 +++++----- vcl/source/filter/ipict/ipict.cxx | 7 +++---- 6 files changed, 16 insertions(+), 20 deletions(-)
New commits: commit f1bd6e802a1671c4b923124b33064b7803a5dbb6 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Sep 12 10:52:59 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Sep 12 12:17:24 2021 +0200 clang:optin.performance.Padding Excessive padding in 'struct chart::TickInfo' (11 padding bytes, where 3 is optimal). Excessive padding in 'class EscherBlibEntry' (10 padding bytes, where 2 is optimal). Excessive padding in 'struct oox::drawingml::ConditionAttr' (8 padding bytes, where 0 is optimal). Excessive padding in 'struct oox::drawingml::Constraint' (12 padding bytes, where 4 is optimal). Excessive padding in 'struct (anonymous namespace)::Number' (10 padding bytes, where 2 is optimal). Change-Id: If7573afa8a794497c9a2bf1c7c15e8f11ff11407 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121993 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/chart2/source/view/axes/Tickmarks.cxx b/chart2/source/view/axes/Tickmarks.cxx index 73c8e041cf40..80476934e7f2 100644 --- a/chart2/source/view/axes/Tickmarks.cxx +++ b/chart2/source/view/axes/Tickmarks.cxx @@ -34,8 +34,8 @@ TickInfo::TickInfo( const uno::Reference<chart2::XScaling>& xInverse ) : fScaledTickValue( 0.0 ) , xInverseScaling( xInverse ) , aTickScreenPosition(0.0,0.0) -, bPaintIt( true ) , nFactorForLimitedTextWidth(1) +, bPaintIt( true ) { } diff --git a/chart2/source/view/axes/Tickmarks.hxx b/chart2/source/view/axes/Tickmarks.hxx index 77b9a2b85bdc..54ae03922e4d 100644 --- a/chart2/source/view/axes/Tickmarks.hxx +++ b/chart2/source/view/axes/Tickmarks.hxx @@ -35,14 +35,11 @@ struct TickInfo { double fScaledTickValue; css::uno::Reference<css::chart2::XScaling> xInverseScaling; - - ::basegfx::B2DVector aTickScreenPosition; - bool bPaintIt; - css::uno::Reference<css::drawing::XShape> xTextShape; - OUString aText;//used only for complex categories so far + ::basegfx::B2DVector aTickScreenPosition; sal_Int32 nFactorForLimitedTextWidth;//categories in higher levels of complex categories can have more place than a single simple category + bool bPaintIt; //methods: TickInfo() = delete; diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 95b8b27c48d3..450aa4b6f208 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -3892,11 +3892,11 @@ beans::PropertyState EscherPropertyValueHelper::GetPropertyState( EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject& rObject, const OString& rId, const GraphicAttr* pGraphicAttr ) : + maPrefMapMode ( rObject.GetPrefMapMode() ), + maPrefSize ( rObject.GetPrefSize() ), mnPictureOffset ( nPictureOffset ), mnRefCount ( 1 ), mnSizeExtra ( 0 ), - maPrefSize ( rObject.GetPrefSize() ), - maPrefMapMode ( rObject.GetPrefMapMode() ), mbIsEmpty ( true ) { mbIsNativeGraphicPossible = ( pGraphicAttr == nullptr ); diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx index 9ab3d891da2a..a4625984308b 100644 --- a/include/filter/msfilter/escherex.hxx +++ b/include/filter/msfilter/escherex.hxx @@ -525,6 +525,9 @@ class EscherBlibEntry friend class EscherGraphicProvider; friend class EscherEx; + MapMode maPrefMapMode; + Size maPrefSize; + sal_uInt32 mnIdentifier[ 4 ]; sal_uInt32 mnPictureOffset; // offset to the graphic in PictureStreams sal_uInt32 mnSize; // size of real graphic @@ -534,9 +537,6 @@ class EscherBlibEntry ESCHER_BlibType meBlibType; - Size maPrefSize; - MapMode maPrefMapMode; - bool mbIsEmpty; bool mbIsNativeGraphicPossible; diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx index 7645c9affc99..0e7d4aec2169 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx @@ -55,26 +55,26 @@ struct ConditionAttr // not sure this belong here, but wth void loadFromXAttr( const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttributes ); + OUString msVal; sal_Int32 mnFunc; sal_Int32 mnArg; sal_Int32 mnOp; - OUString msVal; sal_Int32 mnVal; }; /// Constraints allow you to specify an ideal (or starting point) size for each shape. struct Constraint { - sal_Int32 mnFor; OUString msForName; + OUString msRefForName; + double mfFactor; + double mfValue; + sal_Int32 mnFor; sal_Int32 mnPointType; sal_Int32 mnType; sal_Int32 mnRefFor; - OUString msRefForName; sal_Int32 mnRefType; sal_Int32 mnRefPointType; - double mfFactor; - double mfValue; sal_Int32 mnOperator; }; commit 0652bc404c1a8dedda085a4753b412c8c0e9ea6c Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Sep 11 19:38:07 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Sep 12 12:17:10 2021 +0200 ofz: MemorySanitizer: use-of-uninitialized-value Change-Id: Id142604aca139f0e0a249ba32b6462a2b8db72d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121963 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/filter/ipict/ipict.cxx b/vcl/source/filter/ipict/ipict.cxx index cf9b2531e2c6..ca3a7ab0b41a 100644 --- a/vcl/source/filter/ipict/ipict.cxx +++ b/vcl/source/filter/ipict/ipict.cxx @@ -492,14 +492,13 @@ sal_uInt64 PictReader::ReadPixPattern(PictReader::Pattern &pattern) // Here again the attempt to calculate the size of the date to create simple StarView-Styles // from them. Luckily a PixPattern always contains a normal pattern. - sal_uInt64 nDataSize; - sal_uInt16 nPatType; - BitmapEx aBMP; - pPict->ReadUInt16( nPatType ); + sal_uInt16 nPatType(0); + pPict->ReadUInt16(nPatType); if (nPatType==1) { pattern.read(*pPict); + BitmapEx aBMP; nDataSize=ReadPixMapEtc(aBMP,false,true,nullptr,nullptr,false,false); // CHANGEME: use average pixmap colors to update the pattern, ... if (nDataSize!=0xffffffff) nDataSize+=10;