include/svx/ctredlin.hxx           |    2 
 sc/source/ui/inc/acredlin.hxx      |    4 -
 sc/source/ui/miscdlgs/acredlin.cxx |   38 ++++++++---------
 sw/source/uibase/inc/redlndlg.hxx  |    4 -
 sw/source/uibase/misc/redlndlg.cxx |   80 ++++++++++++++++++-------------------
 5 files changed, 63 insertions(+), 65 deletions(-)

New commits:
commit ddd9cb67a6f0724dd06b86b7843bd2f37bd1e1c9
Author:     Michael Weghorn <[email protected]>
AuthorDate: Sat Jan 31 18:10:17 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Sun Feb 1 09:12:42 2026 +0100

    Drop obsolete "now SvHeaderTabListBox" comments for SvxRedlinTable
    
    These comments are presumably only true for the vcl implementation
    and no longer other weld::TreeView implementations since this
    was welded in
    
        commit 56dd851cfc77c362c3db5c0aae4a490c7f6782cc
        Date:   Thu Apr 18 16:49:26 2019 +0100
    
            weld cluster of change tracking dialogs
    
    Change-Id: I7ed6a3719364ab6d32f98ea6fc7ed5d77ad922d1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198470
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index bc52c9ea3e8d..8cf104fecf80 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -78,7 +78,7 @@ class ScAcceptChgDlg final : public 
SfxModelessDialogController
     bool                    bUseColor:1;
 
     SvxTPFilter* pTPFilter;
-    SvxRedlinTable* pTheView; // #i48648 now SvHeaderTabListBox
+    SvxRedlinTable* pTheView;
 
     std::unique_ptr<weld::Container> m_xContentArea;
     std::unique_ptr<weld::Menu> m_xPopup, m_xSortMenu;
diff --git a/sw/source/uibase/inc/redlndlg.hxx 
b/sw/source/uibase/inc/redlndlg.hxx
index 2eb3d9756741..101c59cc533d 100644
--- a/sw/source/uibase/inc/redlndlg.hxx
+++ b/sw/source/uibase/inc/redlndlg.hxx
@@ -82,7 +82,7 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg final : public 
SfxListener
     std::unique_ptr<SvxAcceptChgCtr> m_xTabPagesCTRL;
     std::unique_ptr<weld::Menu> m_xPopup, m_xSortMenu;
     SvxTPView& m_rTPView;
-    SvxRedlinTable* m_pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
+    SvxRedlinTable* m_pTable;
 
     bool m_bInitialSelect = true;
 
commit 4c17f5e5ea914d52d63002cb56378174d1faacf1
Author:     Michael Weghorn <[email protected]>
AuthorDate: Sat Jan 31 17:24:49 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Sun Feb 1 09:12:33 2026 +0100

    Use SvxTPView ref instead of pointer
    
    Return SvxTPView& instead of SvxTPView*
    in SvxAcceptChgCtr::GetViewPage and switch the
    corresponding  and SwRedlineAcceptDlg members
    to a reference as well.
    
    Change-Id: Ia28e7b34ead996a19644aa33a7e2e79f2edd05ea
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198469
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 520d5102ea29..e4a383aecf12 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -349,7 +349,7 @@ public:
     void            ShowFilterPage();
 
     SvxTPFilter*    GetFilterPage() { return m_xTPFilter.get(); }
-    SvxTPView*      GetViewPage() { return m_xTPView.get(); }
+    SvxTPView& GetViewPage() { return *m_xTPView; }
 };
 
 #endif // INCLUDED_SVX_CTREDLIN_HXX
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index 71d21e455c4f..bc52c9ea3e8d 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -78,12 +78,12 @@ class ScAcceptChgDlg final : public 
SfxModelessDialogController
     bool                    bUseColor:1;
 
     SvxTPFilter* pTPFilter;
