diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-04-27 16:59:09 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-04-29 10:24:08 +0200 |
commit | 3240820acaa2f87e4917d1fa387255c2101460a2 (patch) | |
tree | 62576e631e811204bb979ac412f29536a674cfd2 /oox/source/drawingml | |
parent | 50e40364f5f60d1e4aa6aaacd48383cd98b3a25e (diff) |
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/textparagraphproperties.cxx | 14 | ||||
-rw-r--r-- | oox/source/drawingml/textparagraphpropertiescontext.cxx | 2 |
2 files changed, 12 insertions, 4 deletions
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 ) ); |