summaryrefslogtreecommitdiff
path: root/unotools/source/config/configitem.cxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-10-16 00:05:16 +0200
committerMathias Bauer <mba@openoffice.org>2009-10-16 00:05:16 +0200
commitad482351a6c12cddb06575f6a9a00ec1b72d92fb (patch)
treee97f35e966aef21423e70f325a66943664ed62a9 /unotools/source/config/configitem.cxx
parent9a4d0581c72653e60562d1b8e2121772d21f8a9e (diff)
#i103496#: split svtools; improve ConfitItems
Diffstat (limited to 'unotools/source/config/configitem.cxx')
-rw-r--r--unotools/source/config/configitem.cxx25
1 files changed, 10 insertions, 15 deletions
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index ad83b9b79cae..3d70f99f4ec0 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -83,6 +83,13 @@ catch(Exception& rEx) \
#define CATCH_INFO(a) catch(Exception& ){}
#endif
+/*
+ The ConfigChangeListener_Impl receives notifications from the configuration about changes that
+ have happened. It forwards this notification to the ConfigItem it knows a pParent by calling its
+ "CallNotify" method. As ConfigItems are most probably not thread safe, the SolarMutex is acquired
+ before doing so.
+*/
+
namespace utl{
class ConfigChangeListener_Impl : public cppu::WeakImplHelper1
<
@@ -280,13 +287,6 @@ ConfigItem::~ConfigItem()
/* -----------------------------29.08.00 12:52--------------------------------
---------------------------------------------------------------------------*/
-void ConfigItem::Commit()
-{
- OSL_ENSURE(sal_False, "Base class called");
-}
-/* -----------------------------29.08.00 12:52--------------------------------
-
- ---------------------------------------------------------------------------*/
void ConfigItem::ReleaseConfigMgr()
{
Reference<XHierarchicalNameAccess> xHierarchyAccess = GetTree();
@@ -308,18 +308,13 @@ void ConfigItem::ReleaseConfigMgr()
---------------------------------------------------------------------------*/
void ConfigItem::CallNotify( const com::sun::star::uno::Sequence<OUString>& rPropertyNames )
{
+ // the call is forwarded to the virtual Notify() method
+ // it is pure virtual, so all classes deriving from ConfigItem have to decide how they
+ // want to notify listeners
if(!IsInValueChange() || pImpl->bEnableInternalNotification)
Notify(rPropertyNames);
- NotifyListeners();
}
-/* -----------------------------29.08.00 12:52--------------------------------
-
- ---------------------------------------------------------------------------*/
-void ConfigItem::Notify( const com::sun::star::uno::Sequence<OUString>& /*rPropertyNames*/)
-{
- OSL_ENSURE(sal_False, "Base class called");
-}
/* -----------------------------12.12.00 17:09--------------------------------
---------------------------------------------------------------------------*/