diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-07-22 13:05:22 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-07-22 13:05:22 +0000 |
commit | a4786643553188bb73efa11351e9c7595c165267 (patch) | |
tree | 59b8e088ca7898d0f66d674e31a62e22a3841948 /oox/source/ppt | |
parent | aa81719b5862222dde5492b44de2a31f13fe4953 (diff) |
INTEGRATION: CWS xmlfilter06 (1.5.6); FILE MERGED
2008/07/10 11:13:13 dr 1.5.6.7: RESYNC: (1.5-1.6); FILE MERGED
2008/06/27 09:18:01 dr 1.5.6.6: fill properties cleanup, resolve line gradients to solid color
2008/06/20 11:58:17 dr 1.5.6.5: line/fill/character properties rework; first steps of chart text formatting and rotation import; make line arrow import work
2008/06/12 15:01:22 dr 1.5.6.4: chart formatting, some more changes
2008/06/10 10:51:10 dr 1.5.6.3: chart area formatting, first steps
2008/06/06 16:27:54 dr 1.5.6.2: chart formatting: builtin line/fill/effect styles, manual line formatting
2008/05/27 10:40:42 dr 1.5.6.1: joined changes from CWS xmlfilter05
Diffstat (limited to 'oox/source/ppt')
-rw-r--r-- | oox/source/ppt/slidepersist.cxx | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index 1b4e1ef3ef58..9dac075db38c 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: slidepersist.cxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.7 $ * * This file is part of OpenOffice.org. * @@ -32,7 +32,9 @@ #include "oox/ppt/timenode.hxx" #include "oox/ppt/pptshape.hxx" #include "oox/ppt/slidepersist.hxx" +#include "oox/drawingml/fillproperties.hxx" #include "oox/core/namespaces.hxx" +#include "oox/core/xmlfilterbase.hxx" #include "tokens.hxx" #include <com/sun/star/style/XStyle.hpp> @@ -127,19 +129,19 @@ sal_Int16 SlidePersist::getLayoutFromValueToken() return nLayout; } -void SlidePersist::createXShapes( const oox::core::XmlFilterBase& rFilterBase ) +void SlidePersist::createXShapes( const XmlFilterBase& rFilterBase ) { applyTextStyles( rFilterBase ); Reference< XShapes > xShapes( getPage(), UNO_QUERY ); - std::vector< oox::drawingml::ShapePtr >& rShapes( maShapesPtr->getChilds() ); + std::vector< oox::drawingml::ShapePtr >& rShapes( maShapesPtr->getChildren() ); std::vector< oox::drawingml::ShapePtr >::iterator aShapesIter( rShapes.begin() ); while( aShapesIter != rShapes.end() ) { - std::vector< oox::drawingml::ShapePtr >& rChilds( (*aShapesIter++)->getChilds() ); - std::vector< oox::drawingml::ShapePtr >::iterator aChildIter( rChilds.begin() ); - while( aChildIter != rChilds.end() ) + std::vector< oox::drawingml::ShapePtr >& rChildren( (*aShapesIter++)->getChildren() ); + std::vector< oox::drawingml::ShapePtr >::iterator aChildIter( rChildren.begin() ); + while( aChildIter != rChildren.end() ) { PPTShape* pPPTShape = dynamic_cast< PPTShape* >( (*aChildIter).get() ); if ( pPPTShape ) @@ -166,7 +168,7 @@ void SlidePersist::createXShapes( const oox::core::XmlFilterBase& rFilterBase ) } } -void SlidePersist::createBackground( const oox::core::XmlFilterBase& rFilterBase ) +void SlidePersist::createBackground( const XmlFilterBase& rFilterBase ) { if ( mpBackgroundPropertiesPtr ) { @@ -176,7 +178,10 @@ void SlidePersist::createBackground( const oox::core::XmlFilterBase& rFilterBase static const rtl::OUString sBackground( RTL_CONSTASCII_USTRINGPARAM( "Background" ) ); uno::Reference< beans::XPropertySet > xPagePropSet( mxPage, uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xPropertySet( aPropMap.makePropertySet() ); - mpBackgroundPropertiesPtr->pushToPropSet( rFilterBase, xPropertySet, 0 ); + PropertySet aPropSet( xPropertySet ); + mpBackgroundPropertiesPtr->pushToPropSet( + aPropSet, ::oox::drawingml::FillProperties::DEFAULTNAMES, + rFilterBase, rFilterBase.getModelObjectContainer(), 0, -1 ); xPagePropSet->setPropertyValue( sBackground, Any( xPropertySet ) ); } catch( Exception ) @@ -185,7 +190,7 @@ void SlidePersist::createBackground( const oox::core::XmlFilterBase& rFilterBase } } -void setTextStyle( Reference< beans::XPropertySet >& rxPropSet, +void setTextStyle( Reference< beans::XPropertySet >& rxPropSet, const XmlFilterBase& rFilter, oox::drawingml::TextListStylePtr& pTextListStylePtr, int nLevel ) { ::oox::drawingml::TextParagraphPropertiesPtr pTextParagraphPropertiesPtr( pTextListStylePtr->getListStyle()[ nLevel ] ); @@ -194,12 +199,6 @@ void setTextStyle( Reference< beans::XPropertySet >& rxPropSet, // no properties. return return; } - ::oox::drawingml::TextCharacterPropertiesPtr pTextCharacterPropertiesPtr( pTextParagraphPropertiesPtr->getTextCharacterProperties() ); - if( pTextCharacterPropertiesPtr == NULL ) - { - // no properties. return - return; - } PropertyMap& rTextParagraphPropertyMap( pTextParagraphPropertiesPtr->getTextParagraphPropertyMap() ); #ifdef DEBUG @@ -207,18 +206,12 @@ void setTextStyle( Reference< beans::XPropertySet >& rxPropSet, rTextParagraphPropertyMap.dump_debug("TextParagraph paragraph props"); #endif - PropertyMap& rTextCharacterPropertyMap( pTextCharacterPropertiesPtr->getTextCharacterPropertyMap() ); -#ifdef DEBUG - if ( false ) - rTextCharacterPropertyMap.dump_debug("TextParagraph paragraph props"); -#endif - PropertySet aPropSet( rxPropSet ); aPropSet.setProperties( rTextParagraphPropertyMap ); - aPropSet.setProperties( rTextCharacterPropertyMap ); + pTextParagraphPropertiesPtr->getTextCharacterProperties().pushToPropSet( aPropSet, rFilter ); } -void SlidePersist::applyTextStyles( const oox::core::XmlFilterBase& rFilterBase ) +void SlidePersist::applyTextStyles( const XmlFilterBase& rFilterBase ) { if ( mbMaster ) { @@ -290,8 +283,8 @@ void SlidePersist::applyTextStyles( const oox::core::XmlFilterBase& rFilterBase if ( xFamilies->getByName( aStyle ) >>= aXStyle ) { Reference< beans::XPropertySet > xPropSet( aXStyle, UNO_QUERY_THROW ); - setTextStyle( xPropSet, maDefaultTextStylePtr, 0 ); - setTextStyle( xPropSet, pTextListStylePtr, 0 ); + setTextStyle( xPropSet, rFilterBase, maDefaultTextStylePtr, 0 ); + setTextStyle( xPropSet, rFilterBase, pTextListStylePtr, 0 ); if ( i == 1 /* BodyStyle */ ) { for ( int nLevel = 1; nLevel < 5; nLevel++ ) @@ -307,8 +300,8 @@ void SlidePersist::applyTextStyles( const oox::core::XmlFilterBase& rFilterBase xPropSet = Reference< beans::XPropertySet >( aXStyle, UNO_QUERY_THROW ); } } - setTextStyle( xPropSet, maDefaultTextStylePtr, nLevel ); - setTextStyle( xPropSet, pTextListStylePtr, nLevel ); + setTextStyle( xPropSet, rFilterBase, maDefaultTextStylePtr, nLevel ); + setTextStyle( xPropSet, rFilterBase, pTextListStylePtr, nLevel ); } } } |