[Libreoffice-commits] core.git: extensions/source
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 24 14:42:48 UTC 2021
extensions/source/propctrlr/formcomponenthandler.cxx | 10 ----------
extensions/source/propctrlr/propcontroller.cxx | 10 ++++++++++
2 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 8c2251481a10dc26c969c72e7a5b7cc910996441
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Feb 24 12:22:19 2021 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Feb 24 15:42:07 2021 +0100
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 at libreoffice.org>
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& )
{
More information about the Libreoffice-commits
mailing list