summaryrefslogtreecommitdiff
path: root/vcl/source/window/builder.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-27 09:50:00 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-08-27 14:32:50 +0200
commit5f2c138bf67b19ba5cfa696afda7087d6879f074 (patch)
tree6875f6fcad4fbecec36f223512d3d15738a24e51 /vcl/source/window/builder.cxx
parent9f77b5b694ec3708c8ae5feb01dc7d34f1c29d82 (diff)
factor out an applyAtkProperties
Change-Id: Ib7fda3bbf25046f307dcd080e918d159358b4c90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101445 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window/builder.cxx')
-rw-r--r--vcl/source/window/builder.cxx17
1 files changed, 11 insertions, 6 deletions
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;
}