diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-07-27 16:54:50 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-07-27 17:15:55 +0200 |
commit | a1c081a7c213a56321b0b60651a1dbd63bcaec80 (patch) | |
tree | 52d8070fc39e37d42f5d9c9a4c0147757859fab8 /sw/source/ui/utlui/tmplctrl.cxx | |
parent | 21a4f5df04849a943764918147183ffba3710e87 (diff) |
Revert "SfxStyleSheetBasePool: remove internal iterator"
This reverts commit 3a46d91f8de420f38dd763028e91229c846dff52.
This breaks the Stylist, not sure why (does it depend on something
setting the search flags before?) so revert for now.
Change-Id: Ia50feeebae8bf852c827e4f270e81e9f08d2b1ac
Diffstat (limited to 'sw/source/ui/utlui/tmplctrl.cxx')
-rw-r--r-- | sw/source/ui/utlui/tmplctrl.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/ui/utlui/tmplctrl.cxx b/sw/source/ui/utlui/tmplctrl.cxx index bb3ec4fb5a94..456faf6e7d8b 100644 --- a/sw/source/ui/utlui/tmplctrl.cxx +++ b/sw/source/ui/utlui/tmplctrl.cxx @@ -104,17 +104,16 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt ) { SfxStyleSheetBasePool* pPool = pView->GetDocShell()-> GetStyleSheetPool(); - SfxStyleSheetIterator iter(pPool, - SFX_STYLE_FAMILY_PAGE, SFXSTYLEBIT_ALL); - if (iter.Count() > 1) + pPool->SetSearchMask(SFX_STYLE_FAMILY_PAGE, SFXSTYLEBIT_ALL); + if( pPool->Count() > 1 ) { sal_uInt16 nCount = 0; - SfxStyleSheetBase* pStyle = iter.First(); + SfxStyleSheetBase* pStyle = pPool->First(); while( pStyle ) { nCount++; aPop.InsertItem( nCount, pStyle->GetName() ); - pStyle = iter.Next(); + pStyle = pPool->Next(); } aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel()); @@ -122,7 +121,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt ) if( nCurrId != USHRT_MAX) { // looks a bit awkward, but another way is not possible - pStyle = iter.operator[]( nCurrId - 1 ); + pStyle = pPool->operator[]( nCurrId - 1 ); SfxStringItem aStyle( FN_SET_PAGE_STYLE, pStyle->GetName() ); pWrtShell->GetView().GetViewFrame()->GetDispatcher()->Execute( FN_SET_PAGE_STYLE, |