diff options
author | Alexander Wilms <f.alexander.wilms@gmail.com> | 2014-02-25 22:38:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-26 07:31:08 -0600 |
commit | 060ab521fa0d5d6b9fcb97eab4718c04e8aec944 (patch) | |
tree | 398b92af90dbe2130f45969d2fd86a0922c0e2b9 /ucb/source/ucp/webdav | |
parent | 482ab0d09620f92eb3618125930dc7c4c8335b5e (diff) |
Remove visual noise from ucb
Conflicts:
ucb/source/ucp/webdav/webdavdatasupplier.cxx
ucb/source/ucp/webdav/webdavresponseparser.cxx
Change-Id: I96b69f4867bbaaf42c3d5fd159cbb3e4fe80a4db
Reviewed-on: https://gerrit.libreoffice.org/8329
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'ucb/source/ucp/webdav')
22 files changed, 335 insertions, 338 deletions
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx index 64106e14694e..5766fcb17df5 100644 --- a/ucb/source/ucp/webdav/ContentProperties.cxx +++ b/ucb/source/ucp/webdav/ContentProperties.cxx @@ -64,13 +64,13 @@ Important: HTTP headers will not be mapped to DAV properties; only to UCB properties. (Content-Length,Content-Type,Last-Modified) */ -//========================================================================= -//========================================================================= -// + + + // ContentProperties Implementation. -// -//========================================================================= -//========================================================================= + + + // static member! uno::Any ContentProperties::m_aEmptyAny; @@ -116,7 +116,7 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) m_bTrailingSlash = sal_True; } -//========================================================================= + ContentProperties::ContentProperties( const OUString & rTitle, sal_Bool bFolder ) : m_xProps( new PropertyValueMap ), @@ -130,7 +130,7 @@ ContentProperties::ContentProperties( = PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true ); } -//========================================================================= + ContentProperties::ContentProperties( const OUString & rTitle ) : m_xProps( new PropertyValueMap ), m_bTrailingSlash( sal_False ) @@ -139,14 +139,14 @@ ContentProperties::ContentProperties( const OUString & rTitle ) = PropertyValue( uno::makeAny( rTitle ), true ); } -//========================================================================= + ContentProperties::ContentProperties() : m_xProps( new PropertyValueMap ), m_bTrailingSlash( sal_False ) { } -//========================================================================= + ContentProperties::ContentProperties( const ContentProperties & rOther ) : m_aEscapedTitle( rOther.m_aEscapedTitle ), m_xProps( rOther.m_xProps.get() @@ -156,7 +156,7 @@ ContentProperties::ContentProperties( const ContentProperties & rOther ) { } -//========================================================================= + bool ContentProperties::contains( const OUString & rName ) const { if ( get( rName ) ) @@ -165,7 +165,7 @@ bool ContentProperties::contains( const OUString & rName ) const return false; } -//========================================================================= + const uno::Any & ContentProperties::getValue( const OUString & rName ) const { @@ -176,7 +176,7 @@ const uno::Any & ContentProperties::getValue( return m_aEmptyAny; } -//========================================================================= + const PropertyValue * ContentProperties::get( const OUString & rName ) const { @@ -199,17 +199,17 @@ const PropertyValue * ContentProperties::get( return &(*it).second; } -//========================================================================= + // static void ContentProperties::UCBNamesToDAVNames( const uno::Sequence< beans::Property > & rProps, std::vector< OUString > & propertyNames, bool bIncludeUnmatched /* = true */ ) { - ////////////////////////////////////////////////////////////// + // Assemble list of DAV properties to obtain from server. // Append DAV properties needed to obtain requested UCB props. - ////////////////////////////////////////////////////////////// + // DAV UCB // creationdate <- DateCreated @@ -293,17 +293,17 @@ void ContentProperties::UCBNamesToDAVNames( } } -//========================================================================= + // static void ContentProperties::UCBNamesToHTTPNames( const uno::Sequence< beans::Property > & rProps, std::vector< OUString > & propertyNames, bool bIncludeUnmatched /* = true */ ) { - ////////////////////////////////////////////////////////////// + // Assemble list of HTTP header names to obtain from server. // Append HTTP headers needed to obtain requested UCB props. - ////////////////////////////////////////////////////////////// + // HTTP UCB // Last-Modified <- DateModified @@ -335,7 +335,7 @@ void ContentProperties::UCBNamesToHTTPNames( } } -//========================================================================= + bool ContentProperties::containsAllNames( const uno::Sequence< beans::Property >& rProps, std::vector< OUString > & rNamesNotContained ) const @@ -356,7 +356,7 @@ bool ContentProperties::containsAllNames( return ( rNamesNotContained.size() == 0 ); } -//========================================================================= + void ContentProperties::addProperties( const std::vector< OUString > & rProps, const ContentProperties & rContentProps ) @@ -385,7 +385,7 @@ void ContentProperties::addProperties( } } -//========================================================================= + void ContentProperties::addProperties( const ContentProperties & rProps ) { PropertyValueMap::const_iterator it = rProps.m_xProps->begin(); @@ -399,7 +399,7 @@ void ContentProperties::addProperties( const ContentProperties & rProps ) } } -//========================================================================= + void ContentProperties::addProperties( const std::vector< DAVPropertyValue > & rProps ) { @@ -413,13 +413,13 @@ void ContentProperties::addProperties( } } -//========================================================================= + void ContentProperties::addProperty( const DAVPropertyValue & rProp ) { addProperty( rProp.Name, rProp.Value, rProp.IsCaseSensitive ); } -//========================================================================= + void ContentProperties::addProperty( const OUString & rName, const com::sun::star::uno::Any & rValue, bool bIsCaseSensitive ) @@ -534,13 +534,13 @@ void ContentProperties::addProperty( const OUString & rName, (*m_xProps)[ rName ] = PropertyValue( rValue, bIsCaseSensitive ); } -//========================================================================= -//========================================================================= -// + + + // CachableContentProperties Implementation. -// -//========================================================================= -//========================================================================= + + + namespace { @@ -584,14 +584,14 @@ namespace } // namespace -//========================================================================= + CachableContentProperties::CachableContentProperties( const ContentProperties & rProps ) { addProperties( rProps ); } -//========================================================================= + void CachableContentProperties::addProperties( const ContentProperties & rProps ) { @@ -611,7 +611,7 @@ void CachableContentProperties::addProperties( } } -//========================================================================= + void CachableContentProperties::addProperties( const std::vector< DAVPropertyValue > & rProps ) { diff --git a/ucb/source/ucp/webdav/ContentProperties.hxx b/ucb/source/ucp/webdav/ContentProperties.hxx index 2e7054be0646..286a699d9fc3 100644 --- a/ucb/source/ucp/webdav/ContentProperties.hxx +++ b/ucb/source/ucp/webdav/ContentProperties.hxx @@ -38,7 +38,7 @@ namespace http_dav_ucp struct DAVResource; -//========================================================================= + struct equalString { @@ -56,11 +56,11 @@ struct hashString } }; -//========================================================================= -// + + // PropertyValueMap. -// -//========================================================================= + + class PropertyValue { diff --git a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx index 82822239da40..1f7ff038f18a 100644 --- a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx @@ -28,15 +28,15 @@ namespace http_dav_ucp { -//========================================================================= -//========================================================================= -//========================================================================= -// + + + + // class DAVAuthListenerImpl. -// -//========================================================================= -//========================================================================= + + + class DAVAuthListener_Impl : public DAVAuthListener diff --git a/ucb/source/ucp/webdav/DAVException.hxx b/ucb/source/ucp/webdav/DAVException.hxx index 54b85003c82e..56ed531d9a28 100644 --- a/ucb/source/ucp/webdav/DAVException.hxx +++ b/ucb/source/ucp/webdav/DAVException.hxx @@ -27,9 +27,9 @@ namespace http_dav_ucp { -///////////////////////////////////////////////////////////////////////////// + // HTTP/WebDAV status codes -///////////////////////////////////////////////////////////////////////////// + const sal_uInt16 SC_NONE = 0; @@ -93,7 +93,7 @@ const sal_uInt16 SC_HTTP_VERSION_NOT_SUPPORTED = 505; // DAV extensions const sal_uInt16 SC_INSUFFICIENT_STORAGE = 507; -///////////////////////////////////////////////////////////////////////////// + class DAVException { diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index c997a4a03c9d..47219113a2f1 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -31,15 +31,15 @@ using namespace http_dav_ucp; using namespace com::sun::star; -//========================================================================= -//========================================================================= -// + + + // DAVAuthListener_Impl Implementation. -// -//========================================================================= -//========================================================================= -//========================================================================= + + + + // virtual int DAVAuthListener_Impl::authenticate( const OUString & inRealm, @@ -121,15 +121,15 @@ int DAVAuthListener_Impl::authenticate( return -1; } -//========================================================================= -//========================================================================= -// + + + // DAVResourceAccess Implementation. -// -//========================================================================= -//========================================================================= -//========================================================================= + + + + DAVResourceAccess::DAVResourceAccess( const uno::Reference< uno::XComponentContext > & rContext, rtl::Reference< DAVSessionFactory > const & rSessionFactory, @@ -140,7 +140,7 @@ DAVResourceAccess::DAVResourceAccess( { } -//========================================================================= + DAVResourceAccess::DAVResourceAccess( const DAVResourceAccess & rOther ) : m_aURL( rOther.m_aURL ), m_aPath( rOther.m_aPath ), @@ -151,7 +151,7 @@ DAVResourceAccess::DAVResourceAccess( const DAVResourceAccess & rOther ) { } -//========================================================================= + DAVResourceAccess & DAVResourceAccess::operator=( const DAVResourceAccess & rOther ) { @@ -165,7 +165,7 @@ DAVResourceAccess & DAVResourceAccess::operator=( return *this; } -//========================================================================= + void DAVResourceAccess::PROPFIND( const Depth nDepth, const std::vector< OUString > & rPropertyNames, @@ -209,7 +209,7 @@ void DAVResourceAccess::PROPFIND( while ( bRetry ); } -//========================================================================= + void DAVResourceAccess::PROPFIND( const Depth nDepth, std::vector< DAVResourceInfo > & rResInfo, @@ -250,7 +250,7 @@ void DAVResourceAccess::PROPFIND( while ( bRetry ); } -//========================================================================= + void DAVResourceAccess::PROPPATCH( const std::vector< ProppatchValue >& rValues, const uno::Reference< ucb::XCommandEnvironment >& xEnv ) @@ -289,7 +289,7 @@ void DAVResourceAccess::PROPPATCH( while ( bRetry ); } -//========================================================================= + void DAVResourceAccess::HEAD( const std::vector< OUString > & rHeaderNames, DAVResource & rResource, @@ -330,7 +330,7 @@ void DAVResourceAccess::HEAD( while ( bRetry ); } -//========================================================================= + uno::Reference< io::XInputStream > DAVResourceAccess::GET( const uno::Reference< ucb::XCommandEnvironment > & xEnv ) throw( DAVException ) @@ -371,7 +371,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( return xStream; } -//========================================================================= + void DAVResourceAccess::GET( uno::Reference< io::XOutputStream > & rStream, const uno::Reference< ucb::XCommandEnvironment > & xEnv ) @@ -410,7 +410,7 @@ void DAVResourceAccess::GET( while ( bRetry ); } -//========================================================================= + uno::Reference< io::XInputStream > DAVResourceAccess::GET( const std::vector< OUString > & rHeaderNames, DAVResource & rResource, @@ -455,7 +455,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( return xStream; } -//========================================================================= + uno::Reference< io::XInputStream > DAVResourceAccess::GET( DAVRequestHeaders &rRequestHeaders, const std::vector< OUString > & rHeaderNames, @@ -500,7 +500,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( return xStream; } -//========================================================================= + void DAVResourceAccess::GET( uno::Reference< io::XOutputStream > & rStream, const std::vector< OUString > & rHeaderNames, @@ -543,7 +543,7 @@ void DAVResourceAccess::GET( while ( bRetry ); } -//========================================================================= + void DAVResourceAccess::abort() throw( DAVException ) { @@ -553,7 +553,7 @@ void DAVResourceAccess::abort() OSL_TRACE( "Not implemented. -> #i106766#" ); } -//========================================================================= + namespace { void resetInputStream( const uno::Reference< io::XInputStream > & rStream ) @@ -581,7 +581,7 @@ namespace { } // namespace -//========================================================================= + void DAVResourceAccess::PUT( const uno::Reference< io::XInputStream > & rStream, const uno::Reference< ucb::XCommandEnvironment > & xEnv ) @@ -628,7 +628,7 @@ void DAVResourceAccess::PUT( while ( bRetry ); } -//========================================================================= + uno::Reference< io::XInputStream > DAVResourceAccess::POST( const OUString & rContentType, const OUString & rReferer, @@ -691,7 +691,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::POST( return xStream; } -//========================================================================= + void DAVResourceAccess::POST( const OUString & rContentType, const OUString & rReferer, @@ -753,7 +753,7 @@ void DAVResourceAccess::POST( while ( bRetry ); } -//========================================================================= + void DAVResourceAccess::MKCOL( const uno::Reference< ucb::XCommandEnvironment > & xEnv ) throw( DAVException ) @@ -790,7 +790,7 @@ void DAVResourceAccess::MKCOL( while ( bRetry ); } -//========================================================================= + void DAVResourceAccess::COPY( const OUString & rSourcePath, const OUString & rDestinationURI, @@ -832,7 +832,7 @@ void DAVResourceAccess::COPY( while ( bRetry ); } -//========================================================================= + void DAVResourceAccess::MOVE( const OUString & rSourcePath, const OUString & rDestinationURI, @@ -874,7 +874,7 @@ void DAVResourceAccess::MOVE( while ( bRetry ); } -//========================================================================= + void DAVResourceAccess::DESTROY( const uno::Reference< ucb::XCommandEnvironment > & xEnv ) throw( DAVException ) @@ -911,7 +911,7 @@ void DAVResourceAccess::DESTROY( while ( bRetry ); } -//========================================================================= + // set new lock. void DAVResourceAccess::LOCK( ucb::Lock & inLock, @@ -952,7 +952,7 @@ void DAVResourceAccess::LOCK( } #if 0 // currently not used, but please don't remove code -//========================================================================= + // refresh existing lock. sal_Int64 DAVResourceAccess::LOCK( sal_Int64 nTimeout, @@ -997,7 +997,7 @@ sal_Int64 DAVResourceAccess::LOCK( } #endif -//========================================================================= + void DAVResourceAccess::UNLOCK( const uno::Reference< ucb::XCommandEnvironment > & xEnv ) throw ( DAVException ) @@ -1034,7 +1034,7 @@ void DAVResourceAccess::UNLOCK( while ( bRetry ); } -//========================================================================= + void DAVResourceAccess::setURL( const OUString & rNewURL ) throw( DAVException ) { @@ -1043,7 +1043,7 @@ void DAVResourceAccess::setURL( const OUString & rNewURL ) m_aPath = OUString(); // Next initialize() will create new session. } -//========================================================================= + // init dav session and path void DAVResourceAccess::initialize() throw ( DAVException ) @@ -1085,7 +1085,7 @@ void DAVResourceAccess::initialize() } } -//========================================================================= + const OUString & DAVResourceAccess::getRequestURI() const { OSL_ENSURE( m_xSession.is(), @@ -1098,7 +1098,7 @@ const OUString & DAVResourceAccess::getRequestURI() const return m_aPath; } -//========================================================================= + // static void DAVResourceAccess::getUserRequestHeaders( const uno::Reference< ucb::XCommandEnvironment > & xEnv, @@ -1126,7 +1126,7 @@ void DAVResourceAccess::getUserRequestHeaders( } } -//========================================================================= + sal_Bool DAVResourceAccess::detectRedirectCycle( const OUString& rRedirectURL ) throw ( DAVException ) @@ -1149,7 +1149,7 @@ sal_Bool DAVResourceAccess::detectRedirectCycle( return sal_False; } -//========================================================================= + void DAVResourceAccess::resetUri() { osl::Guard< osl::Mutex > aGuard( m_aMutex ); @@ -1164,7 +1164,7 @@ void DAVResourceAccess::resetUri() } } -//========================================================================= + sal_Bool DAVResourceAccess::handleException( DAVException & e, int errorCount ) throw ( DAVException ) { diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.hxx b/ucb/source/ucp/webdav/DAVResourceAccess.hxx index 4c142705c008..7dcecc473656 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.hxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.hxx @@ -76,7 +76,7 @@ public: { return m_xSessionFactory; } // DAV methods - // + // allprop & named void diff --git a/ucb/source/ucp/webdav/DAVSession.hxx b/ucb/source/ucp/webdav/DAVSession.hxx index e02ff46a1e77..9708fa0aa91a 100644 --- a/ucb/source/ucp/webdav/DAVSession.hxx +++ b/ucb/source/ucp/webdav/DAVSession.hxx @@ -64,7 +64,7 @@ public: virtual sal_Bool UsesProxy() = 0; // DAV methods - // + // NOT USED /* diff --git a/ucb/source/ucp/webdav/PropertyMap.hxx b/ucb/source/ucp/webdav/PropertyMap.hxx index 1729e07caeef..c1ec9828eeec 100644 --- a/ucb/source/ucp/webdav/PropertyMap.hxx +++ b/ucb/source/ucp/webdav/PropertyMap.hxx @@ -27,7 +27,7 @@ namespace http_dav_ucp { -//========================================================================= + struct equalPropertyName { diff --git a/ucb/source/ucp/webdav/SerfInputStream.hxx b/ucb/source/ucp/webdav/SerfInputStream.hxx index 2045df6913c4..03e2a373e9a9 100644 --- a/ucb/source/ucp/webdav/SerfInputStream.hxx +++ b/ucb/source/ucp/webdav/SerfInputStream.hxx @@ -31,11 +31,11 @@ namespace http_dav_ucp { -// ------------------------------------------------------------------- + // SerfInputStream // A simple XInputStream implementation provided specifically for use // by the DAVSession::GET method. -// ------------------------------------------------------------------- + class SerfInputStream : public ::com::sun::star::io::XInputStream, public ::com::sun::star::io::XSeekable, public ::cppu::OWeakObject diff --git a/ucb/source/ucp/webdav/SerfSession.hxx b/ucb/source/ucp/webdav/SerfSession.hxx index 291c1858e6bf..b6cc98f6db44 100644 --- a/ucb/source/ucp/webdav/SerfSession.hxx +++ b/ucb/source/ucp/webdav/SerfSession.hxx @@ -37,10 +37,10 @@ namespace http_dav_ucp class SerfRequestProcessor; -// ------------------------------------------------------------------- + // SerfSession // A DAVSession implementation using the neon/expat library -// ------------------------------------------------------------------- + class SerfSession : public DAVSession { diff --git a/ucb/source/ucp/webdav/SerfUri.hxx b/ucb/source/ucp/webdav/SerfUri.hxx index 2a05790baf14..5c069865dad6 100644 --- a/ucb/source/ucp/webdav/SerfUri.hxx +++ b/ucb/source/ucp/webdav/SerfUri.hxx @@ -31,10 +31,10 @@ namespace http_dav_ucp #define DEFAULT_HTTP_PORT 80 #define DEFAULT_HTTPS_PORT 443 -// ------------------------------------------------------------------- + // SerfUri // A URI implementation for use with the neon/expat library -// ------------------------------------------------------------------- + class SerfUri { private: diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx index ca48a107249a..b5938f7c5299 100644 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx @@ -25,7 +25,7 @@ using namespace http_dav_ucp; using namespace ::com::sun::star; -////////////////////////////////////////////////////////////////////////// + struct UCBDeadPropertyValueParseContext { @@ -71,7 +71,7 @@ const OUString UCBDeadPropertyValue::aXMLEnd #define STATE_VALUE (STATE_TOP + 2) /* -////////////////////////////////////////////////////////////////////////// + extern "C" int UCBDeadPropertyValue_startelement_callback( void *, int parent, @@ -99,7 +99,7 @@ extern "C" int UCBDeadPropertyValue_startelement_callback( return NE_XML_DECLINE; } -////////////////////////////////////////////////////////////////////////// + extern "C" int UCBDeadPropertyValue_chardata_callback( void *userdata, int state, @@ -130,7 +130,7 @@ extern "C" int UCBDeadPropertyValue_chardata_callback( return 0; // zero to continue, non-zero to abort parsing } -////////////////////////////////////////////////////////////////////////// + extern "C" int UCBDeadPropertyValue_endelement_callback( void *userdata, int state, @@ -161,13 +161,13 @@ extern "C" int UCBDeadPropertyValue_endelement_callback( } */ -////////////////////////////////////////////////////////////////////////// + static OUString encodeValue( const OUString & rValue ) { // Note: I do not use the usual & + < + > encoding, because // I want to prevent any XML parser from trying to 'understand' // the value. This caused problems: - // + // Example: // - Unencoded property value: x<z // PROPPATCH: @@ -198,7 +198,7 @@ static OUString encodeValue( const OUString & rValue ) } /* -////////////////////////////////////////////////////////////////////////// + static OUString decodeValue( const OUString & rValue ) { OUStringBuffer aResult; @@ -318,7 +318,7 @@ static OUString decodeValue( const OUString & rValue ) } */ -////////////////////////////////////////////////////////////////////////// + // static bool UCBDeadPropertyValue::supportsType( const uno::Type & rType ) { @@ -346,7 +346,7 @@ bool UCBDeadPropertyValue::supportsType( const uno::Type & rType ) return true; } -////////////////////////////////////////////////////////////////////////// + // static bool UCBDeadPropertyValue::createFromXML( const OString & /*rInData*/, uno::Any & /*rOutData*/ ) @@ -432,7 +432,7 @@ bool UCBDeadPropertyValue::createFromXML( const OString & /*rInData*/, return success; } -////////////////////////////////////////////////////////////////////////// + // static bool UCBDeadPropertyValue::toXML( const uno::Any & rInData, OUString & rOutData ) diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 44a1d2c663bb..8c1b5269ab7b 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -187,15 +187,15 @@ static void lcl_sendPartialGETRequest( bool &bError, } } -//========================================================================= -//========================================================================= -// + + + // Content Implementation. -// -//========================================================================= -//========================================================================= -//========================================================================= + + + + // ctr for content on an existing webdav resource Content::Content( const uno::Reference< uno::XComponentContext >& rxContext, @@ -226,7 +226,7 @@ Content::Content( } } -//========================================================================= + // ctr for content on an non-existing webdav resource Content::Content( const uno::Reference< uno::XComponentContext >& rxContext, @@ -255,17 +255,17 @@ Content::Content( // Do not set m_aEscapedTitle here! Content::insert relays on this!!! } -//========================================================================= + // virtual Content::~Content() { } -//========================================================================= -// + + // XInterface methods. -// -//========================================================================= + + // virtual void SAL_CALL Content::acquire() @@ -274,7 +274,7 @@ void SAL_CALL Content::acquire() ContentImplHelper::acquire(); } -//========================================================================= + // virtual void SAL_CALL Content::release() throw( ) @@ -282,7 +282,7 @@ void SAL_CALL Content::release() ContentImplHelper::release(); } -//========================================================================= + // virtual uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) throw ( uno::RuntimeException ) @@ -330,15 +330,15 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) return aRet.hasValue() ? aRet : ContentImplHelper::queryInterface( rType ); } -//========================================================================= -// + + // XTypeProvider methods. -// -//========================================================================= + + XTYPEPROVIDER_COMMON_IMPL( Content ); -//========================================================================= + // virtual uno::Sequence< uno::Type > SAL_CALL Content::getTypes() throw( uno::RuntimeException ) @@ -428,11 +428,11 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() return (*pCollection).getTypes(); } -//========================================================================= -// + + // XServiceInfo methods. -// -//========================================================================= + + // virtual OUString SAL_CALL Content::getImplementationName() @@ -441,7 +441,7 @@ OUString SAL_CALL Content::getImplementationName() return OUString( "com.sun.star.comp.ucb.WebDAVContent" ); } -//========================================================================= + // virtual uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException ) @@ -451,11 +451,11 @@ uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames() return aSNS; } -//========================================================================= -// + + // XContent methods. -// -//========================================================================= + + // virtual OUString SAL_CALL Content::getContentType() @@ -481,11 +481,11 @@ OUString SAL_CALL Content::getContentType() return OUString( WEBDAV_CONTENT_TYPE ); } -//========================================================================= -// + + // XCommandProcessor methods. -// -//========================================================================= + + // virtual uno::Any SAL_CALL Content::execute( @@ -505,9 +505,9 @@ uno::Any SAL_CALL Content::execute( if ( aCommand.Name == "getPropertyValues" ) { - ////////////////////////////////////////////////////////////////// + // getPropertyValues - ////////////////////////////////////////////////////////////////// + uno::Sequence< beans::Property > Properties; if ( !( aCommand.Argument >>= Properties ) ) @@ -525,9 +525,9 @@ uno::Any SAL_CALL Content::execute( } else if ( aCommand.Name == "setPropertyValues" ) { - ////////////////////////////////////////////////////////////////// + // setPropertyValues - ////////////////////////////////////////////////////////////////// + uno::Sequence< beans::PropertyValue > aProperties; if ( !( aCommand.Argument >>= aProperties ) ) @@ -556,9 +556,9 @@ uno::Any SAL_CALL Content::execute( } else if ( aCommand.Name == "getPropertySetInfo" ) { - ////////////////////////////////////////////////////////////////// + // getPropertySetInfo - ////////////////////////////////////////////////////////////////// + // Note: Implemented by base class. aRet <<= getPropertySetInfo( Environment, @@ -566,18 +566,18 @@ uno::Any SAL_CALL Content::execute( } else if ( aCommand.Name == "getCommandInfo" ) { - ////////////////////////////////////////////////////////////////// + // getCommandInfo - ////////////////////////////////////////////////////////////////// + // Note: Implemented by base class. aRet <<= getCommandInfo( Environment, sal_False ); } else if ( aCommand.Name == "open" ) { - ////////////////////////////////////////////////////////////////// + // open - ////////////////////////////////////////////////////////////////// + ucb::OpenCommandArgument2 aOpenCommand; if ( !( aCommand.Argument >>= aOpenCommand ) ) @@ -595,9 +595,9 @@ uno::Any SAL_CALL Content::execute( } else if ( aCommand.Name == "insert" ) { - ////////////////////////////////////////////////////////////////// + // insert - ////////////////////////////////////////////////////////////////// + ucb::InsertCommandArgument arg; if ( !( aCommand.Argument >>= arg ) ) @@ -615,9 +615,9 @@ uno::Any SAL_CALL Content::execute( } else if ( aCommand.Name == "delete" ) { - ////////////////////////////////////////////////////////////////// + // delete - ////////////////////////////////////////////////////////////////// + sal_Bool bDeletePhysical = sal_False; aCommand.Argument >>= bDeletePhysical; @@ -655,10 +655,10 @@ uno::Any SAL_CALL Content::execute( } else if ( aCommand.Name == "transfer" && isFolder( Environment ) ) { - ////////////////////////////////////////////////////////////////// + // transfer // ( Not available at documents ) - ////////////////////////////////////////////////////////////////// + ucb::TransferInfo transferArgs; if ( !( aCommand.Argument >>= transferArgs ) ) @@ -676,9 +676,9 @@ uno::Any SAL_CALL Content::execute( } else if ( aCommand.Name == "post" ) { - ////////////////////////////////////////////////////////////////// + // post - ////////////////////////////////////////////////////////////////// + ucb::PostCommandArgument2 aArg; if ( !( aCommand.Argument >>= aArg ) ) @@ -697,27 +697,27 @@ uno::Any SAL_CALL Content::execute( else if ( aCommand.Name == "lock" && supportsExclusiveWriteLock( Environment ) ) { - ////////////////////////////////////////////////////////////////// + // lock - ////////////////////////////////////////////////////////////////// + lock( Environment ); } else if ( aCommand.Name == "unlock" && supportsExclusiveWriteLock( Environment ) ) { - ////////////////////////////////////////////////////////////////// + // unlock - ////////////////////////////////////////////////////////////////// + unlock( Environment ); } else if ( aCommand.Name == "createNewContent" && isFolder( Environment ) ) { - ////////////////////////////////////////////////////////////////// + // createNewContent - ////////////////////////////////////////////////////////////////// + ucb::ContentInfo aArg; if ( !( aCommand.Argument >>= aArg ) ) @@ -795,9 +795,9 @@ uno::Any SAL_CALL Content::execute( } else { - ////////////////////////////////////////////////////////////////// + // Unsupported command - ////////////////////////////////////////////////////////////////// + ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( @@ -814,7 +814,7 @@ uno::Any SAL_CALL Content::execute( return aRet; } -//========================================================================= + // virtual void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ ) throw( uno::RuntimeException ) @@ -838,11 +838,11 @@ void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ ) } } -//========================================================================= -// + + // XPropertyContainer methods. -// -//========================================================================= + + void Content::addProperty( const com::sun::star::ucb::PropertyCommandArgument &aCmdArg, const uno::Reference< ucb::XCommandEnvironment >& xEnv ) @@ -875,10 +875,10 @@ throw( beans::PropertyExistException, OUString( "\"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. - ////////////////////////////////////////////////////////////////////// + // Take into account special properties with custom namespace // using <prop:the_propname xmlns:prop="the_namespace"> @@ -893,9 +893,9 @@ throw( beans::PropertyExistException, throw beans::PropertyExistException(); } - ////////////////////////////////////////////////////////////////////// + // Add a new dynamic property. - ////////////////////////////////////////////////////////////////////// + ProppatchValue aValue( PROPSET, aProperty.Name, aDefaultValue ); @@ -1006,9 +1006,9 @@ throw( beans::UnknownPropertyException, } #endif - ////////////////////////////////////////////////////////////////////// + // Try to remove property from server. - ////////////////////////////////////////////////////////////////////// + try { @@ -1117,11 +1117,11 @@ void SAL_CALL Content::removeProperty( const rtl::OUString& Name ) uno::Reference< ucb::XCommandEnvironment >() ); } -//========================================================================= -// + + // XContentCreator methods. -// -//========================================================================= + + // virtual uno::Sequence< ucb::ContentInfo > SAL_CALL @@ -1157,7 +1157,7 @@ Content::queryCreatableContentsInfo() return aSeq; } -//========================================================================= + // virtual uno::Reference< ucb::XContent > SAL_CALL Content::createNewContent( const ucb::ContentInfo& Info ) @@ -1211,7 +1211,7 @@ Content::createNewContent( const ucb::ContentInfo& Info ) } } -//========================================================================= + // virtual OUString Content::getParentURL() { @@ -1241,11 +1241,11 @@ OUString Content::getParentURL() return OUString( aURL.copy( 0, nPos + 1 ) ); } -//========================================================================= -// + + // Non-interface methods. -// -//========================================================================= + + // static uno::Reference< sdbc::XRow > Content::getPropertyValues( @@ -1331,7 +1331,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( return uno::Reference< sdbc::XRow >( xRow.get() ); } -//========================================================================= + uno::Reference< sdbc::XRow > Content::getPropertyValues( const uno::Sequence< beans::Property >& rProperties, const uno::Reference< ucb::XCommandEnvironment >& xEnv ) @@ -1374,9 +1374,9 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( if ( !m_bTransient && !bHasAll ) { - ///////////////////////////////////////////////////////////////////// + // Obtain values from server... - ///////////////////////////////////////////////////////////////////// + // First, identify whether resource is DAV or not const ResourceType & rType = getResourceType( xEnv, xResAccess ); @@ -1675,7 +1675,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( return xResultRow; } -//========================================================================= + uno::Sequence< uno::Any > Content::setPropertyValues( const uno::Sequence< beans::PropertyValue >& rValues, const uno::Reference< ucb::XCommandEnvironment >& xEnv ) @@ -1739,9 +1739,9 @@ uno::Sequence< uno::Any > Content::setPropertyValues( continue; } - ////////////////////////////////////////////////////////////////// + // Mandatory props. - ////////////////////////////////////////////////////////////////// + if ( rName == "ContentType" ) { @@ -1816,9 +1816,9 @@ uno::Sequence< uno::Any > Content::setPropertyValues( } else { - ////////////////////////////////////////////////////////////// + // Optional props. - ////////////////////////////////////////////////////////////// + rtl::OUString aSpecialName; bool bIsSpecial = DAVProperties::isUCBSpecialProperty( rName, aSpecialName ); @@ -2085,7 +2085,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( return aRet; } -//========================================================================= + uno::Any Content::open( const ucb::OpenCommandArgument2 & rArg, const uno::Reference< ucb::XCommandEnvironment > & xEnv ) @@ -2255,7 +2255,7 @@ uno::Any Content::open( return aRet; } -//========================================================================= + void Content::post( const ucb::PostCommandArgument2 & rArg, const uno::Reference< ucb::XCommandEnvironment > & xEnv ) @@ -2339,7 +2339,7 @@ void Content::post( } } -//========================================================================= + void Content::queryChildren( ContentRefList& rChildren ) { // Obtain a list with a snapshot of all currently instanciated contents @@ -2390,7 +2390,7 @@ void Content::queryChildren( ContentRefList& rChildren ) } } -//========================================================================= + void Content::insert( const uno::Reference< io::XInputStream > & xInputStream, sal_Bool bReplaceExisting, @@ -2635,7 +2635,7 @@ void Content::insert( } } -//========================================================================= + void Content::transfer( const ucb::TransferInfo & rArgs, const uno::Reference< ucb::XCommandEnvironment >& Environment ) @@ -2663,7 +2663,7 @@ void Content::transfer( aTargetURI = targetURI.GetPathBaseNameUnescaped(); // Check source's and target's URL scheme - // + const OUString aScheme = sourceURI.GetScheme().toAsciiLowerCase(); if ( aScheme == WEBDAV_URL_SCHEME ) { @@ -2706,7 +2706,7 @@ void Content::transfer( // (Neon does not support cross-server copy/move) // Check for same host - // + if ( sourceURI.GetHost().getLength() && ( sourceURI.GetHost() != targetURI.GetHost() ) ) { @@ -2871,7 +2871,7 @@ void Content::transfer( } } -//========================================================================= + void Content::destroy( sal_Bool bDeletePhysical ) throw( uno::Exception ) { @@ -2899,7 +2899,7 @@ void Content::destroy( sal_Bool bDeletePhysical ) } } -//========================================================================= + bool Content::supportsExclusiveWriteLock( const uno::Reference< ucb::XCommandEnvironment >& Environment ) { @@ -2925,7 +2925,7 @@ bool Content::supportsExclusiveWriteLock( return false; } -//========================================================================= + void Content::lock( const uno::Reference< ucb::XCommandEnvironment >& Environment ) throw( uno::Exception ) @@ -2964,7 +2964,7 @@ void Content::lock( } } -//========================================================================= + void Content::unlock( const uno::Reference< ucb::XCommandEnvironment >& Environment ) throw( uno::Exception ) @@ -2991,7 +2991,7 @@ void Content::unlock( } } -//========================================================================= + sal_Bool Content::exchangeIdentity( const uno::Reference< ucb::XContentIdentifier >& xNewId ) { @@ -3059,7 +3059,7 @@ sal_Bool Content::exchangeIdentity( return sal_False; } -//========================================================================= + sal_Bool Content::isFolder( const uno::Reference< ucb::XCommandEnvironment >& xEnv ) throw( uno::Exception ) @@ -3089,7 +3089,7 @@ sal_Bool Content::isFolder( return sal_False; } -//========================================================================= + uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) { // Map DAVException... @@ -3267,7 +3267,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) return aException; } -//========================================================================= + // static bool Content::shouldAccessNetworkAfterException( const DAVException & e ) { @@ -3281,7 +3281,7 @@ bool Content::shouldAccessNetworkAfterException( const DAVException & e ) return true; } -//========================================================================= + void Content::cancelCommandExecution( const DAVException & e, const uno::Reference< ucb::XCommandEnvironment > & xEnv, @@ -3292,7 +3292,7 @@ void Content::cancelCommandExecution( // Unreachable } -//========================================================================= + const OUString Content::getBaseURI( const std::auto_ptr< DAVResourceAccess > & rResAccess ) { @@ -3323,7 +3323,7 @@ Content::getBaseURI( const std::auto_ptr< DAVResourceAccess > & rResAccess ) return OUString( rResAccess->getURL() ); } -//========================================================================= + const Content::ResourceType & Content::getResourceType( const uno::Reference< ucb::XCommandEnvironment >& xEnv, const std::auto_ptr< DAVResourceAccess > & rResAccess ) @@ -3392,7 +3392,7 @@ const Content::ResourceType & Content::getResourceType( return m_eResourceType; } -//========================================================================= + const Content::ResourceType & Content::getResourceType( const uno::Reference< ucb::XCommandEnvironment >& xEnv ) throw ( uno::Exception ) diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx index 52f14c840c30..1438f9396a6d 100644 --- a/ucb/source/ucp/webdav/webdavcontent.hxx +++ b/ucb/source/ucp/webdav/webdavcontent.hxx @@ -54,12 +54,12 @@ namespace com { namespace sun { namespace star { namespace ucb { namespace http_dav_ucp { -//========================================================================= + // UNO service name for the content. #define WEBDAV_CONTENT_SERVICE_NAME "com.sun.star.ucb.WebDAVContent" -//========================================================================= + class ContentProvider; class ContentProperties; @@ -273,9 +273,9 @@ public: com::sun::star::beans::NotRemoveableException, com::sun::star::uno::RuntimeException ); - ////////////////////////////////////////////////////////////////////// + // Additional interfaces - ////////////////////////////////////////////////////////////////////// + // XContentCreator virtual com::sun::star::uno::Sequence< @@ -287,9 +287,9 @@ public: createNewContent( const com::sun::star::ucb::ContentInfo& Info ) throw( com::sun::star::uno::RuntimeException ); - ////////////////////////////////////////////////////////////////////// + // Non-interface methods. - ////////////////////////////////////////////////////////////////////// + DAVResourceAccess & getResourceAccess() { return *m_xResAccess; } diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx index 921d8e79378f..bbc984e85e80 100644 --- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx +++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx @@ -40,11 +40,11 @@ using namespace com::sun::star; using namespace http_dav_ucp; -//========================================================================= -// + + // ContentProvider implementation. -// -//========================================================================= + + bool ContentProvider::getProperty( const OUString & rPropName, beans::Property & rProp, bool bStrict ) @@ -56,9 +56,9 @@ bool ContentProvider::getProperty( { m_pProps = new PropertyMap; - ////////////////////////////////////////////////////////////// + // Fill map of known properties... - ////////////////////////////////////////////////////////////// + // Mandatory UCB properties. m_pProps->insert( @@ -237,9 +237,9 @@ bool ContentProvider::getProperty( } } - ////////////////////////////////////////////////////////////// + // Lookup property. - ////////////////////////////////////////////////////////////// + beans::Property aProp; aProp.Name = rPropName; @@ -264,11 +264,11 @@ bool ContentProvider::getProperty( return true; } -//========================================================================= -// + + // Content implementation. -// -//========================================================================= + + // virtual uno::Sequence< beans::Property > Content::getProperties( @@ -486,7 +486,7 @@ uno::Sequence< beans::Property > Content::getProperties( return aProperties; } -//========================================================================= + // virtual uno::Sequence< ucb::CommandInfo > Content::getCommands( const uno::Reference< ucb::XCommandEnvironment > & xEnv ) @@ -495,9 +495,9 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( uno::Sequence< ucb::CommandInfo > aCmdInfo( 10 ); - /////////////////////////////////////////////////////////////// + // Mandatory commands - /////////////////////////////////////////////////////////////// + aCmdInfo[ 0 ] = ucb::CommandInfo( @@ -522,9 +522,9 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( getCppuType( static_cast< uno::Sequence< beans::PropertyValue > * >( 0 ) ) ); - /////////////////////////////////////////////////////////////// + // Optional standard commands - /////////////////////////////////////////////////////////////// + aCmdInfo[ 4 ] = ucb::CommandInfo( @@ -544,9 +544,9 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( getCppuType( static_cast< ucb::OpenCommandArgument2 * >( 0 ) ) ); - /////////////////////////////////////////////////////////////// + // New commands - /////////////////////////////////////////////////////////////// + aCmdInfo[ 7 ] = ucb::CommandInfo( @@ -589,9 +589,9 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( if ( bFolder ) { - /////////////////////////////////////////////////////////////// + // Optional standard commands - /////////////////////////////////////////////////////////////// + aCmdInfo[ nPos ] = ucb::CommandInfo( diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx index d70b1619be96..c06176a40c03 100644 --- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx @@ -35,11 +35,11 @@ using namespace http_dav_ucp; namespace http_dav_ucp { -//========================================================================= -// + + // struct ResultListEntry. -// -//========================================================================= + + struct ResultListEntry { @@ -53,19 +53,19 @@ struct ResultListEntry ~ResultListEntry() { delete pData; } }; -//========================================================================= -// + + // ResultList. -// -//========================================================================= + + typedef std::vector< ResultListEntry* > ResultList; -//========================================================================= -// + + // struct DataSupplier_Impl. -// -//========================================================================= + + struct DataSupplier_Impl { @@ -86,7 +86,7 @@ struct DataSupplier_Impl ~DataSupplier_Impl(); }; -//========================================================================= + DataSupplier_Impl::~DataSupplier_Impl() { ResultList::const_iterator it = m_aResults.begin(); @@ -101,13 +101,13 @@ DataSupplier_Impl::~DataSupplier_Impl() } -//========================================================================= -//========================================================================= -// + + + // DataSupplier Implementation. -// -//========================================================================= -//========================================================================= + + + DataSupplier::DataSupplier( const uno::Reference< uno::XComponentContext >& rxContext, @@ -117,14 +117,14 @@ DataSupplier::DataSupplier( { } -//========================================================================= + // virtual DataSupplier::~DataSupplier() { delete m_pImpl; } -//========================================================================= + // virtual OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) { @@ -161,7 +161,7 @@ OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) return OUString(); } -//========================================================================= + // virtual uno::Reference< ucb::XContentIdentifier > DataSupplier::queryContentIdentifier( sal_uInt32 nIndex ) @@ -190,7 +190,7 @@ DataSupplier::queryContentIdentifier( sal_uInt32 nIndex ) return uno::Reference< ucb::XContentIdentifier >(); } -//========================================================================= + // virtual uno::Reference< ucb::XContent > DataSupplier::queryContent( sal_uInt32 nIndex ) @@ -227,7 +227,7 @@ DataSupplier::queryContent( sal_uInt32 nIndex ) return uno::Reference< ucb::XContent >(); } -//========================================================================= + // virtual bool DataSupplier::getResult( sal_uInt32 nIndex ) { @@ -252,7 +252,7 @@ bool DataSupplier::getResult( sal_uInt32 nIndex ) return false; } -//========================================================================= + // virtual sal_uInt32 DataSupplier::totalCount() { @@ -262,21 +262,21 @@ sal_uInt32 DataSupplier::totalCount() return m_pImpl->m_aResults.size(); } -//========================================================================= + // virtual sal_uInt32 DataSupplier::currentCount() { return m_pImpl->m_aResults.size(); } -//========================================================================= + // virtual bool DataSupplier::isCountFinal() { return m_pImpl->m_bCountFinal; } -//========================================================================= + // virtual uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues( sal_uInt32 nIndex ) @@ -310,7 +310,7 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues( return uno::Reference< sdbc::XRow >(); } -//========================================================================= + // virtual void DataSupplier::releasePropertyValues( sal_uInt32 nIndex ) { @@ -320,13 +320,13 @@ void DataSupplier::releasePropertyValues( sal_uInt32 nIndex ) m_pImpl->m_aResults[ nIndex ]->xRow = uno::Reference< sdbc::XRow >(); } -//========================================================================= + // virtual void DataSupplier::close() { } -//========================================================================= + // virtual void DataSupplier::validate() throw( ucb::ResultSetException ) @@ -335,7 +335,6 @@ void DataSupplier::validate() throw ucb::ResultSetException(); } -//========================================================================= bool DataSupplier::getData() { osl::ClearableGuard< osl::Mutex > aGuard( m_pImpl->m_aMutex ); diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index b30069d644f3..9cb0c4ced9c6 100644 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.cxx @@ -53,13 +53,13 @@ OUString &WebDAVUserAgent::operator()() const return aUserAgent; } -//========================================================================= -//========================================================================= -// + + + // ContentProvider Implementation. -// -//========================================================================= -//========================================================================= + + + ContentProvider::ContentProvider( const uno::Reference< uno::XComponentContext >& rContext ) @@ -114,58 +114,58 @@ ContentProvider::ContentProvider( } } -//========================================================================= + // virtual ContentProvider::~ContentProvider() { delete m_pProps; } -//========================================================================= -// + + // XInterface methods. -// -//========================================================================= + + XINTERFACE_IMPL_3( ContentProvider, lang::XTypeProvider, lang::XServiceInfo, ucb::XContentProvider ); -//========================================================================= -// + + // XTypeProvider methods. -// -//========================================================================= + + XTYPEPROVIDER_IMPL_3( ContentProvider, lang::XTypeProvider, lang::XServiceInfo, ucb::XContentProvider ); -//========================================================================= -// + + // XServiceInfo methods. -// -//========================================================================= + + XSERVICEINFO_IMPL_1_CTX( ContentProvider, OUString( "com.sun.star.comp.WebDAVContentProvider" ), OUString( WEBDAV_CONTENT_PROVIDER_SERVICE_NAME ) ); -//========================================================================= -// + + // Service factory implementation. -// -//========================================================================= + + ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider ); -//========================================================================= -// + + // XContentProvider methods. -// -//========================================================================= + + // virtual uno::Reference< ucb::XContent > SAL_CALL diff --git a/ucb/source/ucp/webdav/webdavprovider.hxx b/ucb/source/ucp/webdav/webdavprovider.hxx index 142c88e9759e..52148ec09b49 100644 --- a/ucb/source/ucp/webdav/webdavprovider.hxx +++ b/ucb/source/ucp/webdav/webdavprovider.hxx @@ -30,7 +30,7 @@ namespace http_dav_ucp { -//========================================================================= + // UNO service name for the provider. This name will be used by the UCB to // create instances of the provider. @@ -64,7 +64,7 @@ namespace http_dav_ucp { #define WEBDAV_COLLECTION_TYPE \ "application/" WEBDAV_URL_SCHEME "-collection" -//========================================================================= + class ContentProvider : public ::ucbhelper::ContentProviderImplHelper { @@ -93,13 +93,13 @@ public: throw( ::com::sun::star::ucb::IllegalIdentifierException, ::com::sun::star::uno::RuntimeException ); - ////////////////////////////////////////////////////////////////////// + // Additional interfaces - ////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////// + + // Non-interface methods. - ////////////////////////////////////////////////////////////////////// + rtl::Reference< DAVSessionFactory > getDAVSessionFactory() { return m_xDAVSessionFactory; } diff --git a/ucb/source/ucp/webdav/webdavresponseparser.cxx b/ucb/source/ucp/webdav/webdavresponseparser.cxx index dc1ffb6de750..8be333a1be34 100644 --- a/ucb/source/ucp/webdav/webdavresponseparser.cxx +++ b/ucb/source/ucp/webdav/webdavresponseparser.cxx @@ -30,11 +30,11 @@ #include <map> #include <unordered_map> -////////////////////////////////////////////////////////////////////////////// + using namespace com::sun::star; -////////////////////////////////////////////////////////////////////////////// + // WebDAVNamespace enum and StringToEnum converter namespace @@ -63,9 +63,7 @@ namespace } } // end of anonymous namespace -////////////////////////////////////////////////////////////////////////////// // WebDAVName enum and StringToEnum converter using unordered_map - namespace { enum WebDAVName @@ -136,7 +134,7 @@ namespace } } // end of anonymous namespace -////////////////////////////////////////////////////////////////////////////// + // WebDAVContext, holding information for each start/endElement pair namespace @@ -271,7 +269,7 @@ namespace } } // end of anonymous namespace -////////////////////////////////////////////////////////////////////////////// + // the Xml parser itself namespace @@ -786,7 +784,7 @@ namespace } } // end of anonymous namespace -////////////////////////////////////////////////////////////////////////////// + // wrapper for various calls to the parser namespace @@ -840,7 +838,7 @@ namespace } } // end of anonymous namespace -////////////////////////////////////////////////////////////////////////////// + // helper to parse a XML WebDAV response namespace http_dav_ucp diff --git a/ucb/source/ucp/webdav/webdavresponseparser.hxx b/ucb/source/ucp/webdav/webdavresponseparser.hxx index f385895a06b7..ceadd8a705ba 100644 --- a/ucb/source/ucp/webdav/webdavresponseparser.hxx +++ b/ucb/source/ucp/webdav/webdavresponseparser.hxx @@ -25,7 +25,7 @@ #include "DAVResource.hxx" #include <vector> -////////////////////////////////////////////////////////////////////////////// + namespace http_dav_ucp { @@ -33,11 +33,11 @@ namespace http_dav_ucp std::vector< DAVResourceInfo > parseWebDAVPropNameResponse(const com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& xInputStream); } // namespace http_dav_ucp -////////////////////////////////////////////////////////////////////////////// + #endif // _WEBDAVRESPONSEPARSER_HXX_ -////////////////////////////////////////////////////////////////////////////// + // eof /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/webdav/webdavresultset.cxx b/ucb/source/ucp/webdav/webdavresultset.cxx index ca6b56b1f9ff..fc1418031091 100644 --- a/ucb/source/ucp/webdav/webdavresultset.cxx +++ b/ucb/source/ucp/webdav/webdavresultset.cxx @@ -35,13 +35,13 @@ using namespace com::sun::star; using namespace http_dav_ucp; -//========================================================================= -//========================================================================= -// + + + // DynamicResultSet Implementation. -// -//========================================================================= -//========================================================================= + + + DynamicResultSet::DynamicResultSet( const uno::Reference< uno::XComponentContext >& rxContext, @@ -54,11 +54,11 @@ DynamicResultSet::DynamicResultSet( { } -//========================================================================= -// + + // Non-interface methods. -// -//========================================================================= + + void DynamicResultSet::initStatic() { @@ -71,7 +71,7 @@ void DynamicResultSet::initStatic() m_xEnv ); } -//========================================================================= + void DynamicResultSet::initDynamic() { m_xResultSet1 diff --git a/ucb/source/ucp/webdav/webdavservices.cxx b/ucb/source/ucp/webdav/webdavservices.cxx index 2aaaea128ef4..4b85a977d73f 100644 --- a/ucb/source/ucp/webdav/webdavservices.cxx +++ b/ucb/source/ucp/webdav/webdavservices.cxx @@ -25,14 +25,14 @@ using namespace com::sun::star; -//========================================================================= + extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//========================================================================= + extern "C" void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { @@ -43,9 +43,9 @@ extern "C" void * SAL_CALL component_getFactory( pServiceManager ) ); uno::Reference< lang::XSingleServiceFactory > xFactory; - ////////////////////////////////////////////////////////////////////// + // WebDAV Content Provider. - ////////////////////////////////////////////////////////////////////// + if ( ::http_dav_ucp::ContentProvider::getImplementationName_Static(). equalsAscii( pImplName ) ) @@ -53,7 +53,7 @@ extern "C" void * SAL_CALL component_getFactory( xFactory = ::http_dav_ucp::ContentProvider::createServiceFactory( xSMgr ); } - ////////////////////////////////////////////////////////////////////// + if ( xFactory.is() ) { |