summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/swstylemanager.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-06-13 08:38:49 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-06-13 08:38:49 +0000
commit93d9400f477faa3ad666f70403dd4ff960552526 (patch)
tree93d8449b6f3b8d8ec1ce50553afc2ab62c82d823 /sw/source/core/doc/swstylemanager.cxx
parentd6290266f7ca88d8c5de780675f942dabec6747e (diff)
INTEGRATION: CWS swlists01 (1.5.192); FILE MERGED
2008/05/08 16:27:29 od 1.5.192.2: RESYNC: (1.5-1.6); FILE MERGED 2008/03/11 14:38:41 od 1.5.192.1: #i86732# class <SwStyleManager> - accept item set with ignorable items and pass it to the <StylePool> instance for paragrapg styles. - method <getAllStyles(..)> -- create style pool iterator, which skips unused styles and ignorable items.
Diffstat (limited to 'sw/source/core/doc/swstylemanager.cxx')
-rw-r--r--sw/source/core/doc/swstylemanager.cxx26
1 files changed, 18 insertions, 8 deletions
diff --git a/sw/source/core/doc/swstylemanager.cxx b/sw/source/core/doc/swstylemanager.cxx
index 3701d02d065d..bda693e8d6ae 100644
--- a/sw/source/core/doc/swstylemanager.cxx
+++ b/sw/source/core/doc/swstylemanager.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: swstylemanager.cxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
* This file is part of OpenOffice.org.
*
@@ -78,7 +78,15 @@ class SwStyleManager : public IStyleAccess
SwStyleCache *mpParaCache;
public:
- SwStyleManager() : mpCharCache(0), mpParaCache(0) {}
+ // --> OD 2008-03-07 #refactorlists#
+ // accept empty item set for ignorable paragraph items.
+ SwStyleManager( SfxItemSet* pIgnorableParagraphItems )
+ : aAutoCharPool(),
+ aAutoParaPool( pIgnorableParagraphItems ),
+ mpCharCache(0),
+ mpParaCache(0)
+ {}
+ // <--
virtual ~SwStyleManager();
virtual StylePool::SfxItemSet_Pointer_t getAutomaticStyle( const SfxItemSet& rSet,
IStyleAccess::SwAutoStyleFamily eFamily );
@@ -91,9 +99,9 @@ public:
virtual void clearCaches();
};
-IStyleAccess *createStyleManager()
+IStyleAccess *createStyleManager( SfxItemSet* pIgnorableParagraphItems )
{
- return new SwStyleManager();
+ return new SwStyleManager( pIgnorableParagraphItems );
}
SwStyleManager::~SwStyleManager()
@@ -153,13 +161,15 @@ void SwStyleManager::getAllStyles( std::vector<StylePool::SfxItemSet_Pointer_t>
IStyleAccess::SwAutoStyleFamily eFamily )
{
StylePool& rAutoPool = eFamily == IStyleAccess::AUTO_STYLE_CHAR ? aAutoCharPool : aAutoParaPool;
- IStylePoolIteratorAccess *pIter = rAutoPool.createIterator();
+ // --> OD 2008-03-07 #refactorlists#
+ // setup <StylePool> iterator, which skips unused styles and ignorable items
+ IStylePoolIteratorAccess *pIter = rAutoPool.createIterator( true, true );
+ // <--
StylePool::SfxItemSet_Pointer_t pStyle = pIter->getNext();
while( pStyle.get() )
{
- // Do not consider styles which aren't used.
- if ( pStyle.use_count() > 2 )
- rStyles.push_back( pStyle );
+ rStyles.push_back( pStyle );
+
pStyle = pIter->getNext();
}
delete pIter;