[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - 2 commits - toolkit/source
Vasily Melenchuk (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 4 13:02:14 UTC 2019
toolkit/source/controls/controlmodelcontainerbase.cxx | 9 ++++++++-
toolkit/source/controls/tabpagemodel.cxx | 5 +++--
2 files changed, 11 insertions(+), 3 deletions(-)
New commits:
commit 7bb607467ff983a7d418537e06596263da733d74
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Wed Feb 6 00:41:25 2019 +0300
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Apr 4 15:02:03 2019 +0200
basic: fix for UnoControlTabPageModel get/set properties
The userformscontainers is required property to pass checks in
getter/setter, but returning true instead of actual type is
not a best idea. So let's return actually expected dummy empty
container.
Change-Id: I5cc3e5462ed82f6f2f8e5a45d9fc2d9f9ce1c76f
Reviewed-on: https://gerrit.libreoffice.org/67431
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 24e7d98219191ccdab3673ac96fa866c449cac5f)
Reviewed-on: https://gerrit.libreoffice.org/70234
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx
index dc1730ea04a7..a8b45f108331 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -86,9 +86,10 @@ Any UnoControlTabPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
break;
case BASEPROPERTY_USERFORMCONTAINEES:
{
- // We do not have here any usercontainers (yet?), but let's return something back
+ // We do not have here any usercontainers (yet?), but let's return empty container back
// so normal properties could be set without triggering UnknownPropertyException
- return makeAny(true);
+ aAny <<= uno::Reference< XNameContainer >();
+ break;
}
default:
aAny = UnoControlModel::ImplGetDefaultValue( nPropId );
commit 5b9d543b7255eab74c401dee803bbac4a4ceef8a
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 Apr 4 15:01:48 2019 +0200
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>
(cherry picked from commit 4abb7335529a66346a2a68a089b9c8438faa2e39)
Reviewed-on: https://gerrit.libreoffice.org/70233
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;
More information about the Libreoffice-commits
mailing list