summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2019-03-26 15:23:28 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-04-04 15:01:48 +0200
commit5b9d543b7255eab74c401dee803bbac4a4ceef8a (patch)
tree30941fe7de4fbdb0b10b945207f6b967b602dfbc /toolkit
parent0edf02fc88a444157713874686b1c7409a13f04c (diff)
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@CIB.de> (cherry picked from commit 4abb7335529a66346a2a68a089b9c8438faa2e39) Reviewed-on: https://gerrit.libreoffice.org/70233
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 4d05caa81ff8..51f78d826a26 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -1743,6 +1743,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
@@ -1759,7 +1762,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;