chart2/source/controller/dialogs/RangeSelectionListener.cxx |    1 
 include/vcl/weld/Assistant.hxx                              |   64 ++++++++++
 include/vcl/weld/AssistantController.hxx                    |    2 
 include/vcl/weld/weld.hxx                                   |   71 ------------
 vcl/Library_vcl.mk                                          |    1 
 vcl/inc/qt5/QtInstanceAssistant.hxx                         |    1 
 vcl/inc/qt5/QtInstanceBuilder.hxx                           |    1 
 vcl/inc/salvtables.hxx                                      |    1 
 vcl/source/weld/Assistant.cxx                               |   50 ++++++++
 vcl/unx/gtk3/gtkinst.cxx                                    |    1 
 10 files changed, 121 insertions(+), 72 deletions(-)

New commits:
commit daf87652188e6d3555402d54b4ad31b986c782c4
Author:     Michael Weghorn <[email protected]>
AuthorDate: Fri Jan 2 22:34:35 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Sat Jan 3 08:12:36 2026 +0100

    weld: Move weld::Assistant to own header/source
    
    Move the class out of weld.hxx into its own header and source
    file, in order to make it easier to keep an overview and to avoid
    having to recompile ~all UI code when the class is
    modified.
    
    Change-Id: I43279e6479c9a0b5c9521dadf6e634e22bf39442
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196438
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/chart2/source/controller/dialogs/RangeSelectionListener.cxx 
b/chart2/source/controller/dialogs/RangeSelectionListener.cxx
index df46cdf4a3b7..d3ceb64c8f32 100644
--- a/chart2/source/controller/dialogs/RangeSelectionListener.cxx
+++ b/chart2/source/controller/dialogs/RangeSelectionListener.cxx
@@ -19,6 +19,7 @@
 
 #include <RangeSelectionListener.hxx>
 #include <ChartModel.hxx>
+#include <vcl/weld/Assistant.hxx>
 #include <vcl/weld/DialogController.hxx>
 #include <vcl/weld/weld.hxx>
 #include <utility>
