From 73dbd4229b6a73a62ccb2923102d3eede9595ec7 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 20 Sep 2024 12:21:05 +0200 Subject: tdf#130857 Refactor VclBuilder::handlePacking/applyPackingProperties Instead of doing XML parsing in `VclBuilder::applyPackingProperty`, call `BuilderBase::collectProperty` in `VclBuilder::handlePacking` to get a string map of the properties and pass that as a param to the renamed `VclBuilder::applyPackingProperties` that can then work with the key-value pairs right away. This is one step to split XML parsing out of methods that directly work with vcl::Window, in order to be able to reuse the logic for other implementations. (`git show --ignore-space-change` shows the "actual" change more clearly.) Change-Id: If29cbd7a13da2732c46e4a0b0b50d0963525e729 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173714 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- include/vcl/builder.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/vcl') diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index 8c2181eef852..216b2f0d814c 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -295,7 +295,8 @@ private: VclPtr handleObject(vcl::Window *pParent, stringmap *pAtkProps, xmlreader::XmlReader &reader, bool bToolbarItem); void handlePacking(vcl::Window *pCurrent, vcl::Window *pParent, xmlreader::XmlReader &reader); - void applyPackingProperty(vcl::Window *pCurrent, vcl::Window *pParent, xmlreader::XmlReader &reader); + void applyPackingProperties(vcl::Window* pCurrent, vcl::Window* pParent, + const stringmap& rPackingProperties); void insertMenuObject( Menu *pParent, -- cgit