-    SvxTPView* pTPView;
     SvxRedlinTable* pTheView; // #i48648 now SvHeaderTabListBox
 
     std::unique_ptr<weld::Container> m_xContentArea;
     std::unique_ptr<weld::Menu> m_xPopup, m_xSortMenu;
     std::unique_ptr<SvxAcceptChgCtr> m_xAcceptChgCtr;
+    SvxTPView& m_rTPView;
 
     void            Init();
 
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx 
b/sc/source/ui/miscdlgs/acredlin.cxx
index 8bdfaf151e88..833289da2be7 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -99,30 +99,30 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, 
SfxChildWindow* pCW, weld::Windo
     , m_xContentArea(m_xDialog->weld_content_area())
     , m_xPopup(m_xBuilder->weld_menu(u"calcmenu"_ustr))
     , m_xSortMenu(m_xBuilder->weld_menu(u"calcsortmenu"_ustr))
+    , m_xAcceptChgCtr(new SvxAcceptChgCtr(m_xContentArea.get()))
+    , m_rTPView(m_xAcceptChgCtr->GetViewPage())
 {
-    m_xAcceptChgCtr.reset(new SvxAcceptChgCtr(m_xContentArea.get()));
     nAcceptCount=0;
     nRejectCount=0;
     aReOpenIdle.SetInvokeHandler(LINK( this, ScAcceptChgDlg, ReOpenTimerHdl ));
 
     pTPFilter = m_xAcceptChgCtr->GetFilterPage();
-    pTPView = m_xAcceptChgCtr->GetViewPage();
 
     // tdf#136062 Don't use "Reject/Clear formatting" instead of "Reject" 
buttons in Calc
-    pTPView->EnableClearFormat(false);
-    pTPView->EnableClearFormatAll(false);
+    m_rTPView.EnableClearFormat(false);
+    m_rTPView.EnableClearFormatAll(false);
 
-    pTheView = pTPView->GetTableControl();
+    pTheView = m_rTPView.GetTableControl();
     pTheView->SetCalcView();
     aSelectionIdle.SetInvokeHandler(LINK( this, ScAcceptChgDlg, 
UpdateSelectionHdl ));
 
     pTPFilter->SetReadyHdl(LINK( this, ScAcceptChgDlg, FilterHandle ));
     pTPFilter->SetRefHdl(LINK( this, ScAcceptChgDlg, RefHandle ));
     pTPFilter->HideRange(false);
-    pTPView->SetRejectClickHdl( LINK( this, ScAcceptChgDlg,RejectHandle));
-    pTPView->SetAcceptClickHdl( LINK(this, ScAcceptChgDlg, AcceptHandle));
-    pTPView->SetRejectAllClickHdl( LINK( this, 
ScAcceptChgDlg,RejectAllHandle));
-    pTPView->SetAcceptAllClickHdl( LINK(this, ScAcceptChgDlg, 
AcceptAllHandle));
+    m_rTPView.SetRejectClickHdl(LINK(this, ScAcceptChgDlg, RejectHandle));
+    m_rTPView.SetAcceptClickHdl(LINK(this, ScAcceptChgDlg, AcceptHandle));
+    m_rTPView.SetRejectAllClickHdl(LINK(this, ScAcceptChgDlg, 
RejectAllHandle));
+    m_rTPView.SetAcceptAllClickHdl(LINK(this, ScAcceptChgDlg, 
AcceptAllHandle));
 
     weld::TreeView& rTreeView = pTheView->GetWidget();
     rTreeView.connect_expanding(LINK(this, ScAcceptChgDlg, ExpandingHandle));
@@ -774,10 +774,10 @@ void ScAcceptChgDlg::UpdateView()
     if( bTheFlag && (!pDoc->IsDocEditable() || pChanges->IsProtected()) )
         bTheFlag=false;
 
-    pTPView->EnableAccept(bTheFlag);
-    pTPView->EnableAcceptAll(bTheFlag);
-    pTPView->EnableReject(bTheFlag);
-    pTPView->EnableRejectAll(bTheFlag);
+    m_rTPView.EnableAccept(bTheFlag);
+    m_rTPView.EnableAcceptAll(bTheFlag);
+    m_rTPView.EnableReject(bTheFlag);
+    m_rTPView.EnableRejectAll(bTheFlag);
 
     if (nAcceptCount>0)
         rTreeView.insert(nullptr, -1, &aStrAllAccepted, nullptr, nullptr, 
nullptr, true, nullptr);
@@ -1361,10 +1361,10 @@ void ScAcceptChgDlg::AppendChanges(const ScChangeTrack* 
pChanges,sal_uLong nStar
     if( bTheFlag && (!pDoc->IsDocEditable() || pChanges->IsProtected()) )
         bTheFlag=false;
 
-    pTPView->EnableAccept(bTheFlag);
-    pTPView->EnableAcceptAll(bTheFlag);
-    pTPView->EnableReject(bTheFlag);
-    pTPView->EnableRejectAll(bTheFlag);
+    m_rTPView.EnableAccept(bTheFlag);
+    m_rTPView.EnableAcceptAll(bTheFlag);
+    m_rTPView.EnableReject(bTheFlag);
+    m_rTPView.EnableRejectAll(bTheFlag);
 
     rTreeView.thaw();
     m_xDialog->set_busy_cursor(false);
@@ -1570,8 +1570,8 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, UpdateSelectionHdl, Timer 
*, void)
 
     ScChangeTrack* pChanges = pDoc->GetChangeTrack();
     bool bEnable = pDoc->IsDocEditable() && pChanges && 
!pChanges->IsProtected();
-    pTPView->EnableAccept( bAcceptFlag && bEnable );
-    pTPView->EnableReject( bRejectFlag && bEnable );
+    m_rTPView.EnableAccept(bAcceptFlag && bEnable);
+    m_rTPView.EnableReject(bRejectFlag && bEnable);
 }
 
 IMPL_LINK(ScAcceptChgDlg, CommandHdl, const CommandEvent&, rCEvt, bool)
