diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-05 10:57:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-05-05 13:41:03 +0200 |
commit | a5bbbba632c6aecb8cf24d906b05f145dea1fc41 (patch) | |
tree | e4ee31230a6247a4932b6840bfc33e3a6fb05de3 | |
parent | a46cf617e39be24f16d074c836d558eaa7f1f336 (diff) |
make the family and mask explicit in SfxStyleSheetBasePool::First
Change-Id: I36655b65ca00e5f7b8779a28d4a1778c8e35dc4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93461
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | cui/source/tabpages/paragrph.cxx | 2 | ||||
-rw-r--r-- | include/svl/style.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/stlpool.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/html/htmlexp.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh6.cxx | 2 | ||||
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuhhconv.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 17 | ||||
-rw-r--r-- | sfx2/source/styles/StyleManager.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/style.cxx | 26 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/pardlg.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/swuiccoll.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/dbui/dbinsdlg.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fmtui/tmpdlg.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/misc/docfnote.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/ThemePanel.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/utlui/uitool.cxx | 2 |
22 files changed, 48 insertions, 55 deletions
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 27a34a33279e..bb7115b39add 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1962,7 +1962,7 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia { SfxStyleSheetBasePool* pPool = pSh->GetStyleSheetPool(); pPool->SetSearchMask( SfxStyleFamily::Page ); - SfxStyleSheetBase* pStyle = pPool->First(); + SfxStyleSheetBase* pStyle = pPool->First(SfxStyleFamily::Page); OUString aStdName; while( pStyle ) diff --git a/include/svl/style.hxx b/include/svl/style.hxx index 8ae7c68e000d..808dbd2ef186 100644 --- a/include/svl/style.hxx +++ b/include/svl/style.hxx @@ -231,7 +231,7 @@ friend class SfxStyleSheetBase; std::unique_ptr<SfxStyleSheetBasePool_Impl> pImpl; protected: - SfxStyleSheetIterator& GetIterator_Impl(); + SfxStyleSheetIterator& GetIterator_Impl(SfxStyleFamily eFamily, SfxStyleSearchBits eMask); SfxItemPool& rPool; SfxStyleFamily nSearchFamily; @@ -272,7 +272,7 @@ public: SfxStyleSheetBasePool& operator=( const SfxStyleSheetBasePool& ); SfxStyleSheetBasePool& operator+=( const SfxStyleSheetBasePool& ); - SfxStyleSheetBase* First(); + SfxStyleSheetBase* First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask = SfxStyleSearchBits::All); SfxStyleSheetBase* Next(); virtual SfxStyleSheetBase* Find( const OUString&, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All ); diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index eda1f25551ef..8f38c8846da2 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -422,7 +422,7 @@ ScStyleSheet* ScStyleSheetPool::FindCaseIns( const OUString& rName, SfxStyleFami void ScStyleSheetPool::setAllStandard() { - SfxStyleSheetBase* pSheet = First(); + SfxStyleSheetBase* pSheet = First(GetSearchFamily(), GetSearchMask()); while (pSheet) { pSheet->SetMask(SfxStyleSearchBits::ScStandard); diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 2b362fd1cf45..136941bd3965 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -444,7 +444,7 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab ) SfxStyleFamily::Para ); OSL_ENSURE( pStyleSheet, "ParaStyle not found! :-(" ); if (!pStyleSheet) - pStyleSheet = pStylePool->First(); + pStyleSheet = pStylePool->First(SfxStyleFamily::Para); const SfxItemSet& rSetPara = pStyleSheet->GetItemSet(); aHTMLStyle.nDefaultScriptType = ScGlobal::GetDefaultScriptType(); @@ -465,7 +465,7 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab ) pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SfxStyleFamily::Page ); OSL_ENSURE( pStyleSheet, "PageStyle not found! :-(" ); if (!pStyleSheet) - pStyleSheet = pStylePool->First(); + pStyleSheet = pStylePool->First(SfxStyleFamily::Page); const SfxItemSet& rSet = pStyleSheet->GetItemSet(); if ( !aHTMLStyle.bInitialized ) { diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 9cd7b72474d2..b5bc2303d0e9 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -205,7 +205,7 @@ SfxStyleSheetBasePool* ScDocShell::GetStyleSheetPool() static void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool ) { pStylePool->SetSearchMask(SfxStyleFamily::Page); - SfxStyleSheetBase *pStyle = pStylePool->First(); + SfxStyleSheetBase *pStyle = pStylePool->First(SfxStyleFamily::Page); while ( pStyle ) { SfxItemSet& rStyleSet = pStyle->GetItemSet(); diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index fc4a1fd548b3..91e833156256 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1515,7 +1515,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, static_cast<SdStyleSheetPool*>( mxStyleSheetPool.get())->SetSearchMask(SfxStyleFamily::Page); StyleSheetCopyResultVector aCreatedStyles; // List of created stylesheets - SfxStyleSheetBase* pHisSheet = pSourceStyleSheetPool->First(); + SfxStyleSheetBase* pHisSheet = pSourceStyleSheetPool->First(SfxStyleFamily::Page); while (pHisSheet) { diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx index eea58f039c93..45c29cc2c21e 100644 --- a/sd/source/ui/func/fuhhconv.cxx +++ b/sd/source/ui/func/fuhhconv.cxx @@ -155,7 +155,7 @@ void FuHangulHanjaConversion::ConvertStyles( LanguageType nTargetLanguage, const if( !pStyleSheetPool ) return; - SfxStyleSheetBase* pStyle = pStyleSheetPool->First(); + SfxStyleSheetBase* pStyle = pStyleSheetPool->First(pStyleSheetPool->GetSearchFamily(), pStyleSheetPool->GetSearchMask()); while( pStyle ) { SfxItemSet& rSet = pStyle->GetItemSet(); diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 44aba7480eaf..5598880e2189 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -104,7 +104,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::D if ( pPool ) { pPool->SetSearchMask( pStyle->GetFamily() ); - pPool->First(); // for SW - update internal list + pPool->First(pStyle->GetFamily()); // for SW - update internal list } if ( pStyle->GetName().isEmpty() && pPool ) @@ -128,7 +128,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::D if ( pStyle->HasFollowSupport() && pPool ) { - SfxStyleSheetBase* pPoolStyle = pPool->First(); + SfxStyleSheetBase* pPoolStyle = pPool->First(pStyle->GetFamily()); m_xFollowLb->freeze(); @@ -161,7 +161,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::D // the base template can be set to NULL m_xBaseLb->append_text(SfxResId(STR_NONE)); - SfxStyleSheetBase* pPoolStyle = pPool->First(); + SfxStyleSheetBase* pPoolStyle = pPool->First(pStyle->GetFamily()); while ( pPoolStyle ) { diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 1493bcc8a23d..b56583362026 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -906,7 +906,7 @@ void SfxCommonTemplateDialog_Impl::EnableTreeDrag(bool bEnable) { if (pStyleSheetPool) { - SfxStyleSheetBase* pStyle = pStyleSheetPool->First(); + SfxStyleSheetBase* pStyle = pStyleSheetPool->First(pStyleSheetPool->GetSearchFamily(), pStyleSheetPool->GetSearchMask()); bAllowReParentDrop = pStyle && pStyle->HasParentSupport() && bEnable; } bTreeDrag = bEnable; @@ -962,7 +962,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox() const SfxStyleFamily eFam = pItem->GetFamily(); pStyleSheetPool->SetSearchMask(eFam, SfxStyleSearchBits::AllVisible); StyleTreeArr_Impl aArr; - SfxStyleSheetBase* pStyle = pStyleSheetPool->First(); + SfxStyleSheetBase* pStyle = pStyleSheetPool->First(eFam, SfxStyleSearchBits::AllVisible); bAllowReParentDrop = pStyle && pStyle->HasParentSupport() && bTreeDrag; @@ -1041,7 +1041,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(StyleFlags nFlags) const SfxStyleFamily eFam = pItem->GetFamily(); SfxStyleSearchBits nFilter (nActFilter < pItem->GetFilterList().size() ? pItem->GetFilterList()[nActFilter].nFlags : SfxStyleSearchBits::Auto); - if(nFilter == SfxStyleSearchBits::Auto) // automatic + if (nFilter == SfxStyleSearchBits::Auto) // automatic nFilter = nAppFilter; OSL_ENSURE(pStyleSheetPool, "no StyleSheetPool"); @@ -1061,10 +1061,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(StyleFlags nFlags) mxFilterLb->append(OUString::number(static_cast<int>(SfxStyleSearchBits::All)), SfxResId(STR_STYLE_FILTER_HIERARCHICAL)); const SfxStyleFilter& rFilter = pItem->GetFilterList(); for (const SfxFilterTuple& i : rFilter) - { - SfxStyleSearchBits nFilterFlags = i.nFlags; - mxFilterLb->append(OUString::number(static_cast<int>(nFilterFlags)), i.aName); - } + mxFilterLb->append(OUString::number(static_cast<int>(i.nFlags)), i.aName); mxFilterLb->thaw(); if (nActFilter < mxFilterLb->get_count() - 1) @@ -1073,8 +1070,8 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(StyleFlags nFlags) { nActFilter = 0; mxFilterLb->set_active(1); - SfxStyleSearchBits nFilterFlags = (nActFilter < rFilter.size()) ? rFilter[nActFilter].nFlags : SfxStyleSearchBits::Auto; - pStyleSheetPool->SetSearchMask(eFam, nFilterFlags); + nFilter = (nActFilter < rFilter.size()) ? rFilter[nActFilter].nFlags : SfxStyleSearchBits::Auto; + pStyleSheetPool->SetSearchMask(eFam, nFilter); } // if the tree view again, select family hierarchy @@ -1100,7 +1097,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(StyleFlags nFlags) EnableItem("watercan", false); - SfxStyleSheetBase *pStyle = pStyleSheetPool->First(); + SfxStyleSheetBase *pStyle = pStyleSheetPool->First(eFam, nFilter); std::unique_ptr<weld::TreeIter> xEntry = mxFmtLb->make_iterator(); bool bEntry = mxFmtLb->get_iter_first(*xEntry); diff --git a/sfx2/source/styles/StyleManager.cxx b/sfx2/source/styles/StyleManager.cxx index 7d1525ebccac..83fc314d8407 100644 --- a/sfx2/source/styles/StyleManager.cxx +++ b/sfx2/source/styles/StyleManager.cxx @@ -20,7 +20,7 @@ SfxStyleSheetBase* StyleManager::Search(const OUString& rStyleName, SfxStyleFami pPool->SetSearchMask(eFamily); - SfxStyleSheetBase* pStyle = pPool->First(); + SfxStyleSheetBase* pStyle = pPool->First(eFamily); while (pStyle) { if (rStyleName == pStyle->GetName()) diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index e0a722e42edb..be80f702e06c 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -479,7 +479,6 @@ SfxStyleSheetBase* SfxStyleSheetIterator::First() } } - SfxStyleSheetBase* SfxStyleSheetIterator::Next() { SfxStyleSheetBase* retval = nullptr; @@ -548,14 +547,10 @@ SfxStyleSearchBits SfxStyleSheetIterator::GetSearchMask() const return mask; } - -SfxStyleSheetIterator& SfxStyleSheetBasePool::GetIterator_Impl() +SfxStyleSheetIterator& SfxStyleSheetBasePool::GetIterator_Impl(SfxStyleFamily eFamily, SfxStyleSearchBits eMask) { - if( !pImpl->pIter || (pImpl->pIter->GetSearchMask() != nMask) || (pImpl->pIter->GetSearchFamily() != nSearchFamily) ) - { - pImpl->pIter = CreateIterator( nSearchFamily, nMask ); - } - + if (!pImpl->pIter || (pImpl->pIter->GetSearchMask() != eMask) || (pImpl->pIter->GetSearchFamily() != eFamily)) + pImpl->pIter = CreateIterator(eFamily, eMask); return *pImpl->pIter; } @@ -706,21 +701,22 @@ SfxStyleSheetBasePool& SfxStyleSheetBasePool::operator+=( const SfxStyleSheetBas } SfxStyleSheetBase* SfxStyleSheetBasePool::Find(const OUString& rName, - SfxStyleFamily eFam, - SfxStyleSearchBits mask) + SfxStyleFamily eFamily, + SfxStyleSearchBits eMask) { - SfxStyleSheetIterator aIter(this,eFam,mask); + SfxStyleSheetIterator aIter(this, eFamily, eMask); return aIter.Find(rName); } -SfxStyleSheetBase* SfxStyleSheetBasePool::First() +SfxStyleSheetBase* SfxStyleSheetBasePool::First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask) { - return GetIterator_Impl().First(); + return GetIterator_Impl(eFamily, eMask).First(); } SfxStyleSheetBase* SfxStyleSheetBasePool::Next() { - return GetIterator_Impl().Next(); + assert(pImpl->pIter && "Next called without a previous First"); + return pImpl->pIter->Next(); } void SfxStyleSheetBasePool::Remove( SfxStyleSheetBase* p ) @@ -811,7 +807,7 @@ void SfxStyleSheetBasePool::ChangeParent(const OUString& rOld, { const SfxStyleSearchBits nTmpMask = GetSearchMask(); SetSearchMask(GetSearchFamily()); - for( SfxStyleSheetBase* p = First(); p; p = Next() ) + for( SfxStyleSheetBase* p = First(GetSearchFamily()); p; p = Next() ) { if( p->GetParent() == rOld ) { diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 15204847d528..6e974372f80a 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -907,7 +907,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) m_xReplaceTmplLB->clear(); SfxStyleSheetBasePool* pStylePool = pShell->GetStyleSheetPool(); pStylePool->SetSearchMask( pSearchItem->GetFamily() ); - SfxStyleSheetBase* pBase = pStylePool->First(); + SfxStyleSheetBase* pBase = pStylePool->First(pSearchItem->GetFamily()); while ( pBase ) { @@ -1599,7 +1599,7 @@ void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool ) rPool.SetSearchMask( pSearchItem->GetFamily() ); m_xSearchTmplLB->freeze(); m_xReplaceTmplLB->freeze(); - SfxStyleSheetBase* pBase = rPool.First(); + SfxStyleSheetBase* pBase = rPool.First(pSearchItem->GetFamily()); while ( pBase ) { diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 89fce7fea547..883ddbf83143 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -972,7 +972,7 @@ void SvxStyleBox_Base::Select(bool bNonTravelSelect) { pPool->SetSearchMask( eStyleFamily ); - pStyle = pPool->First(); + pStyle = pPool->First(eStyleFamily); while ( pStyle && pStyle->GetName() != aSearchEntry ) pStyle = pPool->Next(); } @@ -1143,7 +1143,7 @@ void SvxStyleBox_Base::SetupEntry(vcl::RenderContext& rRenderContext, sal_Int32 { pPool->SetSearchMask( eStyleFamily ); - pStyle = pPool->First(); + pStyle = pPool->First(eStyleFamily); while (pStyle && pStyle->GetName() != rStyleName) pStyle = pPool->Next(); } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index c57249326b32..c38a70ec6234 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1899,7 +1899,7 @@ void SwXStyle::SetPropertyValue<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPrope throw lang::IllegalArgumentException(); m_pBasePool->SetSearchMask(SfxStyleFamily::Para); bool bStyleFound = false; - for(auto pBase = m_pBasePool->First(); pBase; pBase = m_pBasePool->Next()) + for(auto pBase = m_pBasePool->First(SfxStyleFamily::Para); pBase; pBase = m_pBasePool->Next()) { bStyleFound = pBase->GetName() == aStyleName; if (bStyleFound) diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index 80388415f486..30360c3d88ea 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -209,7 +209,7 @@ void SwParaDlg::PageCreated(const OString& rId, SfxTabPage& rPage) weld::ComboBox& rBox = static_cast<SwParagraphNumTabPage&>(rPage).GetStyleBox(); SfxStyleSheetBasePool* pPool = rView.GetDocShell()->GetStyleSheetPool(); pPool->SetSearchMask(SfxStyleFamily::Pseudo); - const SfxStyleSheetBase* pBase = pPool->First(); + const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Pseudo); std::set<OUString> aNames; while(pBase) { diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index 056953e4bd0f..7fcd29541cee 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -135,7 +135,7 @@ void SwCondCollPage::Reset(const SfxItemSet *) SfxStyleSheetBasePool* pPool = m_rSh.GetView().GetDocShell()->GetStyleSheetPool(); pPool->SetSearchMask(SfxStyleFamily::Para); m_xStyleLB->clear(); - const SfxStyleSheetBase* pBase = pPool->First(); + const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Para); while (pBase) { if (!m_pFormat || pBase->GetName() != m_pFormat->GetName()) @@ -224,7 +224,7 @@ void SwCondCollPage::SelectHdl(const weld::Widget* pBox) const SfxStyleSearchBits nSearchFlags = static_cast<SfxStyleSearchBits>(m_xFilterLB->get_id(nSelPos).toInt32()); SfxStyleSheetBasePool* pPool = m_rSh.GetView().GetDocShell()->GetStyleSheetPool(); pPool->SetSearchMask(SfxStyleFamily::Para, nSearchFlags); - const SfxStyleSheetBase* pBase = pPool->First(); + const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Para, nSearchFlags); bool bEmpty = true; while (pBase) diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index ba2d93f3ccc8..f1cdecde7e1c 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -310,7 +310,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, pPool->SetSearchMask( SfxStyleFamily::Para ); m_xLbDbParaColl->append_text( sNoTmpl ); - const SfxStyleSheetBase* pBase = pPool->First(); + const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Para); while( pBase ) { m_xLbDbParaColl->append_text( pBase->GetName() ); diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index a508d828698f..a522a2612237 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -338,7 +338,7 @@ void SwTemplateDlgController::PageCreated(const OString& rId, SfxTabPage &rPage SfxStyleSheetBasePool* pStyleSheetPool = pWrtShell-> GetView().GetDocShell()->GetStyleSheetPool(); pStyleSheetPool->SetSearchMask(SfxStyleFamily::Para); - SfxStyleSheetBase *pFirstStyle = pStyleSheetPool->First(); + SfxStyleSheetBase *pFirstStyle = pStyleSheetPool->First(SfxStyleFamily::Para); while(pFirstStyle) { aList.push_back( pFirstStyle->GetName() ); @@ -441,7 +441,7 @@ void SwTemplateDlgController::PageCreated(const OString& rId, SfxTabPage &rPage weld::ComboBox& rBox = static_cast<SwParagraphNumTabPage&>(rPage).GetStyleBox(); SfxStyleSheetBasePool* pPool = pWrtShell->GetView().GetDocShell()->GetStyleSheetPool(); pPool->SetSearchMask(SfxStyleFamily::Pseudo); - const SfxStyleSheetBase* pBase = pPool->First(); + const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Pseudo); std::set<OUString> aNames; while(pBase) { diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 66eef11d9cfa..6762c04b7d28 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -165,7 +165,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet* ) // paragraph SfxStyleSheetBasePool* pStyleSheetPool = pSh->GetView().GetDocShell()->GetStyleSheetPool(); pStyleSheetPool->SetSearchMask(SfxStyleFamily::Para, SfxStyleSearchBits::SwExtra); - SfxStyleSheetBase *pStyle = pStyleSheetPool->First(); + SfxStyleSheetBase *pStyle = pStyleSheetPool->First(SfxStyleFamily::Para, SfxStyleSearchBits::SwExtra); while(pStyle) { m_xParaTemplBox->append_text(pStyle->GetName()); diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 89de80e10925..3d3d2699491e 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -1142,7 +1142,7 @@ bool SwDocStyleSheet::SetName(const OUString& rStr, bool bReindexNow) if( bChg ) { - m_pPool->First(); // internal list has to be updated + m_pPool->First(m_pPool->GetSearchFamily(), m_pPool->GetSearchMask()); // internal list has to be updated m_pPool->Broadcast( SfxStyleSheetHint( SfxHintId::StyleSheetModified, *this ) ); SwEditShell* pSh = rDoc.GetEditShell(); if( pSh ) @@ -3189,7 +3189,7 @@ void SwStyleSheetIterator::AppendStyleList(const std::vector<OUString>& rList, void SwDocStyleSheetPool::InvalidateIterator() { - dynamic_cast<SwStyleSheetIterator&>(GetIterator_Impl()).InvalidateIterator(); + dynamic_cast<SwStyleSheetIterator&>(GetIterator_Impl(GetSearchFamily(), GetSearchMask())).InvalidateIterator(); } void SwStyleSheetIterator::InvalidateIterator() diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index de8745944abb..7e24d4be5f92 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -336,7 +336,7 @@ void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, cons svx::ColorSet aColorSet = rColorSets.getColorSet(sColorSetName); pPool->SetSearchMask(SfxStyleFamily::Para); - pStyle = static_cast<SwDocStyleSheet*>(pPool->First()); + pStyle = static_cast<SwDocStyleSheet*>(pPool->First(SfxStyleFamily::Para)); while (pStyle) { @@ -355,7 +355,7 @@ void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, cons } pPool->SetSearchMask(SfxStyleFamily::Char); - pStyle = static_cast<SwDocStyleSheet*>(pPool->First()); + pStyle = static_cast<SwDocStyleSheet*>(pPool->First(SfxStyleFamily::Char)); while (pStyle) { diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 583768ec2a40..711763c4c236 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -716,7 +716,7 @@ void FillCharStyleListBox(weld::ComboBox& rToFill, SwDocShell* pDocSh, bool bSor SfxStyleSheetBasePool* pPool = pDocSh->GetStyleSheetPool(); pPool->SetSearchMask(SfxStyleFamily::Char); SwDoc* pDoc = pDocSh->GetDoc(); - const SfxStyleSheetBase* pBase = pPool->First(); + const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Char); const OUString sStandard(SwResId(STR_POOLCHR_STANDARD)); while(pBase) { |