[Libreoffice-commits] core.git: cui/source include/svl sc/source sd/source sfx2/source svl/source svx/source sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue May 5 18:15:50 UTC 2020


 cui/source/tabpages/paragrph.cxx        |    1 -
 include/svl/style.hxx                   |    4 ----
 sc/source/filter/html/htmlexp.cxx       |    2 --
 sc/source/ui/docshell/docsh6.cxx        |    1 -
 sc/source/ui/view/formatsh.cxx          |    2 --
 sd/source/core/drawdoc3.cxx             |    6 ------
 sd/source/core/stlpool.cxx              |    1 -
 sfx2/source/dialog/mgetempl.cxx         |    1 -
 sfx2/source/dialog/templdlg.cxx         |   10 ++--------
 sfx2/source/doc/objcont.cxx             |    1 -
 sfx2/source/styles/StyleManager.cxx     |    2 --
 svl/source/items/style.cxx              |   13 ++-----------
 svx/source/dialog/srchdlg.cxx           |    2 --
 svx/source/tbxctrls/tbcontrl.cxx        |    5 -----
 sw/source/core/doc/docdesc.cxx          |    1 -
 sw/source/core/unocore/unostyle.cxx     |   17 -----------------
 sw/source/ui/chrdlg/pardlg.cxx          |    1 -
 sw/source/ui/chrdlg/swuiccoll.cxx       |    2 --
 sw/source/ui/dbui/dbinsdlg.cxx          |    1 -
 sw/source/ui/fmtui/tmpdlg.cxx           |    2 --
 sw/source/ui/misc/docfnote.cxx          |    1 -
 sw/source/uibase/sidebar/ThemePanel.cxx |    4 ----
 sw/source/uibase/utlui/tmplctrl.cxx     |    1 -
 sw/source/uibase/utlui/uitool.cxx       |    1 -
 24 files changed, 4 insertions(+), 78 deletions(-)

New commits:
commit ebcd29ab3b16ab93a523122a672c5f08fcbce4a0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue May 5 15:18:40 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 5 20:15:02 2020 +0200

    remove unused nSearchFamily and nMask members
    
    and so SetSearchMask which doesn't have any effect anymore
    
    Change-Id: I0b7f402ce0317971d5196fc448fe2945a6a292f5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93393
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index bb7115b39add..5f6ae38d3ad9 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1961,7 +1961,6 @@ SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia
     if ( pSh )
     {
         SfxStyleSheetBasePool* pPool = pSh->GetStyleSheetPool();
-        pPool->SetSearchMask( SfxStyleFamily::Page );
         SfxStyleSheetBase* pStyle = pPool->First(SfxStyleFamily::Page);
         OUString aStdName;
 
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 34db45a58792..ea2efab759f4 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -235,8 +235,6 @@ protected:
     SfxStyleSheetIterator*      GetCachedIterator();
 
     SfxItemPool&                rPool;
-    SfxStyleFamily              nSearchFamily;
-    SfxStyleSearchBits          nMask;
 
     void                        ChangeParent(const OUString& rOld, const OUString& rNew, SfxStyleFamily eFamily, bool bVirtual = true);
     virtual SfxStyleSheetBase*  Create( const OUString&, SfxStyleFamily, SfxStyleSearchBits );
@@ -281,8 +279,6 @@ public:
                                           const OUString &rStyle,
                                           const OUString &rParent);
 
