summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-05-05 10:57:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-05-05 13:41:03 +0200
commita5bbbba632c6aecb8cf24d906b05f145dea1fc41 (patch)
treee4ee31230a6247a4932b6840bfc33e3a6fb05de3 /sw
parenta46cf617e39be24f16d074c836d558eaa7f1f336 (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>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx2
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx4
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/fmtui/tmpdlg.cxx4
-rw-r--r--sw/source/ui/misc/docfnote.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx4
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.cxx4
-rw-r--r--sw/source/uibase/utlui/uitool.cxx2
9 files changed, 13 insertions, 13 deletions
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)
{