Index: oox/inc/oox/drawingml/color.hxx =================================================================== --- oox/inc/oox/drawingml/color.hxx (revision 1356538) +++ oox/inc/oox/drawingml/color.hxx (working copy) @@ -93,6 +93,9 @@ /** Returns the transparency of the color (0 = opaque, 100 = full transparent). */ sal_Int16 getTransparency() const; + /** Returns the scheme token*/ + sal_Int32 getSchemeColor( const GraphicHelper& rGraphicHelper ) const; + private: /** Internal helper for getColor(). */ void setResolvedRgb( sal_Int32 nRgb ) const; Index: oox/inc/oox/drawingml/fillproperties.hxx =================================================================== --- oox/inc/oox/drawingml/fillproperties.hxx (revision 1356538) +++ oox/inc/oox/drawingml/fillproperties.hxx (working copy) @@ -123,7 +123,8 @@ ShapePropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, sal_Int32 nShapeRotation = 0, - sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const; + sal_Int32 nPhClr = API_RGB_TRANSPARENT, + bool bTransformed = true) const; }; // ============================================================================ Index: oox/source/drawingml/color.cxx =================================================================== --- oox/source/drawingml/color.cxx (revision 1368765) +++ oox/source/drawingml/color.cxx (working copy) @@ -346,6 +346,11 @@ mnAlpha = MAX_PERCENT; } +sal_Int32 Color::getSchemeColor( const GraphicHelper& rGraphicHelper ) const +{ + return rGraphicHelper.getSchemeColor( mnC1 ); +} + sal_Int32 Color::getColor( const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const { /* Special handling for theme style list placeholder colors (state Index: oox/source/drawingml/fillproperties.cxx =================================================================== --- oox/source/drawingml/fillproperties.cxx (revision 1368765) +++ oox/source/drawingml/fillproperties.cxx (working copy) @@ -184,7 +184,7 @@ } void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, - const GraphicHelper& rGraphicHelper, sal_Int32 nShapeRotation, sal_Int32 nPhClr ) const + const GraphicHelper& rGraphicHelper, sal_Int32 nShapeRotation, sal_Int32 nPhClr, bool bTransformed ) const { if( moFillType.has() ) { @@ -198,7 +198,11 @@ case XML_solidFill: if( maFillColor.isUsed() ) { - rPropMap.setProperty( SHAPEPROP_FillColor, maFillColor.getColor( rGraphicHelper, nPhClr ) ); + if( bTransformed ) + rPropMap.setProperty( SHAPEPROP_FillColor, maFillColor.getColor( rGraphicHelper, nPhClr ) ); + else + rPropMap.setProperty( SHAPEPROP_FillColor, maFillColor.getSchemeColor( rGraphicHelper) ); + if( maFillColor.hasTransparency() ) rPropMap.setProperty( SHAPEPROP_FillTransparency, maFillColor.getTransparency() ); eFillStyle = FillStyle_SOLID; Index: oox/source/drawingml/table/tablecell.cxx =================================================================== --- oox/source/drawingml/table/tablecell.cxx (revision 1368765) +++ oox/source/drawingml/table/tablecell.cxx (working copy) @@ -180,6 +180,8 @@ oox::drawingml::LineProperties aLinePropertiesBottom; oox::drawingml::LineProperties aLinePropertiesTopLeftToBottomRight; oox::drawingml::LineProperties aLinePropertiesBottomLeftToTopRight; + ShapePropertyMap aPropMap( rFilterBase.getModelObjectHelper() ); + bool bPropPushed = false; boost::shared_ptr< ::oox::drawingml::FillProperties >& rBackgroundFillPropertiesPtr( rTable.getBackgroundFillProperties() ); if ( rBackgroundFillPropertiesPtr.get() ) @@ -210,7 +212,7 @@ rTable.getFirstRow() ); lcl_getCharPropFromTblStylePart(aTextCharProps, rTable.getFirstRow()); } - if ( rProperties.isLastRow() && ( nRow == nMaxRow ) ) + if ( rProperties.isLastRow() && ( nRow == nMaxRow -1 ) ) { applyTableStylePart( rFilterBase, rxCell, aFillProperties, aLinePropertiesLeft, @@ -221,6 +223,10 @@ aLinePropertiesBottomLeftToTopRight, rTable.getLastRow() ); lcl_getCharPropFromTblStylePart(aTextCharProps, rTable.getLastRow()); + + aFillProperties.assignUsed( maFillProperties ); + aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper(), false ); + bPropPushed =true; } if ( rProperties.isFirstCol() && ( nColumn == 0 ) ) { @@ -234,7 +240,7 @@ rTable.getFirstCol() ); lcl_getCharPropFromTblStylePart(aTextCharProps, rTable.getFirstCol()); } - if ( rProperties.isLastCol() && ( nColumn == nMaxColumn ) ) + if ( rProperties.isLastCol() && ( nColumn == nMaxColumn -1 ) ) { applyTableStylePart( rFilterBase, rxCell, aFillProperties, aLinePropertiesLeft, @@ -245,6 +251,10 @@ aLinePropertiesBottomLeftToTopRight, rTable.getLastCol() ); lcl_getCharPropFromTblStylePart(aTextCharProps, rTable.getLastCol()); + + aFillProperties.assignUsed( maFillProperties ); + aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper(), false ); + bPropPushed = true; } if ( rProperties.isBandRow() ) { @@ -378,10 +388,12 @@ applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesTopLeftToBottomRight, PROP_DiagonalTLBR ); applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesBottomLeftToTopRight, PROP_DiagonalBLTR ); - aFillProperties.assignUsed( maFillProperties ); - ShapePropertyMap aPropMap( rFilterBase.getModelObjectHelper() ); - // TODO: phClr? - aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper() ); + if(!bPropPushed) + { + aFillProperties.assignUsed( maFillProperties ); + // TODO: phClr? + aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper() ); + } PropertySet( xPropSet ).setProperties( aPropMap ); if ( getVertToken() == XML_eaVert )