vcl/inc/wizdlg.hxx                   |   51 ++++++++++++++++++++++++++++++++-
 vcl/source/control/wizardmachine.cxx |    2 -
 vcl/source/control/wizimpldata.hxx   |   53 +++--------------------------------
 3 files changed, 55 insertions(+), 51 deletions(-)

New commits:
commit 2a56b12245e2596dae342fcea8601328663bb3ab
Author:     Michael Weghorn <[email protected]>
AuthorDate: Sat May 17 23:41:25 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Sun May 18 20:37:52 2025 +0200

    vcl: Use more specific include
    
    This doesn't need to include the header for the
    vcl::Window specific implementation any more.
    
    Drop that one and instead add include for
    RoadmapWizardMachine that was previously included
    indirectly.
    
    Change-Id: Ifa0aa042db87adaad96d4ea23fa93dae1b8b1ba3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185462
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/vcl/source/control/wizardmachine.cxx 
b/vcl/source/control/wizardmachine.cxx
index b901e510068e..fd26afbaa8e4 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -20,10 +20,10 @@
 #include <comphelper/lok.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <tools/debug.hxx>
+#include <vcl/roadmapwizard.hxx>
 #include <comphelper/diagnose_ex.hxx>
 #include <strings.hrc>
 #include <svdata.hxx>
-#include <wizdlg.hxx>
 #include <stack>
 #include "wizimpldata.hxx"
 
commit 2d268b2fe518ccb5ba19ed225c033e9148d64f22
Author:     Michael Weghorn <[email protected]>
AuthorDate: Sat May 17 23:32:45 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Sun May 18 20:37:38 2025 +0200

    vcl: More clearly separate vcl::Window specific RoadmapWizard bits
    
    Move code related to the vcl::Window specific implementation
    from vcl/source/control/wizimpldata.hxx that's also included
    by sources for the weld::Widget based abstraction to
    vcl/inc/wizdlg.hxx which is the header for the vcl::Window
    based implementation, to more clearly separate the vcl::Window
    specific bits from those not depending on vcl::Window.
    
    Reorganize includes accordingly.
    vcl/source/control/wizimpldata.hxx now no longer needs
    any `vcl/toolkit/` includes.
    
    Change-Id: Idd8652cada4cfc9a20957a86892544d779cdc692
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185461
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/inc/wizdlg.hxx b/vcl/inc/wizdlg.hxx
index bfde5a5bcb69..4bdb1b70fb91 100644
--- a/vcl/inc/wizdlg.hxx
+++ b/vcl/inc/wizdlg.hxx
@@ -19,12 +19,16 @@
 
 #pragma once
 
-#include <memory>
 #include <vcl/toolkit/button.hxx>
 #include <vcl/toolkit/dialog.hxx>
+#include <vcl/toolkit/roadmap.hxx>
 #include <vcl/roadmapwizard.hxx>
 #include <vcl/tabpage.hxx>
 
