include/vcl/builder.hxx | 23 ++++++----------------- vcl/source/window/builder.cxx | 4 ++-- 2 files changed, 8 insertions(+), 19 deletions(-)
New commits: commit eb7c82c423ee40f78ff48d7e3182b2766ed0f115 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Aug 12 10:20:13 2024 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Aug 13 07:16:29 2024 +0200 tdf#130857 VclBuilder: Move 2 static methods to base class They're not `vcl::Window`-specific and might be helpful for other implementations as well. Change-Id: I8c04706ac36f80bc225a9ad89352b3d4a7c6464f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171749 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index c5ebc5914256..300e806e04ab 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -76,6 +76,8 @@ protected: static void collectAtkRoleAttribute(xmlreader::XmlReader& reader, stringmap& rMap); static void collectAccelerator(xmlreader::XmlReader& reader, accelmap& rMap); 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); }; /// Creates a hierarchy of vcl::Windows (widgets) from a .ui file for dialogs, sidebar, etc. @@ -349,8 +351,6 @@ private: VclPtr<vcl::Window> handleObject(vcl::Window *pParent, stringmap *pAtkProps, xmlreader::XmlReader &reader, bool bToolbarItem); void handlePacking(vcl::Window *pCurrent, vcl::Window *pParent, xmlreader::XmlReader &reader); - static std::vector<vcl::EnumContext::Context> handleStyle(xmlreader::XmlReader &reader, int &nPriority); - 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; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 797deace748a..442988294a05 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -3888,7 +3888,7 @@ void VclBuilder::applyPackingProperty(vcl::Window *pCurrent, } } -std::vector<vcl::EnumContext::Context> VclBuilder::handleStyle(xmlreader::XmlReader &reader, int &nPriority) +std::vector<vcl::EnumContext::Context> BuilderBase::handleStyle(xmlreader::XmlReader &reader, int &nPriority) { std::vector<vcl::EnumContext::Context> aContext; @@ -3940,7 +3940,7 @@ std::vector<vcl::EnumContext::Context> VclBuilder::handleStyle(xmlreader::XmlRea return aContext; } -OUString VclBuilder::getStyleClass(xmlreader::XmlReader &reader) +OUString BuilderBase::getStyleClass(xmlreader::XmlReader &reader) { xmlreader::Span name; int nsId; commit 911850e7f3194c1f3d6184ae230b390027909fe6 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Aug 12 07:15:03 2024 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Aug 13 07:16:21 2024 +0200 VclBuilder: Drop UStringPair in favor of StringPair They're the same since commit 116b9d6ddf2b61186b29f0370234eec9c1bbe306 Date: Sun Apr 2 01:18:42 2023 +0300 Avoid conversions between OUString and OString in VCL , so consistently use `StringPair` and drop `UStringPair`. Change-Id: I7120760b006957a81dfac50c85a00c9583242cd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171745 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index 59202ba34062..c5ebc5914256 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -177,17 +177,6 @@ private: } }; - struct UStringPair - { - OUString m_sID; - OUString m_sValue; - UStringPair(OUString sId, OUString sValue) - : m_sID(std::move(sId)) - , m_sValue(std::move(sValue)) - { - } - }; - typedef StringPair RadioButtonGroupMap; struct ButtonImageWidgetMap @@ -203,10 +192,10 @@ private: } }; - typedef UStringPair TextBufferMap; - typedef UStringPair WidgetAdjustmentMap; - typedef UStringPair ButtonMenuMap; - typedef UStringPair MnemonicWidgetMap; + typedef StringPair TextBufferMap; + typedef StringPair WidgetAdjustmentMap; + typedef StringPair ButtonMenuMap; + typedef StringPair MnemonicWidgetMap; struct ComboBoxModelMap {