diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2002-09-24 13:15:50 +0000 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2002-09-24 13:15:50 +0000 |
commit | 24f19e7ec5acf277cd1db2ee82799a0fcb1b819a (patch) | |
tree | 21c183fb01afcf8c55ab7714ba2d6f663b89dfab /ucb/source/ucp/webdav/ContentProperties.cxx | |
parent | 9d99bc95c446232234c6156dc056656bc1891096 (diff) |
#102945# - Added support for new property "BaseURI".
Diffstat (limited to 'ucb/source/ucp/webdav/ContentProperties.cxx')
-rw-r--r-- | ucb/source/ucp/webdav/ContentProperties.cxx | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx index 1810cb827dc5..3ca2d99fce89 100644 --- a/ucb/source/ucp/webdav/ContentProperties.cxx +++ b/ucb/source/ucp/webdav/ContentProperties.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ContentProperties.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: kso $ $Date: 2002-09-16 14:37:09 $ + * last change: $Author: kso $ $Date: 2002-09-24 14:15:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -288,10 +288,7 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) if ( rResource.uri.getStr()[ rResource.uri.getLength() - 1 ] == sal_Unicode( '/' ) ) - { -// if ( pIsFolder && *pIsFolder ) - m_bTrailingSlash = sal_True; - } + m_bTrailingSlash = sal_True; } //========================================================================= @@ -320,10 +317,11 @@ ContentProperties::ContentProperties( const rtl::OUString & rTitle ) //========================================================================= ContentProperties::ContentProperties( const ContentProperties & rOther ) : m_aEscapedTitle( rOther.m_aEscapedTitle ), + m_xProps( rOther.m_xProps.get() + ? new PropertyValueMap( *rOther.m_xProps ) + : new PropertyValueMap ), m_bTrailingSlash( rOther.m_bTrailingSlash ) { - if ( rOther.m_xProps.get() ) - m_xProps.reset( new PropertyValueMap( *rOther.m_xProps ) ); } //========================================================================= @@ -505,18 +503,27 @@ void ContentProperties::UCBNamesToHTTPNames( void ContentProperties::getMappableHTTPHeaders( std::vector< rtl::OUString > & rHeaderNames ) { + // -> DateModified rHeaderNames.push_back( rtl::OUString::createFromAscii( "Last-Modified" ) ); + + // -> MediaType rHeaderNames.push_back( rtl::OUString::createFromAscii( "Content-Type" ) ); + + // -> Size rHeaderNames.push_back( rtl::OUString::createFromAscii( "Content-Length" ) ); + + // -> BaseURI + rHeaderNames.push_back( + rtl::OUString::createFromAscii( "Content-Location" ) ); } //========================================================================= bool ContentProperties::containsAllNames( - const uno::Sequence< beans::Property >& rProps, - std::vector< rtl::OUString > & rNamesNotContained ) + const uno::Sequence< beans::Property >& rProps, + std::vector< rtl::OUString > & rNamesNotContained ) const { rNamesNotContained.clear(); @@ -535,8 +542,9 @@ bool ContentProperties::containsAllNames( } //========================================================================= -void ContentProperties::add( const std::vector< rtl::OUString > & rProps, - const ContentProperties & rContentProps ) +void ContentProperties::addProperties( + const std::vector< rtl::OUString > & rProps, + const ContentProperties & rContentProps ) { std::vector< rtl::OUString >::const_iterator it = rProps.begin(); std::vector< rtl::OUString >::const_iterator end = rProps.end(); @@ -559,3 +567,10 @@ void ContentProperties::add( const std::vector< rtl::OUString > & rProps, } } +//========================================================================= +void ContentProperties::addProperty( const rtl::OUString & rName, + const com::sun::star::uno::Any & rValue ) +{ + (*m_xProps)[ rName ] = rValue; +} + |