diff options
author | Felix Zhang <fezhang@suse.com> | 2012-03-02 18:17:29 +0800 |
---|---|---|
committer | Radek Doulik <rodo@rychlik.lounovice> | 2012-03-02 13:59:07 +0100 |
commit | 101fd1733000b4f8dae5fa39b6657531a21769ea (patch) | |
tree | e95235cc2ee8867a953dd93fe5eded65cf337b82 /oox | |
parent | c45208832536d144007f01e419614f9bf37eb763 (diff) |
n719988, n734733: Bullet should have same color as following text by default
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textcharacterproperties.cxx | 2 | ||||
-rw-r--r-- | oox/source/drawingml/textparagraph.cxx | 9 | ||||
-rw-r--r-- | oox/source/drawingml/textparagraphproperties.cxx | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index adfa2fe095ec..e7c6bb8f2092 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -69,7 +69,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSource moUnderlineFillFollowText.assignIfUsed( rSourceProps.moUnderlineFillFollowText ); } - void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFilterBase& rFilter, bool bUseOptional ) const +void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFilterBase& rFilter, bool bUseOptional ) const { OUString aFontName; sal_Int16 nFontPitch = 0; diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index 689ab90b7f50..63a28452ba9e 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -28,6 +28,7 @@ #include "oox/drawingml/textparagraph.hxx" #include "oox/drawingml/drawingmltypes.hxx" +#include "oox/drawingml/textcharacterproperties.hxx" #include <rtl/ustring.hxx> #include "oox/helper/propertyset.hxx" @@ -111,8 +112,14 @@ void TextParagraph::insertAt( float fCharacterSize = nCharHeight > 0 ? GetFontHeight( nCharHeight ) : 18; if ( pTextParagraphStyle.get() ) { - pTextParagraphStyle->pushToPropSet( &rFilterBase, xProps, aioBulletList, NULL, sal_False, fCharacterSize ); + pTextParagraphStyle->pushToPropSet( &rFilterBase, xProps, aioBulletList, NULL, sal_True, fCharacterSize ); fCharacterSize = pTextParagraphStyle->getCharHeightPoints( fCharacterSize ); + + // bullets have same color as following texts by default + if( !aioBulletList.hasProperty( PROP_BulletColor ) && maRuns.size() > 0 + && (*maRuns.begin())->getTextCharacterProperties().maCharColor.isUsed() ) + aioBulletList[ PROP_BulletColor ] <<= (*maRuns.begin())->getTextCharacterProperties().maCharColor.getColor( rFilterBase.getGraphicHelper() ); + maProperties.pushToPropSet( &rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize ); } diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index 6eea22fd21a4..5df6bfe1df3f 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -433,6 +433,8 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p rioBulletMap[ PROP_FirstLineOffset ] <<= static_cast< sal_Int32 >( *noFirstLineIndentation ); noFirstLineIndentation = boost::optional< sal_Int32 >( 0 ); } + if ( nNumberingType != NumberingType::BITMAP && !rioBulletMap.hasProperty( PROP_BulletColor )) + rioBulletMap[ PROP_BulletColor ] <<= static_cast< sal_Int32 >( maTextCharacterProperties.maCharColor.getColor( pFilterBase->getGraphicHelper())); } if ( bApplyBulletMap ) |