summaryrefslogtreecommitdiff
path: root/sd/source/filter/ppt/pptin.cxx
diff options
context:
space:
mode:
authorTobias Lippert <drtl@fastmail.fm>2014-03-04 22:20:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-03-10 11:52:41 -0500
commit0b291d42e7fc3c787af0e88ee7c5499c333b14b2 (patch)
treecddfa3d0813b6bd28093c795221b2bea88c0a2aa /sd/source/filter/ppt/pptin.cxx
parent136f1ad5ed67a39dde500f34cfdc446ddbbd10be (diff)
Use SfxStyleSheetIterator to iterate over SfxStyles in sd/pptin.cxx
Change-Id: I99534efdd52644882f2e2960bdafce58bf632804 Reviewed-on: https://gerrit.libreoffice.org/8483 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/filter/ppt/pptin.cxx')
-rw-r--r--sd/source/filter/ppt/pptin.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index b6f1c665d347..e80fc82781ad 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -91,6 +91,8 @@
#include <comphelper/string.hxx>
#include <oox/ole/olehelper.hxx>
+#include <boost/make_shared.hpp>
+
using namespace ::com::sun::star;
SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvStorage& rStorage, SfxMedium& rMedium )
@@ -137,13 +139,12 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvSto
{
// iterate over all styles
SdStyleSheetPool* pStyleSheetPool = pDocument->GetSdStyleSheetPool();
+ SfxStyleSheetIteratorPtr aIter =
+ boost::make_shared<SfxStyleSheetIterator>(pStyleSheetPool, SFX_STYLE_FAMILY_ALL);
- sal_uInt32 nStyles = pStyleSheetPool ? pStyleSheetPool->GetStyles().size() : 0;
- for (sal_uInt32 nStyle = 0; nStyle < nStyles; nStyle++)
+ for (SfxStyleSheetBase *pSheet = aIter->First(); pSheet; pSheet = aIter->Next())
{
- SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>( pStyleSheetPool->GetStyles()[nStyle].get() );
SfxItemSet& rSet = pSheet->GetItemSet();
-
// if autokerning is set in style, override it, ppt has no autokerning
if( rSet.GetItemState( EE_CHAR_PAIRKERNING, false ) == SFX_ITEM_SET )
rSet.ClearItem( EE_CHAR_PAIRKERNING );