From a1c081a7c213a56321b0b60651a1dbd63bcaec80 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Sat, 27 Jul 2013 16:54:50 +0200 Subject: 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 --- svx/source/dialog/srchdlg.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'svx/source/dialog') diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 63b3a9b45f31..11d235e57870 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -894,16 +894,16 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) m_pSearchTmplLB->Clear(); m_pReplaceTmplLB->Clear(); SfxStyleSheetBasePool* pStylePool = pShell->GetStyleSheetPool(); - SfxStyleSheetIterator iter(pStylePool, pSearchItem->GetFamily(), + pStylePool->SetSearchMask( pSearchItem->GetFamily(), SFXSTYLEBIT_ALL ); - SfxStyleSheetBase* pBase = iter.First(); + SfxStyleSheetBase* pBase = pStylePool->First(); while ( pBase ) { if ( pBase->IsUsed() ) m_pSearchTmplLB->InsertEntry( pBase->GetName() ); m_pReplaceTmplLB->InsertEntry( pBase->GetName() ); - pBase = iter.Next(); + pBase = pStylePool->Next(); } m_pSearchTmplLB->SelectEntry( pSearchItem->GetSearchString() ); m_pReplaceTmplLB->SelectEntry( pSearchItem->GetReplaceString() ); @@ -1564,18 +1564,17 @@ void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool ) String aOldRepl( m_pReplaceTmplLB->GetSelectEntry() ); m_pSearchTmplLB->Clear(); m_pReplaceTmplLB->Clear(); + rPool.SetSearchMask( pSearchItem->GetFamily(), SFXSTYLEBIT_ALL ); m_pSearchTmplLB->SetUpdateMode( sal_False ); m_pReplaceTmplLB->SetUpdateMode( sal_False ); - SfxStyleSheetIterator iter(&rPool, - pSearchItem->GetFamily(), SFXSTYLEBIT_ALL); - SfxStyleSheetBase* pBase = iter.First(); + SfxStyleSheetBase* pBase = rPool.First(); while ( pBase ) { if ( pBase->IsUsed() ) m_pSearchTmplLB->InsertEntry( pBase->GetName() ); m_pReplaceTmplLB->InsertEntry( pBase->GetName() ); - pBase = iter.Next(); + pBase = rPool.Next(); } m_pSearchTmplLB->SetUpdateMode( sal_True ); m_pReplaceTmplLB->SetUpdateMode( sal_True ); -- cgit