[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - basctl/source

Julien Nabet serval2412 at yahoo.fr
Tue Jul 22 07:29:06 PDT 2014


 basctl/source/basicide/localizationmgr.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e712c229f02e62641856ef5dddbf3c6a38dbf5af
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Jul 21 19:26:58 2014 +0200

    Resolves fdo#80906: Delete any control on Dialog editing window crashes LO
    
    Quick fix for this bt:
    3  0x00002aaaab2935d2 in __GI___assert_fail (assertion=0x2aaae1f2806a "_pInterface != 0",
        file=0x2aaae1f28018 "/home/julien/compile-libreoffice/libreoffice/include/com/sun/star/uno/Reference.h", line=402,
        function=0x2aaae1f28480 <com::sun::star::uno::Reference<com::sun::star::resource::XStringResourceManager>::operator->() const::__PRETTY_FUNCTION__> "interface_type* com::sun::star::uno::Reference< <template-parameter-1-1> >::operator->() const [with interface_type = com::sun::star::resource::XStringResourceManager]") at assert.c:101
    4  0x00002aaae1e2963b in com::sun::star::uno::Reference<com::sun::star::resource::XStringResourceManager>::operator-> (this=0x7fffffff2d00)
        at /home/julien/compile-libreoffice/libreoffice/include/com/sun/star/uno/Reference.h:402
    5  0x00002aaae1eb5c87 in basctl::LocalizationMgr::implHandleControlResourceProperties (aControlAny=
        uno::Any {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x8935ea8}, <No data fields>}, aDialogName="Dialog1", aCtrlName="TextField1",
        xStringResourceManager=empty uno::Reference, xSourceStringResolver=empty uno::Reference, eMode=basctl::LocalizationMgr::REMOVE_IDS_FROM_RESOURCE)
        at /home/julien/compile-libreoffice/libreoffice/basctl/source/basicide/localizationmgr.cxx:202
    6  0x00002aaae1eb92a0 in basctl::LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject (pEditor=0x919d820, aControlAny=
        uno::Any {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x8935ea8}, <No data fields>}, aCtrlName="TextField1")
        at /home/julien/compile-libreoffice/libreoffice/basctl/source/basicide/localizationmgr.cxx:896
    Indeed, LocalizationMgr::setControlResourceIDsForNewEditorObject just returns if !xStringResourceManager.is()
    So let's do the same when trying to delete ControlResources
    See http://opengrok.libreoffice.org/xref/core/basctl/source/basicide/localizationmgr.cxx#835
    
    Cherry-picked from e1840cf944b36b7ead5800a036870e38f4ddb049
    
    Change-Id: I4be49503cd2464f97a25840dfdc29877e5fb2b93
    Reviewed-on: https://gerrit.libreoffice.org/10448
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index c34ac55..53e268b 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -199,7 +199,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
 
     Reference< XPropertySet > xPropertySet;
     aControlAny >>= xPropertySet;
-    if( xPropertySet.is() )
+    if( xPropertySet.is() && xStringResourceManager.is())
     {
         Sequence< Locale > aLocaleSeq = xStringResourceManager->getLocales();
         sal_Int32 nLocaleCount = aLocaleSeq.getLength();


More information about the Libreoffice-commits mailing list