summaryrefslogtreecommitdiff
path: root/sdext/source/pdfimport/tree/style.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sdext/source/pdfimport/tree/style.cxx')
-rw-r--r--sdext/source/pdfimport/tree/style.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx
index 01585029049a..1a2f43ca0fc5 100644
--- a/sdext/source/pdfimport/tree/style.cxx
+++ b/sdext/source/pdfimport/tree/style.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,7 +50,7 @@ StyleContainer::StyleContainer() :
sal_Int32 StyleContainer::impl_getStyleId( const Style& rStyle, bool bSubStyle )
{
sal_Int32 nRet = -1;
-
+
// construct HashedStyle to find or insert
HashedStyle aSearchStyle;
aSearchStyle.Name = rStyle.Name;
@@ -59,10 +59,10 @@ sal_Int32 StyleContainer::impl_getStyleId( const Style& rStyle, bool bSubStyle )
aSearchStyle.ContainedElement = rStyle.ContainedElement;
for( unsigned int n = 0; n < rStyle.SubStyles.size(); ++n )
aSearchStyle.SubStyles.push_back( impl_getStyleId( *rStyle.SubStyles[n], true ) );
-
+
std::hash_map< HashedStyle, sal_Int32, StyleHash >::iterator it =
m_aStyleToId.find( aSearchStyle );
-
+
if( it != m_aStyleToId.end() )
{
nRet = it->second;
@@ -132,7 +132,7 @@ sal_Int32 StyleContainer::setProperties( sal_Int32 nStyleId, const PropertyMap&
aSearchStyle.ContainedElement = it->second.ContainedElement;
aSearchStyle.SubStyles = it->second.SubStyles;
aSearchStyle.IsSubStyle = it->second.IsSubStyle;
-
+
// find out whether this new style already exists
std::hash_map< HashedStyle, sal_Int32, StyleHash >::iterator new_it =
m_aStyleToId.find( aSearchStyle );
@@ -159,13 +159,13 @@ sal_Int32 StyleContainer::setProperties( sal_Int32 nStyleId, const PropertyMap&
OUString StyleContainer::getStyleName( sal_Int32 nStyle ) const
{
OUStringBuffer aRet( 64 );
-
+
std::hash_map< sal_Int32, HashedStyle >::const_iterator style_it =
m_aIdToStyle.find( nStyle );
if( style_it != m_aIdToStyle.end() )
{
const HashedStyle& rStyle = style_it->second;
-
+
PropertyMap::const_iterator name_it = rStyle.Properties.find( USTR("style:name") );
if( name_it != rStyle.Properties.end() )
aRet.append( name_it->second );
@@ -193,8 +193,8 @@ OUString StyleContainer::getStyleName( sal_Int32 nStyle ) const
return aRet.makeStringAndClear();
}
-void StyleContainer::impl_emitStyle( sal_Int32 nStyleId,
- EmitContext& rContext,
+void StyleContainer::impl_emitStyle( sal_Int32 nStyleId,
+ EmitContext& rContext,
ElementTreeVisitor& rContainedElemVisitor )
{
std::hash_map< sal_Int32, HashedStyle >::const_iterator it = m_aIdToStyle.find( nStyleId );
@@ -211,7 +211,7 @@ void StyleContainer::impl_emitStyle( sal_Int32 nStyleId,
if( rStyle.Contents )
rContext.rEmitter.write( rStyle.Contents );
if( rStyle.ContainedElement )
- rStyle.ContainedElement->visitedBy( rContainedElemVisitor,
+ rStyle.ContainedElement->visitedBy( rContainedElemVisitor,
std::list<Element*>::iterator() );
rContext.rEmitter.endTag( rStyle.Name.getStr() );
}
@@ -234,14 +234,14 @@ void StyleContainer::emit( EmitContext& rContext,
aAutomaticStyleSection.push_back( it->first );
}
}
-
+
if( ! aMasterPageSection.empty() )
std::stable_sort( aMasterPageSection.begin(), aMasterPageSection.end(), StyleIdNameSort(&m_aIdToStyle) );
if( ! aAutomaticStyleSection.empty() )
std::stable_sort( aAutomaticStyleSection.begin(), aAutomaticStyleSection.end(), StyleIdNameSort(&m_aIdToStyle) );
if( ! aOfficeStyleSection.empty() )
std::stable_sort( aOfficeStyleSection.begin(), aOfficeStyleSection.end(), StyleIdNameSort(&m_aIdToStyle) );
-
+
int n = 0, nElements = 0;
rContext.rEmitter.beginTag( "office:styles", PropertyMap() );
for( n = 0, nElements = aOfficeStyleSection.size(); n < nElements; n++ )