diff --git a/sw/source/uibase/inc/redlndlg.hxx 
b/sw/source/uibase/inc/redlndlg.hxx
index 07016a4b84f9..2eb3d9756741 100644
--- a/sw/source/uibase/inc/redlndlg.hxx
+++ b/sw/source/uibase/inc/redlndlg.hxx
@@ -81,7 +81,7 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg final : public 
SfxListener
 
     std::unique_ptr<SvxAcceptChgCtr> m_xTabPagesCTRL;
     std::unique_ptr<weld::Menu> m_xPopup, m_xSortMenu;
-    SvxTPView* m_pTPView;
+    SvxTPView& m_rTPView;
     SvxRedlinTable* m_pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
 
     bool m_bInitialSelect = true;
diff --git a/sw/source/uibase/misc/redlndlg.cxx 
b/sw/source/uibase/misc/redlndlg.cxx
index a9fd2278415e..a14108a1cb11 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -193,29 +193,28 @@ 
SwRedlineAcceptDlg::SwRedlineAcceptDlg(std::shared_ptr<weld::Window> xParent, we
     , m_xTabPagesCTRL(new SvxAcceptChgCtr(pContentArea))
     , m_xPopup(pBuilder->weld_menu(u"writermenu"_ustr))
     , m_xSortMenu(pBuilder->weld_menu(u"writersortmenu"_ustr))
+    , m_rTPView(m_xTabPagesCTRL->GetViewPage())
 {
-    m_pTPView = m_xTabPagesCTRL->GetViewPage();
-
-    m_pTable = m_pTPView->GetTableControl();
+    m_pTable = m_rTPView.GetTableControl();
     m_pTable->SetWriterView();
 
-    m_pTPView->GetSortByComboBoxControl()->set_active(4);
+    m_rTPView.GetSortByComboBoxControl()->set_active(4);
 
-    m_pTPView->SetSortByComboBoxChangedHdl(
+    m_rTPView.SetSortByComboBoxChangedHdl(
         LINK(this, SwRedlineAcceptDlg, SortByComboBoxChangedHdl));
 
-    m_pTPView->SetAcceptClickHdl(LINK(this, SwRedlineAcceptDlg, AcceptHdl));
-    m_pTPView->SetAcceptAllClickHdl(LINK(this, SwRedlineAcceptDlg, 
AcceptAllHdl));
-    m_pTPView->SetRejectClickHdl(LINK(this, SwRedlineAcceptDlg, RejectHdl));
-    m_pTPView->SetRejectAllClickHdl(LINK(this, SwRedlineAcceptDlg, 
RejectAllHdl));
-    m_pTPView->SetUndoClickHdl(LINK(this, SwRedlineAcceptDlg, UndoHdl));
+    m_rTPView.SetAcceptClickHdl(LINK(this, SwRedlineAcceptDlg, AcceptHdl));
+    m_rTPView.SetAcceptAllClickHdl(LINK(this, SwRedlineAcceptDlg, 
AcceptAllHdl));
+    m_rTPView.SetRejectClickHdl(LINK(this, SwRedlineAcceptDlg, RejectHdl));
+    m_rTPView.SetRejectAllClickHdl(LINK(this, SwRedlineAcceptDlg, 
RejectAllHdl));
+    m_rTPView.SetUndoClickHdl(LINK(this, SwRedlineAcceptDlg, UndoHdl));
     //tdf#89227 default to disabled, and only enable if possible to 
accept/reject
-    m_pTPView->EnableAccept(false);
-    m_pTPView->EnableReject(false);
-    m_pTPView->EnableClearFormat(false);
-    m_pTPView->EnableAcceptAll(false);
-    m_pTPView->EnableRejectAll(false);
-    m_pTPView->EnableClearFormatAll(false);
+    m_rTPView.EnableAccept(false);
+    m_rTPView.EnableReject(false);
+    m_rTPView.EnableClearFormat(false);
+    m_rTPView.EnableAcceptAll(false);
+    m_rTPView.EnableRejectAll(false);
+    m_rTPView.EnableClearFormatAll(false);
 
     m_xTabPagesCTRL->GetFilterPage()->SetReadyHdl(LINK(this, 
SwRedlineAcceptDlg, FilterChangedHdl));
 
@@ -229,8 +228,8 @@ 
SwRedlineAcceptDlg::SwRedlineAcceptDlg(std::shared_ptr<weld::Window> xParent, we
     {
         pActLB->append_text(m_sFormatCollSet);
         pActLB->append_text(m_sAutoFormat);
-        m_pTPView->ShowUndo();
-        m_pTPView->DisableUndo();     // no UNDO events yet
+        m_rTPView.ShowUndo();
+        m_rTPView.DisableUndo();     // no UNDO events yet
     }
 
     pActLB->set_active(0);
@@ -395,13 +394,12 @@ void SwRedlineAcceptDlg::EnableControls(const SwView* 
pView)
         return false;
     });
 
-    m_pTPView->EnableAccept( bEnable && pSelectedEntry );
-    m_pTPView->EnableReject( bEnable && pSelectedEntry );
-    m_pTPView->EnableClearFormat( bEnable && !bIsNotFormated && pSelectedEntry 
);
-    m_pTPView->EnableAcceptAll( bEnable );
-    m_pTPView->EnableRejectAll( bEnable );
-    m_pTPView->EnableClearFormatAll( bEnable &&
-                                m_bOnlyFormatedRedlines );
+    m_rTPView.EnableAccept(bEnable && pSelectedEntry);
+    m_rTPView.EnableReject(bEnable && pSelectedEntry);
+    m_rTPView.EnableClearFormat(bEnable && !bIsNotFormated && pSelectedEntry);
+    m_rTPView.EnableAcceptAll(bEnable);
+    m_rTPView.EnableRejectAll(bEnable);
+    m_rTPView.EnableClearFormatAll(bEnable && m_bOnlyFormatedRedlines);
 }
 
 const OUString & SwRedlineAcceptDlg::GetActionImage(const SwRangeRedline& 
rRedln, sal_uInt16 nStack,
@@ -463,12 +461,12 @@ void SwRedlineAcceptDlg::Activate()
     SwView *pView = ::GetActiveView();
     if (!pView) // can happen when switching to another app
     {
-        m_pTPView->EnableAccept(false);
-        m_pTPView->EnableReject(false);
-        m_pTPView->EnableClearFormat(false);
-        m_pTPView->EnableAcceptAll(false);
-        m_pTPView->EnableRejectAll(false);
-        m_pTPView->EnableClearFormatAll(false);
+        m_rTPView.EnableAccept(false);
+        m_rTPView.EnableReject(false);
+        m_rTPView.EnableClearFormat(false);
+        m_rTPView.EnableAcceptAll(false);
+        m_rTPView.EnableRejectAll(false);
+        m_rTPView.EnableClearFormatAll(false);
         return; // had the focus previously
     }
 
@@ -476,12 +474,12 @@ void SwRedlineAcceptDlg::Activate()
 
     if (pView->GetDocShell()->IsReadOnly())
     {
-        m_pTPView->EnableAccept(false);
-        m_pTPView->EnableReject(false);
-        m_pTPView->EnableClearFormat(false);
-        m_pTPView->EnableAcceptAll(false);
-        m_pTPView->EnableRejectAll(false);
-        m_pTPView->EnableClearFormatAll(false);
+        m_rTPView.EnableAccept(false);
+        m_rTPView.EnableReject(false);
+        m_rTPView.EnableClearFormat(false);
+        m_rTPView.EnableAcceptAll(false);
+        m_rTPView.EnableRejectAll(false);
+        m_rTPView.EnableClearFormatAll(false);
         // note: enabling is done in EnableControls below
     }
 
@@ -1221,7 +1219,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( bool bSelect, 
bool bAccept )
         rTreeView.set_cursor(nPos);
         SelectHdl(rTreeView);
     }
-    m_pTPView->EnableUndo();
+    m_rTPView.EnableUndo();
 }
 
 SwRedlineTable::size_type SwRedlineAcceptDlg::GetRedlinePos(const 
weld::TreeIter& rEntry)
@@ -1245,7 +1243,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, 
SortByComboBoxChangedHdl, SvxTPView*, void)
     if (!pView)
         return;
     SwWait aWait(*pView->GetDocShell(), false);
