diff options
-rw-r--r-- | include/vcl/builder.hxx | 4 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 17 |
2 files changed, 14 insertions, 7 deletions
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index 9ceca5cb53dd..c15b671cd8b2 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -376,7 +376,9 @@ private: void handleSizeGroup(xmlreader::XmlReader &reader); - void handleAtkObject(xmlreader::XmlReader &reader, vcl::Window *pWindow); + stringmap handleAtkObject(xmlreader::XmlReader &reader); + + static void applyAtkProperties(vcl::Window *pWindow, const stringmap& rProperties); void handleActionWidget(xmlreader::XmlReader &reader); diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 020ea6c5f74c..1b2f0aef2263 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -3087,15 +3087,13 @@ void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const OString &rI } } -void VclBuilder::handleAtkObject(xmlreader::XmlReader &reader, vcl::Window *pWindow) +VclBuilder::stringmap VclBuilder::handleAtkObject(xmlreader::XmlReader &reader) { - assert(pWindow); - int nLevel = 1; stringmap aProperties; - while(true) + while (true) { xmlreader::Span name; int nsId; @@ -3122,7 +3120,13 @@ void VclBuilder::handleAtkObject(xmlreader::XmlReader &reader, vcl::Window *pWin break; } - for (auto const& prop : aProperties) + return aProperties; +} + +void VclBuilder::applyAtkProperties(vcl::Window *pWindow, const stringmap& rProperties) +{ + assert(pWindow); + for (auto const& prop : rProperties) { const OString &rKey = prop.first; const OUString &rValue = prop.second; @@ -3620,7 +3624,8 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm } else if (sClass == "AtkObject") { - handleAtkObject(reader, pParent); + auto aAtkProperties = handleAtkObject(reader); + applyAtkProperties(pParent, aAtkProperties); return nullptr; } |