oox/inc/drawingml/textparagraphproperties.hxx | 1 + oox/source/drawingml/textparagraphproperties.cxx | 14 +++++++++++--- oox/source/drawingml/textparagraphpropertiescontext.cxx | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-)
New commits: commit 3240820acaa2f87e4917d1fa387255c2101460a2 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Apr 27 16:59:09 2022 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Apr 29 10:24:08 2022 +0200 oox: make buSzTx and buFontTx behave the same way as buClrTx I believe this is the right thing to do although this is a blind fix, since I couldn't find any file affected Change-Id: I500ceaf11b917abb5e86769b8816ddc2d6dfec6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133522 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/oox/inc/drawingml/textparagraphproperties.hxx b/oox/inc/drawingml/textparagraphproperties.hxx index 7bda257d445e..8ea56a7b0736 100644 --- a/oox/inc/drawingml/textparagraphproperties.hxx +++ b/oox/inc/drawingml/textparagraphproperties.hxx @@ -58,6 +58,7 @@ public: std::shared_ptr< ::oox::drawingml::Color > maBulletColorPtr; css::uno::Any mbBulletColorFollowText; css::uno::Any mbBulletFontFollowText; + css::uno::Any mbBulletSizeFollowText; ::oox::drawingml::TextFont maBulletFont; css::uno::Any msBulletChar; css::uno::Any mnStartAt; diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index ce40f69eb4f6..bcf51d290794 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -59,7 +59,9 @@ namespace oox::drawingml { BulletList::BulletList( ) : maBulletColorPtr( std::make_shared<Color>() ), - mbBulletColorFollowText ( false ) + mbBulletColorFollowText ( false ), + mbBulletFontFollowText ( false ), + mbBulletSizeFollowText ( false ) { } @@ -266,6 +268,8 @@ void BulletList::apply( const BulletList& rSource ) mbBulletColorFollowText = rSource.mbBulletColorFollowText; if ( rSource.mbBulletFontFollowText.hasValue() ) mbBulletFontFollowText = rSource.mbBulletFontFollowText; + if ( rSource.mbBulletSizeFollowText.hasValue() ) + mbBulletSizeFollowText = rSource.mbBulletSizeFollowText; maBulletFont.assignIfUsed( rSource.maBulletFont ); if ( rSource.msBulletChar.hasValue() ) msBulletChar = rSource.msBulletChar; @@ -308,7 +312,9 @@ void BulletList::pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, P float nBulletFontWeight = css::awt::FontWeight::NORMAL; bool bSymbolFont = false; if( pFilterBase) { - if (maBulletFont.getFontData( aBulletFontName, nBulletFontPitch, nBulletFontFamily, *pFilterBase ) ) + bool bFollowTextFont = false; + mbBulletFontFollowText >>= bFollowTextFont; + if (!bFollowTextFont && maBulletFont.getFontData( aBulletFontName, nBulletFontPitch, nBulletFontFamily, *pFilterBase ) ) { FontDescriptor aFontDesc; sal_Int16 nFontSize = 0; @@ -357,7 +363,9 @@ void BulletList::pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, P if (xBitmap.is()) rPropMap.setProperty(PROP_GraphicBitmap, xBitmap); } - if( mnSize.hasValue() ) + bool bFollowTextSize = false; + mbBulletSizeFollowText >>= bFollowTextSize; + if( !bFollowTextSize && mnSize.hasValue() ) rPropMap.setAnyProperty( PROP_BulletRelSize, mnSize); if ( maStyleName.hasValue() ) rPropMap.setAnyProperty( PROP_CharStyleName, maStyleName); diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index 20810ce1b5c8..c1b8763a961a 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -213,7 +213,7 @@ ContextHandlerRef TextParagraphPropertiesContext::onCreateContext( sal_Int32 aEl return new ColorContext( *this, *mrBulletList.maBulletColorPtr ); // EG_TextBulletSize case A_TOKEN( buSzTx ): // CT_TextBulletSizeFollowText - mrBulletList.setBulletSize(100); + mrBulletList.mbBulletSizeFollowText <<= true; break; case A_TOKEN( buSzPct ): // CT_TextBulletSizePercent mrBulletList.setBulletSize( std::lround( GetPercent( rAttribs.getString( XML_val ).get() ) / 1000.f ) );