summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-02-24 12:22:19 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-02-24 15:42:07 +0100
commit8c2251481a10dc26c969c72e7a5b7cc910996441 (patch)
treeda3c3c85edd20d3ce60b4576ce8e38700924554d /extensions
parent01f86c59531b29cd06dd53a7a6e4556fb97cbb24 (diff)
Move code for setting unique buildable names one level up
this way, we also set the name for elements like the listbox 'Text type' Change-Id: Id894704f870276c20958612bee2926dae98d766d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111475 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx10
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx10
2 files changed, 10 insertions, 10 deletions
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index ccd910553249..ceac37326a0a 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -1375,16 +1375,6 @@ namespace pcr
if ( !aDescriptor.SecondaryButtonId.isEmpty() )
aDescriptor.HasSecondaryButton = true;
- // for ui-testing try and distinguish different instances of the controls
- auto xWindow = aDescriptor.Control->getControlWindow();
- if (weld::TransportAsXWindow* pTunnel = dynamic_cast<weld::TransportAsXWindow*>(xWindow.get()))
- {
- weld::Widget* m_pControlWindow = pTunnel->getWidget();
- if (m_pControlWindow)
- m_pControlWindow->set_buildable_name(m_pControlWindow->get_buildable_name() + "-" + aDescriptor.DisplayName.toUtf8());
- }
-
-
bool bIsDataProperty = ( nPropertyUIFlags & PROP_FLAG_DATA_PROPERTY ) != 0;
aDescriptor.Category = bIsDataProperty ? std::u16string_view(u"Data") : std::u16string_view(u"General");
return aDescriptor;
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index bde1e1f56e3e..4ed339fb2d42 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -1105,6 +1105,16 @@ namespace pcr
}
_rDescriptor.bReadOnly = impl_isReadOnlyModel_throw();
+
+ // for ui-testing try and distinguish different instances of the controls
+ auto xWindow = _rDescriptor.Control->getControlWindow();
+ if (weld::TransportAsXWindow* pTunnel = dynamic_cast<weld::TransportAsXWindow*>(xWindow.get()))
+ {
+ weld::Widget* m_pControlWindow = pTunnel->getWidget();
+ if (m_pControlWindow)
+ m_pControlWindow->set_buildable_name(m_pControlWindow->get_buildable_name() + "-" + _rDescriptor.DisplayName.toUtf8());
+ }
+
}
catch( const Exception& )
{