diff options
Diffstat (limited to 'ucb/source/ucp/tdoc/tdoc_content.cxx')
-rwxr-xr-x[-rw-r--r--] | ucb/source/ucp/tdoc/tdoc_content.cxx | 212 |
1 files changed, 104 insertions, 108 deletions
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 2c2103e46224..1c0634b79acf 100644..100755 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -146,13 +147,6 @@ Content* Content::create( return 0; } -#if 0 - // Fail, if content does exist. - if ( Content::hasData( pProvider, - Uri( Identifier->getContentIdentifier() ) ) ) - return 0; -#endif - return new Content( rxSMgr, pProvider, Identifier, Info ); } @@ -325,8 +319,8 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString::createFromAscii( - "com.sun.star.comp.ucb.TransientDocumentsContent" ); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.ucb.TransientDocumentsContent" )); } //========================================================================= @@ -339,17 +333,17 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() uno::Sequence< rtl::OUString > aSNS( 1 ); if ( m_aProps.getType() == STREAM ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_STREAM_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_STREAM_CONTENT_SERVICE_NAME )); else if ( m_aProps.getType() == FOLDER ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_FOLDER_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_FOLDER_CONTENT_SERVICE_NAME )); else if ( m_aProps.getType() == DOCUMENT ) - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_DOCUMENT_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_DOCUMENT_CONTENT_SERVICE_NAME )); else - aSNS.getArray()[ 0 ] = rtl::OUString::createFromAscii( - TDOC_ROOT_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + TDOC_ROOT_CONTENT_SERVICE_NAME )); return aSNS; } @@ -416,8 +410,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -438,8 +432,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -450,8 +444,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "No properties!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No properties!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -490,8 +484,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -547,8 +541,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -606,8 +600,8 @@ uno::Any SAL_CALL Content::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString::createFromAscii( - "Cannot remove persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data!" )), this ); // Unreachable } @@ -647,8 +641,8 @@ uno::Any SAL_CALL Content::execute( OSL_ENSURE( sal_False, "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -690,8 +684,8 @@ uno::Any SAL_CALL Content::execute( OSL_ENSURE( sal_False, "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Wrong argument type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Wrong argument type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -780,12 +774,12 @@ Content::createNewContent( const ucb::ContentInfo& Info ) "Content::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( bCreateFolder ) - aURL += rtl::OUString::createFromAscii( "New_Folder" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Folder")); else - aURL += rtl::OUString::createFromAscii( "New_Stream" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Stream")); uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ); @@ -848,7 +842,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += rtl::OUString::createFromAscii( "/" ); + aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } sal_Int32 nLen = aURL.getLength(); @@ -1110,7 +1104,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { // Append all Core Properties. xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "ContentType" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -1120,7 +1114,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( ContentType eType = rData.getType(); xRow->appendString ( - beans::Property( rtl::OUString::createFromAscii( "Title" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), // Title is read-only for root and documents. @@ -1130,14 +1124,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( : 0 ), rData.getTitle() ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsDocument" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.getIsDocument() ); xRow->appendBoolean( - beans::Property( rtl::OUString::createFromAscii( "IsFolder" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1145,7 +1139,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rData.getIsFolder() ); xRow->appendObject( beans::Property( - rtl::OUString::createFromAscii( "CreatableContentsInfo" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreatableContentsInfo")), -1, getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), @@ -1156,7 +1150,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // Storage is only supported by folders. if ( eType == FOLDER ) xRow->appendObject( - beans::Property( rtl::OUString::createFromAscii( "Storage" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Storage")), -1, getCppuType( static_cast< @@ -1168,7 +1162,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // DocumentModel is only supported by documents. if ( eType == DOCUMENT ) xRow->appendObject( - beans::Property( rtl::OUString::createFromAscii( "DocumentModel" ), + beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentModel")), -1, getCppuType( static_cast< @@ -1240,8 +1234,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1249,8 +1243,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1258,8 +1252,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1267,8 +1261,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name.equalsAsciiL( @@ -1279,8 +1273,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( ( eType == ROOT ) || ( eType == DOCUMENT ) ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1310,8 +1304,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Empty Title not allowed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Empty Title not allowed!" )), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1319,8 +1313,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString::createFromAscii( - "Title Property value has wrong type!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Title Property value has wrong type!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1332,16 +1326,16 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( eType == FOLDER ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else { // Storage is only supported by folders. aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( - "Storage property only supported by folders" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Storage property only supported by folders" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1352,17 +1346,17 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( eType == DOCUMENT ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString::createFromAscii( - "Property is read-only!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } else { // Storage is only supported by folders. aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DocumentModel property only supported by " - "documents" ), + "documents" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1415,8 +1409,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString::createFromAscii( - "No property set for storing the value!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "No property set for storing the value!" )), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1448,14 +1442,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString::createFromAscii( "Exchange failed!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), static_cast< cppu::OWeakObject * >( this ) ); } } if ( aOldTitle.getLength() ) { - aEvent.PropertyName = rtl::OUString::createFromAscii( "Title" ); + aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( m_aProps.getTitle() ); @@ -1483,8 +1477,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot store persistent data!" )), this ); // Unreachable } @@ -1564,8 +1558,8 @@ uno::Any Content::open( m_eState == PERSISTENT ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( - "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Got no data stream!" )), this ); // Unreachable } @@ -1600,7 +1594,7 @@ uno::Any Content::open( m_eState == PERSISTENT ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Got no data stream!")), this ); // Unreachable } @@ -1662,8 +1656,8 @@ uno::Any Content::open( ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString::createFromAscii( - "Got no data stream!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Got no data stream!" )), this ); // Unreachable } @@ -1791,8 +1785,8 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString::createFromAscii( - "Unable to resolve name clash!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unable to resolve name clash!" )), static_cast< cppu::OWeakObject * >( this ), nNameClashResolve ) ), xEnv ); @@ -1848,7 +1842,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( "Cannot store persistent data!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot store persistent data!")), this ); // Unreachable } @@ -1886,8 +1880,8 @@ void Content::destroy( sal_Bool bDeletePhysical, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -2028,8 +2022,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString::createFromAscii( - "Not persistent!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Not persistent!" )), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -2069,8 +2063,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( - "Invalid source URI! Syntax!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Invalid source URI! Syntax!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2081,9 +2075,9 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid source URI! " - "Must describe a folder or stream!" ), + "Must describe a folder or stream!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2096,7 +2090,7 @@ void Content::transfer( if ( nPos != ( aId.getLength() - 1 ) ) { // No trailing slash found. Append. - aId += rtl::OUString::createFromAscii( "/" ); + aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); } if ( rInfo.SourceURL.getLength() <= aId.getLength() ) @@ -2115,8 +2109,8 @@ void Content::transfer( ucb::IOErrorCode_RECURSIVE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Target is equal to or is a child of source!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Target is equal to or is a child of source!" )), this ); // Unreachable } @@ -2138,10 +2132,10 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid source URI! " "Streams cannot be created as " - "children of document root!" ), + "children of document root!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -2168,9 +2162,9 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString::createFromAscii( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid source URI! " - "Unabale to determine source type!" ), + "Unabale to determine source type!" )), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2213,7 +2207,7 @@ void Content::transfer( rtl::OUString aTargetUri = m_xIdentifier->getContentIdentifier(); if ( ( aTargetUri.lastIndexOf( '/' ) + 1 ) != aTargetUri.getLength() ) - aTargetUri += rtl::OUString::createFromAscii( "/" ); + aTargetUri += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); if ( rInfo.NewTitle.getLength() > 0 ) aTargetUri += ::ucb_impl::urihelper::encodeSegment( rInfo.NewTitle ); @@ -2276,8 +2270,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot instanciate target object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot instanciate target object!" )), this ); // Unreachable } @@ -2321,8 +2315,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot instanciate target object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot instanciate target object!" )), this ); // Unreachable } @@ -2345,8 +2339,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot remove persistent data of source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove persistent data of source object!" )), this ); // Unreachable } @@ -2366,8 +2360,8 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString::createFromAscii( - "Cannot remove additional properties of source object!" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Cannot remove additional properties of source object!" )), this ); // Unreachable } @@ -3073,7 +3067,7 @@ ContentProperties::getCreatableContentsInfo() const { uno::Sequence< beans::Property > aProps( 1 ); aProps.getArray()[ 0 ] = beans::Property( - rtl::OUString::createFromAscii( "Title" ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ); @@ -3086,7 +3080,7 @@ ContentProperties::getCreatableContentsInfo() const // Folder. aSeq.getArray()[ 0 ].Type - = rtl::OUString::createFromAscii( TDOC_FOLDER_CONTENT_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_FOLDER_CONTENT_TYPE )); aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; aSeq.getArray()[ 0 ].Properties = aProps; @@ -3100,14 +3094,14 @@ ContentProperties::getCreatableContentsInfo() const // Folder. aSeq.getArray()[ 0 ].Type - = rtl::OUString::createFromAscii( TDOC_FOLDER_CONTENT_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_FOLDER_CONTENT_TYPE )); aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; aSeq.getArray()[ 0 ].Properties = aProps; // Stream. aSeq.getArray()[ 1 ].Type - = rtl::OUString::createFromAscii( TDOC_STREAM_CONTENT_TYPE ); + = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_STREAM_CONTENT_TYPE )); aSeq.getArray()[ 1 ].Attributes = ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | ucb::ContentInfoAttribute::KIND_DOCUMENT; @@ -3133,3 +3127,5 @@ bool ContentProperties::isContentCreator() const { return ( getType() == FOLDER ) || ( getType() == DOCUMENT ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |