diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-07-27 00:43:34 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-07-27 00:45:21 +0200 |
commit | 3a46d91f8de420f38dd763028e91229c846dff52 (patch) | |
tree | f34ae4072fdd9ff6f06dbd4bac49072ff81f5c60 /sw/source/core | |
parent | 197010643e7e1b8c973013efa9034ffc9bdb56c0 (diff) |
SfxStyleSheetBasePool: remove internal iterator
The clients always start with First() anyway so they might as well use
external iterators, which makes calling First() in certain situations
just so the internal iterator is invalidated unnecessary.
Change-Id: I0948576c20410136448e8b85311c21a257469bc7
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 1eaa460e8597..152e3e3e7a13 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1900,14 +1900,15 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, // sal_Int16 nIdx = GetCommandContextIndex( pSeq[i].Name ); - pBasePool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL ); + SfxStyleSheetIterator iter(pBasePool, + SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL); sal_Bool bStyleFound = sal_False; - const SfxStyleSheetBase* pBase = pBasePool->First(); + const SfxStyleSheetBase* pBase = iter.First(); while (pBase && !bStyleFound) { if(pBase->GetName() == aStyleName) bStyleFound = sal_True; - pBase = pBasePool->Next(); + pBase = iter.Next(); } if (nIdx == -1 || !bStyleFound) |