diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 12:06:47 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 14:23:11 +0200 |
commit | 1946794ae09ba732022fe6a74ea45e304ab70b84 (patch) | |
tree | e32bd7ba61fa021ecc7f8c85959df8ca837d6e81 /ucb/source/ucp/webdav/ContentProperties.cxx | |
parent | 5b08c6e7a21dda94d5b755eea0b1ed1e9c199bec (diff) |
mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).
Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
Diffstat (limited to 'ucb/source/ucp/webdav/ContentProperties.cxx')
-rw-r--r-- | ucb/source/ucp/webdav/ContentProperties.cxx | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx index 4c6e217ac39f..0ca32557aeec 100644 --- a/ucb/source/ucp/webdav/ContentProperties.cxx +++ b/ucb/source/ucp/webdav/ContentProperties.cxx @@ -88,16 +88,16 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) SerfUri aURI( rResource.uri ); m_aEscapedTitle = aURI.GetPathBaseName(); - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ OUString::createFromAscii( "Title" ) ] = PropertyValue( uno::makeAny( aURI.GetPathBaseNameUnescaped() ), true ); } catch ( DAVException const & ) { - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ OUString::createFromAscii( "Title" ) ] = PropertyValue( uno::makeAny( - rtl::OUString( "*** unknown ***" ) ), + OUString( "*** unknown ***" ) ), true ); } @@ -119,24 +119,24 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) //========================================================================= ContentProperties::ContentProperties( - const rtl::OUString & rTitle, sal_Bool bFolder ) + const OUString & rTitle, sal_Bool bFolder ) : m_xProps( new PropertyValueMap ), m_bTrailingSlash( sal_False ) { - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ OUString::createFromAscii( "Title" ) ] = PropertyValue( uno::makeAny( rTitle ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsFolder" ) ] + (*m_xProps)[ OUString::createFromAscii( "IsFolder" ) ] = PropertyValue( uno::makeAny( bFolder ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsDocument" ) ] + (*m_xProps)[ OUString::createFromAscii( "IsDocument" ) ] = PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true ); } //========================================================================= -ContentProperties::ContentProperties( const rtl::OUString & rTitle ) +ContentProperties::ContentProperties( const OUString & rTitle ) : m_xProps( new PropertyValueMap ), m_bTrailingSlash( sal_False ) { - (*m_xProps)[ rtl::OUString::createFromAscii( "Title" ) ] + (*m_xProps)[ OUString::createFromAscii( "Title" ) ] = PropertyValue( uno::makeAny( rTitle ), true ); } @@ -158,7 +158,7 @@ ContentProperties::ContentProperties( const ContentProperties & rOther ) } //========================================================================= -bool ContentProperties::contains( const rtl::OUString & rName ) const +bool ContentProperties::contains( const OUString & rName ) const { if ( get( rName ) ) return true; @@ -168,7 +168,7 @@ bool ContentProperties::contains( const rtl::OUString & rName ) const //========================================================================= const uno::Any & ContentProperties::getValue( - const rtl::OUString & rName ) const + const OUString & rName ) const { const PropertyValue * pProp = get( rName ); if ( pProp ) @@ -179,7 +179,7 @@ const uno::Any & ContentProperties::getValue( //========================================================================= const PropertyValue * ContentProperties::get( - const rtl::OUString & rName ) const + const OUString & rName ) const { PropertyValueMap::const_iterator it = m_xProps->find( rName ); const PropertyValueMap::const_iterator end = m_xProps->end(); @@ -204,7 +204,7 @@ const PropertyValue * ContentProperties::get( // static void ContentProperties::UCBNamesToDAVNames( const uno::Sequence< beans::Property > & rProps, - std::vector< rtl::OUString > & propertyNames, + std::vector< OUString > & propertyNames, bool bIncludeUnmatched /* = true */ ) { ////////////////////////////////////////////////////////////// @@ -298,7 +298,7 @@ void ContentProperties::UCBNamesToDAVNames( // static void ContentProperties::UCBNamesToHTTPNames( const uno::Sequence< beans::Property > & rProps, - std::vector< rtl::OUString > & propertyNames, + std::vector< OUString > & propertyNames, bool bIncludeUnmatched /* = true */ ) { ////////////////////////////////////////////////////////////// @@ -319,17 +319,17 @@ void ContentProperties::UCBNamesToHTTPNames( if ( rProp.Name == "DateModified" ) { propertyNames.push_back( - rtl::OUString::createFromAscii( "Last-Modified" ) ); + OUString::createFromAscii( "Last-Modified" ) ); } else if ( rProp.Name == "MediaType" ) { propertyNames.push_back( - rtl::OUString::createFromAscii( "Content-Type" ) ); + OUString::createFromAscii( "Content-Type" ) ); } else if ( rProp.Name == "Size" ) { propertyNames.push_back( - rtl::OUString::createFromAscii( "Content-Length" ) ); + OUString::createFromAscii( "Content-Length" ) ); } else { @@ -342,14 +342,14 @@ void ContentProperties::UCBNamesToHTTPNames( //========================================================================= bool ContentProperties::containsAllNames( const uno::Sequence< beans::Property >& rProps, - std::vector< rtl::OUString > & rNamesNotContained ) const + std::vector< OUString > & rNamesNotContained ) const { rNamesNotContained.clear(); sal_Int32 nCount = rProps.getLength(); for ( sal_Int32 n = 0; n < nCount; ++n ) { - const rtl::OUString & rName = rProps[ n ].Name; + const OUString & rName = rProps[ n ].Name; if ( !contains( rName ) ) { // Not found. @@ -362,15 +362,15 @@ bool ContentProperties::containsAllNames( //========================================================================= void ContentProperties::addProperties( - const std::vector< rtl::OUString > & rProps, + const std::vector< OUString > & rProps, const ContentProperties & rContentProps ) { - std::vector< rtl::OUString >::const_iterator it = rProps.begin(); - std::vector< rtl::OUString >::const_iterator end = rProps.end(); + std::vector< OUString >::const_iterator it = rProps.begin(); + std::vector< OUString >::const_iterator end = rProps.end(); while ( it != end ) { - const rtl::OUString & rName = (*it); + const OUString & rName = (*it); if ( !contains( rName ) ) // ignore duplicates { @@ -424,19 +424,19 @@ void ContentProperties::addProperty( const DAVPropertyValue & rProp ) } //========================================================================= -void ContentProperties::addProperty( const rtl::OUString & rName, +void ContentProperties::addProperty( const OUString & rName, const com::sun::star::uno::Any & rValue, bool bIsCaseSensitive ) { if ( rName == DAVProperties::CREATIONDATE ) ) { // Map DAV:creationdate to UCP:DateCreated - rtl::OUString aValue; + OUString aValue; rValue >>= aValue; util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString::createFromAscii( "DateCreated" ) ] + (*m_xProps)[ OUString::createFromAscii( "DateCreated" ) ] = PropertyValue( uno::makeAny( aDate ), true ); } // else if ( rName.equals( DAVProperties::DISPLAYNAME ) ) @@ -448,10 +448,10 @@ void ContentProperties::addProperty( const rtl::OUString & rName, else if ( rName == DAVProperties::GETCONTENTLENGTH ) ) { // Map DAV:getcontentlength to UCP:Size - rtl::OUString aValue; + OUString aValue; rValue >>= aValue; - (*m_xProps)[ rtl::OUString::createFromAscii( "Size" ) ] + (*m_xProps)[ OUString::createFromAscii( "Size" ) ] = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); } else if ( rName == "Content-Length" ) @@ -460,16 +460,16 @@ void ContentProperties::addProperty( const rtl::OUString & rName, // Only DAV resources have this property. // Map Content-Length entity header to UCP:Size - rtl::OUString aValue; + OUString aValue; rValue >>= aValue; - (*m_xProps)[ rtl::OUString::createFromAscii( "Size" ) ] + (*m_xProps)[ OUString::createFromAscii( "Size" ) ] = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); } else if ( rName == DAVProperties::GETCONTENTTYPE ) ) { // Map DAV:getcontenttype to UCP:MediaType (1:1) - (*m_xProps)[ rtl::OUString::createFromAscii( "MediaType" ) ] + (*m_xProps)[ OUString::createFromAscii( "MediaType" ) ] = PropertyValue( rValue, true ); } else if ( rName == "Content-Type" ) @@ -478,7 +478,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, // Only DAV resources have this property. // Map DAV:getcontenttype to UCP:MediaType (1:1) - (*m_xProps)[ rtl::OUString::createFromAscii( "MediaType" ) ] + (*m_xProps)[ OUString::createFromAscii( "MediaType" ) ] = PropertyValue( rValue, true ); } // else if ( rName.equals( DAVProperties::GETETAG ) ) @@ -487,12 +487,12 @@ void ContentProperties::addProperty( const rtl::OUString & rName, else if ( rName == DAVProperties::GETLASTMODIFIED ) { // Map the DAV:getlastmodified entity header to UCP:DateModified - rtl::OUString aValue; + OUString aValue; rValue >>= aValue; util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString::createFromAscii( "DateModified" ) ] + (*m_xProps)[ OUString::createFromAscii( "DateModified" ) ] = PropertyValue( uno::makeAny( aDate ), true ); } else if ( rName == "Last-Modified" ) @@ -501,12 +501,12 @@ void ContentProperties::addProperty( const rtl::OUString & rName, // Only DAV resources have this property. // Map the Last-Modified entity header to UCP:DateModified - rtl::OUString aValue; + OUString aValue; rValue >>= aValue; util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString::createFromAscii( "DateModified" ) ] + (*m_xProps)[ OUString::createFromAscii( "DateModified" ) ] = PropertyValue( uno::makeAny( aDate ), true ); } // else if ( rName.equals( DAVProperties::LOCKDISCOVERY ) ) @@ -514,21 +514,21 @@ void ContentProperties::addProperty( const rtl::OUString & rName, // } else if ( rName == DAVProperties::RESOURCETYPE ) ) { - rtl::OUString aValue; + OUString aValue; rValue >>= aValue; // Map DAV:resourceype to UCP:IsFolder, UCP:IsDocument, UCP:ContentType sal_Bool bFolder = aValue.equalsIgnoreAsciiCase( "collection" ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsFolder" ) ] + (*m_xProps)[ OUString::createFromAscii( "IsFolder" ) ] = PropertyValue( uno::makeAny( bFolder ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "IsDocument" ) ] + (*m_xProps)[ OUString::createFromAscii( "IsDocument" ) ] = PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true ); - (*m_xProps)[ rtl::OUString::createFromAscii( "ContentType" ) ] + (*m_xProps)[ OUString::createFromAscii( "ContentType" ) ] = PropertyValue( uno::makeAny( bFolder - ? rtl::OUString::createFromAscii( WEBDAV_COLLECTION_TYPE ) - : rtl::OUString::createFromAscii( WEBDAV_CONTENT_TYPE ) ), true ); + ? OUString::createFromAscii( WEBDAV_COLLECTION_TYPE ) + : OUString::createFromAscii( WEBDAV_CONTENT_TYPE ) ), true ); } // else if ( rName.equals( DAVProperties::SUPPORTEDLOCK ) ) // { @@ -548,25 +548,25 @@ void ContentProperties::addProperty( const rtl::OUString & rName, namespace { - bool isCachable( rtl::OUString const & rName, + bool isCachable( OUString const & rName, bool isCaseSensitive ) { - static rtl::OUString aNonCachableProps [] = + static OUString aNonCachableProps [] = { DAVProperties::LOCKDISCOVERY, DAVProperties::GETETAG, - rtl::OUString( "ETag" ), + OUString( "ETag" ), - rtl::OUString( "DateModified" ), - rtl::OUString( "Last-Modified" ), + OUString( "DateModified" ), + OUString( "Last-Modified" ), DAVProperties::GETLASTMODIFIED, - rtl::OUString( "Size" ), - rtl::OUString( "Content-Length" ), + OUString( "Size" ), + OUString( "Content-Length" ), DAVProperties::GETCONTENTLENGTH, - rtl::OUString( "Date" ) + OUString( "Date" ) }; for ( sal_uInt32 n = 0; |