[Libreoffice-commits] .: configmgr/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Mon Feb 7 09:52:48 PST 2011


 configmgr/source/access.cxx     |   10 ++++------
 configmgr/source/rootaccess.cxx |    8 ++++++++
 configmgr/source/rootaccess.hxx |    5 +++++
 3 files changed, 17 insertions(+), 6 deletions(-)

New commits:
commit 21427f17e1f6901ac9a7148d5d8ac13e0aad958e
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Mon Feb 7 18:52:27 2011 +0100

    fdo#33994: Fixed several crashes around config UNO API

diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 0382054..7fcd7a1 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -912,11 +912,7 @@ rtl::OUString Access::getImplementationName() throw (css::uno::RuntimeException)
     OSL_ASSERT(thisIs(IS_ANY));
     osl::MutexGuard g(*lock_);
     checkLocalizedPropertyAccess();
-    throw css::uno::RuntimeException(
-        rtl::OUString(
-            RTL_CONSTASCII_USTRINGPARAM(
-                "configmgr Access has no service implementation name")),
-        static_cast< cppu::OWeakObject * >(this));
+    return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "configmgr.Access" ) );
 }
 
 sal_Bool Access::supportsService(rtl::OUString const & ServiceName)
@@ -2095,7 +2091,9 @@ css::beans::Property Access::asProperty() {
     default:
         type = cppu::UnoType< css::uno::XInterface >::get(); //TODO: correct?
         nillable = false;
-        removable = getParentNode()->kind() == Node::KIND_SET;
+        removable = false;
+        if ( getParentNode() != NULL )
+            removable = getParentNode()->kind() == Node::KIND_SET;
         break;
     }
     return css::beans::Property(
diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx
index 27f3884..ef5982e 100644
--- a/configmgr/source/rootaccess.cxx
+++ b/configmgr/source/rootaccess.cxx
@@ -327,6 +327,14 @@ css::util::ChangesSet RootAccess::getPendingChanges()
     return changes.getAsConstList();
 }
 
+rtl::OUString RootAccess::getImplementationName() throw (css::uno::RuntimeException)
+{
+    OSL_ASSERT(thisIs(IS_ANY));
+    osl::MutexGuard g(*lock_);
+    checkLocalizedPropertyAccess();
+    return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "configmgr.RootAccess" ) );
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/rootaccess.hxx b/configmgr/source/rootaccess.hxx
index 4d74167..c175121 100644
--- a/configmgr/source/rootaccess.hxx
+++ b/configmgr/source/rootaccess.hxx
@@ -86,6 +86,11 @@ public:
 
     bool isUpdate() const;
 
+protected:
+
+    virtual rtl::OUString SAL_CALL getImplementationName()
+        throw (com::sun::star::uno::RuntimeException);
+
 private:
     virtual ~RootAccess();
 


More information about the Libreoffice-commits mailing list