[Libreoffice-commits] core.git: toolkit/source
Vasily Melenchuk (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 28 10:52:43 UTC 2019
toolkit/source/controls/controlmodelcontainerbase.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 4abb7335529a66346a2a68a089b9c8438faa2e39
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Tue Mar 26 15:23:28 2019 +0300
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Mar 28 11:52:16 2019 +0100
tdf#124385: toolkit: do not fail if ResourceListener is not defined
If current control (for example TabPageContainer) is missing
resource listener property we should not fail script with
exception. Just behave as with empty ResourceListener.
Change-Id: I260feec775a5d197bebc9414b652dd6f89e35035
Reviewed-on: https://gerrit.libreoffice.org/69740
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index a7721a72146a..10da911540e2 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -1741,6 +1741,9 @@ void ControlContainerBase::ImplStartListingForResourceEvents()
{
Reference< resource::XStringResourceResolver > xStringResourceResolver;
+ if ( !ImplHasProperty(PROPERTY_RESOURCERESOLVER) )
+ return;
+
ImplGetPropertyValue( PROPERTY_RESOURCERESOLVER ) >>= xStringResourceResolver;
// Add our helper as listener to retrieve notifications about changes
@@ -1757,7 +1760,11 @@ void ControlContainerBase::ImplUpdateResourceResolver()
{
Reference< resource::XStringResourceResolver > xStringResourceResolver;
- ImplGetPropertyValue( PROPERTY_RESOURCERESOLVER ) >>= xStringResourceResolver;
+ if ( !ImplHasProperty(PROPERTY_RESOURCERESOLVER) )
+ return;
+
+ ImplGetPropertyValue(PROPERTY_RESOURCERESOLVER) >>= xStringResourceResolver;
+
if ( !xStringResourceResolver.is() )
return;
More information about the Libreoffice-commits
mailing list