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 /svx/source/dialog/srchdlg.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 'svx/source/dialog/srchdlg.cxx')
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
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 ); |