summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-01-29 14:42:24 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-02-08 22:49:30 +0100
commit9d928231e71806d4cfe76af2159630bff242c5da (patch)
tree127a15d9916a030735f9eaade03655cfa9f3352b /include/vcl
parentc1991a5fb229161b5f2ad3240afc5b2417abe5c9 (diff)
tdf#130857 VclBuilder: Extract static methods to new base class
Extract static methods from VclBuilder to a new base class BuilderBase that can be reused by other builder implementations (like the upcoming one for the Qt-based VCL plugins) in the future. Change-Id: I719ab5fe1b8a6b36050815204550aae3e3dd25e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162917 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/builder.hxx19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 64538f81272e..e53a89321095 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -64,12 +64,23 @@ struct ComboBoxTextItem
}
};
-/// Creates a hierarchy of vcl::Windows (widgets) from a .ui file for dialogs, sidebar, etc.
-class VCL_DLLPUBLIC VclBuilder
+class VCL_DLLPUBLIC BuilderBase
{
public:
typedef std::map<OUString, OUString> stringmap;
typedef std::map<OUString, std::pair<OUString, OUString>> accelmap;
+
+protected:
+ 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);
+};
+
+/// Creates a hierarchy of vcl::Windows (widgets) from a .ui file for dialogs, sidebar, etc.
+class VCL_DLLPUBLIC VclBuilder : public BuilderBase
+{
+public:
/// These functions create a new widget with parent pParent and return it in rRet
typedef void (*customMakeWidget)(VclPtr<vcl::Window> &rRet, const VclPtr<vcl::Window> &pParent, stringmap &rVec);
@@ -351,10 +362,6 @@ private:
static OUString getStyleClass(xmlreader::XmlReader &reader);
void applyPackingProperty(vcl::Window *pCurrent, vcl::Window *pParent, xmlreader::XmlReader &reader);
void collectProperty(xmlreader::XmlReader &reader, stringmap &rVec) const;
- 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 insertMenuObject(
Menu *pParent,