summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-08-20 11:55:36 +0000
committerRüdiger Timm <rt@openoffice.org>2004-08-20 11:55:36 +0000
commit1e2e88ee0d0f674620f191858e452ac846664634 (patch)
treefbab31249632941f19c1000fba843ae273244f0f /configmgr
parent328dd0685cc96a2ed64d163f443a3a6cf412b615 (diff)
INTEGRATION: CWS cfgruggedised (1.10.6); FILE MERGED
2004/07/23 13:30:52 jb 1.10.6.1: #i28654#,#i29838# Add InteractionHandler support to configuration
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/localbe/localfilelayer.cxx64
1 files changed, 62 insertions, 2 deletions
diff --git a/configmgr/source/localbe/localfilelayer.cxx b/configmgr/source/localbe/localfilelayer.cxx
index 568f084d8852..c2e23812859d 100644
--- a/configmgr/source/localbe/localfilelayer.cxx
+++ b/configmgr/source/localbe/localfilelayer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: localfilelayer.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: obo $ $Date: 2004-07-05 13:23:19 $
+ * last change: $Author: rt $ $Date: 2004-08-20 12:55:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -84,6 +84,9 @@
#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_BACKENDACCESSEXCEPTION_HPP_
#include <com/sun/star/configuration/backend/BackendAccessException.hpp>
#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
namespace configmgr { namespace localbe {
@@ -600,6 +603,63 @@ uno::Reference<backend::XUpdatableLayer> createUpdatableLocalFileLayer(
return xResult;
}
//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+
+enum
+{
+ LAYER_PROPERTY_URL = 1
+};
+
+#define PROPNAME( name ) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( name ) )
+#define PROPTYPE( type ) getCppuType( static_cast< type const *>( 0 ) )
+
+// cppu::OPropertySetHelper
+cppu::IPropertyArrayHelper * SAL_CALL LayerPropertyHelper::newInfoHelper()
+{
+ using com::sun::star::beans::Property;
+ using namespace com::sun::star::beans::PropertyAttribute;
+
+ Property properties[] =
+ {
+ Property(PROPNAME("URL"), LAYER_PROPERTY_URL, PROPTYPE(rtl::OUString), READONLY)
+ };
+
+ return new cppu::OPropertyArrayHelper(properties, sizeof(properties)/sizeof(properties[0]));
+}
+
+#define MESSAGE( text ) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ERROR: Layer Properties: " text ) )
+
+void SAL_CALL LayerPropertyHelper::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const uno::Any& /*rValue*/ )
+ throw (uno::Exception)
+{
+ namespace beans = com::sun::star::beans;
+
+ switch (nHandle)
+ {
+ case LAYER_PROPERTY_URL:
+ OSL_ENSURE(false, "Error: trying to set a READONLY property");
+ throw beans::PropertyVetoException(MESSAGE("Property 'URL' is read-only"),*this);
+
+ default:
+ OSL_ENSURE(false, "Error: trying to set an UNKNOWN property");
+ throw beans::UnknownPropertyException(MESSAGE("Trying to set an unknown property"),*this);
+ }
+}
+void SAL_CALL LayerPropertyHelper::getFastPropertyValue( uno::Any& rValue, sal_Int32 nHandle ) const
+{
+ switch (nHandle)
+ {
+ case LAYER_PROPERTY_URL:
+ rValue = uno::makeAny( this->getLayerUrl() );
+ break;
+
+ default:
+ OSL_ENSURE(false, "Error: trying to get an UNKNOWN property");
+ break;
+ }
+}
+
+//------------------------------------------------------------------------------
} } // configmgr.localbe