[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 13 commits - extensions/source filter/source odk/docs offapi/com offapi/type_reference ucb/source vcl/source
Ariel Constenla-Haile
arielch at apache.org
Sun Mar 24 17:55:11 PDT 2013
extensions/source/update/feed/updatefeed.cxx | 60
filter/source/pdf/impdialog.cxx | 49
filter/source/pdf/impdialog.src | 2
odk/docs/common/ref/idl.css | 13
offapi/com/sun/star/ucb/Content.idl | 1378 ++++++++++--------
offapi/com/sun/star/ucb/PropertyCommandArgument.idl | 47
offapi/com/sun/star/ucb/WebDAVHTTPMethod.idl | 118 +
offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl | 32
offapi/com/sun/star/ucb/makefile.mk | 22
offapi/type_reference/typelibrary_history.txt | 10
offapi/type_reference/types.rdb |binary
ucb/source/ucp/webdav/AprEnv.cxx | 2
ucb/source/ucp/webdav/DAVProperties.cxx | 40
ucb/source/ucp/webdav/DAVProperties.hxx | 2
ucb/source/ucp/webdav/DAVRequestEnvironment.hxx | 2
ucb/source/ucp/webdav/DAVResource.hxx | 4
ucb/source/ucp/webdav/DAVResourceAccess.cxx | 132 +
ucb/source/ucp/webdav/DAVResourceAccess.hxx | 11
ucb/source/ucp/webdav/SerfCallbacks.cxx | 6
ucb/source/ucp/webdav/SerfCopyReqProcImpl.cxx | 2
ucb/source/ucp/webdav/SerfCopyReqProcImpl.hxx | 2
ucb/source/ucp/webdav/SerfDeleteReqProcImpl.cxx | 2
ucb/source/ucp/webdav/SerfDeleteReqProcImpl.hxx | 2
ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx | 2
ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx | 6
ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx | 2
ucb/source/ucp/webdav/SerfHeadReqProcImpl.hxx | 6
ucb/source/ucp/webdav/SerfLockStore.cxx | 6
ucb/source/ucp/webdav/SerfLockStore.hxx | 4
ucb/source/ucp/webdav/SerfMkColReqProcImpl.cxx | 2
ucb/source/ucp/webdav/SerfMkColReqProcImpl.hxx | 2
ucb/source/ucp/webdav/SerfMoveReqProcImpl.cxx | 2
ucb/source/ucp/webdav/SerfMoveReqProcImpl.hxx | 2
ucb/source/ucp/webdav/SerfPostReqProcImpl.cxx | 2
ucb/source/ucp/webdav/SerfPostReqProcImpl.hxx | 4
ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx | 46
ucb/source/ucp/webdav/SerfPropFindReqProcImpl.hxx | 4
ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx | 81 -
ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.hxx | 4
ucb/source/ucp/webdav/SerfPutReqProcImpl.cxx | 7
ucb/source/ucp/webdav/SerfPutReqProcImpl.hxx | 2
ucb/source/ucp/webdav/SerfRequestProcessor.cxx | 10
ucb/source/ucp/webdav/SerfRequestProcessor.hxx | 8
ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx | 17
ucb/source/ucp/webdav/SerfRequestProcessorImpl.hxx | 2
ucb/source/ucp/webdav/SerfRequestProcessorImplFac.cxx | 22
ucb/source/ucp/webdav/SerfRequestProcessorImplFac.hxx | 4
ucb/source/ucp/webdav/SerfSession.cxx | 16
ucb/source/ucp/webdav/SerfSession.hxx | 6
ucb/source/ucp/webdav/SerfUri.cxx | 2
ucb/source/ucp/webdav/SerfUri.hxx | 2
ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx | 2
ucb/source/ucp/webdav/makefile.mk | 9
ucb/source/ucp/webdav/webdavcontent.cxx | 381 ++++
ucb/source/ucp/webdav/webdavcontent.hxx | 16
ucb/source/ucp/webdav/webdavcontentcaps.cxx | 15
ucb/source/ucp/webdav/webdavprovider.cxx | 78 +
ucb/source/ucp/webdav/webdavresponseparser.cxx | 2
ucb/source/ucp/webdav/webdavresponseparser.hxx | 2
ucb/source/ucp/webdav/webdavuseragent.hxx | 38
vcl/source/gdi/pdfwriter_impl.cxx | 1
61 files changed, 1858 insertions(+), 897 deletions(-)
New commits:
commit 122e10cfd23b379b97e2d8ec002e7f0562ebd6f7
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Mar 24 12:23:39 2013 +0000
i121946 - Use enums to identify WebDAV/HTTP methods
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index 67c5e9b..06b8d3d 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -179,7 +179,7 @@ public:
// XWebDAVCommandEnvironment
virtual uno::Sequence< beans::StringPair > SAL_CALL getUserRequestHeaders(
- const rtl::OUString&, const rtl::OUString& )
+ const rtl::OUString&, ucb::WebDAVHTTPMethod )
throw ( uno::RuntimeException ) { return m_aRequestHeaderList; };
// XServiceInfo
diff --git a/offapi/com/sun/star/ucb/WebDAVHTTPMethod.idl b/offapi/com/sun/star/ucb/WebDAVHTTPMethod.idl
new file mode 100644
index 0000000..876a4ff
--- /dev/null
+++ b/offapi/com/sun/star/ucb/WebDAVHTTPMethod.idl
@@ -0,0 +1,118 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_ucb_WebDAVHTTPMethod_idl__
+#define __com_sun_star_ucb_WebDAVHTTPMethod_idl__
+
+module com { module sun { module star { module ucb {
+
+
+/** Standard WebDAV/HTTP methods.
+
+ @since Apache OpenOffice 4.0
+*/
+enum WebDAVHTTPMethod
+{
+ /** HTTP request method as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc2616#section-9.3">RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1</a>
+ */
+ GET,
+
+ /** HTTP request method as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc2616#section-9.4">RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1</a>
+ */
+ HEAD,
+
+ /** HTTP request method as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc2616#section-9.5">RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1</a>
+ */
+ POST,
+
+ /** HTTP request method as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc2616#section-9.6">RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1</a>
+ */
+ PUT,
+
+ /** HTTP request method as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc2616#section-9.7">RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1</a>
+ */
+ DELETE,
+
+ /** HTTP request method as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc2616#section-9.8">RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1</a>
+ */
+ TRACE,
+
+ /** HTTP request method as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc2616#section-9.2">RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1</a>
+ */
+ OPTIONS,
+
+ /** HTTP request method as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc2616#section-9.9">RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1</a>
+ */
+ CONNECT,
+
+ /** HTTP request method as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc5789">RFC 5789: PATCH Method for HTTP</a>
+ */
+ PATCH,
+
+ /** WebDAV methods as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc4918#section-9.1">HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</a>
+ */
+ PROPFIND,
+
+ /** WebDAV methods as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc4918#section-9.2">HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</a>
+ */
+ PROPPATCH,
+
+ /** WebDAV methods as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc4918#section-9.3">HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</a>
+ */
+ MKCOL,
+
+ /** WebDAV methods as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc4918#section-9.8">HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</a>
+ */
+ COPY,
+
+ /** WebDAV methods as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc4918#section-9.9">HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</a>
+ */
+ MOVE,
+
+ /** WebDAV methods as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc4918#section-9.10">HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</a>
+ */
+ LOCK,
+
+ /** WebDAV methods as defined in
+ <a target="_blank" href="http://tools.ietf.org/html/rfc4918#section-9.11">HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</a>
+ */
+ UNLOCK
+
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl b/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl
index 4e71a34..23fcda9 100644
--- a/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl
+++ b/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl
@@ -23,6 +23,7 @@
#define __com_sun_star_ucb_XWebDAVCommandEnvironment_idl__
#include <com/sun/star/ucb/XCommandEnvironment.idl>
+#include <com/sun/star/ucb/WebDAVHTTPMethod.idl>
#include <com/sun/star/beans/StringPair.idl>
module com { module sun { module star { module ucb {
@@ -30,7 +31,7 @@ module com { module sun { module star { module ucb {
/** A command environment that can be used to deal with WebDAV/HTTP specific
commands.
*/
-published interface XWebDAVCommandEnvironment : XCommandEnvironment
+interface XWebDAVCommandEnvironment : XCommandEnvironment
{
/** This method gets called while assembling an WebDAV/HTTP request.
The returned headername-headervalue pairs will be appended to
@@ -40,15 +41,16 @@ published interface XWebDAVCommandEnvironment : XCommandEnvironment
The request URI.
@param aMethod
- The WebDAV/HTTP method ("GET","PUT","MKCOL",...).
+ The WebDAV/HTTP method ("GET","PUT","MKCOL",...) as defined in
+ <type>WebDAVHTTPMethod</type>.
@return
A sequence of header name, header value pairs. The header
names must be the plain names and contain no trailing ":".
*/
sequence<com::sun::star::beans::StringPair> getUserRequestHeaders(
- [in] string aURI,
- [in] string aMethod);
+ [in] string aURI,
+ [in] WebDAVHTTPMethod eMethod);
};
}; }; }; };
diff --git a/offapi/com/sun/star/ucb/makefile.mk b/offapi/com/sun/star/ucb/makefile.mk
index 36338bd..26c67d2 100644
--- a/offapi/com/sun/star/ucb/makefile.mk
+++ b/offapi/com/sun/star/ucb/makefile.mk
@@ -205,6 +205,7 @@ IDLFILES=\
WebDAVContentProvider.idl\
WebDAVDocumentContent.idl\
WebDAVFolderContent.idl\
+ WebDAVHTTPMethod.idl \
WelcomeDynamicResultSetStruct.idl\
XAnyCompare.idl\
XAnyCompareFactory.idl\
diff --git a/offapi/type_reference/typelibrary_history.txt b/offapi/type_reference/typelibrary_history.txt
index 38c148b..a42bf6c5 100644
--- a/offapi/type_reference/typelibrary_history.txt
+++ b/offapi/type_reference/typelibrary_history.txt
@@ -206,3 +206,5 @@
css::ucb::XWebDAVCommandEnvironment::getUserRequestHeaders() should return a
sequence of css::beans::StringPair
+23/03/2013 (arielch): TaskID=121946
+ css::ucb::XWebDAVCommandEnvironment: use enums to identify WebDAV/HTTP methods
diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb
index 3eae5c6..e566943 100644
Binary files a/offapi/type_reference/types.rdb and b/offapi/type_reference/types.rdb differ
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
index 01a4d0f..53bbba4 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
@@ -193,8 +193,7 @@ void DAVResourceAccess::PROPFIND(
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii(
- "PROPFIND" ),
+ ucb::WebDAVHTTPMethod_PROPFIND,
aHeaders );
m_xSession->PROPFIND( getRequestURI(),
@@ -236,8 +235,7 @@ void DAVResourceAccess::PROPFIND(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii(
- "PROPFIND" ),
+ ucb::WebDAVHTTPMethod_PROPFIND,
aHeaders );
m_xSession->PROPFIND( getRequestURI(),
@@ -277,8 +275,7 @@ void DAVResourceAccess::PROPPATCH(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii(
- "PROPPATCH" ),
+ ucb::WebDAVHTTPMethod_PROPPATCH,
aHeaders );
m_xSession->PROPPATCH( getRequestURI(),
@@ -318,7 +315,7 @@ void DAVResourceAccess::HEAD(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "HEAD" ),
+ ucb::WebDAVHTTPMethod_HEAD,
aHeaders );
m_xSession->HEAD( getRequestURI(),
@@ -358,7 +355,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "GET" ),
+ ucb::WebDAVHTTPMethod_GET,
aHeaders );
xStream = m_xSession->GET( getRequestURI(),
@@ -399,7 +396,7 @@ void DAVResourceAccess::GET(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "GET" ),
+ ucb::WebDAVHTTPMethod_GET,
aHeaders );
m_xSession->GET( getRequestURI(),
@@ -440,7 +437,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "GET" ),
+ ucb::WebDAVHTTPMethod_GET,
aHeaders );
xStream = m_xSession->GET( getRequestURI(),
@@ -485,7 +482,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET(
{
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "GET" ),
+ ucb::WebDAVHTTPMethod_GET,
rRequestHeaders );
xStream = m_xSession->GET( getRequestURI(),
@@ -530,7 +527,7 @@ void DAVResourceAccess::GET(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "GET" ),
+ ucb::WebDAVHTTPMethod_GET,
aHeaders );
m_xSession->GET( getRequestURI(),
@@ -617,7 +614,7 @@ void DAVResourceAccess::PUT(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "PUT" ),
+ ucb::WebDAVHTTPMethod_PUT,
aHeaders );
m_xSession->PUT( getRequestURI(),
@@ -669,7 +666,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::POST(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "POST" ),
+ ucb::WebDAVHTTPMethod_POST,
aHeaders );
xStream = m_xSession->POST( getRequestURI(),
@@ -732,7 +729,7 @@ void DAVResourceAccess::POST(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "POST" ),
+ ucb::WebDAVHTTPMethod_POST,
aHeaders );
m_xSession->POST( getRequestURI(),
@@ -780,7 +777,7 @@ void DAVResourceAccess::MKCOL(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "MKCOL" ),
+ ucb::WebDAVHTTPMethod_MKCOL,
aHeaders );
m_xSession->MKCOL( getRequestURI(),
@@ -820,7 +817,7 @@ void DAVResourceAccess::COPY(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "COPY" ),
+ ucb::WebDAVHTTPMethod_COPY,
aHeaders );
m_xSession->COPY( rSourcePath,
@@ -862,7 +859,7 @@ void DAVResourceAccess::MOVE(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "MOVE" ),
+ ucb::WebDAVHTTPMethod_MOVE,
aHeaders );
m_xSession->MOVE( rSourcePath,
@@ -901,8 +898,7 @@ void DAVResourceAccess::DESTROY(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii(
- "DESTROY" ),
+ ucb::WebDAVHTTPMethod_DELETE,
aHeaders );
m_xSession->DESTROY( getRequestURI(),
@@ -941,7 +937,7 @@ void DAVResourceAccess::LOCK(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "LOCK" ),
+ ucb::WebDAVHTTPMethod_LOCK,
aHeaders );
m_xSession->LOCK( getRequestURI(),
@@ -983,7 +979,7 @@ sal_Int64 DAVResourceAccess::LOCK(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "LOCK" ),
+ ucb::WebDAVHTTPMethod_LOCK,
aHeaders );
nNewTimeout = m_xSession->LOCK( getRequestURI(),
@@ -1025,7 +1021,7 @@ void DAVResourceAccess::UNLOCK(
DAVRequestHeaders aHeaders;
getUserRequestHeaders( xEnv,
getRequestURI(),
- rtl::OUString::createFromAscii( "UNLOCK" ),
+ ucb::WebDAVHTTPMethod_UNLOCK,
aHeaders );
m_xSession->UNLOCK( getRequestURI(),
@@ -1114,7 +1110,7 @@ const rtl::OUString & DAVResourceAccess::getRequestURI() const
void DAVResourceAccess::getUserRequestHeaders(
const uno::Reference< ucb::XCommandEnvironment > & xEnv,
const rtl::OUString & rURI,
- const rtl::OUString & rMethod,
+ ucb::WebDAVHTTPMethod eMethod,
DAVRequestHeaders & rRequestHeaders )
{
if ( !xEnv.is() )
@@ -1127,7 +1123,7 @@ void DAVResourceAccess::getUserRequestHeaders(
return;
uno::Sequence< beans::StringPair > aRequestHeaders
- = xDAVEnv->getUserRequestHeaders( rURI, rMethod );
+ = xDAVEnv->getUserRequestHeaders( rURI, eMethod );
for ( sal_Int32 n = 0; n < aRequestHeaders.getLength(); ++n )
{
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.hxx b/ucb/source/ucp/webdav/DAVResourceAccess.hxx
index f45cb44..11b2207 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.hxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.hxx
@@ -32,6 +32,7 @@
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/ucb/Lock.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/ucb/WebDAVHTTPMethod.hpp>
#include "DAVAuthListener.hxx"
#include "DAVException.hxx"
#include "DAVSession.hxx"
@@ -229,7 +230,7 @@ public:
const com::sun::star::uno::Reference<
com::sun::star::ucb::XCommandEnvironment > & xEnv,
const rtl::OUString & rURI,
- const rtl::OUString & rMethod,
+ com::sun::star::ucb::WebDAVHTTPMethod eMethod,
DAVRequestHeaders & rRequestHeaders );
private:
commit 80199136d0d84b51b3d0529fb313b8f20f5cf851
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Mar 24 12:22:48 2013 +0000
i121945 - WebDAV ucp: return StringPair instead of NamedValue
Make css::ucb::XWebDAVCommandEnvironment::getUserRequestHeaders() return
a sequence of css::beans::StringPair; this avoids all the any overhead,
and is much more simple and intuitive.
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index 3edd422..67c5e9b 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -178,7 +178,7 @@ public:
throw ( uno::RuntimeException ) { return uno::Reference< ucb::XProgressHandler >(); };
// XWebDAVCommandEnvironment
- virtual uno::Sequence< beans::NamedValue > SAL_CALL getUserRequestHeaders(
+ virtual uno::Sequence< beans::StringPair > SAL_CALL getUserRequestHeaders(
const rtl::OUString&, const rtl::OUString& )
throw ( uno::RuntimeException ) { return m_aRequestHeaderList; };
@@ -193,7 +193,7 @@ public:
protected:
virtual ~UpdateInformationProvider();
- static uno::Any getConfigurationItem(uno::Reference<lang::XMultiServiceFactory> const & configurationProvider, rtl::OUString const & node, rtl::OUString const & item);
+ static rtl::OUString getConfigurationItem(uno::Reference<lang::XMultiServiceFactory> const & configurationProvider, rtl::OUString const & node, rtl::OUString const & item);
private:
uno::Reference< io::XInputStream > load(const rtl::OUString& rURL);
@@ -214,7 +214,7 @@ private:
const uno::Reference< xml::dom::XDocumentBuilder > m_xDocumentBuilder;
const uno::Reference< xml::xpath::XXPathAPI > m_xXPathAPI;
- uno::Sequence< beans::NamedValue > m_aRequestHeaderList;
+ uno::Sequence< beans::StringPair > m_aRequestHeaderList;
uno::Reference< ucb::XCommandProcessor > m_xCommandProcessor;
uno::Reference< task::XInteractionHandler > m_xInteractionHandler;
@@ -344,19 +344,17 @@ UpdateInformationProvider::UpdateInformationProvider(
uno::UNO_QUERY_THROW);
rtl::OUStringBuffer buf;
- rtl::OUString name;
- getConfigurationItem(
- xConfigurationProvider,
- UNISTRING("org.openoffice.Setup/Product"),
- UNISTRING("ooName")) >>= name;
- buf.append(name);
+ buf.append(
+ getConfigurationItem(
+ xConfigurationProvider,
+ UNISTRING("org.openoffice.Setup/Product"),
+ UNISTRING("ooName")));
buf.append(sal_Unicode(' '));
- rtl::OUString version;
- getConfigurationItem(
- xConfigurationProvider,
- UNISTRING("org.openoffice.Setup/Product"),
- UNISTRING("ooSetupVersion")) >>= version;
- buf.append(version);
+ buf.append(
+ getConfigurationItem(
+ xConfigurationProvider,
+ UNISTRING("org.openoffice.Setup/Product"),
+ UNISTRING("ooSetupVersion")));
rtl::OUString edition(
UNISTRING(
"${${BRAND_BASE_DIR}/program/edition/edition.ini:"
@@ -366,11 +364,11 @@ UpdateInformationProvider::UpdateInformationProvider(
buf.append(sal_Unicode(' '));
buf.append(edition);
}
- rtl::OUString extension;
- getConfigurationItem(
- xConfigurationProvider,
- UNISTRING("org.openoffice.Setup/Product"),
- UNISTRING("ooSetupExtension")) >>= extension;
+ rtl::OUString extension(
+ getConfigurationItem(
+ xConfigurationProvider,
+ UNISTRING("org.openoffice.Setup/Product"),
+ UNISTRING("ooSetupExtension")));
if (extension.getLength() != 0) {
buf.append(sal_Unicode(' '));
buf.append(extension);
@@ -404,13 +402,13 @@ UpdateInformationProvider::UpdateInformationProvider(
i += product.getLength();
}
- m_aRequestHeaderList[0].Name = UNISTRING("Accept-Language");
- m_aRequestHeaderList[0].Value = getConfigurationItem( xConfigurationProvider, UNISTRING("org.openoffice.Setup/L10N"), UNISTRING("ooLocale") );
+ m_aRequestHeaderList[0].First = UNISTRING("Accept-Language");
+ m_aRequestHeaderList[0].Second = getConfigurationItem( xConfigurationProvider, UNISTRING("org.openoffice.Setup/L10N"), UNISTRING("ooLocale") );
if( aUserAgent.getLength() > 0 )
{
m_aRequestHeaderList.realloc(2);
- m_aRequestHeaderList[1].Name = UNISTRING("User-Agent");
- m_aRequestHeaderList[1].Value = uno::makeAny(aUserAgent);
+ m_aRequestHeaderList[1].First = UNISTRING("User-Agent");
+ m_aRequestHeaderList[1].Second = aUserAgent;
}
}
@@ -451,9 +449,10 @@ UpdateInformationProvider::~UpdateInformationProvider()
//------------------------------------------------------------------------------
-uno::Any
+rtl::OUString
UpdateInformationProvider::getConfigurationItem(uno::Reference<lang::XMultiServiceFactory> const & configurationProvider, rtl::OUString const & node, rtl::OUString const & item)
{
+ rtl::OUString sRet;
beans::PropertyValue aProperty;
aProperty.Name = UNISTRING("nodepath");
aProperty.Value = uno::makeAny(node);
@@ -467,7 +466,8 @@ UpdateInformationProvider::getConfigurationItem(uno::Reference<lang::XMultiServi
aArgumentList ),
uno::UNO_QUERY_THROW);
- return xNameAccess->getByName(item);
+ xNameAccess->getByName(item) >>= sRet;
+ return sRet;
}
//------------------------------------------------------------------------------
diff --git a/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl b/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl
index e2ea1fd..4e71a34 100644
--- a/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl
+++ b/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl
@@ -23,7 +23,7 @@
#define __com_sun_star_ucb_XWebDAVCommandEnvironment_idl__
#include <com/sun/star/ucb/XCommandEnvironment.idl>
-#include <com/sun/star/beans/NamedValue.idl>
+#include <com/sun/star/beans/StringPair.idl>
module com { module sun { module star { module ucb {
@@ -45,9 +45,8 @@ published interface XWebDAVCommandEnvironment : XCommandEnvironment
@return
A sequence of header name, header value pairs. The header
names must be the plain names and contain no trailing ":".
- The header value must be an Any containing a string.
*/
- sequence<com::sun::star::beans::NamedValue> getUserRequestHeaders(
+ sequence<com::sun::star::beans::StringPair> getUserRequestHeaders(
[in] string aURI,
[in] string aMethod);
};
diff --git a/offapi/type_reference/typelibrary_history.txt b/offapi/type_reference/typelibrary_history.txt
index efa309a..38c148b 100644
--- a/offapi/type_reference/typelibrary_history.txt
+++ b/offapi/type_reference/typelibrary_history.txt
@@ -202,3 +202,7 @@
23/03/2013 (arielch): TaskID=121944
css::ucb::XWebDAVCommandEnvironment should be derived from css::ucb::XCommandEnvironment
+23/03/2013 (arielch): TaskID=121945
+ css::ucb::XWebDAVCommandEnvironment::getUserRequestHeaders() should return a
+ sequence of css::beans::StringPair
+
diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb
index 1b128f1..3eae5c6 100644
Binary files a/offapi/type_reference/types.rdb and b/offapi/type_reference/types.rdb differ
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
index f7ca25d..01a4d0f 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
@@ -1126,24 +1126,14 @@ void DAVResourceAccess::getUserRequestHeaders(
if ( !xDAVEnv.is() )
return;
- uno::Sequence< beans::NamedValue > aRequestHeaders
+ uno::Sequence< beans::StringPair > aRequestHeaders
= xDAVEnv->getUserRequestHeaders( rURI, rMethod );
for ( sal_Int32 n = 0; n < aRequestHeaders.getLength(); ++n )
{
- rtl::OUString aValue;
- sal_Bool isString = aRequestHeaders[ n ].Value >>= aValue;
-
- if ( !isString )
- {
- OSL_ENSURE( isString,
- "DAVResourceAccess::getUserRequestHeaders :"
- "Value is not a string! Ignoring..." );
- continue;
- }
-
rRequestHeaders.push_back(
- DAVRequestHeader( aRequestHeaders[ n ].Name, aValue ) );
+ DAVRequestHeader( aRequestHeaders[ n ].First,
+ aRequestHeaders[ n ].Second ) );
}
}
commit 817e11dccbfe3431f9cc0466051f4d154ce33e5e
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Mar 24 12:22:31 2013 +0000
i121944 - Implement inheritance in css::ucb::XWebDAVCommandEnvironment
It should be derived from css::ucb::XCommandEnvironment
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index 19e6c87..3edd422 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -25,7 +25,7 @@
#include "precompiled_extensions.hxx"
#include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
@@ -37,7 +37,6 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/ucb/XWebDAVCommandEnvironment.hpp>
#include <com/sun/star/ucb/XCommandProcessor2.hpp>
#include <com/sun/star/ucb/XContentIdentifierFactory.hpp>
@@ -137,8 +136,7 @@ public:
//------------------------------------------------------------------------------
class UpdateInformationProvider :
- public ::cppu::WeakImplHelper4< deployment::XUpdateInformationProvider,
- ucb::XCommandEnvironment,
+ public ::cppu::WeakImplHelper3< deployment::XUpdateInformationProvider,
ucb::XWebDAVCommandEnvironment,
lang::XServiceInfo >
{
diff --git a/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl b/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl
index a5da409..e2ea1fd 100644
--- a/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl
+++ b/offapi/com/sun/star/ucb/XWebDAVCommandEnvironment.idl
@@ -19,32 +19,19 @@
*
*************************************************************/
-
#ifndef __com_sun_star_ucb_XWebDAVCommandEnvironment_idl__
#define __com_sun_star_ucb_XWebDAVCommandEnvironment_idl__
-#ifndef __com_sun_star_uno_XInterface_idl__
-#include <com/sun/star/uno/XInterface.idl>
-#endif
-#ifndef __com_sun_star_beans_NamedValue_idl__
+#include <com/sun/star/ucb/XCommandEnvironment.idl>
#include <com/sun/star/beans/NamedValue.idl>
-#endif
-
-//=============================================================================
module com { module sun { module star { module ucb {
-//=============================================================================
/** A command environment that can be used to deal with WebDAV/HTTP specific
commands.
-
- <p>Supply an implementation of this interface together with an
- <type>XCommandEnvironment</type> implementation, when executing a command
- using <type>XCommandProcessor</type>.
*/
-published interface XWebDAVCommandEnvironment : com::sun::star::uno::XInterface
+published interface XWebDAVCommandEnvironment : XCommandEnvironment
{
- //-------------------------------------------------------------------------
/** This method gets called while assembling an WebDAV/HTTP request.
The returned headername-headervalue pairs will be appended to
the list of request headers before the request is dispatched.
@@ -65,8 +52,6 @@ published interface XWebDAVCommandEnvironment : com::sun::star::uno::XInterface
[in] string aMethod);
};
-//=============================================================================
-
}; }; }; };
#endif
diff --git a/offapi/type_reference/typelibrary_history.txt b/offapi/type_reference/typelibrary_history.txt
index ad3f8a8..efa309a 100644
--- a/offapi/type_reference/typelibrary_history.txt
+++ b/offapi/type_reference/typelibrary_history.txt
@@ -198,3 +198,7 @@
19/12/2012 (arielch): TaskID=121514
Remove deprecated AWT UnoControlSimpleAnimation API
+
+23/03/2013 (arielch): TaskID=121944
+ css::ucb::XWebDAVCommandEnvironment should be derived from css::ucb::XCommandEnvironment
+
diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb
index f015d25..1b128f1 100644
Binary files a/offapi/type_reference/types.rdb and b/offapi/type_reference/types.rdb differ
commit 339d75d9c99462d63234845031f24a42e7ffdd27
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Mar 24 12:22:15 2013 +0000
i121947 - Default User-Agent
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
index a354072..f7ca25d 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
@@ -1117,32 +1117,33 @@ void DAVResourceAccess::getUserRequestHeaders(
const rtl::OUString & rMethod,
DAVRequestHeaders & rRequestHeaders )
{
- if ( xEnv.is() )
- {
- uno::Reference< ucb::XWebDAVCommandEnvironment > xDAVEnv(
- xEnv, uno::UNO_QUERY );
+ if ( !xEnv.is() )
+ return;
- if ( xDAVEnv.is() )
- {
- uno::Sequence< beans::NamedValue > aRequestHeaders
- = xDAVEnv->getUserRequestHeaders( rURI, rMethod );
+ uno::Reference< ucb::XWebDAVCommandEnvironment > xDAVEnv(
+ xEnv, uno::UNO_QUERY );
- for ( sal_Int32 n = 0; n < aRequestHeaders.getLength(); ++n )
- {
- rtl::OUString aValue;
- sal_Bool isString = aRequestHeaders[ n ].Value >>= aValue;
+ if ( !xDAVEnv.is() )
+ return;
- if ( !isString )
- {
- OSL_ENSURE( isString,
- "DAVResourceAccess::getUserRequestHeaders :"
- "Value is not a string! Ignoring..." );
- }
+ uno::Sequence< beans::NamedValue > aRequestHeaders
+ = xDAVEnv->getUserRequestHeaders( rURI, rMethod );
- rRequestHeaders.push_back(
- DAVRequestHeader( aRequestHeaders[ n ].Name, aValue ) );
- }
+ for ( sal_Int32 n = 0; n < aRequestHeaders.getLength(); ++n )
+ {
+ rtl::OUString aValue;
+ sal_Bool isString = aRequestHeaders[ n ].Value >>= aValue;
+
+ if ( !isString )
+ {
+ OSL_ENSURE( isString,
+ "DAVResourceAccess::getUserRequestHeaders :"
+ "Value is not a string! Ignoring..." );
+ continue;
}
+
+ rRequestHeaders.push_back(
+ DAVRequestHeader( aRequestHeaders[ n ].Name, aValue ) );
}
}
diff --git a/ucb/source/ucp/webdav/SerfPutReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPutReqProcImpl.cxx
index 3d806b8..f24f68d 100644
--- a/ucb/source/ucp/webdav/SerfPutReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPutReqProcImpl.cxx
@@ -64,6 +64,11 @@ serf_bucket_t * SerfPutReqProcImpl::createSerfRequestBucket( serf_request_t * in
serf_request_get_alloc( inSerfRequest ) );
handleChunkedEncoding(req_bkt, mnDataLen);
+ // set request header fields
+ serf_bucket_t* hdrs_bkt = serf_bucket_request_get_headers( req_bkt );
+ // general header fields provided by caller
+ setRequestHeaders( hdrs_bkt );
+
return req_bkt;
}
diff --git a/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx b/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx
index d180af6..fa7c5f8 100644
--- a/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx
@@ -20,6 +20,7 @@
*************************************************************/
#include "SerfRequestProcessorImpl.hxx"
+#include "webdavuseragent.hxx"
namespace
{
@@ -82,6 +83,7 @@ void SerfRequestProcessorImpl::handleChunkedEncoding (
void SerfRequestProcessorImpl::setRequestHeaders( serf_bucket_t* inoutSerfHeaderBucket )
{
+ bool bHasUserAgent( false );
DAVRequestHeaders::const_iterator aHeaderIter( mrRequestHeaders.begin() );
const DAVRequestHeaders::const_iterator aEnd( mrRequestHeaders.end() );
@@ -92,6 +94,11 @@ void SerfRequestProcessorImpl::setRequestHeaders( serf_bucket_t* inoutSerfHeader
const rtl::OString aValue = rtl::OUStringToOString( (*aHeaderIter).second,
RTL_TEXTENCODING_UTF8 );
+ OSL_TRACE( "Request Header - \"%s: %s\"", aHeader.getStr(), aValue.getStr() );
+ if ( !bHasUserAgent )
+ bHasUserAgent = aHeaderIter->first.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM( "User-Agent" ) );
+
serf_bucket_headers_set( inoutSerfHeaderBucket,
aHeader.getStr(),
aValue.getStr() );
@@ -99,6 +106,14 @@ void SerfRequestProcessorImpl::setRequestHeaders( serf_bucket_t* inoutSerfHeader
++aHeaderIter;
}
+ if ( !bHasUserAgent )
+ {
+ const rtl::OUString &rUserAgent = WebDAVUserAgent::get();
+ serf_bucket_headers_set( inoutSerfHeaderBucket,
+ "User-Agent",
+ rtl::OUStringToOString( rUserAgent, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+
serf_bucket_headers_set( inoutSerfHeaderBucket, "Accept-Encoding", "gzip");
}
diff --git a/ucb/source/ucp/webdav/makefile.mk b/ucb/source/ucp/webdav/makefile.mk
index d6f1589..9645833 100644
--- a/ucb/source/ucp/webdav/makefile.mk
+++ b/ucb/source/ucp/webdav/makefile.mk
@@ -61,6 +61,9 @@ SHL1STDLIBS+=$(APR_LIBS)
.ELSE
CFLAGS+= -I$(SOLARINCDIR)$/$(APRINCDIR)
SHL1STDLIBS+=$(INTERNAL_APR_LIBS)
+.INCLUDE : apr_version.mk
+CFLAGS+=\
+ -DAPR_VERSION=\"$(APR_MAJOR).$(APR_MINOR).$(APR_MICRO)\"
.ENDIF
.IF "$(SYSTEM_APR_UTIL)" == "YES"
@@ -69,6 +72,9 @@ SHL1STDLIBS+=$(APR_UTIL_LIBS)
.ELSE
CFLAGS+= -I$(SOLARINCDIR)$/$(APRUTILINCDIR)
SHL1STDLIBS+=$(INTERNAL_APR_UTIL_LIBS)
+.INCLUDE : aprutil_version.mk
+CFLAGS+=\
+ -DAPR_UTIL_VERSION=\"$(APR_UTIL_MAJOR).$(APR_UTIL_MINOR).$(APR_UTIL_MICRO)\"
.ENDIF
.IF "$(SYSTEM_SERF)" == "YES"
@@ -77,6 +83,9 @@ SHL1STDLIBS+=$(SERF_LIBS)
.ELSE
CFLAGS+= -I$(SOLARINCDIR)$/$(SERFINCDIR)
SHL1STDLIBS+=$(INTERNAL_SERF_LIBS)
+.INCLUDE : serf_version.mk
+CFLAGS+=\
+ -DSERF_VERSION=\"$(SERF_MAJOR).$(SERF_MINOR).$(SERF_MICRO)\"
.ENDIF
.IF "$(SYSTEM_LIBXML)" == "YES"
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index 0d24aa6..b25e321 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -32,12 +32,39 @@
#include <ucbhelper/contentidentifier.hxx>
#include "webdavprovider.hxx"
#include "webdavcontent.hxx"
+#include "webdavuseragent.hxx"
#include <osl/mutex.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
using namespace com::sun::star;
using namespace http_dav_ucp;
+
+rtl::OUString &WebDAVUserAgent::operator()() const
+{
+ rtl::OUStringBuffer aBuffer;
+ aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "$ooName/$ooSetupVersion" ));
+#if OSL_DEBUG_LEVEL > 0
+#ifdef APR_VERSION
+ aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( " apr/" APR_VERSION ));
+#endif
+
+#ifdef APR_UTIL_VERSION
+ aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( " apr-util/" APR_UTIL_VERSION ));
+#endif
+
+#ifdef SERF_VERSION
+ aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( " serf/" SERF_VERSION ));
+#endif
+#endif
+ static rtl::OUString aUserAgent( aBuffer.makeStringAndClear() );
+ return aUserAgent;
+}
+
//=========================================================================
//=========================================================================
//
@@ -52,6 +79,55 @@ ContentProvider::ContentProvider(
m_xDAVSessionFactory( new DAVSessionFactory() ),
m_pProps( 0 )
{
+ static bool bInit = false;
+ if ( bInit )
+ return;
+ bInit = true;
+ try
+ {
+ uno::Reference< uno::XComponentContext > xContext(
+ ::comphelper::getProcessComponentContext() );
+ uno::Reference< lang::XMultiServiceFactory > xConfigProvider(
+ xContext->getServiceManager()->createInstanceWithContext(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.ConfigurationProvider")), xContext),
+ uno::UNO_QUERY_THROW );
+
+ beans::NamedValue aNodePath;
+ aNodePath.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) );
+ aNodePath.Value <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup/Product"));
+
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[0] <<= aNodePath;
+
+ uno::Reference< container::XNameAccess > xConfigAccess(
+ xConfigProvider->createInstanceWithArguments(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.ConfigurationAccess")), aArgs),
+ uno::UNO_QUERY_THROW );
+
+ rtl::OUString aVal;
+ xConfigAccess->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooName"))) >>= aVal;
+
+ rtl::OUString &aUserAgent = WebDAVUserAgent::get();
+ sal_Int32 nIndex = aUserAgent.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "$ooName" ) );
+ if ( !aVal.getLength() || nIndex == -1 )
+ return;
+ aUserAgent = aUserAgent.replaceAt( nIndex, RTL_CONSTASCII_LENGTH( "$ooName" ), aVal );
+
+ xConfigAccess->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupVersion"))) >>= aVal;
+ nIndex = aUserAgent.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "$ooSetupVersion" ) );
+ if ( !aVal.getLength() || nIndex == -1 )
+ return;
+ aUserAgent = aUserAgent.replaceAt( nIndex, RTL_CONSTASCII_LENGTH( "$ooSetupVersion" ), aVal );
+
+ }
+ catch ( const uno::Exception &e )
+ {
+ OSL_TRACE( "ContentProvider -caught exception! %s",
+ rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ (void) e;
+ }
}
//=========================================================================
diff --git a/ucb/source/ucp/webdav/webdavuseragent.hxx b/ucb/source/ucp/webdav/webdavuseragent.hxx
new file mode 100644
index 0000000..532182e
--- /dev/null
+++ b/ucb/source/ucp/webdav/webdavuseragent.hxx
@@ -0,0 +1,38 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef INCLUDED_WEBDAV_UCP_USERAGENT_HXX
+#define INCLUDED_WEBDAV_UCP_USERAGENT_HXX
+
+#include <rtl/ustring.hxx>
+#include <rtl/instance.hxx>
+
+namespace http_dav_ucp {
+
+struct WebDAVUserAgent
+ : public ::rtl::StaticWithInit< rtl::OUString, WebDAVUserAgent >
+{
+ rtl::OUString &operator()() const;
+};
+
+}
+
+#endif
commit 69f5a7496ce1d06ac312a753fa7b21f45db8fd78
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Mar 24 12:22:04 2013 +0000
i121942 - Explicitly set "ContentType" for non-DAV content
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index bbfb72d..df558f0 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -1657,6 +1657,10 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ),
uno::makeAny( true ),
true );
+ xProps->addProperty(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ),
+ uno::makeAny( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_TYPE ) ) ),
+ true );
}
}
else
commit 3d5d60176c01f9d3504559b816281fca11aea403
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Mar 24 12:21:56 2013 +0000
i121935 - UCB: new "addProperty" and "removeProperty" commands
diff --git a/offapi/com/sun/star/ucb/Content.idl b/offapi/com/sun/star/ucb/Content.idl
index 32d1ada..1e01710 100644
--- a/offapi/com/sun/star/ucb/Content.idl
+++ b/offapi/com/sun/star/ucb/Content.idl
@@ -459,6 +459,65 @@ published service Content
</p>
</td>
</tr>
+ <tr>
+ <td>addProperty</td>
+ <td>void</td>
+ <td><type>PropertyCommandArgument</type> aCmdArg</td>
+ <td>
+ Adds a new properties to the content.
+ <p>
+ <member>PropertyCommandArgument::Property</member>
+ contains information about the property to be added.
+ <member>PropertyCommandArgument::DefaultValue</member>
+ may contain the default value for the property. Its type must
+ match the one specified in <member scope="com::sun::star::beans">Property::Type</member>.
+ </p>
+ <p>Note that the dynamic properties must be kept persistent. The
+ service <type>Store</type> (UCB persistence service) may be used to
+ implement this.</p>
+ <p><b>Important:</b> The implementation must at least support
+ adding properties of the following basic data types:</p>
+ <p>
+ <ul>
+ <li>boolean
+ <li>char
+ <li>byte
+ <li>string
+ <li>short
+ <li>long
+ <li>hyper
+ <li>float
+ <li>double
+ </ul>
+ </p>
+ <p>
+ Raises a <type scope="com::sun::star::beans">PropertyExistException</type>
+ if a property with the same name already exists;
+ <type scope="com::sun::star::beans">IllegalTypeException</type>
+ if the property has an unsupported type;
+ <type scope="com::sun::star::lang">IllegalArgumentException</type>
+ if the Name of the property is empty.</p>
+ <blockquote>
+ Note: This command replaces the deprecated interface method
+ <member scope="com::sun::star::beans">XPropertyContainer::addProperty</member>.
+ </blockquote>
+ </td>
+ </tr>
+ <tr>
+ <td>removeProperty</td>
+ <td>void</td>
+ <td>string PropertyName</td>
+ <td>Removes the properties from the content.
+ <p>Raises a <type scope="com::sun::star::beans">UnknownPropertyException</type>
+ if the property does not exist;
+ <type scope="com::sun::star::beans">NotRemoveableException</type>
+ if the property is not removable.</p>
+ <blockquote>
+ Note: This command replaces the deprecated interface method
+ <member scope="com::sun::star::beans">XPropertyContainer::removeProperty</member>.
+ </blockquote>
+ </td>
+ </tr>
</tbody>
</table>
@@ -804,7 +863,7 @@ published service Content
<td>TargetURL</td>
<td>string</td>
<td>for contents that are links to other contents, contains the URL of
- the target content</td>
+ the target content</td>
</tr>
<tr>
<td>TimeLimitStore</td>
@@ -815,7 +874,7 @@ published service Content
<td>UserName</td>
<td>string</td>
<td>contains a user name. (e.g. the user name needed to access a
- POP3-Account)</td>
+ POP3-Account)</td>
</tr>
<tr>
<td>VerificationMode</td>
diff --git a/offapi/com/sun/star/ucb/PropertyCommandArgument.idl b/offapi/com/sun/star/ucb/PropertyCommandArgument.idl
new file mode 100644
index 0000000..a2e2817
--- /dev/null
+++ b/offapi/com/sun/star/ucb/PropertyCommandArgument.idl
@@ -0,0 +1,47 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_ucb_PropertyCommandArgument_idl__
+#define __com_sun_star_ucb_PropertyCommandArgument_idl__
+
+#include <com/sun/star/beans/Property.idl>
+
+module com { module sun { module star { module ucb {
+
+/** The argument for the "addProperty" command.
+
+ @see XCommandProcessor
+ @since Apache OpenOffice 4.0
+*/
+struct PropertyCommandArgument
+{
+ /** The property that the command has to add.
+ */
+ com::sun::star::beans::Property Property;
+
+ /** The default value of the property.
+ */
+ any DefaultValue;
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/ucb/makefile.mk b/offapi/com/sun/star/ucb/makefile.mk
index 2522b63..36338bd 100644
--- a/offapi/com/sun/star/ucb/makefile.mk
+++ b/offapi/com/sun/star/ucb/makefile.mk
@@ -37,7 +37,7 @@ IDLFILES=\
AlreadyInitializedException.idl\
AnyCompareFactory.idl\
AuthenticationRequest.idl\
- URLAuthenticationRequest.idl\
+ CHAOSProgressStart.idl\
CachedContentResultSet.idl\
CachedContentResultSetFactory.idl\
CachedContentResultSetStub.idl\
@@ -46,7 +46,6 @@ IDLFILES=\
CachedDynamicResultSetFactory.idl\
CachedDynamicResultSetStub.idl\
CachedDynamicResultSetStubFactory.idl\
- CHAOSProgressStart.idl\
CertificateValidationRequest.idl\
Command.idl\
CommandAbortedException.idl\
@@ -83,6 +82,8 @@ IDLFILES=\
Error.idl\
ExpandContentProvider.idl\
ExportStreamInfo.idl\
+ FTPContent.idl\
+ FTPContentProvider.idl\
FetchError.idl\
FetchResult.idl\
FileContent.idl\
@@ -91,10 +92,8 @@ IDLFILES=\
FolderList.idl\
FolderListCommand.idl\
FolderListEntry.idl\
- FTPContent.idl\
- FTPContentProvider.idl\
- GlobalTransferCommandArgument.idl\
GIOContentProvider.idl\
+ GlobalTransferCommandArgument.idl\
GnomeVFSContentProvider.idl\
GnomeVFSDocumentContent.idl\
GnomeVFSFolderContent.idl\
@@ -108,6 +107,7 @@ IDLFILES=\
HierarchyFolderContent.idl\
HierarchyLinkContent.idl\
HierarchyRootFolderContent.idl\
+ IOErrorCode.idl\
IllegalIdentifierException.idl\
InsertCommandArgument.idl\
InteractiveAppException.idl\
@@ -117,8 +117,8 @@ IDLFILES=\
InteractiveFileIOException.idl\
InteractiveIOException.idl\
InteractiveLockingException.idl\
- InteractiveLockingLockedException.idl\
InteractiveLockingLockExpiredException.idl\
+ InteractiveLockingLockedException.idl\
InteractiveLockingNotLockedException.idl\
InteractiveNetworkConnectException.idl\
InteractiveNetworkException.idl\
@@ -128,12 +128,11 @@ IDLFILES=\
InteractiveNetworkResolveNameException.idl\
InteractiveNetworkWriteException.idl\
InteractiveWrongMediumException.idl\
- IOErrorCode.idl\
Link.idl\
ListAction.idl\
ListActionType.idl\
- ListenerAlreadySetException.idl\
ListEvent.idl\
+ ListenerAlreadySetException.idl\
Lock.idl\
LockDepth.idl\
LockEntry.idl\
@@ -159,6 +158,7 @@ IDLFILES=\
PostCommandArgument2.idl\
Priority.idl\
PropertiesManager.idl\
+ PropertyCommandArgument.idl\
PropertySetRegistry.idl\
PropertyValueInfo.idl\
PropertyValueState.idl\
@@ -191,10 +191,11 @@ IDLFILES=\
TransferInfo.idl\
TransferResult.idl\
TransientDocumentsContentProvider.idl\
- TransientDocumentsRootContent.idl\
TransientDocumentsDocumentContent.idl\
TransientDocumentsFolderContent.idl\
+ TransientDocumentsRootContent.idl\
TransientDocumentsStreamContent.idl\
+ URLAuthenticationRequest.idl\
UniversalContentBroker.idl\
UnsupportedCommandException.idl\
UnsupportedDataSinkException.idl\
@@ -262,7 +263,7 @@ IDLFILES=\
XSimpleFileAccess3.idl\
XSortedDynamicResultSetFactory.idl\
XSourceInitialization.idl\
- XWebDAVCommandEnvironment.idl
+ XWebDAVCommandEnvironment.idl \
# ------------------------------------------------------------------
diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx
index 786a363..1bdff2e 100644
--- a/ucb/source/ucp/webdav/DAVProperties.cxx
+++ b/ucb/source/ucp/webdav/DAVProperties.cxx
@@ -26,6 +26,7 @@
#include <string.h>
#include "DAVProperties.hxx"
+#include <rtl/ustrbuf.hxx>
using namespace http_dav_ucp;
@@ -192,3 +193,42 @@ bool DAVProperties::isUCBDeadProperty( const SerfPropName & rName )
rName.nspace, "http://ucb.openoffice.org/dav/props/" )
== 0 ) );
}
+
+bool DAVProperties::isUCBSpecialProperty(const rtl::OUString& rFullName, rtl::OUString& rParsedName)
+{
+ sal_Int32 nLen = rFullName.getLength();
+ if ( nLen <= 0 ||
+ !rFullName.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "<prop:" ) ) ||
+ !rFullName.endsWithAsciiL( RTL_CONSTASCII_STRINGPARAM( "\">" ) ) )
+ return false;
+
+ sal_Int32 nStart = RTL_CONSTASCII_LENGTH( "<prop:" );
+ sal_Int32 nEnd = rFullName.indexOf( sal_Unicode( ' ' ), nStart );
+ if ( nEnd == -1 )
+ return false;
+
+ rtl::OUString sPropName = rFullName.copy( nStart, nEnd - nStart );
+ if ( !sPropName.getLength() )
+ return false;
+
+ // TODO skip whitespaces?
+ if ( !rFullName.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "xmlns:prop=\"" ), ++nEnd ) )
+ return false;
+
+ nStart = nEnd + RTL_CONSTASCII_LENGTH( "xmlns:prop=\"" );
+ nEnd = rFullName.indexOf( sal_Unicode( '"' ), nStart );
+ if ( nEnd != nLen - RTL_CONSTASCII_LENGTH( "\">" ) )
+ return false;
+
+ rtl::OUString sNamesp = rFullName.copy( nStart, nEnd - nStart );
+ if ( !( nLen = sNamesp.getLength() ) )
+ return false;
+
+ rtl::OUStringBuffer aBuff( sNamesp );
+ if ( sNamesp[nLen - 1] != '/' )
+ aBuff.append( sal_Unicode( '/' ) );
+ aBuff.append( sPropName );
+ rParsedName = aBuff.makeStringAndClear();
+
+ return rParsedName.getLength();
+}
diff --git a/ucb/source/ucp/webdav/DAVProperties.hxx b/ucb/source/ucp/webdav/DAVProperties.hxx
index dc9e378..03efa69 100644
--- a/ucb/source/ucp/webdav/DAVProperties.hxx
+++ b/ucb/source/ucp/webdav/DAVProperties.hxx
@@ -50,6 +50,8 @@ struct DAVProperties
rtl::OUString & rFullName );
static bool isUCBDeadProperty( const SerfPropName & rName );
+ static bool isUCBSpecialProperty( const rtl::OUString & rFullName,
+ rtl::OUString & rParsedName );
};
} // namespace http_dav_ucp
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 7aaf4f4..bbfb72d 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -68,6 +68,7 @@
#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <com/sun/star/ucb/PostCommandArgument2.hpp>
+#include <com/sun/star/ucb/PropertyCommandArgument.hpp>
#include <com/sun/star/ucb/TransferInfo.hpp>
#include <com/sun/star/ucb/UnsupportedCommandException.hpp>
#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
@@ -769,6 +770,68 @@ uno::Any SAL_CALL Content::execute(
aRet = uno::makeAny( createNewContent( aArg ) );
}
+ else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "addProperty" )))
+ {
+ ucb::PropertyCommandArgument aPropArg;
+ if ( !( aCommand.Argument >>= aPropArg ))
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "Wrong argument type!" )),
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ }
+
+ // TODO when/if XPropertyContainer is removed,
+ // the command execution can be canceled in addProperty
+ try
+ {
+ addProperty( aPropArg, Environment );
+ }
+ catch ( const beans::PropertyExistException &e )
+ {
+ ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment );
+ }
+ catch ( const beans::IllegalTypeException&e )
+ {
+ ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment );
+ }
+ catch ( const lang::IllegalArgumentException&e )
+ {
+ ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment );
+ }
+ }
+ else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "removeProperty" )))
+ {
+ rtl::OUString sPropName;
+ if ( !( aCommand.Argument >>= sPropName ) )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "Wrong argument type!" )),
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ }
+
+ // TODO when/if XPropertyContainer is removed,
+ // the command execution can be canceled in removeProperty
+ try
+ {
+ removeProperty( sPropName, Environment );
+ }
+ catch( const beans::UnknownPropertyException &e )
+ {
+ ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment );
+ }
+ catch( const beans::NotRemoveableException &e )
+ {
+ ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment );
+ }
+ }
else
{
//////////////////////////////////////////////////////////////////
@@ -820,42 +883,53 @@ void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ )
//
//=========================================================================
-// virtual
-void SAL_CALL Content::addProperty( const rtl::OUString& Name,
- sal_Int16 Attributes,
- const uno::Any& DefaultValue )
- throw( beans::PropertyExistException,
- beans::IllegalTypeException,
- lang::IllegalArgumentException,
- uno::RuntimeException )
+void Content::addProperty( const com::sun::star::ucb::PropertyCommandArgument &aCmdArg,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+throw( beans::PropertyExistException,
+ beans::IllegalTypeException,
+ lang::IllegalArgumentException,
+ uno::RuntimeException )
{
// if ( m_bTransient )
// @@@ ???
+ const beans::Property aProperty = aCmdArg.Property;
+ const uno::Any aDefaultValue = aCmdArg.DefaultValue;
- if ( !Name.getLength() )
- throw lang::IllegalArgumentException();
+ // check property Name
+ if ( !aProperty.Name.getLength() )
+ throw lang::IllegalArgumentException(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "\"addProperty\" with empty Property.Name")),
+ static_cast< ::cppu::OWeakObject * >( this ),
+ -1 );
// Check property type.
- if ( !UCBDeadPropertyValue::supportsType( DefaultValue.getValueType() ) )
- {
- OSL_ENSURE( sal_False,
- "Content::addProperty - Unsupported property type!" );
- throw beans::IllegalTypeException();
- }
+ if ( !UCBDeadPropertyValue::supportsType( aProperty.Type ) )
+ throw beans::IllegalTypeException(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "\"addProperty\" unsupported Property.Type")),
+ static_cast< ::cppu::OWeakObject * >( this ) );
+
+ // check default value
+ if ( aDefaultValue.hasValue() && aDefaultValue.getValueType() != aProperty.Type )
+ throw beans::IllegalTypeException(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "\"addProperty\" DefaultValue does not match Property.Type")),
+ static_cast< ::cppu::OWeakObject * >( this ) );
//////////////////////////////////////////////////////////////////////
// Make sure a property with the requested name does not already
// exist in dynamic and static(!) properties.
//////////////////////////////////////////////////////////////////////
- // @@@ Need real command environment here, but where to get it from?
- // XPropertyContainer interface should be replaced by
- // XCommandProcessor commands!
- uno::Reference< ucb::XCommandEnvironment > xEnv;
+ // Take into account special properties with custom namespace
+ // using <prop:the_propname xmlns:prop="the_namespace">
+ rtl::OUString aSpecialName;
+ bool bIsSpecial = DAVProperties::isUCBSpecialProperty( aProperty.Name, aSpecialName );
// Note: This requires network access!
if ( getPropertySetInfo( xEnv, sal_False /* don't cache data */ )
- ->hasPropertyByName( Name ) )
+ ->hasPropertyByName( bIsSpecial ? aSpecialName : aProperty.Name ) )
{
// Property does already exist.
throw beans::PropertyExistException();
@@ -865,7 +939,7 @@ void SAL_CALL Content::addProperty( const rtl::OUString& Name,
// Add a new dynamic property.
//////////////////////////////////////////////////////////////////////
- ProppatchValue aValue( PROPSET, Name, DefaultValue );
+ ProppatchValue aValue( PROPSET, aProperty.Name, aDefaultValue );
std::vector< ProppatchValue > aProppatchValues;
aProppatchValues.push_back( aValue );
@@ -887,7 +961,7 @@ void SAL_CALL Content::addProperty( const rtl::OUString& Name,
// Notify propertyset info change listeners.
beans::PropertySetInfoChangeEvent evt(
static_cast< cppu::OWeakObject * >( this ),
- Name,
+ bIsSpecial ? aSpecialName : aProperty.Name,
-1, // No handle available
beans::PropertySetInfoChange::PROPERTY_INSERTED );
notifyPropertySetInfoChange( evt );
@@ -899,8 +973,9 @@ void SAL_CALL Content::addProperty( const rtl::OUString& Name,
// Support for setting arbitrary dead properties is optional!
// Store property locally.
- ContentImplHelper::addProperty(
- Name, Attributes, DefaultValue );
+ ContentImplHelper::addProperty( bIsSpecial ? aSpecialName : aProperty.Name,
+ aProperty.Attributes,
+ aDefaultValue );
}
else
{
@@ -917,9 +992,9 @@ void SAL_CALL Content::addProperty( const rtl::OUString& Name,
case NON_DAV:
// Store property locally.
- ContentImplHelper::addProperty( Name,
- Attributes,
- DefaultValue );
+ ContentImplHelper::addProperty( bIsSpecial ? aSpecialName : aProperty.Name,
+ aProperty.Attributes,
+ aDefaultValue );
break;
default:
@@ -946,25 +1021,19 @@ void SAL_CALL Content::addProperty( const rtl::OUString& Name,
}
}
-//=========================================================================
-// virtual
-void SAL_CALL Content::removeProperty( const rtl::OUString& Name )
- throw( beans::UnknownPropertyException,
- beans::NotRemoveableException,
- uno::RuntimeException )
+void Content::removeProperty( const rtl::OUString& Name,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+throw( beans::UnknownPropertyException,
+ beans::NotRemoveableException,
+ uno::RuntimeException )
{
- // @@@ Need real command environment here, but where to get it from?
- // XPropertyContainer interface should be replaced by
- // XCommandProcessor commands!
- uno::Reference< ucb::XCommandEnvironment > xEnv;
-
#if 0
// @@@ REMOVEABLE z.Z. nicht richtig an der PropSetInfo gesetzt!!!
try
{
beans::Property aProp
- = getPropertySetInfo( xEnv, sal_False /* don't cache data */ )
- ->getPropertyByName( Name );
+ = getPropertySetInfo( xEnv, sal_False /* don't cache data */ )
+ ->getPropertyByName( Name );
if ( !( aProp.Attributes & beans::PropertyAttribute::REMOVEABLE ) )
{
@@ -1027,20 +1096,20 @@ void SAL_CALL Content::removeProperty( const rtl::OUString& Name )
const ResourceType & rType = getResourceType( xEnv );
switch ( rType )
{
- case UNKNOWN:
- case DAV:
- throw beans::UnknownPropertyException();
-
- case NON_DAV:
- // Try to remove property from local store.
- ContentImplHelper::removeProperty( Name );
- break;
-
- default:
- OSL_ENSURE( sal_False,
- "Content::removeProperty - "
- "Unsupported resource type!" );
- break;
+ case UNKNOWN:
+ case DAV:
+ throw beans::UnknownPropertyException();
+
+ case NON_DAV:
+ // Try to remove property from local store.
+ ContentImplHelper::removeProperty( Name );
+ break;
+
+ default:
+ OSL_ENSURE( sal_False,
+ "Content::removeProperty - "
+ "Unsupported resource type!" );
+ break;
}
}
catch ( uno::Exception const & )
@@ -1061,6 +1130,35 @@ void SAL_CALL Content::removeProperty( const rtl::OUString& Name )
}
}
+// virtual
+void SAL_CALL Content::addProperty( const rtl::OUString& Name,
+ sal_Int16 Attributes,
+ const uno::Any& DefaultValue )
+ throw( beans::PropertyExistException,
+ beans::IllegalTypeException,
+ lang::IllegalArgumentException,
+ uno::RuntimeException )
+{
+ beans::Property aProperty;
+ aProperty.Name = Name;
+ aProperty.Type = DefaultValue.getValueType();
+ aProperty.Attributes = Attributes;
+ aProperty.Handle = -1;
+
+ addProperty( ucb::PropertyCommandArgument( aProperty, DefaultValue ),
+ uno::Reference< ucb::XCommandEnvironment >());
+}
+
+// virtual
+void SAL_CALL Content::removeProperty( const rtl::OUString& Name )
+ throw( beans::UnknownPropertyException,
+ beans::NotRemoveableException,
+ uno::RuntimeException )
+{
+ removeProperty( Name,
+ uno::Reference< ucb::XCommandEnvironment >() );
+}
+
//=========================================================================
//
// XContentCreator methods.
@@ -1779,11 +1877,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
// Optional props.
//////////////////////////////////////////////////////////////
+ rtl::OUString aSpecialName;
+ bool bIsSpecial = DAVProperties::isUCBSpecialProperty( rName, aSpecialName );
+
if ( !xInfo.is() )
xInfo = getPropertySetInfo( xEnv,
sal_False /* don't cache data */ );
- if ( !xInfo->hasPropertyByName( rName ) )
+ if ( !xInfo->hasPropertyByName( bIsSpecial ? aSpecialName : rName ) )
{
// Check, whether property exists. Skip otherwise.
// PROPPATCH::set would add the property automatically, which
@@ -1832,7 +1933,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
static_cast< cppu::OWeakObject * >( this ) );
}
if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) )
+ RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx
index 08f33fb..dfdfa73 100644
--- a/ucb/source/ucp/webdav/webdavcontent.hxx
+++ b/ucb/source/ucp/webdav/webdavcontent.hxx
@@ -48,6 +48,7 @@ namespace com { namespace sun { namespace star { namespace sdbc {
namespace com { namespace sun { namespace star { namespace ucb {
struct OpenCommandArgument2;
+ struct PropertyCommandArgument;
struct PostCommandArgument2;
struct TransferInfo;
} } } }
@@ -192,6 +193,21 @@ private:
const com::sun::star::uno::Reference<
com::sun::star::ucb::XCommandEnvironment >& Environment );
+ // XPropertyContainer replacement
+ void addProperty( const com::sun::star::ucb::PropertyCommandArgument &aCmdArg,
+ const com::sun::star::uno::Reference<
+ com::sun::star::ucb::XCommandEnvironment >& Environment )
+ throw( com::sun::star::beans::PropertyExistException,
+ com::sun::star::beans::IllegalTypeException,
+ com::sun::star::lang::IllegalArgumentException,
+ com::sun::star::uno::RuntimeException );
+
+ void removeProperty( const rtl::OUString& Name,
+ const com::sun::star::uno::Reference<
+ com::sun::star::ucb::XCommandEnvironment >& Environment )
+ throw( com::sun::star::beans::UnknownPropertyException,
+ com::sun::star::beans::NotRemoveableException,
+ com::sun::star::uno::RuntimeException );
public:
Content( const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx
index ea6e339..42b82a0 100644
--- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx
+++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
#include <com/sun/star/ucb/InsertCommandArgument.hpp>
#include <com/sun/star/ucb/PostCommandArgument2.hpp>
+#include <com/sun/star/ucb/PropertyCommandArgument.hpp>
#include <com/sun/star/ucb/TransferInfo.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/util/DateTime.hpp>
@@ -529,7 +530,7 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands(
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- uno::Sequence< ucb::CommandInfo > aCmdInfo( 8 );
+ uno::Sequence< ucb::CommandInfo > aCmdInfo( 10 );
///////////////////////////////////////////////////////////////
// Mandatory commands
@@ -594,6 +595,18 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands(
-1,
getCppuType( static_cast<
ucb::PostCommandArgument2 * >( 0 ) ) );
+ aCmdInfo[ 8 ] =
+ ucb::CommandInfo(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "addProperty" ) ),
+ -1,
+ getCppuType( static_cast<
+ ucb::PropertyCommandArgument * >( 0 ) ) );
+ aCmdInfo[ 9 ] =
+ ucb::CommandInfo(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "removeProperty" ) ),
+ -1,
+ getCppuType( static_cast<
+ rtl::OUString * >( 0 ) ) );
sal_Bool bFolder = sal_False;
commit e7b7b284aca5f3936ab1a5902652af41ea849093
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun Mar 24 12:21:43 2013 +0000
Fix css.ucb.Content documentation
Make it more readable by adding a table.
diff --git a/odk/docs/common/ref/idl.css b/odk/docs/common/ref/idl.css
index f408f81..d5c4894 100644
--- a/odk/docs/common/ref/idl.css
+++ b/odk/docs/common/ref/idl.css
@@ -126,6 +126,19 @@ body { background-color:#ffffff; }
#adc-idlref .expl-table td,
#adc-idlref .param-table td { border: none; }
+#adc-idlref .devdoc td {
+ border-width: 1px;
+ padding: 5px;
+ border-style: inset;
+ border-color: gray;
+ background-color: white; }
+
+#adc-idlref .devdoc th {
+ border-width: 1px;
+ padding: 5px;
+ border-style: inset;
+ border-color: gray;
+ background-color: white; }
/* Explanation of CSS classes:
diff --git a/offapi/com/sun/star/ucb/Content.idl b/offapi/com/sun/star/ucb/Content.idl
index dddf833..32d1ada 100644
--- a/offapi/com/sun/star/ucb/Content.idl
+++ b/offapi/com/sun/star/ucb/Content.idl
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
#ifndef __com_sun_star_ucb_Content_idl__
#define __com_sun_star_ucb_Content_idl__
@@ -35,18 +33,15 @@
#include <com/sun/star/ucb/XContentCreator.idl>
#include <com/sun/star/container/XChild.idl>
-//=============================================================================
-
module com { module sun { module star { module ucb {
-//=============================================================================
/** A <type>Content</type> is a service that provides access to data of a
content provided by an implementation of the service
<type>ContentProvider</type>.
*/
published service Content
{
- //-------------------------------------------------------------------------
+
/** provides access to the identitity and the type of the content and
allows the registration of listeners for <type>ContentEvent</type>s.
@@ -54,7 +49,7 @@ published service Content
*/
interface com::sun::star::ucb::XContent;
- //-------------------------------------------------------------------------
+
/** must be implemented to make it possible to resolve cyclic object
references.
@@ -73,7 +68,7 @@ published service Content
*/
interface com::sun::star::lang::XComponent;
- //-------------------------------------------------------------------------
+
/** enables the caller to let the content execute commands.
<p>It is strongly recommended that any implementation supports the
@@ -85,527 +80,754 @@ published service Content
commands and properties. A content may define additional commands and
properties. </p>
- <p>This interface is required. </p>
-
- <pre>
- =======================================================================
- Commands:
- =======================================================================
-
- [return type]
- [command name]
- [parameter type and name]
-
- -----------------------------------------------------------------------
- Mandatory commands:
- -----------------------------------------------------------------------
-
- // This command obtains an interface which allows to query
- // information on commands supported by a content.
- <type>XCommandInfo</type>
- getCommandInfo
- void
-
- // This command obtains an interface which allows to query
- // information on properties supported by a content.
- <type scope="com::sun::star::beans">XPropertySetInfo</type>
- getPropertySetInfo
- void
-
- // This command obtains property values from the content.
- // Note: The execution will not be aborted, if there are properties
- // requested, that are unknown to the content! The returned
- // row object must contain a NULL value in the corresponding
- // column instead.
- <type scope="com::sun::star::sdbc">XRow</type>
- getPropertyValues
- sequence< <type scope="com::sun::star::beans">Property</type> > aProps
-
- // This command sets property values of the content.
- // Note that setPropertyValues does not throw an exception in the case
- // that one or more of the requested property values cannot be set! The
- // implementation should set as much property values as possible. This
- // command returns a sequence< any > which has exactly the same number
- // of elements like the number of properties to set. Every sequence
- // element contains the status for a property. The first sequence
- // elements corresponds to the first element in the sequence of
- // <type scope="com::sun::star::beans">PropertyValue</type> passed as
- // command argument and so on. The exceptions will never be passed to
- // an Interaction Handler.
- //
- // An any containing:
- //
- // - No value indicates, that the property value was set successfully.
- // - <type scope="com::sun::star::beans">UnknownPropertyException</type>
- // indicates, that the property is not known to the content
- // implementation.
- // - <type scope="com::sun::star::beans">IllegalTypeException</type>
- // indicates, that the data type of the property value is not
- // acceptable.
- // - <type scope="com::sun::star::lang">IllegalAccessException</type>
- // indicates, that the property is constant
- // (<member scope="com::sun::star::beans">PropertyAttribute::READONLY</member>
- // is set).
- // - <type scope="com::sun::star::lang">IllegalArgumentException</type>
- // indicates, that the property value is not acceptable. For instance,
- // setting an empty title may be illegal.
- // - Any other execption derived from <type scope="com::sun::star::uno">Exception</type>
- // indicates, that the value was not set successfully. For example,
- // this can be a <type>InteractiveAugmentedIOException</type>
- // transporting the error code <member>IOErrorCode::ACCESS_DENIED</member>.
- //
- // If the value to set is equal to the current value, no exception must
- // be added to the returned sequence
- sequence< any >
- setPropertyValues
- sequence< <type scope="com::sun::star::beans">PropertyValue</type> > aValues
-
- -----------------------------------------------------------------------
- Optional commands:
- -----------------------------------------------------------------------
-
- // For folder objects, this command will return an implementation
- // of service <type>DynamicResultSet</type>.
- //
- // The <type>OpenCommandArgument2</type> members must be filled as follows:
- //
- // Mode : ALL or FOLDERS or DOCUMENTS. The implementation
- // of the open command MUST support all these modes!
- // Priority : can be set, but implementation may ignore the value
- // Sink : empty( ignored )
- // Properties : The properties for that the result set shall
- // contain the property values. The order of the
- // sequence is the same as the order of result set
- // columns. First element of sequence will be row
- // number one, second will be row number two, ...
- // SortingInfo : contains sort criteria, if result set shall
- // be sorted, otherwise it can be left empty.
- //
- // The exceution must be aborted by the implementation of this command
- // (by throwing a <type>CommandAbortedException</type>), if an
- // unsupported mode is requested.
- <type>XDynamicResultSet</type>
- <B>open</B>
- <type>OpenCommandArgument2</type> aOpenCommandArg
-
- // For non-folder objects, the <type>OpenCommandArgument2</type> struct
- // will be prefilled with a data sink object, which will be filled
- // with the content data.
- //
- // The <type>OpenCommandArgument2</type> members must be filled as follows:
- //
- // Mode : DOCUMENT or DOCUMENT_SHARE_DENY_NONE or
- // DOCUMENT_SHARE_DENY_WRITE. Support for DOCUMENT
- // is mandatory, all others are optional.
- // Priority : can be set, but implementation may ignore the value
- // Sink : a sink, where the implementation can put the
- // document data into.
- // Properties : empty ( ignored )
- // SortingInfo : empty ( ignored )
- //
- // The exceution must be aborted by the implementation of this command
- // (by throwing a <type>CommandAbortedException</type>), if an
- // unsupported mode is requested.
- void
- <B>open</B>
- <type>OpenCommandArgument2</type> aOpenCommandArg
-
- // This command triggers an update operation on a content. For example,
- // when "updating" a POP3-Inbox, the content for that box will get
- // and store all new objects on the appropriate server. The inserted
- // contents will be notified by calling
- // <member>XContentEventListener::contentEvent</member>.
- void
- <B>update</B>
- <type>OpenCommandArgument2</type> aOpenCommandArg
-
- // This command triggers a synchronization operation between locally
- // cached data and remote server's data. For example, when
- // "synchronizing" a POP3-Inbox the content for that box will get and
- // store all new objects and destroy all cached data for objects no
- // longer existing on the server. The inserted/deleted contents will
- // be notified by calling
- // <member>XContent::contentEvent</member>.
- void
- <B>synchronize</B>
- <type>OpenCommandArgument2</type> aOpenCommandArg
-
- // This command closes an object.
- void
- <B>close</B>
- void
-
- // This command deletes an object. If <TRUE/> is passed as parameter,
- // the object will be destroyed physically. Otherwise it will be put
- // into trash can, if such a service is available and the object to
- // be deleted supports the command "undelete".
- // On successful completion of this command, the deleted content
- // must propagate its deletion by notifying a <type>ContentEvent</type>
- // - <member>ContentAction::DELETED</member>. Additionally, the contents
- // parent must notify a <type>ContentEvent</type>
- // - <member>ContentAction::REMOVED</member>
- void
- <B>delete</B>
- boolean bDeletePhysically
-
- // This command restores an object previously deleted into trash. It
- // must be supported by objects which claim to be undeletable, but
- // should never be called directly.
- void
- <B>undelete</B>
- void
-
- // (1) This command inserts a new content. It commits the process of
- // creating a new content via executing the command "createNewContent"
- // and initializing it via setting properties, afterwards.
- // The command is not called on the content which created the new
- // content, because the new object already knows where it is to be
- // inserted (i.e. Calling createNewContent with the content type for a
- // message on a News Group creates a content which internally belongs
- // to the Outbox. Calling "insert" on that message will result in
- // posting the article to the appropriate News Group). Not calling
- // "insert" for the new content, i.e. because the user cancels writing
- // a new message, simply discards the new object. No extra call to
- // "delete" is necessary.
- // On successful completion of this command, the parent of the inserted
- // content must propagate the change by notifying a
- // <type>ContentEvent</type> - <member>ContentAction::INSERTED</member>.
- //
- // (2) Additionally this command can be called at any time to overwrite
- // the data of an existing content.
- void
- <B>insert</B>
- <type>InsertCommandArgument</type> aInsertCommandArg
-
- // This command searches for subcontents of a content matching the
- // given search criteria. The command will return an implemenation
- // of service <type>DynamicResultSet</type>.
- <type>XDynamicResultSet</type>
- <B>search</B>
- <type>SearchCommandArgument</type> aSearchCommandArg
-
- // <b>Important note:</b> A client that wants to transfer data should
- // not execute this command, but it should execute the command
- // "globalTransfer" at the <type>UniversalContentBroker</type>.
- // This command is able to transfer all kind of content
- // supported by that UCB.
- //
- // This command transfers (copies/moves) an object from one location
- // to another. It must be executed at the folder content representing
- // the destination of the transfer operation. Note that the
- // implementation need not(!) be able to handle any type of contents.
- // Generally, there are good chances that a transfer of a content will
- // succeed, if source and target folder have the same URL scheme.
- // But there is no guaranty for that. For instance, moving a message
- // from a folder on IMAP server A to a folder on IMAP server B may
- // fail, because the transfer command can't be implemented efficiently
- // for this scenario, because it is not directly supported by the IMAP
- // protocol. On the other hand, moving a message from one folder to
- // another folder on the same IMAP server should work, because it can
- // be implemeted efficiently. If an implementation is not able to
- // handle a given source URL, it should indicate this by issuing a
- // <type>InteractiveBadTransferURLException</type> interaction request.
- // Source and target folder may be the same when doing a move operation.
- //
- // Transfers without the transfer command can be done as follows:
- //
- // 1) Create a new content at the target folder
- // --> targetContent = target.execute( "createNewContent", type )
- // 2) Transfer data from source to target content
- // --> props = sourceContent.execute( "getPropertyValues", ... )
- // --> dataStream = sourceContent.execute( "open", ... )
- // --> targetContent.execute( "setPropertyValues", props )
- // 3) Insert ( commit ) the new content
- // --> targetContent.execute( "insert", dataStream )
- // 4) For move operations only: destroy the source content
- // sourceContent.execute( "delete", ... )
- //
- // This mechanism should work for all transfer operations, but generally
- // it's less efficient than the transfer command.
- void
- <B>transfer</B>
- <type>TransferInfo</type> aTransferInfo
-
- // This command obtains an exlusive write lock for the resource. The
- // lock is active until command "unlock" is executed or the OOo
- // session that obtained the lock ends or until the lock is released by
- // a third party (e.g. a system administrator).
- void
- <B>lock</B>
- void
- Exceptions: <type>InteractiveLockingLockedException</type>
- <type>InteractiveLockingLockExpiredException</type>
-
- // This command removes a lock obtained by executing the command "lock"
- // from the resource.
- void
- <B>unlock</B>
- void
- Exceptions: <type>InteractiveLockingNotLockedException</type>
- <type>InteractiveLockingLockExpiredException</type>
-
- // Note that <type>InteractiveLockingLockExpiredException</type> might
- // be raised by any command that requires a previously obtained lock.
-
- // This command creates a new non-persistent content of a given type.
- //
- // <p>Creation of a new (persistent) content:
- // <ol>
- // <li>creatabletypes = obtain "CreatableContentsInfo" property<br>
- // from creator
- // <li>choose a suitable type from creatabletypes
- // <li>newObject = execute command "createNewContent(type)" at<br>
- // creator
- // <li>initialize the new object (i.e. newObject.Property1 = ...)
- // <li>execute command "insert" at new content. This command
- // commits the data and makes the new content persistent.
- // </ol>
- //
- // This command must be supported by every Content that supports the
- // property "CreatableContentsInfo" if the returned property value
- // contains a non-empty sequence of creatable types.
- //
- // Note: This command is part of the replacement for the deprecated
- // interface <type>XContentCreator</type>.
- <type>XContent</type> >
- <B>createNewContent</B>
- <type>ContentInfo<type> contentinfo
-
- =======================================================================
- Properties:
- =======================================================================
-
- -----------------------------------------------------------------------
- Mandatory properties:
- -----------------------------------------------------------------------
-
- // contains a unique(!) type string for the content ( i.e.
- // "application/vnd.sun.star.hierarchy-link" ). This property is always
- // read-only. It does not contain the media type ( MIME types ) of the
- // content. Media types may be provided through the optional property
- // "MediaType".
- // The value of this property should match the information on creatable
- // contents given by UCB contents that implement the property
- // "CreatableContentsInfo".
- string ContentType
-
- // indicates, whether a content can contain other contents.
- boolean IsFolder
-
- // indicates, whether a content is a document. This means, the
- // content can dump itself into a data sink.
- boolean IsDocument
-
- // contains the title of an object (e.g. the subject of a message).
- string Title;
-
- -----------------------------------------------------------------------
- Optional properties:
- -----------------------------------------------------------------------
-
- // contains the interval for automatic updates of an object.
- // It is specified in seconds.
- long AutoUpdateInterval
-
- // contains the maximum number of network connections
- // allowed for one (internet) protocol at a time. (e.g. The HTTP
- // cache can be configured to use a maximum for the number of
- // connections used for browsing.)
- short ConnectionLimit
-
- // contains the current connection mode for the object.
- // (see <type>ConnectionMode</type>)
- short ConnectionMode
-
- // contains the date and time the object was created.
- <type scope"com::sun::star::util">DateTime</type> DateCreated
-
- // contains the date and time the object was last modified.
- <type scope"com::sun::star::util">DateTime</type> DateModified
-
- // contains the count of documents of a folder.
- long DocumentCount;
-
- // contains the count of marked documents within a folder.
- long DocumentCountMarked
-
- // contains a sequence of documemt header fields (i.e. header
- // fields of a MIME-message, or the document info of an
- // office document ). For some standard header fields there
- // are predefined separate properties, like "MessageTo".
- sequence< <type>DocumentHeaderField</type> > DocumentHeader
-
- // contains information about the way a folder stores the
- // contents of (remote) documents.
- <type>DocumentStoreMode</type> DocumentStoreMode
-
- // contains the count of subfolders of a folder.
- long FolderCount
-
- // contains the free space left on a storage device. It is
- // specified in bytes.
- hyper FreeSpace
-
- // indicates whether a content has subcontents, which are documents.
- boolean HasDocuments
-
- // indicates whether a content has subcontents, which are folders.
- boolean HasFolders
-
- // indicates whether a content is "marked".
- boolean IsMarked
-
- // indicates whether a content has been "read".
- boolean IsRead;
-
- // indicates whether a content is read-only.
- boolean IsReadOnly
-
- // indicates whether a content is subscribed.
- boolean IsSubscribed
-
- // indicates whether the feature to store contents depending on
- // their age is active.
- boolean IsTimeLimitedStore;
-
- // indicates whether (sub)contents shall be automatically updated
- // everytime a (folder) content is opened. This property may be
- // used to control whether a folder content should read data only
- // from local cache when it is opened, or whether it should connect
- // to a server to obtain latest data.
- boolean UpdateOnOpen
-
- // contains the keywords of a document (e.g. the value
- // of the "keywords" header field of a news article).
- string Keywords
-
- // contains the media type ( MIME type ) of a content. It is highly
- // recommended to support this property if the content's implementation
- // can obtain the media type natively from its data source ( i.e.
- // HTTP servers provide media types for all their documents ).
- string MediaType
-
- // contains the BCC (blind carbon copy) receiver(s) of a message.
- string MessageBCC
-
- // contains the CC (carbon copy) receiver(s) of a message.
- string MessageCC
-
- // contains (the address of) the sender of a message.
- string MessageFrom
-
- // contains the ID of a message.
- string MessageId
-
- // contains the "In-Reply-To" field of a message.
- string MessageInReplyTo
-
- // contains the "Reply-To" field of a message.
- string MessageReplyTo
-
- // contains the recipient(s) of a message.
- string MessageTo
-
- // contains the name(s) of the newsgroup(s) into which a message
- // was posted.
- string NewsGroups
-
- // contains a password (e.g. needed to access a POP3-Server).
- string Password
-
- // contains a priority (i.e. of a message).
- <type>Priority</type> Priority
-
- // contains the "References" field of a news article.
- string References
-
- // contains the rules set for a content.
- <type>RuleSet</type> Rules
-
- // contains the count of seen/read subcontents of a folder content.
- long SeenCount
-
- // contains the base directory to use on a server. (e.g. Setting
- // the server base of an FTP-Account to "/pub/incoming"
- // will result in showing contents from that directory and not from
- // server's root directory)
- string ServerBase
-
- // contains a server name (e.g. The name of the server to use for
- // a POP3-Account).
- string ServerName
-
- // contains a numeric server port.
- short ServerPort
-
- // contains the size (usually in bytes) of an object.
- hyper Size
-
- // contains a size limit for an object. (e.g. One may specify the
- // maximum size of the HTTP-Cache)
- hyper SizeLimit
-
- // contains the count of subscribed contents of a folder.
- long SubscribedCount
-
- // contains the policy to use when synchronizing two objects.
- <type>SynchronizePolicy</type> SynchronizePolicy
-
- // contains information about the target frame to use when displaying
- // an object.
-
- <p>The value is a string containing three tokens, separated by ";"
- (A semicolon):<br/>
- <dl>
- <dt>1st token
- </dt><dd>Behavior on "select" ( single click )
- </dd><dt>2nd token
- </dt><dd>Behavior on "open" ( double click )
- </dd><dt>3rd token
- </dt><dd>Behavior on "open in new task" ( double click + CTRL key )
- </dd></dl>
- </p>
- <p> Each token may contain the following values:<br/>
- <dl>
- <dt>"_beamer"
- </dt><dd>Show in "Beamer"
- </dd><dt>"_top"
- </dt><dd>Show in current frame (replaces old)
- </dd><dt>"_blank"
- </dt><dd>Show in new task
- </dd></dl>
- </p>
- string TargetFrames
-
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list