-    auto nSortMode = m_pTPView->GetSortByComboBoxControl()->get_active();
+    auto nSortMode = m_rTPView.GetSortByComboBoxControl()->get_active();
     if (nSortMode == 4)
         nSortMode = -1;
     m_pTable->HeaderBarClick(nSortMode);
@@ -1280,7 +1278,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, UndoHdl, SvxTPView*, 
void)
         pView->GetViewFrame().GetDispatcher()->
                     Execute(SID_UNDO, SfxCallMode::SYNCHRON);
         const SfxPoolItemHolder aResult(pView->GetSlotState(SID_UNDO));
-        m_pTPView->EnableUndo(aResult.is());
+        m_rTPView.EnableUndo(aResult.is());
     }
 
     Activate();
@@ -1506,7 +1504,7 @@ IMPL_LINK(SwRedlineAcceptDlg, CommandHdl, const 
CommandEvent&, rCEvt, bool)
         if (nSortMode == 4 && nColumn == 4)
             return true;  // we already have it
 
-        m_pTPView->GetSortByComboBoxControl()->set_active(nSortMode);
+        m_rTPView.GetSortByComboBoxControl()->set_active(nSortMode);
 
         if (nSortMode == 4)
             nSortMode = -1; // unsorted / sorted by position

Reply via email to