-    void                        SetSearchMask(SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All );
-
     void                        Reindex();
     /** Add a style sheet.
      * Not an actual public function. Do not call it from non-subclasses.
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 136941bd3965..18124981f0ba 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -438,7 +438,6 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab )
     // remember defaults for compare in WriteCell
     if ( !aHTMLStyle.bInitialized )
     {
-        pStylePool->SetSearchMask( SfxStyleFamily::Para );
         pStyleSheet = pStylePool->Find(
                 ScResId(STR_STYLENAME_STANDARD),
                 SfxStyleFamily::Para );
@@ -461,7 +460,6 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab )
 
     // Page style sheet printer settings, e.g. for background graphics.
     // There's only one background graphic in HTML!
-    pStylePool->SetSearchMask( SfxStyleFamily::Page );
     pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SfxStyleFamily::Page );
     OSL_ENSURE( pStyleSheet, "PageStyle not found! :-(" );
     if (!pStyleSheet)
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index b5bc2303d0e9..103d05e954de 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -204,7 +204,6 @@ SfxStyleSheetBasePool* ScDocShell::GetStyleSheetPool()
 
 static void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool )
 {
-    pStylePool->SetSearchMask(SfxStyleFamily::Page);
     SfxStyleSheetBase *pStyle = pStylePool->First(SfxStyleFamily::Page);
     while ( pStyle )
     {
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 3ee7479df5f3..48ee79cafaac 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -369,8 +369,6 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
         OUString                aStyleName;
         sal_uInt16              nRetMask = 0xffff;
 
-        pStylePool->SetSearchMask( eFamily );
-
         switch ( nSlotId )
         {
             case SID_STYLE_NEW:
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 91e833156256..8d6b3976cada 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1511,8 +1511,6 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
             // only worry about presentation templates
             OUString aName;
             SdStyleSheetPool* pSourceStyleSheetPool = static_cast<SdStyleSheetPool*>( pSourceDoc->GetStyleSheetPool() );
-            pSourceStyleSheetPool->SetSearchMask(SfxStyleFamily::Page);
-            static_cast<SdStyleSheetPool*>( mxStyleSheetPool.get())->SetSearchMask(SfxStyleFamily::Page);
 
             StyleSheetCopyResultVector aCreatedStyles;          // List of created stylesheets
             SfxStyleSheetBase* pHisSheet = pSourceStyleSheetPool->First(SfxStyleFamily::Page);
@@ -1604,10 +1602,6 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
                         }
                     }
                 }
-
-                // Now look for all of them when searching
-                pSourceStyleSheetPool->SetSearchMask(SfxStyleFamily::All);
-                mxStyleSheetPool->SetSearchMask(SfxStyleFamily::All);
             }
 
             if (bUndo && !aCreatedStyles.empty())
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 93fbda2d55ae..e5f1ddf8cf7a 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -872,7 +872,6 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
     pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_NOTES );
 
     pParent = nullptr;
-    SetSearchMask(SfxStyleFamily::Pseudo);
     aName = SdResId(STR_PSEUDOSHEET_OUTLINE);
     for (sal_Int32 nLevel = 1; nLevel < 10; nLevel++)
     {
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 5598880e2189..46536f3f4d8c 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -103,7 +103,6 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::D
 
     if ( pPool )
     {
-        pPool->SetSearchMask( pStyle->GetFamily() );
         pPool->First(pStyle->GetFamily()); // for SW - update internal list
     }
 
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 8d52f5ae8ad5..4ed0673dbe5e 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -961,7 +961,6 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
     if (!pItem)
         return;
     const SfxStyleFamily eFam = pItem->GetFamily();
-    pStyleSheetPool->SetSearchMask(eFam, SfxStyleSearchBits::AllVisible);
     StyleTreeArr_Impl aArr;
     SfxStyleSheetBase* pStyle = pStyleSheetPool->First(eFam, SfxStyleSearchBits::AllVisible);
 
@@ -1049,7 +1048,6 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(StyleFlags nFlags)
     if(!pStyleSheetPool)
         return;
 
-    pStyleSheetPool->SetSearchMask(eFam, nFilter);
     pItem = GetFamilyItem_Impl();
     if(nFlags & StyleFlags::UpdateFamily)   // Update view type list (Hierarchical, All, etc.
     {
@@ -1072,7 +1070,6 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(StyleFlags nFlags)
             nActFilter = 0;
             mxFilterLb->set_active(1);
             nFilter = (nActFilter < rFilter.size()) ? rFilter[nActFilter].nFlags : SfxStyleSearchBits::Auto;
-            pStyleSheetPool->SetSearchMask(eFam, nFilter);
         }
 
         // if the tree view again, select family hierarchy
@@ -1616,7 +1613,6 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(const OString& rEntry)
             // why? : FloatingWindow must not be parent of a modal dialog
             SfxNewStyleDlg aDlg(pWindow ? pWindow->GetFrameWeld() : nullptr, *pStyleSheetPool, eFam);
             auto nResult = aDlg.run();
-            pStyleSheetPool->SetSearchMask(eFam, nFilter);
             if (nResult ==  RET_OK)
             {
                 const OUString aTemplName(aDlg.GetName());
@@ -1714,18 +1710,16 @@ void SfxCommonTemplateDialog_Impl::NewHdl()
         return;
 
     const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
-    const SfxStyleFamily eFam=pItem->GetFamily();
+    const SfxStyleFamily eFam = pItem->GetFamily();
     SfxStyleSearchBits nMask(SfxStyleSearchBits::Auto);
     if (nActFilter != 0xffff)
         nMask = pItem->GetFilterList()[nActFilter].nFlags;
     if (nMask == SfxStyleSearchBits::Auto)    // automatic
         nMask = nAppFilter;
 
-    pStyleSheetPool->SetSearchMask(eFam,nMask);
-
     Execute_Impl(SID_STYLE_NEW,
                  "", GetSelectedEntry(),
-                 static_cast<sal_uInt16>(GetFamilyItem_Impl()->GetFamily()),
+                 static_cast<sal_uInt16>(eFam),
                  nMask);
 }
 
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index b1ee8eca0bf7..3055a52cc3d0 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -313,7 +313,6 @@ void SfxObjectShell::LoadStyles
     DBG_ASSERT(pSourcePool, "Source-DocumentShell without StyleSheetPool");
     SfxStyleSheetBasePool *pMyPool = GetStyleSheetPool();
     DBG_ASSERT(pMyPool, "Dest-DocumentShell without StyleSheetPool");
-    pSourcePool->SetSearchMask(SfxStyleFamily::All);
     auto xIter = pSourcePool->CreateIterator(SfxStyleFamily::All);
     std::unique_ptr<Styles_Impl[]> pFound(new Styles_Impl[xIter->Count()]);
     sal_uInt16 nFound = 0;
diff --git a/sfx2/source/styles/StyleManager.cxx b/sfx2/source/styles/StyleManager.cxx
index 83fc314d8407..95bdeac80122 100644
--- a/sfx2/source/styles/StyleManager.cxx
+++ b/sfx2/source/styles/StyleManager.cxx
@@ -18,8 +18,6 @@ SfxStyleSheetBase* StyleManager::Search(const OUString& rStyleName, SfxStyleFami
     if (!pPool)
         return nullptr;
 
-    pPool->SetSearchMask(eFamily);
-
     SfxStyleSheetBase* pStyle = pPool->First(eFamily);
     while (pStyle)
     {
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 17266a5b809a..db0ee8d4242b 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -556,9 +556,7 @@ SfxStyleSheetIterator& SfxStyleSheetBasePool::GetIterator_Impl(SfxStyleFamily eF
 
 SfxStyleSheetBasePool::SfxStyleSheetBasePool( SfxItemPool& r ) :
     pImpl(new SfxStyleSheetBasePool_Impl),
-    rPool(r),
-    nSearchFamily(SfxStyleFamily::Para),
-    nMask(SfxStyleSearchBits::All)
+    rPool(r)
 {
 #ifdef DBG_UTIL
     aDbgStyleSheetReferences.mnPools++;
@@ -569,9 +567,7 @@ SfxStyleSheetBasePool::SfxStyleSheetBasePool( const SfxStyleSheetBasePool& r ) :
     SfxBroadcaster( r ),
     comphelper::OWeakTypeObject(r),
     pImpl(new SfxStyleSheetBasePool_Impl),
-    rPool(r.rPool),
-    nSearchFamily(r.nSearchFamily),
-    nMask( r.nMask )
+    rPool(r.rPool)
 {
 #ifdef DBG_UTIL
     aDbgStyleSheetReferences.mnPools++;
@@ -601,11 +597,6 @@ bool SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const OUString& rStyl
         return false;
 }
 
-void SfxStyleSheetBasePool::SetSearchMask(SfxStyleFamily eFam, SfxStyleSearchBits n)
-{
-    nSearchFamily = eFam; nMask = n;
-}
-
 std::unique_ptr<SfxStyleSheetIterator> SfxStyleSheetBasePool::CreateIterator
 (
  SfxStyleFamily eFam,
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 6e974372f80a..371bac5c75cf 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -906,7 +906,6 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
             m_xSearchTmplLB->clear();
             m_xReplaceTmplLB->clear();
             SfxStyleSheetBasePool* pStylePool = pShell->GetStyleSheetPool();
-            pStylePool->SetSearchMask( pSearchItem->GetFamily() );
             SfxStyleSheetBase* pBase = pStylePool->First(pSearchItem->GetFamily());
 
             while ( pBase )
@@ -1596,7 +1595,6 @@ void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool )
     OUString aOldRepl( m_xReplaceTmplLB->get_active_text() );
     m_xSearchTmplLB->clear();
     m_xReplaceTmplLB->clear();
-    rPool.SetSearchMask( pSearchItem->GetFamily() );
     m_xSearchTmplLB->freeze();
     m_xReplaceTmplLB->freeze();
     SfxStyleSheetBase* pBase = rPool.First(pSearchItem->GetFamily());
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 883ddbf83143..ce6a935c4714 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -970,8 +970,6 @@ void SvxStyleBox_Base::Select(bool bNonTravelSelect)
 
     if ( pPool )
     {
-        pPool->SetSearchMask( eStyleFamily );
-
         pStyle = pPool->First(eStyleFamily);
         while ( pStyle && pStyle->GetName() != aSearchEntry )
             pStyle = pPool->Next();
@@ -1141,8 +1139,6 @@ void SvxStyleBox_Base::SetupEntry(vcl::RenderContext& rRenderContext, sal_Int32
 
         if ( pPool )
         {
-            pPool->SetSearchMask( eStyleFamily );
-
             pStyle = pPool->First(eStyleFamily);
             while (pStyle && pStyle->GetName() != rStyleName)
                 pStyle = pPool->Next();
@@ -2756,7 +2752,6 @@ void SvxStyleToolBoxControl::FillStyleBox()
         SfxStyleSheetBase*      pStyle      = nullptr;
         bool                    bDoFill     = false;
 
-        pStyleSheetPool->SetSearchMask( eFamily, SfxStyleSearchBits::Used );
         auto xIter = pStyleSheetPool->CreateIterator(eFamily, SfxStyleSearchBits::Used);
         sal_uInt16 nCount = xIter->Count();
 
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index a832eed9ef9e..036185e88d7d 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -602,7 +602,6 @@ void SwDoc::BroadcastStyleOperation(const OUString& rName, SfxStyleFamily eFamil
 
         if (pPool)
         {
-            pPool->SetSearchMask(eFamily);
             SfxStyleSheetBase* pBase = pPool->Find(rName, eFamily);
 
             if (pBase != nullptr)
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index c38a70ec6234..f43ba36c59a7 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -890,7 +890,6 @@ uno::Any XStyleFamily::getByName(const OUString& rName)
     SwStyleNameMapper::FillUIName(rName, sStyleName, m_rEntry.m_aPoolId);
     if(!m_pBasePool)
         throw uno::RuntimeException();
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName, m_rEntry.m_eFamily);
     if(!pBase)
         throw container::NoSuchElementException();
@@ -923,12 +922,10 @@ sal_Bool XStyleFamily::hasByName(const OUString& rName)
         throw uno::RuntimeException();
     OUString sStyleName;
     SwStyleNameMapper::FillUIName(rName, sStyleName, m_rEntry.m_aPoolId);
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName, m_rEntry.m_eFamily);
     return nullptr != pBase;
 }
 
-
 void XStyleFamily::insertByName(const OUString& rName, const uno::Any& rElement)
 {
     SolarMutexGuard aGuard;
@@ -936,7 +933,6 @@ void XStyleFamily::insertByName(const OUString& rName, const uno::Any& rElement)
         throw uno::RuntimeException();
     OUString sStyleName;
     SwStyleNameMapper::FillUIName(rName, sStyleName, m_rEntry.m_aPoolId);
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName, m_rEntry.m_eFamily);
     SfxStyleSheetBase* pUINameBase = m_pBasePool->Find(sStyleName, m_rEntry.m_eFamily);
     if(pBase || pUINameBase)
@@ -989,7 +985,6 @@ void XStyleFamily::insertByName(const OUString& rName, const uno::Any& rElement)
         const OUString sParentStyleName(pNewStyle->GetParentStyleName());
         if (!sParentStyleName.isEmpty())
         {
-            m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
             SfxStyleSheetBase* pParentBase = m_pBasePool->Find(sParentStyleName, m_rEntry.m_eFamily);
             if(pParentBase && pParentBase->GetFamily() == m_rEntry.m_eFamily &&
                 pParentBase->GetPool() == m_pBasePool)
@@ -1007,7 +1002,6 @@ void XStyleFamily::replaceByName(const OUString& rName, const uno::Any& rElement
         throw uno::RuntimeException();
     OUString sStyleName;
     SwStyleNameMapper::FillUIName(rName, sStyleName, m_rEntry.m_aPoolId);
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName, m_rEntry.m_eFamily);
     // replacements only for userdefined styles
     if(!pBase)
@@ -1067,7 +1061,6 @@ void XStyleFamily::removeByName(const OUString& rName)
     SolarMutexGuard aGuard;
     if(!m_pBasePool)
         throw uno::RuntimeException();
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
     OUString sName;
     SwStyleNameMapper::FillUIName(rName, sName, m_rEntry.m_aPoolId);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(sName, m_rEntry.m_eFamily);
@@ -1305,7 +1298,6 @@ static bool lcl_InitConditional(SfxStyleSheetBasePool* pBasePool, const SfxStyle
 {
     if(!pBasePool || eFamily != SfxStyleFamily::Para)
         return false;
-    pBasePool->SetSearchMask(eFamily);
     SfxStyleSheetBase* pBase = pBasePool->Find(rStyleName, eFamily);
     SAL_WARN_IF(!pBase, "sw.uno", "where is the style?" );
     if(!pBase)
@@ -1374,7 +1366,6 @@ OUString SwXStyle::getName()
     SolarMutexGuard aGuard;
     if(!m_pBasePool)
         return m_sStyleName;
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(m_sStyleName, m_rEntry.m_eFamily);
     SAL_WARN_IF(!pBase, "sw.uno", "where is the style?");
     if(!pBase)
@@ -1392,7 +1383,6 @@ void SwXStyle::setName(const OUString& rName)
         m_sStyleName = rName;
         return;
     }
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(m_sStyleName, m_rEntry.m_eFamily);
     SAL_WARN_IF(!pBase, "sw.uno", "where is the style?");
     if(!pBase || !pBase->IsUserDefined())
@@ -1408,7 +1398,6 @@ sal_Bool SwXStyle::isUserDefined()
     SolarMutexGuard aGuard;
     if(!m_pBasePool)
         throw uno::RuntimeException();
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(m_sStyleName, m_rEntry.m_eFamily);
     //if it is not found it must be non user defined
     return pBase && pBase->IsUserDefined();
@@ -1419,7 +1408,6 @@ sal_Bool SwXStyle::isInUse()
     SolarMutexGuard aGuard;
     if(!m_pBasePool)
         throw uno::RuntimeException();
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily, SfxStyleSearchBits::Used);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(m_sStyleName, m_rEntry.m_eFamily, SfxStyleSearchBits::Used);
     return pBase && pBase->IsUsed();
 }
@@ -1433,7 +1421,6 @@ OUString SwXStyle::getParentStyle()
             throw uno::RuntimeException();
         return m_sParentStyleName;
     }
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(m_sStyleName, m_rEntry.m_eFamily);
     OUString aString;
     if(pBase)
@@ -1461,7 +1448,6 @@ void SwXStyle::setParentStyle(const OUString& rParentStyle)
         { }
         return;
     }
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(m_sStyleName, m_rEntry.m_eFamily);
     if(!pBase)
         throw uno::RuntimeException();
@@ -1897,7 +1883,6 @@ void SwXStyle::SetPropertyValue<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPrope
         const auto nIdx(GetCommandContextIndex(rNamedValue.Name));
         if (nIdx == -1)
             throw lang::IllegalArgumentException();
-        m_pBasePool->SetSearchMask(SfxStyleFamily::Para);
         bool bStyleFound = false;
         for(auto pBase = m_pBasePool->First(SfxStyleFamily::Para); pBase; pBase = m_pBasePool->Next())
         {
@@ -2514,7 +2499,6 @@ uno::Sequence<beans::PropertyState> SwXStyle::getPropertyStates(const uno::Seque
 
     if(!m_pBasePool)
         throw uno::RuntimeException();
-    m_pBasePool->SetSearchMask(m_rEntry.m_eFamily);
     SfxStyleSheetBase* pBase = m_pBasePool->Find(m_sStyleName, m_rEntry.m_eFamily);
 
     SAL_WARN_IF(!pBase, "sw.uno", "where is the style?");
@@ -2812,7 +2796,6 @@ void SwXStyle::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
     else if(rHint.GetId() == SfxHintId::StyleSheetChanged)
     {
         SfxStyleSheetBasePool& rBP = static_cast<SfxStyleSheetBasePool&>(rBC);
-        rBP.SetSearchMask(m_rEntry.m_eFamily);
         SfxStyleSheetBase* pOwnBase = rBP.Find(m_sStyleName, m_rEntry.m_eFamily);
         if(!pOwnBase)
         {
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 30360c3d88ea..e64932300c3b 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -208,7 +208,6 @@ void SwParaDlg::PageCreated(const OString& rId, SfxTabPage& rPage)
         static_cast<SwParagraphNumTabPage&>(rPage).EnableNewStart();
         weld::ComboBox& rBox = static_cast<SwParagraphNumTabPage&>(rPage).GetStyleBox();
         SfxStyleSheetBasePool* pPool = rView.GetDocShell()->GetStyleSheetPool();
-        pPool->SetSearchMask(SfxStyleFamily::Pseudo);
         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 7fcd29541cee..b4b722f6374b 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -133,7 +133,6 @@ void SwCondCollPage::Reset(const SfxItemSet *)
     m_xTbLinks->clear();
 
     SfxStyleSheetBasePool* pPool = m_rSh.GetView().GetDocShell()->GetStyleSheetPool();
-    pPool->SetSearchMask(SfxStyleFamily::Para);
     m_xStyleLB->clear();
     const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Para);
     while (pBase)
@@ -223,7 +222,6 @@ void SwCondCollPage::SelectHdl(const weld::Widget* pBox)
         const sal_Int32 nSelPos = m_xFilterLB->get_active();
         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(SfxStyleFamily::Para, nSearchFlags);
 
         bool bEmpty = true;
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index f1cdecde7e1c..53bbc0b619e9 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -307,7 +307,6 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
     // fill paragraph templates-ListBox
     {
         SfxStyleSheetBasePool* pPool = pView->GetDocShell()->GetStyleSheetPool();
-        pPool->SetSearchMask( SfxStyleFamily::Para );
         m_xLbDbParaColl->append_text( sNoTmpl );
 
         const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Para);
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index a522a2612237..b9914d319ac4 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -337,7 +337,6 @@ void SwTemplateDlgController::PageCreated(const OString& rId, SfxTabPage &rPage
             {
                 SfxStyleSheetBasePool* pStyleSheetPool = pWrtShell->
                             GetView().GetDocShell()->GetStyleSheetPool();
-                pStyleSheetPool->SetSearchMask(SfxStyleFamily::Para);
                 SfxStyleSheetBase *pFirstStyle = pStyleSheetPool->First(SfxStyleFamily::Para);
                 while(pFirstStyle)
                 {
@@ -440,7 +439,6 @@ void SwTemplateDlgController::PageCreated(const OString& rId, SfxTabPage &rPage
             }//<-end
             weld::ComboBox& rBox = static_cast<SwParagraphNumTabPage&>(rPage).GetStyleBox();
             SfxStyleSheetBasePool* pPool = pWrtShell->GetView().GetDocShell()->GetStyleSheetPool();
-            pPool->SetSearchMask(SfxStyleFamily::Pseudo);
             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 6762c04b7d28..1455565d687f 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -164,7 +164,6 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet* )
         // styles   special regions
         // paragraph
     SfxStyleSheetBasePool* pStyleSheetPool = pSh->GetView().GetDocShell()->GetStyleSheetPool();
-    pStyleSheetPool->SetSearchMask(SfxStyleFamily::Para, SfxStyleSearchBits::SwExtra);
     SfxStyleSheetBase *pStyle = pStyleSheetPool->First(SfxStyleFamily::Para, SfxStyleSearchBits::SwExtra);
     while(pStyle)
     {
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index 7e24d4be5f92..18abd157b71a 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -335,9 +335,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(SfxStyleFamily::Para));
-
     while (pStyle)
     {
         SwTextFormatColl* pCollection = pStyle->GetCollection();
@@ -354,9 +352,7 @@ void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, cons
         pStyle = static_cast<SwDocStyleSheet*>(pPool->Next());
     }
 
-    pPool->SetSearchMask(SfxStyleFamily::Char);
     pStyle = static_cast<SwDocStyleSheet*>(pPool->First(SfxStyleFamily::Char));
-
     while (pStyle)
     {
         SwCharFormat* pCharFormat = pStyle->GetCharFormat();
diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx
index eb3fb95c989b..2220c776e2b6 100644
--- a/sw/source/uibase/utlui/tmplctrl.cxx
+++ b/sw/source/uibase/utlui/tmplctrl.cxx
@@ -110,7 +110,6 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
             {
                 SfxStyleSheetBasePool* pPool = pView->GetDocShell()->
                                                             GetStyleSheetPool();
-                pPool->SetSearchMask(SfxStyleFamily::Page);
                 auto xIter = pPool->CreateIterator(SfxStyleFamily::Page);
                 if (xIter->Count() > 1)
                 {
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index 711763c4c236..fb41aaa6f66f 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -714,7 +714,6 @@ void FillCharStyleListBox(weld::ComboBox& rToFill, SwDocShell* pDocSh, bool bSor
     const int nOffset = rToFill.get_count() > 0 ? 1 : 0;
     rToFill.freeze();
     SfxStyleSheetBasePool* pPool = pDocSh->GetStyleSheetPool();
-    pPool->SetSearchMask(SfxStyleFamily::Char);
     SwDoc* pDoc = pDocSh->GetDoc();
     const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Char);
     const OUString sStandard(SwResId(STR_POOLCHR_STANDARD));


More information about the Libreoffice-commits mailing list