oox/source/drawingml/textcharacterproperties.cxx |    2 +-
 oox/source/drawingml/textparagraph.cxx           |    9 ++++++++-
 oox/source/drawingml/textparagraphproperties.cxx |    2 ++
 3 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 101fd1733000b4f8dae5fa39b6657531a21769ea
Author: Felix Zhang <fezh...@suse.com>
Date:   Fri Mar 2 18:17:29 2012 +0800

    n719988, n734733: Bullet should have same color as following text by default

diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index adfa2fe..e7c6bb8 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 689ab90..63a2845 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 6eea22f..5df6bfe 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 )
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to