From d63a0b60fb6f0d97e9e3cb1ec0eb6506db47fddb Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Sat, 4 Jul 2026 10:16:45 -0400 Subject: [PATCH] tdf#74078 srchdlg.cxx: remove non-working Page Style Page Style is not a 'on or off' kind of attribute. In order to compare a Page Style, you need a name to match, and the attribute dialog has no ability to specify a name. Change-Id: Ifd7e85bd7e0cc80e2ee9fbda87520c60045364f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207619 Tested-by: Jenkins Reviewed-by: Justin Luth --- svx/source/dialog/srchdlg.cxx | 3 --- sw/source/uibase/uiview/viewsrch.cxx | 15 ++------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 0c3a22b6627a..be5bfd1830ff 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1947,8 +1947,6 @@ IMPL_LINK_NOARG(SvxSearchDialog, FormatHdl_Impl, weld::Button&, void) SfxItemPool& rPool = pSh->GetPool(); SfxItemSet aSet(rPool, m_pImpl->pRanges); - aSet.MergeRange(SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL); - sal_uInt16 nBrushWhich = pSh->GetPool().GetWhichIDFromSlotID(SID_ATTR_BRUSH); aSet.MergeRange(nBrushWhich, nBrushWhich); @@ -1975,7 +1973,6 @@ IMPL_LINK_NOARG(SvxSearchDialog, FormatHdl_Impl, weld::Button&, void) aTxt = SvxResId( RID_SVXSTR_REPLACE ); m_pReplaceList->Get(aSet); } - aSet.DisableItem(SID_ATTR_PARA_MODEL); aSet.DisableItem(rPool.GetWhichIDFromSlotID(SID_ATTR_PARA_PAGEBREAK)); aSet.DisableItem(rPool.GetWhichIDFromSlotID(SID_ATTR_PARA_KEEP)); diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 23d38660d095..e4779cbb513a 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -429,7 +429,7 @@ void SwView::ExecSearch(SfxRequest& rReq) /*20 */ RES_PARATR_VERTALIGN, RES_PARATR_VERTALIGN, RES_MARGIN_FIRSTLINE, RES_MARGIN_RIGHT, RES_UL_SPACE, RES_UL_SPACE, -/*24 */ SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP + SID_ATTR_PARA_KEEP, SID_ATTR_PARA_KEEP >); SfxItemSet aSet(m_pWrtShell->GetAttrPool(), aNormalAttr); @@ -728,10 +728,7 @@ void SwView::Replace() SfxItemSet aReplSet( m_pWrtShell->GetAttrPool(), aTextFormatCollSetRange ); if( s_xReplaceList->Get( aReplSet ).Count() ) - { - ::SfxToSwPageDescAttr( *m_pWrtShell, aReplSet ); m_pWrtShell->SwEditShell::SetAttrSet( aReplSet ); - } } } } @@ -776,18 +773,13 @@ sal_Int32 SwView::FUNC_Search(const SwSearchOptions& rOptions) RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_PARATR_BEGIN, RES_PARATR_END-1, RES_FRMATR_BEGIN, RES_FRMATR_END-1, - SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP + SID_ATTR_PARA_KEEP, SID_ATTR_PARA_KEEP >); SfxItemSet aSrchSet( m_pWrtShell->GetAttrPool(), aSearchAttrRange); if( s_xSearchList && s_xSearchList->Count() ) - { s_xSearchList->Get( aSrchSet ); - // -- Page break with page template - ::SfxToSwPageDescAttr( *m_pWrtShell, aSrchSet ); - } - std::optional xReplSet; if (bDoReplace) { @@ -797,9 +789,6 @@ sal_Int32 SwView::FUNC_Search(const SwSearchOptions& rOptions) { s_xReplaceList->Get( *xReplSet ); - // -- Page break with page template - ::SfxToSwPageDescAttr( *m_pWrtShell, *xReplSet ); - if( !xReplSet->Count() ) // too bad, we don't know xReplSet.reset(); // the attributes }