+#include <map>
+#include <memory>
+#include <set>
+
 struct ImplWizPageData
 {
     ImplWizPageData*    mpNext;
@@ -40,7 +44,6 @@ struct ImplWizButtonData
 
 namespace vcl
 {
-    struct RoadmapWizardImpl;
     class RoadmapWizard;
 
     namespace RoadmapWizardTypes
@@ -48,6 +51,50 @@ namespace vcl
         typedef VclPtr<TabPage> (* RoadmapPageFactory)( RoadmapWizard& );
     };
 
+    using namespace RoadmapWizardTypes;
+    namespace
+    {
+        typedef ::std::set< WizardTypes::WizardState > StateSet;
+
+        typedef ::std::map<
+            PathId,
+            WizardPath
+            > Paths;
+
+        typedef ::std::map<
+            WizardTypes::WizardState,
+            ::std::pair<
+                OUString,
+                RoadmapPageFactory
+                >
+            > StateDescriptions;
+    }
+
+    struct RoadmapWizardImpl
+    {
+        ScopedVclPtr<ORoadmap> pRoadmap;
+        std::map<VclPtr<vcl::Window>, short> maResponses;
+        Paths               aPaths;
+        PathId              nActivePath;
+        StateDescriptions   aStateDescriptors;
+        StateSet            aDisabledStates;
+        bool                bActivePathIsDefinite;
+
+        RoadmapWizardImpl()
+            :pRoadmap( nullptr )
+            ,nActivePath( PathId::INVALID )
+            ,bActivePathIsDefinite( false )
+        {
+        }
+
+        /// returns the index of the current state in given path, or -1
+        static sal_Int32 getStateIndexInPath( WizardTypes::WizardState 
_nState, const WizardPath& _rPath );
+        /// returns the index of the current state in the path with the given 
id, or -1
+        sal_Int32 getStateIndexInPath( WizardTypes::WizardState _nState, 
PathId _nPathId );
+        /// returns the index of the first state in which the two given paths 
differ
+        static sal_Int32 getFirstDifferentIndex( const WizardPath& _rLHS, 
const WizardPath& _rRHS );
+    };
+
     //= RoadmapWizard
 
     /** wizard for a roadmap
diff --git a/vcl/source/control/wizimpldata.hxx 
b/vcl/source/control/wizimpldata.hxx
index 916f1e06b602..d68c27f801fc 100644
--- a/vcl/source/control/wizimpldata.hxx
+++ b/vcl/source/control/wizimpldata.hxx
@@ -19,10 +19,11 @@
 
 #pragma once
 
+#include <rtl/ustring.hxx>
+#include <vcl/builderpage.hxx>
+#include <vcl/wizardmachine.hxx>
+
 #include <stack>
-#include <map>
-#include <set>
-#include <vcl/toolkit/roadmap.hxx>
 
 constexpr OUString HID_WIZARD_NEXT = u"SVT_HID_WIZARD_NEXT"_ustr;
 constexpr OUString HID_WIZARD_PREVIOUS = u"SVT_HID_WIZARD_PREVIOUS"_ustr;
@@ -55,50 +56,6 @@ namespace vcl
         {
         }
     };
-
-    using namespace RoadmapWizardTypes;
-    namespace
-    {
-        typedef ::std::set< WizardTypes::WizardState > StateSet;
-
-        typedef ::std::map<
-                    PathId,
-                    WizardPath
-                > Paths;
-
-        typedef ::std::map<
-                    WizardTypes::WizardState,
-                    ::std::pair<
-                        OUString,
-                        RoadmapPageFactory
-                    >
-                > StateDescriptions;
-    }
-
-    struct RoadmapWizardImpl
-    {
-        ScopedVclPtr<ORoadmap> pRoadmap;
-        std::map<VclPtr<vcl::Window>, short> maResponses;
-        Paths               aPaths;
-        PathId              nActivePath;
-        StateDescriptions   aStateDescriptors;
-        StateSet            aDisabledStates;
-        bool                bActivePathIsDefinite;
-
-        RoadmapWizardImpl()
-            :pRoadmap( nullptr )
-            ,nActivePath( PathId::INVALID )
-            ,bActivePathIsDefinite( false )
-        {
-        }
-
-        /// returns the index of the current state in given path, or -1
-        static sal_Int32 getStateIndexInPath( WizardTypes::WizardState 
_nState, const WizardPath& _rPath );
-        /// returns the index of the current state in the path with the given 
id, or -1
-        sal_Int32 getStateIndexInPath( WizardTypes::WizardState _nState, 
PathId _nPathId );
-        /// returns the index of the first state in which the two given paths 
differ
-        static sal_Int32 getFirstDifferentIndex( const WizardPath& _rLHS, 
const WizardPath& _rRHS );
-    };
-}   // namespace svt
+}   // namespace vcl
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to