summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2004-12-23 08:42:13 +0000
committerVladimir Glazounov <vg@openoffice.org>2004-12-23 08:42:13 +0000
commit07b784f25214bb1628a6c0587234eb1b68089f29 (patch)
tree714159f58271a61a50671709736b690676349875 /ucb
parent9fa8ea7db7ebb772893e7ef3e8776aa5c7a3c1ff (diff)
INTEGRATION: CWS kso12 (1.14.26); FILE MERGED
2004/12/02 08:43:39 kso 1.14.26.1: #i37781# - Improved commandinfo handling for non-existing resources
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav/webdavcontentcaps.cxx52
1 files changed, 48 insertions, 4 deletions
diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx
index 45d0dd8cd01a..185cb06924c0 100644
--- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx
+++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: webdavcontentcaps.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: rt $ $Date: 2004-09-08 17:06:47 $
+ * last change: $Author: vg $ $Date: 2004-12-23 09:42:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -58,7 +58,6 @@
*
*
************************************************************************/
-
/**************************************************************************
TODO
**************************************************************************
@@ -587,7 +586,52 @@ uno::Sequence< com::sun::star::ucb::CommandInfo > Content::getCommands(
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- if ( isFolder( xEnv ) )
+ sal_Bool bFolder = sal_False;
+
+ try
+ {
+ bFolder = isFolder( xEnv );
+ }
+ catch ( uno::Exception const & )
+ {
+ static com::sun::star::ucb::CommandInfo aDefaultCommandInfoTable[] =
+ {
+ ///////////////////////////////////////////////////////////////
+ // Just mandatory commands avail.
+ ///////////////////////////////////////////////////////////////
+
+ com::sun::star::ucb::CommandInfo(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ),
+ -1,
+ getCppuVoidType()
+ ),
+ com::sun::star::ucb::CommandInfo(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ),
+ -1,
+ getCppuVoidType()
+ ),
+ com::sun::star::ucb::CommandInfo(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ),
+ -1,
+ getCppuType( static_cast<
+ uno::Sequence< beans::Property > * >( 0 ) )
+ ),
+ com::sun::star::ucb::CommandInfo(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ),
+ -1,
+ getCppuType( static_cast<
+ uno::Sequence< beans::PropertyValue > * >( 0 ) )
+ )
+ };
+ return uno::Sequence< com::sun::star::ucb::CommandInfo >(
+ aDefaultCommandInfoTable, 4 );
+ }
+
+ if ( bFolder )
{
//=================================================================
//