summaryrefslogtreecommitdiff
path: root/sdext/source/pdfimport/tree/style.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sdext/source/pdfimport/tree/style.hxx')
-rw-r--r--sdext/source/pdfimport/tree/style.hxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/sdext/source/pdfimport/tree/style.hxx b/sdext/source/pdfimport/tree/style.hxx
index 8b79bfaa89ce..94571cafc0b1 100644
--- a/sdext/source/pdfimport/tree/style.hxx
+++ b/sdext/source/pdfimport/tree/style.hxx
@@ -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
@@ -41,7 +41,7 @@ namespace pdfi
struct Element;
struct EmitContext;
struct ElementTreeVisitable;
-
+
class StyleContainer
{
public:
@@ -52,7 +52,7 @@ namespace pdfi
rtl::OUString Contents;
Element* ContainedElement;
std::vector< Style* > SubStyles;
-
+
Style() : ContainedElement( NULL ) {}
Style( const rtl::OString& rName, const PropertyMap& rProps ) :
Name( rName ),
@@ -60,7 +60,7 @@ namespace pdfi
ContainedElement( NULL )
{}
};
-
+
private:
struct HashedStyle
{
@@ -69,12 +69,12 @@ namespace pdfi
rtl::OUString Contents;
Element* ContainedElement;
std::vector<sal_Int32> SubStyles;
-
+
bool IsSubStyle;
sal_Int32 RefCount;
-
+
HashedStyle() : ContainedElement( NULL ), IsSubStyle( true ), RefCount( 0 ) {}
-
+
HashedStyle( const HashedStyle& rRight ) :
Name( rRight.Name ),
Properties( rRight.Properties ),
@@ -100,7 +100,7 @@ namespace pdfi
nRet ^= size_t(SubStyles[n]);
return nRet;
}
-
+
bool operator==(const HashedStyle& rRight) const
{
if( Name != rRight.Name ||
@@ -128,13 +128,13 @@ namespace pdfi
return rStyle.hashCode();
}
};
-
+
struct StyleIdNameSort;
friend struct StyleIdNameSort;
struct StyleIdNameSort
{
const std::hash_map< sal_Int32, HashedStyle >* m_pMap;
-
+
StyleIdNameSort( const std::hash_map< sal_Int32, HashedStyle >* pMap ) :
m_pMap(pMap)
{}
@@ -152,15 +152,15 @@ namespace pdfi
return left_it->second.Name < right_it->second.Name;
}
};
-
+
sal_Int32 m_nNextId;
std::hash_map< sal_Int32, HashedStyle > m_aIdToStyle;
std::hash_map< HashedStyle, sal_Int32, StyleHash > m_aStyleToId;
-
- void impl_emitStyle( sal_Int32 nStyleId,
+
+ void impl_emitStyle( sal_Int32 nStyleId,
EmitContext& rContext,
ElementTreeVisitor& rContainedElemVisitor );
-
+
public:
StyleContainer();
@@ -171,7 +171,7 @@ namespace pdfi
sal_Int32 getStyleId( const Style& rStyle )
{ return impl_getStyleId( rStyle, false ); }
sal_Int32 getStandardStyleId( const rtl::OString& rFamily );
-
+
// returns NULL for an invalid style id
const PropertyMap* getProperties( sal_Int32 nStyleId ) const;
sal_Int32 setProperties( sal_Int32 nStyleId, const PropertyMap &rNewProps );