summaryrefslogtreecommitdiff
path: root/framework/source/jobs/configaccess.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-03-25 17:22:13 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-03-25 17:22:13 +0000
commit4011187ff516846635d4e2c3256dca3eb8c3719f (patch)
treec065bc70b3ca137cb2afaa026aa2276ea9171068 /framework/source/jobs/configaccess.cxx
parent27973e334a0fdbc8712bdcb1c693b26717923a1e (diff)
MWS_SRX644: migrate branch mws_srx644 -> HEAD
Diffstat (limited to 'framework/source/jobs/configaccess.cxx')
-rw-r--r--framework/source/jobs/configaccess.cxx37
1 files changed, 30 insertions, 7 deletions
diff --git a/framework/source/jobs/configaccess.cxx b/framework/source/jobs/configaccess.cxx
index fbb4d8f80f0f..9cfe10186741 100644
--- a/framework/source/jobs/configaccess.cxx
+++ b/framework/source/jobs/configaccess.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configaccess.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: as $ $Date: 2002-10-11 13:41:13 $
+ * last change: $Author: hr $ $Date: 2003-03-25 18:21:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -169,6 +169,22 @@ ConfigAccess::~ConfigAccess()
//________________________________
/**
+ @short return the internal mode of this instance
+ @descr May be the outside user need any information about successfully opened
+ or closed config access point objects. He can control the internal mode to do so.
+
+ @return The internal open state of this object.
+ */
+ConfigAccess::EOpenMode ConfigAccess::getMode() const
+{
+ /* SAFE { */
+ ReadGuard aReadLock(m_aLock);
+ return m_eMode;
+ /* } SAFE */
+}
+
+//________________________________
+/**
@short open the configuration access in the specified mode
@descr We set the opened configuration access as our member. So any following method,
which needs cfg access, can use it. That prevent us against multiple open/close requests.
@@ -215,11 +231,18 @@ void ConfigAccess::open( /*IN*/ EOpenMode eMode )
lParams[0] <<= aParam;
// open it
- if (eMode==E_READONLY)
- m_xConfig = xConfigProvider->createInstanceWithArguments(SERVICENAME_CFGREADACCESS , lParams);
- else
- if (eMode==E_READWRITE)
- m_xConfig = xConfigProvider->createInstanceWithArguments(SERVICENAME_CFGUPDATEACCESS, lParams);
+ try
+ {
+ if (eMode==E_READONLY)
+ m_xConfig = xConfigProvider->createInstanceWithArguments(SERVICENAME_CFGREADACCESS , lParams);
+ else
+ if (eMode==E_READWRITE)
+ m_xConfig = xConfigProvider->createInstanceWithArguments(SERVICENAME_CFGUPDATEACCESS, lParams);
+ }
+ catch(css::uno::Exception& ex)
+ {
+ LOG_WARNING("open config ...", U2B(ex.Message))
+ }
m_eMode = E_CLOSED;
if (m_xConfig.is())