include/vcl/builder.hxx     |   94 ----------------------------------
 include/vcl/builderbase.hxx |  119 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 120 insertions(+), 93 deletions(-)

New commits:
commit c6c5f088549c654f44ba0feffbf82e4fd2425bce
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Sep 20 09:33:47 2024 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Sat Sep 21 09:06:46 2024 +0200

    tdf#130857 qt weld: Drop accidently added empty files
    
    I accidently left them as empty files and committed
    them when extracting a separate commit
    
        commit 9b3a2996e710fee11145dcbbe38a6f1e6f646ec8
        Author: OmkarAcharekar <omkarachareka...@gmail.com>
        Date:   Wed Sep 18 09:35:09 2024 +0200
    
            tdf#130857 qt weld: Add QtInstanceBuilder skeleton
    
    based on a part of the pending WIP Gerrit change [1].
    
    [1] https://gerrit.libreoffice.org/c/core/+/161831
    
    Change-Id: Ic7e13e4a24ec064a658283ccd43d0e9f656a21fd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173708
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/vcl/inc/qt5/QtBuilder.hxx b/vcl/inc/qt5/QtBuilder.hxx
deleted file mode 100644
index e69de29bb2d1..000000000000
diff --git a/vcl/inc/qt5/QtMessageBox.hxx b/vcl/inc/qt5/QtMessageBox.hxx
deleted file mode 100644
index e69de29bb2d1..000000000000
diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx
deleted file mode 100644
index e69de29bb2d1..000000000000
commit 7bdbce0fd80a9a4ed29e92f80c7020323d638e06
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Sep 20 09:21:58 2024 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Sat Sep 21 09:06:37 2024 +0200

    tdf#130857 vcl: Move BuilderBase to an own header
    
    Change-Id: If959579996764888b791a32d711dcc828d9771db
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173707
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 1f92ff0cd708..e8590a473d77 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -16,6 +16,7 @@
 #include <tools/fldunit.hxx>
 #include <vcl/dllapi.h>
 #include <utility>
+#include <vcl/builderbase.hxx>
 #include <vcl/window.hxx>
 #include <vcl/vclptr.hxx>
 #include <vcl/toolboxid.hxx>
@@ -53,99 +54,6 @@ struct NotebookBarAddonsItem;
 namespace xmlreader { class XmlReader; }
 namespace com::sun::star::frame { class XFrame; }
 
-struct ComboBoxTextItem
-{
-    OUString m_sItem;
-    OUString m_sId;
-    ComboBoxTextItem(OUString sItem, OUString sId)
-        : m_sItem(std::move(sItem))
-        , m_sId(std::move(sId))
-    {
-    }
-};
-
-class UNLESS_MERGELIBS(VCL_DLLPUBLIC) BuilderBase
-{
-public:
-    typedef std::map<OUString, OUString> stringmap;
-    typedef std::map<OUString, std::pair<OUString, OUString>> accelmap;
-
-    typedef stringmap Adjustment;
-    typedef stringmap TextBuffer;
-
-protected:
-    BuilderBase(const OUString& rUIFile, bool bLegacy);
-
-    struct ListStore
-    {
-        typedef std::vector<OUString> row;
-        std::vector<row> m_aEntries;
-    };
-
-    struct SizeGroup
-    {
-        std::vector<OUString> m_aWidgets;
-        stringmap m_aProperties;
-        SizeGroup() {}
-    };
-
-    static void collectPangoAttribute(xmlreader::XmlReader& reader, stringmap& 
rMap);
-    static void collectAtkRelationAttribute(xmlreader::XmlReader& reader, 
stringmap& rMap);
-    static void collectAtkRoleAttribute(xmlreader::XmlReader& reader, 
stringmap& rMap);
-    static void collectAccelerator(xmlreader::XmlReader& reader, accelmap& 
rMap);
-    void collectProperty(xmlreader::XmlReader& rReader, stringmap& rMap) const;
-    void extractClassAndIdAndCustomProperty(xmlreader::XmlReader& reader, 
OUString& rClass,
-                                            OUString& rId, OUString& 
rCustomProperty);
-    void handleInterfaceDomain(xmlreader::XmlReader& rReader);
-    static bool isToolbarItemClass(std::u16string_view sClass);
-    static std::vector<vcl::EnumContext::Context> 
handleStyle(xmlreader::XmlReader &reader, int &nPriority);
-    static OUString getStyleClass(xmlreader::XmlReader &reader);
-    static bool hasOrientationVertical(stringmap &rMap);
-
-    OUString getHelpRoot() { return m_sHelpRoot; }
-    bool isLegacy() { return m_bLegacy; }
-    const std::locale& getResLocale() const;
-    const std::vector<SizeGroup>& getSizeGroups() const;
-
-    OUString finalizeValue(const OString& rContext, const OString& rValue,
-                           const bool bTranslate) const;
-
-
-    stringmap handleAtkObject(xmlreader::XmlReader& reader) const;
-    std::vector<ComboBoxTextItem> handleItems(xmlreader::XmlReader& reader) 
const;
-    void handleListStore(xmlreader::XmlReader& reader, const OUString& rID, 
std::u16string_view rClass);
-    void handleRow(xmlreader::XmlReader& reader, const OUString& rID);
-
-    void addAdjustment(const OUString& sID, const Adjustment& rAdjustment);
-    const Adjustment* get_adjustment_by_name(const OUString& sID) const;
-
-    void addTextBuffer(const OUString& sID, const TextBuffer& rTextBuffer);
-    const TextBuffer* get_buffer_by_name(const OUString& sID) const;
-
-    const ListStore* get_model_by_name(const OUString& sID) const;
-
-    void handleSizeGroup(xmlreader::XmlReader& reader);
-
-    virtual void resetParserState();
-
-private:
-    struct ParserState
-    {
-        std::locale m_aResLocale;
-
-        std::map<OUString, ListStore> m_aModels;
-        std::vector<SizeGroup> m_aSizeGroups;
-
-        std::map<OUString, Adjustment> m_aAdjustments;
-        std::map<OUString, TextBuffer> m_aTextBuffers;
-    };
-
-    std::unique_ptr<ParserState> m_pParserState;
-
-    OUString m_sHelpRoot;
-    bool m_bLegacy;
-};
-
 /// Creates a hierarchy of vcl::Windows (widgets) from a .ui file for dialogs, 