diff --git a/include/vcl/weld/Assistant.hxx b/include/vcl/weld/Assistant.hxx
new file mode 100644
index 000000000000..3984b216e11a
--- /dev/null
+++ b/include/vcl/weld/Assistant.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <vcl/dllapi.h>
+#include <vcl/weld/weld.hxx>
+
+namespace weld
+{
+class VCL_DLLPUBLIC Assistant : virtual public Dialog
+{
+    Link<const OUString&, bool> m_aJumpPageHdl;
+
+protected:
+    bool signal_jump_page(const OUString& rIdent)
+    {
+        if (notify_events_disabled())
+            return true;
+        return m_aJumpPageHdl.Call(rIdent);
+    }
+
+    virtual void do_set_current_page(int nPage) = 0;
+    virtual void do_set_current_page(const OUString& rIdent) = 0;
+    virtual void do_set_page_index(const OUString& rIdent, int nIndex) = 0;
+    virtual void do_set_page_title(const OUString& rIdent, const OUString& 
rTitle) = 0;
+    virtual void do_set_page_sensitive(const OUString& rIdent, bool 
bSensitive) = 0;
+
+public:
+    virtual int get_current_page() const = 0;
+    virtual int get_n_pages() const = 0;
+    virtual OUString get_page_ident(int nPage) const = 0;
+    virtual OUString get_current_page_ident() const = 0;
+
+    void set_current_page(int nPage);
+
+    void set_current_page(const OUString& rIdent);
+
+    // move the page rIdent to position nIndex
+    void set_page_index(const OUString& rIdent, int nIndex);
+
+    void set_page_title(const OUString& rIdent, const OUString& rTitle);
+
+    virtual OUString get_page_title(const OUString& rIdent) const = 0;
+
+    void set_page_sensitive(const OUString& rIdent, bool bSensitive);
+
+    virtual weld::Container* append_page(const OUString& rIdent) = 0;
+
+    virtual void set_page_side_help_id(const OUString& rHelpId) = 0;
+
+    virtual void set_page_side_image(const OUString& rImage) = 0;
+
+    void connect_jump_page(const Link<const OUString&, bool>& rLink) { 
m_aJumpPageHdl = rLink; }
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/include/vcl/weld/AssistantController.hxx 
b/include/vcl/weld/AssistantController.hxx
index 6fb2b800c84a..9480dfcacfb4 100644
--- a/include/vcl/weld/AssistantController.hxx
+++ b/include/vcl/weld/AssistantController.hxx
@@ -10,8 +10,8 @@
 #pragma once
 
 #include <vcl/dllapi.h>
+#include <vcl/weld/Assistant.hxx>
 #include <vcl/weld/DialogController.hxx>
-#include <vcl/weld/weld.hxx>
 
 namespace weld
 {
diff --git a/include/vcl/weld/weld.hxx b/include/vcl/weld/weld.hxx
index 86c2a1641870..816a63bb4234 100644
--- a/include/vcl/weld/weld.hxx
+++ b/include/vcl/weld/weld.hxx
@@ -635,77 +635,6 @@ public:
     virtual std::unique_ptr<Container> weld_message_area() = 0;
 };
 
-class VCL_DLLPUBLIC Assistant : virtual public Dialog
-{
-    Link<const OUString&, bool> m_aJumpPageHdl;
-
-protected:
-    bool signal_jump_page(const OUString& rIdent)
-    {
-        if (notify_events_disabled())
-            return true;
-        return m_aJumpPageHdl.Call(rIdent);
-    }
-
-    virtual void do_set_current_page(int nPage) = 0;
-    virtual void do_set_current_page(const OUString& rIdent) = 0;
-    virtual void do_set_page_index(const OUString& rIdent, int nIndex) = 0;
-    virtual void do_set_page_title(const OUString& rIdent, const OUString& 
rTitle) = 0;
-    virtual void do_set_page_sensitive(const OUString& rIdent, bool 
bSensitive) = 0;
-
-public:
-    virtual int get_current_page() const = 0;
-    virtual int get_n_pages() const = 0;
-    virtual OUString get_page_ident(int nPage) const = 0;
-    virtual OUString get_current_page_ident() const = 0;
-
-    void set_current_page(int nPage)
-    {
-        disable_notify_events();
-        do_set_current_page(nPage);
-        enable_notify_events();
-    }
-
-    void set_current_page(const OUString& rIdent)
-    {
-        disable_notify_events();
-        do_set_current_page(rIdent);
-        enable_notify_events();
-    }
-
-    // move the page rIdent to position nIndex
-    void set_page_index(const OUString& rIdent, int nIndex)
-    {
-        disable_notify_events();
-        do_set_page_index(rIdent, nIndex);
-        enable_notify_events();
-    }
-
-    void set_page_title(const OUString& rIdent, const OUString& rTitle)
-    {
-        disable_notify_events();
-        do_set_page_title(rIdent, rTitle);
-        enable_notify_events();
-    }
-
-    virtual OUString get_page_title(const OUString& rIdent) const = 0;
-
-    void set_page_sensitive(const OUString& rIdent, bool bSensitive)
-    {
-        disable_notify_events();
-        do_set_page_sensitive(rIdent, bSensitive);
-        enable_notify_events();
-    }
-
-    virtual weld::Container* append_page(const OUString& rIdent) = 0;
-
-    virtual void set_page_side_help_id(const OUString& rHelpId) = 0;
-
-    virtual void set_page_side_image(const OUString& rImage) = 0;
-
-    void connect_jump_page(const Link<const OUString&, bool>& rLink) { 
m_aJumpPageHdl = rLink; }
-};
-
 inline OUString toId(const void* pValue)
 {
     return OUString::number(reinterpret_cast<sal_uIntPtr>(pValue));
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 16f96ed22e22..f7c0353c508b 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -582,6 +582,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/uitest/uitest \
     vcl/source/uitest/uno/uiobject_uno \
     vcl/source/uitest/uno/uitest_uno \
+    vcl/source/weld/Assistant \
     vcl/source/weld/AssistantController \
     vcl/source/weld/Builder \
     vcl/source/weld/ComboBox \
diff --git a/vcl/inc/qt5/QtInstanceAssistant.hxx 
b/vcl/inc/qt5/QtInstanceAssistant.hxx
index f5acd9c578fa..86572460842d 100644
--- a/vcl/inc/qt5/QtInstanceAssistant.hxx
+++ b/vcl/inc/qt5/QtInstanceAssistant.hxx
@@ -11,6 +11,7 @@
 
 #include "QtInstanceDialog.hxx"
 
+#include <vcl/weld/Assistant.hxx>
 #include <vcl/weld/weldutils.hxx>
 
 #include <QtWidgets/QWizard>
diff --git a/vcl/inc/qt5/QtInstanceBuilder.hxx 
b/vcl/inc/qt5/QtInstanceBuilder.hxx
index 32cd64367230..dfeb9e260a40 100644
--- a/vcl/inc/qt5/QtInstanceBuilder.hxx
+++ b/vcl/inc/qt5/QtInstanceBuilder.hxx
@@ -16,6 +16,7 @@
 #include <QtWidgets/QWidget>
 
 #include <rtl/ustring.hxx>
+#include <vcl/weld/Assistant.hxx>
 #include <vcl/weld/Builder.hxx>
 #include <vcl/weld/ComboBox.hxx>
 #include <vcl/weld/EntryTreeView.hxx>
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index e0fbac961d1a..db6e715a8b0b 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -9,6 +9,7 @@
 #pragma once
 
 #include <vcl/builder.hxx>
+#include <vcl/weld/Assistant.hxx>
 #include <vcl/weld/Builder.hxx>
 #include <vcl/weld/ComboBox.hxx>
 #include <vcl/weld/DialogController.hxx>
diff --git a/vcl/source/weld/Assistant.cxx b/vcl/source/weld/Assistant.cxx
new file mode 100644
index 000000000000..dbf7c00a8e67
--- /dev/null
+++ b/vcl/source/weld/Assistant.cxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <vcl/weld/Assistant.hxx>
+
+namespace weld
+{
+void Assistant::set_current_page(int nPage)
+{
+    disable_notify_events();
+    do_set_current_page(nPage);
+    enable_notify_events();
+}
+
+void Assistant::set_current_page(const OUString& rIdent)
+{
+    disable_notify_events();
+    do_set_current_page(rIdent);
+    enable_notify_events();
+}
+
+void Assistant::set_page_index(const OUString& rIdent, int nIndex)
+{
+    disable_notify_events();
+    do_set_page_index(rIdent, nIndex);
+    enable_notify_events();
+}
+
+void Assistant::set_page_title(const OUString& rIdent, const OUString& rTitle)
+{
+    disable_notify_events();
+    do_set_page_title(rIdent, rTitle);
+    enable_notify_events();
+}
+
+void Assistant::set_page_sensitive(const OUString& rIdent, bool bSensitive)
+{
+    disable_notify_events();
+    do_set_page_sensitive(rIdent, bSensitive);
+    enable_notify_events();
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 27e756b065c5..eebc9a461ff8 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -98,6 +98,7 @@
 #include <vcl/stdtext.hxx>
 #include <vcl/syswin.hxx>
 #include <vcl/virdev.hxx>
+#include <vcl/weld/Assistant.hxx>
 #include <vcl/weld/EntryTreeView.hxx>
 #include <vcl/weld/IconView.hxx>
 #include <vcl/weld/weld.hxx>

Reply via email to