summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-07-01 11:00:20 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-07-01 11:00:20 +0000
commit4d80f13a898d7003bd20e131d3811dbd2b41abf4 (patch)
tree53ca2309b4bbf584bc51eeefee9ea02611a6e771 /oox/source
parentbd46c2baf8d782d8a22507820f250826bd2616f5 (diff)
INTEGRATION: CWS xmlfilter05 (1.3.4); FILE MERGED
2008/06/27 12:10:29 dr 1.3.4.6: RESYNC: (1.5-1.6); FILE MERGED 2008/05/21 12:55:44 dr 1.3.4.5: #i10000# new header 2008/04/25 08:57:33 dr 1.3.4.4: more cleanup 2008/04/23 15:58:14 dr 1.3.4.3: a little theme cleanup 2008/04/02 12:41:55 hbrinkm 1.3.4.2: merged changes from xmlfilter04 to xmlfilter05 2008/04/01 15:38:05 hbrinkm 1.3.4.1: 'Merged xmlfilter04'
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/drawingml/shape.cxx35
1 files changed, 13 insertions, 22 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 7adf3e5696e1..cd8056520438 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: shape.cxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
* This file is part of OpenOffice.org.
*
@@ -29,6 +29,8 @@
************************************************************************/
#include "oox/drawingml/shape.hxx"
+#include "oox/drawingml/theme.hxx"
+#include "oox/drawingml/textbody.hxx"
#include "oox/core/namespaces.hxx"
#include "oox/helper/propertyset.hxx"
#include "tokens.hxx"
@@ -442,41 +444,30 @@ void addMissingProperties( const PropertyMap& rSource, PropertyMap& rDest )
// merging styles, if a shape property is not set, we have to set the shape style property
void Shape::setShapeStyles( const ThemePtr& rxTheme, LineProperties& rLineProperties, FillProperties& rFillProperties )
{
+ if( !rxTheme ) return;
+
ShapeStylesIndexMap::const_iterator aShapeStylesIndexIter( getShapeStylesIndex().begin() );
while( aShapeStylesIndexIter != getShapeStylesIndex().end() )
{
- const rtl::OUString sIndex( (*aShapeStylesIndexIter).second );
- sal_uInt32 nIndex( sIndex.toInt32() );
- if ( nIndex-- )
+ sal_Int32 nIndex = aShapeStylesIndexIter->second.toInt32();
+ if ( nIndex-- > 0 )
{
- switch( (*aShapeStylesIndexIter).first )
+ switch( aShapeStylesIndexIter->first )
{
case SHAPESTYLE_ln :
- {
- if( rxTheme.get() )
- {
- const std::vector< LinePropertiesPtr >& rThemeLineStyleList( rxTheme->getLineStyleList() );
- if ( rThemeLineStyleList.size() > nIndex )
- rLineProperties = *rThemeLineStyleList[ nIndex ].get();
- }
- }
+ if( const LineProperties* pLineProps = rxTheme->getLineStyle( nIndex ) )
+ rLineProperties = *pLineProps;
break;
case SHAPESTYLE_fill :
- {
- if( rxTheme.get() )
- {
- const std::vector< FillPropertiesPtr >& rThemeFillStyleList( rxTheme->getFillStyleList() );
- if ( rThemeFillStyleList.size() > nIndex )
- rFillProperties = *rThemeFillStyleList[ nIndex ].get();
- }
- }
+ if( const FillProperties* pFillProps = rxTheme->getFillStyle( nIndex ) )
+ rFillProperties = *pFillProps;
break;
case SHAPESTYLE_effect :
case SHAPESTYLE_font :
break;
}
}
- aShapeStylesIndexIter++;
+ ++aShapeStylesIndexIter;
}
}