sidebar, etc.
 class VCL_DLLPUBLIC VclBuilder : public BuilderBase
 {
diff --git a/include/vcl/builderbase.hxx b/include/vcl/builderbase.hxx
new file mode 100644
index 000000000000..b345a7d8b1ff
--- /dev/null
+++ b/include/vcl/builderbase.hxx
@@ -0,0 +1,119 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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 <config_options.h>
+
+#include <vcl/dllapi.h>
+#include <vcl/EnumContext.hxx>
+
+#include <map>
+#include <vector>
+
+namespace xmlreader
+{
+class XmlReader;
+}
+
+struct ComboBoxTextItem
+{
+    OUString m_sItem;
+    OUString m_sId;
+    ComboBoxTextItem(OUString sItem, OUString sId)
+        : m_sItem(std::move(sItem))
+        , m_sId(std::move(sId))
+    {
+    }
+};
+
+class UNLESS_MERGELIBS(VCL_DLLPUBLIC) BuilderBase
+{
+public:
+    typedef std::map<OUString, OUString> stringmap;
+    typedef std::map<OUString, std::pair<OUString, OUString>> accelmap;
+
+    typedef stringmap Adjustment;
+    typedef stringmap TextBuffer;
+
+protected:
+    BuilderBase(const OUString& rUIFile, bool bLegacy);
+
+    struct ListStore
+    {
+        typedef std::vector<OUString> row;
+        std::vector<row> m_aEntries;
+    };
+
+    struct SizeGroup
+    {
+        std::vector<OUString> m_aWidgets;
+        stringmap m_aProperties;
+        SizeGroup() {}
+    };
+
+    static void collectPangoAttribute(xmlreader::XmlReader& reader, stringmap& 
rMap);
+    static void collectAtkRelationAttribute(xmlreader::XmlReader& reader, 
stringmap& rMap);
+    static void collectAtkRoleAttribute(xmlreader::XmlReader& reader, 
stringmap& rMap);
+    static void collectAccelerator(xmlreader::XmlReader& reader, accelmap& 
rMap);
+    void collectProperty(xmlreader::XmlReader& rReader, stringmap& rMap) const;
+    void extractClassAndIdAndCustomProperty(xmlreader::XmlReader& reader, 
OUString& rClass,
+                                            OUString& rId, OUString& 
rCustomProperty);
+    void handleInterfaceDomain(xmlreader::XmlReader& rReader);
+    static bool isToolbarItemClass(std::u16string_view sClass);
+    static std::vector<vcl::EnumContext::Context> 
handleStyle(xmlreader::XmlReader& reader,
+                                                              int& nPriority);
+    static OUString getStyleClass(xmlreader::XmlReader& reader);
+    static bool hasOrientationVertical(stringmap& rMap);
+
+    OUString getHelpRoot() { return m_sHelpRoot; }
+    bool isLegacy() { return m_bLegacy; }
+    const std::locale& getResLocale() const;
+    const std::vector<SizeGroup>& getSizeGroups() const;
+
+    OUString finalizeValue(const OString& rContext, const OString& rValue,
+                           const bool bTranslate) const;
+
+    stringmap handleAtkObject(xmlreader::XmlReader& reader) const;
+    std::vector<ComboBoxTextItem> handleItems(xmlreader::XmlReader& reader) 
const;
+    void handleListStore(xmlreader::XmlReader& reader, const OUString& rID,
+                         std::u16string_view rClass);
+    void handleRow(xmlreader::XmlReader& reader, const OUString& rID);
+
+    void addAdjustment(const OUString& sID, const Adjustment& rAdjustment);
+    const Adjustment* get_adjustment_by_name(const OUString& sID) const;
+
+    void addTextBuffer(const OUString& sID, const TextBuffer& rTextBuffer);
+    const TextBuffer* get_buffer_by_name(const OUString& sID) const;
+
+    const ListStore* get_model_by_name(const OUString& sID) const;
+
+    void handleSizeGroup(xmlreader::XmlReader& reader);
+
+    virtual void resetParserState();
+
+private:
+    struct ParserState
+    {
+        std::locale m_aResLocale;
+
+        std::map<OUString, ListStore> m_aModels;
+        std::vector<SizeGroup> m_aSizeGroups;
+
+        std::map<OUString, Adjustment> m_aAdjustments;
+        std::map<OUString, TextBuffer> m_aTextBuffers;
+    };
+
+    std::unique_ptr<ParserState> m_pParserState;
+
+    OUString m_sHelpRoot;
+    bool m_bLegacy;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to