summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-02-06 19:59:34 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-02-07 00:35:37 -0500
commitab0543469433395153874c47ce46ef73fc137203 (patch)
tree9d24a1991ca4b824a52db7080e595807cc832fa6 /xmloff
parent14b9d7c75f65757e0fd281e34012ae2feabd85c1 (diff)
Move these typedef's inside the class scope & bool cleanups.
Change-Id: I806453efbc5f7bb18f34593c350b05d74a0bc23b
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlstyle.cxx25
1 files changed, 10 insertions, 15 deletions
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index b69f3f6b97f6..9cf064533884 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -56,8 +56,6 @@
#include <set>
#include <vector>
-using ::std::vector;
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
@@ -254,18 +252,15 @@ struct SvXMLStyleIndexCmp_Impl
}
};
-// ---------------------------------------------------------------------
-
-typedef SvXMLStyleContext *SvXMLStyleContextPtr;
-typedef vector< SvXMLStyleContextPtr > SvXMLStyleContexts_Impl;
-
-typedef std::set<SvXMLStyleIndex_Impl, SvXMLStyleIndexCmp_Impl> SvXMLStyleIndices_Impl;
class SvXMLStylesContext_Impl
{
- SvXMLStyleContexts_Impl aStyles;
- SvXMLStyleIndices_Impl *pIndices;
- sal_Bool bAutomaticStyle;
+ typedef std::vector<SvXMLStyleContext*> StylesType;
+ typedef std::set<SvXMLStyleIndex_Impl, SvXMLStyleIndexCmp_Impl> IndicesType;
+
+ StylesType aStyles;
+ IndicesType* pIndices;
+ bool bAutomaticStyle;
#ifdef DBG_UTIL
sal_uInt32 nIndexCreated;
@@ -274,7 +269,7 @@ class SvXMLStylesContext_Impl
void FlushIndex() { delete pIndices; pIndices = 0; }
public:
- SvXMLStylesContext_Impl( sal_Bool bAuto );
+ SvXMLStylesContext_Impl( bool bAuto );
~SvXMLStylesContext_Impl();
size_t GetStyleCount() const { return aStyles.size(); }
@@ -298,7 +293,7 @@ public:
sal_Bool IsAutomaticStyle() const { return bAutomaticStyle; }
};
-SvXMLStylesContext_Impl::SvXMLStylesContext_Impl( sal_Bool bAuto ) :
+SvXMLStylesContext_Impl::SvXMLStylesContext_Impl( bool bAuto ) :
pIndices( 0 ),
bAutomaticStyle( bAuto )
#ifdef DBG_UTIL
@@ -351,7 +346,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( sal_uIn
"Performance warning: sdbcx::Index created multiple times" );
#endif
((SvXMLStylesContext_Impl *)this)->pIndices =
- new SvXMLStyleIndices_Impl( aStyles.begin(), aStyles.end() );
+ new IndicesType( aStyles.begin(), aStyles.end() );
SAL_WARN_IF(pIndices->size() != aStyles.size(), "xmloff", "Here is a duplicate Style");
#ifdef DBG_UTIL
((SvXMLStylesContext_Impl *)this)->nIndexCreated++;
@@ -361,7 +356,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( sal_uIn
if( pIndices )
{
SvXMLStyleIndex_Impl aIndex( nFamily, rName );
- SvXMLStyleIndices_Impl::iterator aFind = pIndices->find(aIndex);
+ IndicesType::iterator aFind = pIndices->find(aIndex);
if( aFind != pIndices->end() )
pStyle = aFind->GetStyle();
}