[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - toolkit/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 6 10:24:45 UTC 2019


 toolkit/source/controls/tabpagemodel.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 954c23f3393fc1d6e06687db8718f072723c8355
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Wed Jan 23 15:11:38 2019 +0300
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Feb 6 11:24:19 2019 +0100

    tdf#87884: basic: fix for UnknownPropertyException
    
    UnoControlTabPageModel had no USERFOMRCONTAINERS property
    and this was causing an exception during any attempt to set
    its properties.
    
    Change-Id: Icc432d7a431ecd861ac4f00a96ec75165bec168c
    Reviewed-on: https://gerrit.libreoffice.org/66801
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 3deab788199395712b7d4641be5b11623b2ed964)
    Reviewed-on: https://gerrit.libreoffice.org/67399
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx
index ade7374176f8..dc1730ea04a7 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -54,6 +54,7 @@ UnoControlTabPageModel::UnoControlTabPageModel( Reference< XComponentContext > c
     ImplRegisterProperty( BASEPROPERTY_TITLE );
     ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
     ImplRegisterProperty( BASEPROPERTY_HELPURL );
+    ImplRegisterProperty( BASEPROPERTY_USERFORMCONTAINEES );
 }
 
 OUString SAL_CALL UnoControlTabPageModel::getImplementationName()
@@ -83,6 +84,12 @@ Any UnoControlTabPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
         case BASEPROPERTY_DEFAULTCONTROL:
             aAny <<= OUString("com.sun.star.awt.tab.UnoControlTabPage");
             break;
+        case BASEPROPERTY_USERFORMCONTAINEES:
+        {
+            // We do not have here any usercontainers (yet?), but let's return something back
+            // so normal properties could be set without triggering UnknownPropertyException
+            return makeAny(true);
+        }
         default:
             aAny = UnoControlModel::ImplGetDefaultValue( nPropId );
     }


More information about the Libreoffice-commits mailing list