diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-05-31 20:45:03 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-05-31 21:15:00 -0500 |
commit | 827865fee1dba85d4c3f986a23e4bd34b1a641f9 (patch) | |
tree | 70f92b92b8eeb8f0d722b5c4ee24c1e9488d95f4 /ucb/source/ucp | |
parent | e6ef9f128e85961921b0b319087010fce1d59a74 (diff) |
targeted string re-work
Change-Id: Ic08995a67a407576da475a6716b1218e45b60dfd
Diffstat (limited to 'ucb/source/ucp')
50 files changed, 814 insertions, 1139 deletions
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 1d05a2197426..69d60f47469b 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -192,15 +192,15 @@ namespace ucb { namespace ucp { namespace ext //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL Content::getImplementationName() throw( RuntimeException ) { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.ucp.ext.Content" ) ); + return ::rtl::OUString( "org.openoffice.comp.ucp.ext.Content" ); } //------------------------------------------------------------------------------------------------------------------ Sequence< ::rtl::OUString > SAL_CALL Content::getSupportedServiceNames() throw( RuntimeException ) { Sequence< ::rtl::OUString > aServiceNames(2); - aServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.Content" ) ); - aServiceNames[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.ExtensionContent" ) ); + aServiceNames[0] = ::rtl::OUString( "com.sun.star.ucb.Content" ); + aServiceNames[1] = ::rtl::OUString( "com.sun.star.ucb.ExtensionContent" ); return aServiceNames; } @@ -289,7 +289,7 @@ namespace ucb { namespace ucp { namespace ext { const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() ); ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment ); - aRet = aRequestedContent.executeCommand( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), makeAny( aOpenCommand ) ); + aRet = aRequestedContent.executeCommand( ::rtl::OUString( "open" ), makeAny( aOpenCommand ) ); } } @@ -449,22 +449,22 @@ namespace ucb { namespace ucp { namespace ext else { // Append all Core Properties. - xRow->appendString ( Property( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), + xRow->appendString ( Property( ::rtl::OUString("ContentType"), -1, getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), ContentProvider::getArtificialNodeContentType() ); - xRow->appendString ( Property( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + xRow->appendString ( Property( ::rtl::OUString("Title"), -1, getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), i_rTitle ); - xRow->appendBoolean( Property( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), + xRow->appendBoolean( Property( ::rtl::OUString("IsDocument"), -1, getCppuBooleanType(), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), sal_False ); - xRow->appendBoolean( Property( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), + xRow->appendBoolean( Property( ::rtl::OUString("IsFolder"), -1, getCppuBooleanType(), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), @@ -555,7 +555,7 @@ namespace ucb { namespace ucp { namespace ext for ( sal_Int32 n = 0; n < nCount; ++n, ++pValues ) { // all our properties are read-only ... - aRet[ n ] <<= IllegalAccessException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("property is read-only.")), *this ); + aRet[ n ] <<= IllegalAccessException( ::rtl::OUString("property is read-only."), *this ); } return aRet; @@ -571,23 +571,23 @@ namespace ucb { namespace ucp { namespace ext // Mandatory commands /////////////////////////////////////////////////////////////// CommandInfo( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ), + ::rtl::OUString( "getCommandInfo" ), -1, getCppuVoidType() ), CommandInfo( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ), + ::rtl::OUString( "getPropertySetInfo" ), -1, getCppuVoidType() ), CommandInfo( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ), + ::rtl::OUString( "getPropertyValues" ), -1, getCppuType( static_cast< Sequence< Property > * >( 0 ) ) ), CommandInfo( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ), + ::rtl::OUString( "setPropertyValues" ), -1, getCppuType( static_cast< Sequence< PropertyValue > * >( 0 ) ) @@ -596,7 +596,7 @@ namespace ucb { namespace ucp { namespace ext // Optional standard commands /////////////////////////////////////////////////////////////// , CommandInfo( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), + ::rtl::OUString( "open" ), -1, getCppuType( static_cast< OpenCommandArgument2 * >( 0 ) ) ) @@ -611,25 +611,25 @@ namespace ucb { namespace ucp { namespace ext static Property aProperties[] = { Property( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ), + ::rtl::OUString( "ContentType" ), -1, getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), Property( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ), + ::rtl::OUString( "IsDocument" ), -1, getCppuBooleanType(), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), Property( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ), + ::rtl::OUString( "IsFolder" ), -1, getCppuBooleanType(), PropertyAttribute::BOUND | PropertyAttribute::READONLY ), Property( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), + ::rtl::OUString( "Title" ), -1, getCppuType( static_cast< const ::rtl::OUString * >( 0 ) ), PropertyAttribute::BOUND | PropertyAttribute::READONLY @@ -648,7 +648,7 @@ namespace ucb { namespace ucp { namespace ext try { Sequence< Property > aProps(1); - aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ); + aProps[0].Name = ::rtl::OUString( "IsFolder" ); Reference< XRow > xRow( getPropertyValues( aProps, NULL ), UNO_SET_THROW ); bIsFolder = xRow->getBoolean(1); } @@ -672,7 +672,7 @@ namespace ucb { namespace ucp { namespace ext try { Sequence< Property > aProps(1); - aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ); + aProps[0].Name = ::rtl::OUString( "ContentType" ); Reference< XRow > xRow( getPropertyValues( aProps, NULL ), UNO_SET_THROW ); m_aContentType.reset( xRow->getString(1) ); } diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx index 746f37bd917a..8da160067d77 100644 --- a/ucb/source/ucp/ext/ucpext_provider.cxx +++ b/ucb/source/ucp/ext/ucpext_provider.cxx @@ -79,7 +79,7 @@ namespace ucb { namespace ucp { namespace ext //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL ContentProvider::getImplementationName_static() throw (RuntimeException) { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.ucp.ext.ContentProvider" ) ); + return ::rtl::OUString( "org.openoffice.comp.ucp.ext.ContentProvider" ); } //------------------------------------------------------------------------------------------------------------------ @@ -92,8 +92,8 @@ namespace ucb { namespace ucp { namespace ext Sequence< ::rtl::OUString > SAL_CALL ContentProvider::getSupportedServiceNames_static( ) throw (RuntimeException) { Sequence< ::rtl::OUString > aServiceNames(2); - aServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.ContentProvider" ) ); - aServiceNames[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.ExtensionContentProvider" ) ); + aServiceNames[0] = ::rtl::OUString( "com.sun.star.ucb.ContentProvider" ); + aServiceNames[1] = ::rtl::OUString( "com.sun.star.ucb.ExtensionContentProvider" ); return aServiceNames; } @@ -113,13 +113,13 @@ namespace ucb { namespace ucp { namespace ext //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString ContentProvider::getRootURL() { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.extension://" ) ); + return ::rtl::OUString( "vnd.sun.star.extension://" ); } //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString ContentProvider::getArtificialNodeContentType() { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.extension-content" ) ); + return ::rtl::OUString( "application/vnd.sun.star.extension-content" ); } //------------------------------------------------------------------------------------------------------------------ @@ -139,7 +139,7 @@ namespace ucb { namespace ucp { namespace ext throw( IllegalIdentifierException, RuntimeException ) { // Check URL scheme... - const ::rtl::OUString sScheme( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.extension") ); + const ::rtl::OUString sScheme( "vnd.sun.star.extension" ); if ( !i_rIdentifier->getContentProviderScheme().equalsIgnoreAsciiCase( sScheme ) ) throw IllegalIdentifierException(); diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index ad48bd416e66..eba4595bea2e 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -265,7 +265,7 @@ rtl::OUString SAL_CALL BaseContent::getImplementationName() throw( RuntimeException) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ucb.FileContent")); + return rtl::OUString("com.sun.star.comp.ucb.FileContent"); } @@ -287,7 +287,7 @@ BaseContent::getSupportedServiceNames() throw( RuntimeException ) { Sequence< rtl::OUString > ret( 1 ); - ret[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContent")); + ret[0] = rtl::OUString("com.sun.star.ucb.FileContent"); return ret; } @@ -419,7 +419,7 @@ BaseContent::execute( const Command& aCommand, { Sequence< beans::Property > seq(1); seq[0] = beans::Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CasePreservingURL")), + rtl::OUString("CasePreservingURL"), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -528,7 +528,7 @@ BaseContent::getContentType() { // Who am I ? Sequence< beans::Property > seq(1); - seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), + seq[0] = beans::Property( rtl::OUString("IsDocument"), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -605,7 +605,7 @@ BaseContent::addProperty( { if( ( m_nState & JustInserted ) || ( m_nState & Deleted ) || Name.isEmpty() ) { - throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); + throw lang::IllegalArgumentException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), 0 ); } m_pMyShell->associate( m_aUncPath,Name,DefaultValue,Attributes ); @@ -621,7 +621,7 @@ BaseContent::removeProperty( { if( m_nState & Deleted ) - throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); m_pMyShell->deassociate( m_aUncPath, Name ); } @@ -665,7 +665,7 @@ BaseContent::createNewContent( try { Sequence< beans::Property > seq(1); - seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), + seq[0] = beans::Property( rtl::OUString("IsDocument"), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -768,7 +768,7 @@ BaseContent::setParent( throw( lang::NoSupportException, RuntimeException) { - throw lang::NoSupportException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw lang::NoSupportException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } @@ -866,7 +866,7 @@ BaseContent::setPropertyValues( return Sequence< Any >( Values.getLength() ); } - const rtl::OUString Title(RTL_CONSTASCII_USTRINGPARAM("Title")); + const rtl::OUString Title("Title"); // Special handling for files which have to be inserted if( m_nState & JustInserted ) @@ -920,7 +920,7 @@ BaseContent::setPropertyValues( // m_aUncPath contains parent's URI. if( m_aUncPath.lastIndexOf( sal_Unicode('/') ) != m_aUncPath.getLength() - 1 ) - m_aUncPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + m_aUncPath += rtl::OUString("/"); m_aUncPath += rtl::Uri::encode( NewTitle, rtl_UriCharClassPchar, @@ -949,19 +949,19 @@ BaseContent::setPropertyValues( rtl::OUString NewTitle; if( !( Values[i].Value >>= NewTitle ) ) { - ret[i] <<= beans::IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + ret[i] <<= beans::IllegalTypeException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); break; } else if( NewTitle.isEmpty() ) { - ret[i] <<= lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); + ret[i] <<= lang::IllegalArgumentException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), 0 ); break; } rtl::OUString aDstName = getParentName( m_aUncPath ); if( aDstName.lastIndexOf( sal_Unicode('/') ) != aDstName.getLength() - 1 ) - aDstName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aDstName += rtl::OUString("/"); aDstName += rtl::Uri::encode( NewTitle, rtl_UriCharClassPchar, @@ -1123,7 +1123,7 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier, // Is destination a document or a folder ? Sequence< beans::Property > seq(1); - seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), + seq[0] = beans::Property( rtl::OUString("IsDocument"), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -1146,7 +1146,7 @@ BaseContent::transfer( sal_Int32 nMyCommandIdentifier, // as child dstUncPath = m_aUncPath; - dstUncPath += ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + NewTitle ); + dstUncPath += ( rtl::OUString("/") + NewTitle ); sal_Int32 NameClash = aTransferInfo.NameClash; @@ -1192,7 +1192,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier, sal_Bool bDocument = false; Sequence< beans::Property > seq(1); - seq[0] = beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), + seq[0] = beans::Property( rtl::OUString("IsDocument"), -1, getCppuType( static_cast< sal_Bool* >(0) ), 0 ); @@ -1257,7 +1257,7 @@ void SAL_CALL BaseContent::insert( sal_Int32 nMyCommandIdentifier, m_pMyShell->clearError( nMyCommandIdentifier ); m_aUncPath = getParentName( m_aUncPath ); if( m_aUncPath.lastIndexOf( sal_Unicode('/') ) != m_aUncPath.getLength() - 1 ) - m_aUncPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + m_aUncPath += rtl::OUString("/"); m_aUncPath += rtl::Uri::encode( aRequestImpl->newName(), rtl_UriCharClassPchar, diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index bab84d6c00ef..ef9e65f1b6d4 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx @@ -94,17 +94,13 @@ namespace { switch (aStatus.getFileType()) { case osl::FileStatus::Directory: - aResourceType - = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("folder")); + aResourceType = rtl::OUString( "folder"); bResourceType = true; break; case osl::FileStatus::Volume: { - aResourceType - = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("volume")); + aResourceType = rtl::OUString( "volume"); bResourceType = true; osl::VolumeInfo aVolumeInfo( osl_VolumeInfo_Mask_Attributes ); @@ -134,29 +130,25 @@ namespace { (bRemoveProperty ? 1 : 0) ); sal_Int32 i = 0; aArguments[i++] - <<= PropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + <<= PropertyValue(rtl::OUString( "Uri"), -1, makeAny(rPhysicalUrl), PropertyState_DIRECT_VALUE); if (bResourceName) aArguments[i++] - <<= PropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "ResourceName")), + <<= PropertyValue(rtl::OUString( "ResourceName"), -1, makeAny(aResourceName), PropertyState_DIRECT_VALUE); if (bResourceType) aArguments[i++] - <<= PropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "ResourceType")), + <<= PropertyValue(rtl::OUString( "ResourceType"), -1, makeAny(aResourceType), PropertyState_DIRECT_VALUE); if (bRemoveProperty) aArguments[i++] - <<= PropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Removable")), + <<= PropertyValue(rtl::OUString( "Removable"), -1, makeAny(bRemovable), PropertyState_DIRECT_VALUE); @@ -217,10 +209,10 @@ namespace fileaccess { rtl::OUString aParent = aFileName.copy( 0,lastIndex ); if( aParent[ aParent.getLength()-1] == sal_Unicode(':') && aParent.getLength() == 6 ) - aParent += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aParent += rtl::OUString("/"); if ( aParent == "file://" ) - aParent = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///")); + aParent = rtl::OUString("file:///"); return aParent; } @@ -269,7 +261,7 @@ namespace fileaccess { if( errorCode == TASKHANDLER_UNSUPPORTED_COMMAND ) { - aAny <<= UnsupportedCommandException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + aAny <<= UnsupportedCommandException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); cancelCommandExecution( aAny,xEnv ); } else if( errorCode == TASKHANDLING_WRONG_SETPROPERTYVALUES_ARGUMENT || @@ -385,9 +377,7 @@ namespace fileaccess { ioErrorCode, generateErrorArguments(aUncPath), xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "an error occurred during file opening")), + rtl::OUString( "an error occurred during file opening"), xComProc); } else if( errorCode == TASKHANDLING_OPEN_FOR_DIRECTORYLISTING || @@ -440,9 +430,7 @@ namespace fileaccess { ioErrorCode, generateErrorArguments(aUncPath), xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "an error occurred during opening a directory")), + rtl::OUString( "an error occurred during opening a directory"), xComProc); } else if( errorCode == TASKHANDLING_NOTCONNECTED_FOR_WRITE || @@ -457,9 +445,7 @@ namespace fileaccess { ioErrorCode, generateErrorArguments(aUncPath), xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "an error occurred writing or reading from a file")), + rtl::OUString( "an error occurred writing or reading from a file"), xComProc ); } else if( errorCode == TASKHANDLING_FILEIOERROR_FOR_NO_SPACE ) @@ -469,9 +455,7 @@ namespace fileaccess { ioErrorCode, generateErrorArguments(aUncPath), xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "device full")), + rtl::OUString( "device full"), xComProc); } else if( errorCode == TASKHANDLING_FILEIOERROR_FOR_WRITE || @@ -523,9 +507,7 @@ namespace fileaccess { ioErrorCode, generateErrorArguments(aUncPath), xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "an error occurred during opening a file")), + rtl::OUString( "an error occurred during opening a file"), xComProc); } else if( errorCode == TASKHANDLING_NONAMESET_INSERT_COMMAND || @@ -534,14 +516,12 @@ namespace fileaccess { Sequence< ::rtl::OUString > aSeq( 1 ); aSeq[0] = ( errorCode == TASKHANDLING_NONAMESET_INSERT_COMMAND ) ? - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) : - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")); + rtl::OUString("Title") : + rtl::OUString("ContentType"); aAny <<= MissingPropertiesException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "a property is missing necessary" - "to create a content")), + rtl::OUString( "a property is missing necessary" + "to create a content"), xComProc, aSeq); cancelCommandExecution(aAny,xEnv); @@ -565,9 +545,7 @@ namespace fileaccess { ioErrorCode, generateErrorArguments(aUncPath), xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "there were problems with the filesize")), + rtl::OUString( "there were problems with the filesize"), xComProc); } else if(errorCode == TASKHANDLING_INPUTSTREAM_FOR_WRITE) @@ -575,10 +553,8 @@ namespace fileaccess { Reference<XInterface> xContext(xComProc,UNO_QUERY); aAny <<= MissingInputStreamException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "the inputstream is missing necessary" - "to create a content")), + rtl::OUString( "the inputstream is missing necessary" + "to create a content"), xContext); cancelCommandExecution(aAny,xEnv); } @@ -590,9 +566,7 @@ namespace fileaccess { excep.Classification = InteractionClassification_ERROR; Reference<XInterface> xContext(xComProc,UNO_QUERY); excep.Context = xContext; - excep.Message = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "file exists and overwrite forbidden")); + excep.Message = rtl::OUString( "file exists and overwrite forbidden"); aAny <<= excep; cancelCommandExecution( aAny,xEnv ); } @@ -601,7 +575,7 @@ namespace fileaccess { InteractiveAugmentedIOException excep; excep.Code = IOErrorCode_INVALID_CHARACTER; PropertyValue prop; - prop.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ResourceName")); + prop.Name = rtl::OUString("ResourceName"); prop.Handle = -1; rtl::OUString m_aClashingName( rtl::Uri::decode( @@ -615,9 +589,7 @@ namespace fileaccess { excep.Classification = InteractionClassification_ERROR; Reference<XInterface> xContext(xComProc,UNO_QUERY); excep.Context = xContext; - excep.Message = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "the name contained invalid characters")); + excep.Message = rtl::OUString( "the name contained invalid characters"); if(isHandled) throw excep; else { @@ -629,9 +601,7 @@ namespace fileaccess { // ioErrorCode, // generateErrorArguments(aUncPath), // xEnv, -// rtl::OUString( -// RTL_CONSTASCII_USTRINGPARAM( -// "the name contained invalid characters")), +// rtl::OUString( "the name contained invalid characters"), // xComProc ); } else if( errorCode == TASKHANDLING_FOLDER_EXISTS_MKDIR ) @@ -641,9 +611,7 @@ namespace fileaccess { excep.Classification = InteractionClassification_ERROR; Reference<XInterface> xContext(xComProc,UNO_QUERY); excep.Context = xContext; - excep.Message = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "folder exists and overwrite forbidden")); + excep.Message = rtl::OUString( "folder exists and overwrite forbidden"); if(isHandled) throw excep; else { @@ -655,9 +623,7 @@ namespace fileaccess { // ioErrorCode, // generateErrorArguments(aUncPath), // xEnv, -// rtl::OUString( -// RTL_CONSTASCII_USTRINGPARAM( -// "the folder exists")), +// rtl::OUString( "the folder exists"), // xComProc ); } else if( errorCode == TASKHANDLING_ENSUREDIR_FOR_WRITE || @@ -683,9 +649,7 @@ namespace fileaccess { generateErrorArguments(getParentName(aUncPath)), //TODO! ok to supply physical URL to getParentName()? xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "a folder could not be created")), + rtl::OUString( "a folder could not be created"), xComProc ); } else if( errorCode == TASKHANDLING_VALIDFILESTATUSWHILE_FOR_REMOVE || @@ -736,9 +700,7 @@ namespace fileaccess { ioErrorCode, generateErrorArguments(aUncPath), xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "a file status object could not be filled")), + rtl::OUString( "a file status object could not be filled"), xComProc ); } else if( errorCode == TASKHANDLING_DELETEFILE_FOR_REMOVE || @@ -785,9 +747,7 @@ namespace fileaccess { ioErrorCode, generateErrorArguments(aUncPath), xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "a file or directory could not be deleted")), + rtl::OUString( "a file or directory could not be deleted"), xComProc ); } else if( errorCode == TASKHANDLING_TRANSFER_BY_COPY_SOURCE || @@ -809,21 +769,18 @@ namespace fileaccess { errorCode == TASKHANDLING_TRANSFER_BY_MOVE_SOURCESTAT ) { ioErrorCode = IOErrorCode_NOT_EXISTING; - aMsg = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "source file/folder does not exist")); + aMsg = rtl::OUString( "source file/folder does not exist"); break; } else { ioErrorCode = IOErrorCode_GENERAL; - aMsg = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "a general error during transfer command")); + aMsg = rtl::OUString( "a general error during transfer command"); break; } default: ioErrorCode = IOErrorCode_GENERAL; - aMsg = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "a general error during transfer command")); + aMsg = rtl::OUString( "a general error during transfer command"); break; } cancelCommandExecution( @@ -840,9 +797,7 @@ namespace fileaccess { ioErrorCode, generateErrorArguments(aUncPath), xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "accessing the root during transfer")), + rtl::OUString( "accessing the root during transfer"), xComProc ); } else if( errorCode == TASKHANDLING_TRANSFER_INVALIDSCHEME ) @@ -851,9 +806,7 @@ namespace fileaccess { aAny <<= InteractiveBadTransferURLException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "bad tranfer url")), + rtl::OUString( "bad tranfer url"), xContext); cancelCommandExecution( aAny,xEnv ); } @@ -868,8 +821,8 @@ namespace fileaccess { errorCode == TASKHANDLING_RENAMEMOVE_FOR_MOVE || errorCode == TASKHANDLING_RENAMEMOVE_FOR_COPY ) { - rtl::OUString aMsg(RTL_CONSTASCII_USTRINGPARAM( - "general error during transfer")); + rtl::OUString aMsg( + "general error during transfer"); switch( minorCode ) { @@ -893,8 +846,7 @@ namespace fileaccess { break; case FileBase::E_NOENT: // No such file or directory ioErrorCode = IOErrorCode_NOT_EXISTING; - aMsg = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "file/folder does not exist")); + aMsg = rtl::OUString( "file/folder does not exist"); break; case FileBase::E_ROFS: // Read-only file system<p> ioErrorCode = IOErrorCode_NOT_EXISTING; @@ -918,9 +870,7 @@ namespace fileaccess { excep.Classification = InteractionClassification_ERROR; Reference<XInterface> xContext(xComProc,UNO_QUERY); excep.Context = xContext; - excep.Message = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "name clash during copy or move")); + excep.Message = rtl::OUString( "name clash during copy or move"); aAny <<= excep; cancelCommandExecution(aAny,xEnv); @@ -933,9 +883,7 @@ namespace fileaccess { UnsupportedNameClashException excep; excep.NameClash = minorCode; excep.Context = xContext; - excep.Message = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "name clash value not supported during copy or move")); + excep.Message = rtl::OUString( "name clash value not supported during copy or move"); aAny <<= excep; cancelCommandExecution(aAny,xEnv); diff --git a/ucb/source/ucp/file/filinsreq.cxx b/ucb/source/ucp/file/filinsreq.cxx index ea674c1cc692..1ac3d39944c1 100644 --- a/ucb/source/ucp/file/filinsreq.cxx +++ b/ucb/source/ucp/file/filinsreq.cxx @@ -195,9 +195,7 @@ XInteractionRequestImpl::getRequest() excep.Name = m_aClashingName; excep.Classification = InteractionClassification_ERROR; excep.Context = m_xOrigin; - excep.Message = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "folder exists and overwritte forbidden")); + excep.Message = rtl::OUString( "folder exists and overwritte forbidden"); aAny <<= excep; } else if(m_nErrorCode == TASKHANDLING_INVALID_NAME_MKDIR) @@ -205,7 +203,7 @@ XInteractionRequestImpl::getRequest() InteractiveAugmentedIOException excep; excep.Code = IOErrorCode_INVALID_CHARACTER; PropertyValue prop; - prop.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ResourceName")); + prop.Name = rtl::OUString("ResourceName"); prop.Handle = -1; prop.Value <<= m_aClashingName; Sequence<Any> seq(1); @@ -213,9 +211,7 @@ XInteractionRequestImpl::getRequest() excep.Arguments = seq; excep.Classification = InteractionClassification_ERROR; excep.Context = m_xOrigin; - excep.Message = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "the name contained invalid characters")); + excep.Message = rtl::OUString( "the name contained invalid characters"); aAny <<= excep; } diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx index a52b0700ce2c..0c78507540af 100644 --- a/ucb/source/ucp/file/filrow.cxx +++ b/ucb/source/ucp/file/filrow.cxx @@ -52,7 +52,7 @@ sal_Bool convert( shell* pShell, { xConverter = uno::Reference< script::XTypeConverter >( pShell->m_xMultiServiceFactory->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter")) ), uno::UNO_QUERY ); + rtl::OUString("com.sun.star.script.Converter") ), uno::UNO_QUERY ); } try @@ -143,7 +143,7 @@ XRow_impl::getString( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); rtl::OUString Value; osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<rtl::OUString>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -157,7 +157,7 @@ XRow_impl::getBoolean( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); sal_Bool Value( false ); osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<sal_Bool>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -172,7 +172,7 @@ XRow_impl::getByte( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); sal_Int8 Value( 0 ); osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<sal_Int8>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -186,7 +186,7 @@ XRow_impl::getShort( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); sal_Int16 Value( 0 ); osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<sal_Int16>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -201,7 +201,7 @@ XRow_impl::getInt( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); sal_Int32 Value( 0 ); osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<sal_Int32>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -215,7 +215,7 @@ XRow_impl::getLong( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); sal_Int64 Value( 0 ); osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<sal_Int64>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -229,7 +229,7 @@ XRow_impl::getFloat( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); float Value( 0 ); osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<float>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -243,7 +243,7 @@ XRow_impl::getDouble( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); double Value( 0 ); osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<double>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -257,7 +257,7 @@ XRow_impl::getBytes( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); uno::Sequence< sal_Int8 > Value(0); osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<uno::Sequence< sal_Int8 > >( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -271,7 +271,7 @@ XRow_impl::getDate( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); util::Date Value; osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<util::Date>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -285,7 +285,7 @@ XRow_impl::getTime( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); util::Time Value; osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<util::Time>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -299,7 +299,7 @@ XRow_impl::getTimestamp( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); util::DateTime Value; osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<util::DateTime>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -314,7 +314,7 @@ XRow_impl::getBinaryStream( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); uno::Reference< io::XInputStream > Value; osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<uno::Reference< io::XInputStream > >( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -329,7 +329,7 @@ XRow_impl::getCharacterStream( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); uno::Reference< io::XInputStream > Value; osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert< uno::Reference< io::XInputStream> >( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -345,7 +345,7 @@ XRow_impl::getObject( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); uno::Any Value; osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<uno::Any>( m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value ); @@ -359,7 +359,7 @@ XRow_impl::getRef( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); uno::Reference< sdbc::XRef > Value; osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<uno::Reference< sdbc::XRef> >( m_pMyShell, @@ -376,7 +376,7 @@ XRow_impl::getBlob( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); uno::Reference< sdbc::XBlob > Value; osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<uno::Reference< sdbc::XBlob> >( m_pMyShell, @@ -393,7 +393,7 @@ XRow_impl::getClob( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); uno::Reference< sdbc::XClob > Value; osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<uno::Reference< sdbc::XClob> >( m_pMyShell, @@ -411,7 +411,7 @@ XRow_impl::getArray( uno::RuntimeException) { if( columnIndex < 1 || columnIndex > m_aValueMap.getLength() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); uno::Reference< sdbc::XArray > Value; osl::MutexGuard aGuard( m_aMutex ); m_nWasNull = ::convert<uno::Reference< sdbc::XArray> >( m_pMyShell, diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx index 627536fa2031..2c98f2924570 100644 --- a/ucb/source/ucp/file/filrset.cxx +++ b/ucb/source/ucp/file/filrset.cxx @@ -235,7 +235,7 @@ void XResultSet_impl::rowCountChanged() aOldValue = aNewValue-1; } beans::PropertyChangeEvent aEv; - aEv.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); + aEv.PropertyName = rtl::OUString("RowCount"); aEv.Further = false; aEv.PropertyHandle = -1; aEv.OldValue <<= aOldValue; @@ -260,7 +260,7 @@ void XResultSet_impl::isFinalChanged() m_bRowCountFinal = true; } beans::PropertyChangeEvent aEv; - aEv.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); + aEv.PropertyName = rtl::OUString("IsRowCountFinal"); aEv.Further = false; aEv.PropertyHandle = -1; sal_Bool fval = false; @@ -349,7 +349,7 @@ XResultSet_impl::OneMore( } else // error fetching anything { - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); } } } @@ -507,7 +507,7 @@ XResultSet_impl::relative( uno::RuntimeException) { if( isAfterLast() || isBeforeFirst() ) - throw sdbc::SQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); + throw sdbc::SQLException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), ::rtl::OUString(), 0, uno::Any() ); if( row > 0 ) while( row-- ) next(); else if( row < 0 ) @@ -659,7 +659,7 @@ XResultSet_impl::getStaticResultSet() osl::MutexGuard aGuard( m_aMutex ); if ( m_xListener.is() ) - throw ucb::ListenerAlreadySetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw ucb::ListenerAlreadySetException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); return uno::Reference< sdbc::XResultSet >( this ); } @@ -675,7 +675,7 @@ XResultSet_impl::setListener( osl::ClearableMutexGuard aGuard( m_aMutex ); if ( m_xListener.is() ) - throw ucb::ListenerAlreadySetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw ucb::ListenerAlreadySetException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); m_xListener = Listener; @@ -718,9 +718,9 @@ XResultSet_impl::connectToCache( = m_pMyShell->m_xMultiServiceFactory; if( m_xListener.is() ) - throw ucb::ListenerAlreadySetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw ucb::ListenerAlreadySetException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); if( m_bStatic ) - throw ucb::ListenerAlreadySetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw ucb::ListenerAlreadySetException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); uno::Reference< ucb::XSourceInitialization > xTarget( xCache, uno::UNO_QUERY ); @@ -732,8 +732,8 @@ XResultSet_impl::connectToCache( xStubFactory = uno::Reference< ucb::XCachedDynamicResultSetStubFactory >( mxSMgr->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.CachedDynamicResultSetStubFactory" )) ), + rtl::OUString( + "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ), uno::UNO_QUERY ); } catch ( uno::Exception const & ) @@ -747,7 +747,7 @@ XResultSet_impl::connectToCache( return; } } - throw ucb::ServiceNotFoundException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw ucb::ServiceNotFoundException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } //========================================================================= @@ -804,12 +804,12 @@ XResultSet_impl::getPropertySetInfo() { uno::Sequence< beans::Property > seq(2); - seq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); + seq[0].Name = rtl::OUString("RowCount"); seq[0].Handle = -1; seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) ); seq[0].Attributes = beans::PropertyAttribute::READONLY; - seq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); + seq[0].Name = rtl::OUString("IsRowCountFinal"); seq[0].Handle = -1; seq[0].Type = getCppuType( static_cast< sal_Bool* >(0) ); seq[0].Attributes = beans::PropertyAttribute::READONLY; @@ -829,10 +829,10 @@ void SAL_CALL XResultSet_impl::setPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) || - aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) + if( aPropertyName == rtl::OUString("IsRowCountFinal") || + aPropertyName == rtl::OUString("RowCount") ) return; - throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } @@ -842,13 +842,13 @@ uno::Any SAL_CALL XResultSet_impl::getPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) + if( PropertyName == rtl::OUString("IsRowCountFinal") ) { uno::Any aAny; aAny <<= m_bRowCountFinal; return aAny; } - else if ( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) + else if ( PropertyName == rtl::OUString("RowCount") ) { uno::Any aAny; sal_Int32 count = sal::static_int_cast<sal_Int32>(m_aItems.size()); @@ -856,7 +856,7 @@ uno::Any SAL_CALL XResultSet_impl::getPropertyValue( return aAny; } else - throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } @@ -867,7 +867,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) + if( aPropertyName == rtl::OUString("IsRowCountFinal") ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pIsFinalListeners ) @@ -876,7 +876,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener( m_pIsFinalListeners->addInterface( xListener ); } - else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) + else if ( aPropertyName == rtl::OUString("RowCount") ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pRowCountListeners ) @@ -885,7 +885,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener( m_pRowCountListeners->addInterface( xListener ); } else - throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } @@ -896,13 +896,13 @@ void SAL_CALL XResultSet_impl::removePropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) && + if( aPropertyName == rtl::OUString("IsRowCountFinal") && m_pIsFinalListeners ) { osl::MutexGuard aGuard( m_aMutex ); m_pIsFinalListeners->removeInterface( aListener ); } - else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) && + else if ( aPropertyName == rtl::OUString("RowCount") && m_pRowCountListeners ) { osl::MutexGuard aGuard( m_aMutex ); @@ -910,7 +910,7 @@ void SAL_CALL XResultSet_impl::removePropertyChangeListener( m_pRowCountListeners->removeInterface( aListener ); } else - throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } void SAL_CALL XResultSet_impl::addVetoableChangeListener( diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx index 2bec4c61bcea..4f0f5b19d928 100644 --- a/ucb/source/ucp/file/filstr.cxx +++ b/ucb/source/ucp/file/filstr.cxx @@ -185,10 +185,10 @@ void SAL_CALL XStream_impl::truncate(void) throw( io::IOException, uno::RuntimeException ) { if (osl::FileBase::E_None != m_aFile.setSize(0)) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); if (osl::FileBase::E_None != m_aFile.setPos(osl_Pos_Absolut,sal_uInt64(0))) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } @@ -207,7 +207,7 @@ XStream_impl::readBytes( uno::RuntimeException) { if( ! m_nIsOpen ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); sal_Int8 * buffer; try @@ -217,7 +217,7 @@ XStream_impl::readBytes( catch (const std::bad_alloc&) { if( m_nIsOpen ) m_aFile.close(); - throw io::BufferSizeExceededException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::BufferSizeExceededException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } sal_uInt64 nrc(0); @@ -225,7 +225,7 @@ XStream_impl::readBytes( != osl::FileBase::E_None) { delete[] buffer; - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } aData = uno::Sequence< sal_Int8 > ( buffer, (sal_uInt32)nrc ); delete[] buffer; @@ -283,7 +283,7 @@ XStream_impl::writeBytes( const uno::Sequence< sal_Int8 >& aData ) const sal_Int8* p = aData.getConstArray(); if(osl::FileBase::E_None != m_aFile.write(((void*)(p)),sal_uInt64(length),nWrittenBytes) || nWrittenBytes != length ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } } @@ -301,8 +301,7 @@ XStream_impl::closeStream( if( err != osl::FileBase::E_None ) { io::IOException ex; - ex.Message = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "could not close file")); + ex.Message = rtl::OUString( "could not close file"); throw ex; } @@ -348,9 +347,9 @@ XStream_impl::seek( uno::RuntimeException ) { if( location < 0 ) - throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); + throw lang::IllegalArgumentException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >(), 0 ); if( osl::FileBase::E_None != m_aFile.setPos( osl_Pos_Absolut, sal_uInt64( location ) ) ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } @@ -362,7 +361,7 @@ XStream_impl::getPosition( { sal_uInt64 uPos; if( osl::FileBase::E_None != m_aFile.getPos( uPos ) ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); return sal_Int64( uPos ); } @@ -374,7 +373,7 @@ XStream_impl::getLength( { sal_uInt64 uEndPos; if ( m_aFile.getSize(uEndPos) != osl::FileBase::E_None ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); else return sal_Int64( uEndPos ); } @@ -395,9 +394,7 @@ void XStream_impl::waitForCompletion() // afterwards, there appears to be no cheaper way than to call fsync: if (m_nIsOpen && m_aFile.sync() != osl::FileBase::E_None) { throw io::IOException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "could not synchronize file to disc")), + rtl::OUString( "could not synchronize file to disc"), static_cast< OWeakObject * >(this)); } } diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index ae819bdde75e..d7b5a35904e5 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -200,7 +200,7 @@ FileProvider::supportsService( const rtl::OUString& ServiceName ) throw( RuntimeException ) { - return ServiceName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider")); + return ServiceName == rtl::OUString("com.sun.star.ucb.FileContentProvider"); } @@ -276,7 +276,7 @@ FileProvider::queryContent( aUnc ); if( err ) - throw IllegalIdentifierException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw IllegalIdentifierException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); return Reference< XContent >( new BaseContent( m_pMyShell,xIdentifier,aUnc ) ); } @@ -405,17 +405,17 @@ private: XPropertySetInfoImpl2::XPropertySetInfoImpl2() : m_seq( 3 ) { - m_seq[0] = Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HostName")), + m_seq[0] = Property( rtl::OUString("HostName"), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), PropertyAttribute::READONLY ); - m_seq[1] = Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HomeDirectory")), + m_seq[1] = Property( rtl::OUString("HomeDirectory"), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), PropertyAttribute::READONLY ); - m_seq[2] = Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FileSystemNotation")), + m_seq[2] = Property( rtl::OUString("FileSystemNotation"), -1, getCppuType( static_cast< sal_Int32* >( 0 ) ), PropertyAttribute::READONLY ); @@ -467,7 +467,7 @@ XPropertySetInfoImpl2::getPropertyByName( if( m_seq[i].Name == aName ) return m_seq[i]; - throw UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } @@ -549,7 +549,7 @@ FileProvider::setPropertyValue( const rtl::OUString& aPropertyName, aPropertyName.compareToAscii( "HostName" ) == 0 ) return; else - throw UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } @@ -581,7 +581,7 @@ FileProvider::getPropertyValue( return aAny; } else - throw UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 1907d168cb12..fe5b3b68ec05 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -161,24 +161,23 @@ shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceF m_bWithConfig( bWithConfig ), m_pProvider( pProvider ), m_xMultiServiceFactory( xMultiServiceFactory ), - Title( RTL_CONSTASCII_USTRINGPARAM("Title") ), - CasePreservingURL( - RTL_CONSTASCII_USTRINGPARAM("CasePreservingURL") ), - IsDocument( RTL_CONSTASCII_USTRINGPARAM("IsDocument") ), - IsFolder( RTL_CONSTASCII_USTRINGPARAM("IsFolder") ), - DateModified( RTL_CONSTASCII_USTRINGPARAM("DateModified") ), - Size( RTL_CONSTASCII_USTRINGPARAM("Size") ), - IsVolume( RTL_CONSTASCII_USTRINGPARAM("IsVolume") ), - IsRemoveable( RTL_CONSTASCII_USTRINGPARAM("IsRemoveable") ), - IsRemote( RTL_CONSTASCII_USTRINGPARAM("IsRemote") ), - IsCompactDisc( RTL_CONSTASCII_USTRINGPARAM("IsCompactDisc") ), - IsFloppy( RTL_CONSTASCII_USTRINGPARAM("IsFloppy") ), - IsHidden( RTL_CONSTASCII_USTRINGPARAM("IsHidden") ), - ContentType( RTL_CONSTASCII_USTRINGPARAM("ContentType") ), - IsReadOnly( RTL_CONSTASCII_USTRINGPARAM("IsReadOnly") ), - CreatableContentsInfo( RTL_CONSTASCII_USTRINGPARAM("CreatableContentsInfo") ), - FolderContentType( RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.staroffice.fsys-folder") ), - FileContentType( RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.staroffice.fsys-file") ), + Title( "Title" ), + CasePreservingURL( "CasePreservingURL" ), + IsDocument( "IsDocument" ), + IsFolder( "IsFolder" ), + DateModified( "DateModified" ), + Size( "Size" ), + IsVolume( "IsVolume" ), + IsRemoveable( "IsRemoveable" ), + IsRemote( "IsRemote" ), + IsCompactDisc( "IsCompactDisc" ), + IsFloppy( "IsFloppy" ), + IsHidden( "IsHidden" ), + ContentType( "ContentType" ), + IsReadOnly( "IsReadOnly" ), + CreatableContentsInfo( "CreatableContentsInfo" ), + FolderContentType( "application/vnd.sun.staroffice.fsys-folder" ), + FileContentType( "application/vnd.sun.staroffice.fsys-file" ), m_sCommandInfo( 9 ) { // Title @@ -358,45 +357,45 @@ shell::shell( const uno::Reference< lang::XMultiServiceFactory >& xMultiServiceF | beans::PropertyAttribute::READONLY ) ); // Commands - m_sCommandInfo[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getCommandInfo")); + m_sCommandInfo[0].Name = rtl::OUString("getCommandInfo"); m_sCommandInfo[0].Handle = -1; m_sCommandInfo[0].ArgType = getCppuVoidType(); - m_sCommandInfo[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertySetInfo")); + m_sCommandInfo[1].Name = rtl::OUString("getPropertySetInfo"); m_sCommandInfo[1].Handle = -1; m_sCommandInfo[1].ArgType = getCppuVoidType(); - m_sCommandInfo[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")); + m_sCommandInfo[2].Name = rtl::OUString("getPropertyValues"); m_sCommandInfo[2].Handle = -1; m_sCommandInfo[2].ArgType = getCppuType( static_cast< uno::Sequence< beans::Property >* >( 0 ) ); - m_sCommandInfo[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setPropertyValues")); + m_sCommandInfo[3].Name = rtl::OUString("setPropertyValues"); m_sCommandInfo[3].Handle = -1; m_sCommandInfo[3].ArgType = getCppuType( static_cast< uno::Sequence< beans::PropertyValue >* >( 0 ) ); - m_sCommandInfo[4].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")); + m_sCommandInfo[4].Name = rtl::OUString("open"); m_sCommandInfo[4].Handle = -1; m_sCommandInfo[4].ArgType = getCppuType( static_cast< OpenCommandArgument* >( 0 ) ); - m_sCommandInfo[5].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")); + m_sCommandInfo[5].Name = rtl::OUString("transfer"); m_sCommandInfo[5].Handle = -1; m_sCommandInfo[5].ArgType = getCppuType( static_cast< TransferInfo* >( 0 ) ); - m_sCommandInfo[6].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")); + m_sCommandInfo[6].Name = rtl::OUString("delete"); m_sCommandInfo[6].Handle = -1; m_sCommandInfo[6].ArgType = getCppuType( static_cast< sal_Bool* >( 0 ) ); - m_sCommandInfo[7].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("insert")); + m_sCommandInfo[7].Name = rtl::OUString("insert"); m_sCommandInfo[7].Handle = -1; m_sCommandInfo[7].ArgType = getCppuType( static_cast< InsertCommandArgument* > ( 0 ) ); - m_sCommandInfo[7].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("createNewContent")); + m_sCommandInfo[7].Name = rtl::OUString("createNewContent"); m_sCommandInfo[7].Handle = -1; m_sCommandInfo[7].ArgType = getCppuType( static_cast< ucb::ContentInfo * > ( 0 ) ); if(m_bWithConfig) { - rtl::OUString Store(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.Store")); + rtl::OUString Store("com.sun.star.ucb.Store"); uno::Reference< XPropertySetRegistryFactory > xRegFac( m_xMultiServiceFactory->createInstance( Store ), uno::UNO_QUERY ); @@ -496,7 +495,7 @@ shell::associate( const rtl::OUString& aUnqPath, shell::PropertySet::iterator it1 = m_aDefaultProperties.find( newProperty ); if( it1 != m_aDefaultProperties.end() ) - throw beans::PropertyExistException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::PropertyExistException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); { osl::MutexGuard aGuard( m_aMutex ); @@ -509,7 +508,7 @@ shell::associate( const rtl::OUString& aUnqPath, PropertySet& properties = *(it->second.properties); it1 = properties.find( newProperty ); if( it1 != properties.end() ) - throw beans::PropertyExistException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::PropertyExistException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); // Property does not exist properties.insert( newProperty ); @@ -532,7 +531,7 @@ shell::deassociate( const rtl::OUString& aUnqPath, shell::PropertySet::iterator it1 = m_aDefaultProperties.find( oldProperty ); if( it1 != m_aDefaultProperties.end() ) - throw beans::NotRemoveableException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::NotRemoveableException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); osl::MutexGuard aGuard( m_aMutex ); @@ -544,7 +543,7 @@ shell::deassociate( const rtl::OUString& aUnqPath, it1 = properties.find( oldProperty ); if( it1 == properties.end() ) - throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); properties.erase( it1 ); @@ -840,7 +839,7 @@ shell::setv( const rtl::OUString& aUnqPath, it1 = properties.find( toset ); if( it1 == properties.end() ) { - ret[i] <<= beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + ret[i] <<= beans::UnknownPropertyException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); continue; } @@ -850,7 +849,7 @@ shell::setv( const rtl::OUString& aUnqPath, if( it1->getAttributes() & beans::PropertyAttribute::READONLY ) { - ret[i] <<= lang::IllegalAccessException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + ret[i] <<= lang::IllegalAccessException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); continue; } @@ -908,7 +907,7 @@ shell::setv( const rtl::OUString& aUnqPath, --propChanged; // unsuccessful setting uno::Sequence< uno::Any > names( 1 ); ret[0] <<= beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, + rtl::OUString("Uri"), -1, uno::makeAny(aUnqPath), beans::PropertyState_DIRECT_VALUE); IOErrorCode ioError(IOErrorCode_GENERAL); @@ -921,7 +920,7 @@ shell::setv( const rtl::OUString& aUnqPath, } } else - ret[i] <<= beans::IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + ret[i] <<= beans::IllegalTypeException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } else if(values[i].Name == IsReadOnly || values[i].Name == IsHidden) @@ -972,7 +971,7 @@ shell::setv( const rtl::OUString& aUnqPath, --propChanged; // unsuccessful setting uno::Sequence< uno::Any > names( 1 ); names[0] <<= beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, + rtl::OUString("Uri"), -1, uno::makeAny(aUnqPath), beans::PropertyState_DIRECT_VALUE); IOErrorCode ioError; @@ -1029,7 +1028,7 @@ shell::setv( const rtl::OUString& aUnqPath, } } else - ret[i] <<= beans::IllegalTypeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + ret[i] <<= beans::IllegalTypeException( ::rtl::OUString( OSL_LOG_PREFIX ), uno::Reference< uno::XInterface >() ); } } } // end for @@ -1201,7 +1200,7 @@ shell::move( sal_Int32 CommandId, { newDstUnqPath = dstUnqPath; - rtl::OUString aPostFix( RTL_CONSTASCII_USTRINGPARAM("_") ); + rtl::OUString aPostFix( "_" ); aPostFix += rtl::OUString::valueOf( ++nTry ); newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostFix ); @@ -1431,7 +1430,7 @@ shell::copy( { newDstUnqPath = dstUnqPath; - rtl::OUString aPostFix( RTL_CONSTASCII_USTRINGPARAM("_") ); + rtl::OUString aPostFix( "_" ); aPostFix += rtl::OUString::valueOf( ++nTry ); newDstUnqPath = newDstUnqPath.replaceAt( nPos, 0, aPostFix ); @@ -1972,7 +1971,7 @@ sal_Bool SAL_CALL shell::getUnqFromUrl( const rtl::OUString& Url,rtl::OUString& { if ( Url == "file:///" || Url == "file://localhost/" || Url == "file://127.0.0.1/" ) { - Unq = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///")); + Unq = rtl::OUString("file:///"); return false; } @@ -2053,7 +2052,7 @@ shell::copy_recursive( const rtl::OUString& srcUnqPath, RTL_TEXTENCODING_UTF8 ); if( newDstUnqPath.lastIndexOf( sal_Unicode('/') ) != newDstUnqPath.getLength()-1 ) - newDstUnqPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + newDstUnqPath += rtl::OUString("/"); newDstUnqPath += tit; @@ -3020,7 +3019,7 @@ uno::Sequence< ucb::ContentInfo > shell::queryCreatableContentsInfo() uno::Sequence< beans::Property > props( 1 ); props[0] = beans::Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + rtl::OUString("Title"), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), beans::PropertyAttribute::MAYBEVOID @@ -3043,20 +3042,20 @@ uno::Sequence< ucb::ContentInfo > shell::queryCreatableContentsInfo() void SAL_CALL shell::getScheme( rtl::OUString& Scheme ) { - Scheme = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file")); + Scheme = rtl::OUString("file"); } rtl::OUString SAL_CALL shell::getImplementationName_static( void ) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ucb.FileProvider")); + return rtl::OUString("com.sun.star.comp.ucb.FileProvider"); } uno::Sequence< rtl::OUString > SAL_CALL shell::getSupportedServiceNames_static( void ) { - rtl::OUString Supported(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider")); + rtl::OUString Supported("com.sun.star.ucb.FileContentProvider"); com::sun::star::uno::Sequence< rtl::OUString > Seq( &Supported,1 ); return Seq; } diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index deba05ec9c1b..9d63b26022e0 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -175,10 +175,8 @@ XTYPEPROVIDER_IMPL_6( FTPContent, #define XSERVICEINFO_CREATE_INSTANCE_IMPL( Class ) XSERVICEINFO_IMPL_1( FTPContent, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.FTPContent")), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.FTPContent"))); + rtl::OUString( "com.sun.star.comp.FTPContent"), + rtl::OUString( "com.sun.star.ucb.FTPContent")); @@ -192,7 +190,7 @@ XSERVICEINFO_IMPL_1( FTPContent, rtl::OUString SAL_CALL FTPContent::getContentType() throw( RuntimeException ) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(FTP_CONTENT_TYPE)); + return rtl::OUString(FTP_CONTENT_TYPE); } @@ -373,7 +371,7 @@ Any SAL_CALL FTPContent::execute( { Sequence<Any> seq(1); PropertyValue value; - value.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")); + value.Name = rtl::OUString("Uri"); value.Handle = -1; value.Value <<= m_aFTPURL.ident(false,false); value.State = PropertyState_DIRECT_VALUE; @@ -408,7 +406,7 @@ Any SAL_CALL FTPContent::execute( { Sequence<Any> seq(1); PropertyValue value; - value.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")); + value.Name = rtl::OUString("Uri"); value.Handle = -1; value.Value <<= m_aFTPURL.ident(false,false); value.State = PropertyState_DIRECT_VALUE; @@ -433,8 +431,7 @@ Any SAL_CALL FTPContent::execute( if(!(aCommand.Argument >>= Properties)) { aRet <<= IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >(this), -1); ucbhelper::cancelCommandExecution(aRet,Environment); @@ -448,8 +445,7 @@ Any SAL_CALL FTPContent::execute( if( ! ( aCommand.Argument >>= propertyValues ) ) { aRet <<= IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >(this), -1); ucbhelper::cancelCommandExecution(aRet,Environment); @@ -470,8 +466,7 @@ Any SAL_CALL FTPContent::execute( InsertCommandArgument aInsertArgument; if ( ! ( aCommand.Argument >>= aInsertArgument ) ) { aRet <<= IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >(this), -1); ucbhelper::cancelCommandExecution(aRet,Environment); @@ -486,8 +481,7 @@ Any SAL_CALL FTPContent::execute( OpenCommandArgument2 aOpenCommand; if ( !( aCommand.Argument >>= aOpenCommand ) ) { aRet <<= IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >(this), -1); @@ -530,8 +524,7 @@ Any SAL_CALL FTPContent::execute( if(n) { Sequence<Any> seq(1); PropertyValue value; - value.Name = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")); + value.Name = rtl::OUString("Uri"); value.Handle = -1; value.Value <<= m_aFTPURL.ident(false,false); value.State = PropertyState_DIRECT_VALUE; @@ -582,8 +575,7 @@ Any SAL_CALL FTPContent::execute( } else { aRet <<= IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unexpected OpenMode!" )), + rtl::OUString( "Unexpected OpenMode!" ), static_cast< cppu::OWeakObject * >(this), -1); @@ -595,8 +587,7 @@ Any SAL_CALL FTPContent::execute( ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >(this), -1)), Environment); @@ -633,13 +624,9 @@ Any SAL_CALL FTPContent::execute( } } -#define FTP_FILE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( \ - "application/" \ - "vnd.sun.staroffice.ftp-file")) +#define FTP_FILE rtl::OUString( "application/vnd.sun.staroffice.ftp-file") -#define FTP_FOLDER rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( \ - "application/" \ - "vnd.sun.staroffice.ftp-folder")) +#define FTP_FOLDER rtl::OUString( "application/vnd.sun.staroffice.ftp-folder") Sequence<ContentInfo > SAL_CALL FTPContent::queryCreatableContentsInfo( ) @@ -660,7 +647,7 @@ FTPContent::queryCreatableContentsInfo_Static( ) | ContentInfoAttribute::KIND_DOCUMENT; Sequence< Property > props( 1 ); props[0] = Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + rtl::OUString("Title"), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), PropertyAttribute::MAYBEVOID @@ -757,7 +744,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand, if(m_bInserted && !m_bTitleSet) { MissingPropertiesException excep; excep.Properties.realloc(1); - excep.Properties[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + excep.Properties[0] = rtl::OUString("Title"); Any aAny; aAny <<= excep; ucbhelper::cancelCommandExecution(aAny,Env); } @@ -910,7 +897,7 @@ Sequence<Any> FTPContent::setPropertyValues( rtl::OUString OldTitle = m_aFTPURL.ren(Title); evt.realloc(1); evt[0].PropertyName = - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + rtl::OUString("Title"); evt[0].Further = false; evt[0].PropertyHandle = -1; evt[0].OldValue <<= OldTitle; @@ -931,8 +918,7 @@ Sequence<Any> FTPContent::setPropertyValues( for(sal_Int32 j = 0; j < props.getLength(); ++j) if(props[j].Name == seqPropVal[i].Name) { ret[i] <<= IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!")), + rtl::OUString( "Property is read-only!"), //props[j].Attributes & PropertyAttribute::READONLY // ? "Property is read-only!" // : "Access denied!"), diff --git a/ucb/source/ucp/ftp/ftpcontentidentifier.cxx b/ucb/source/ucp/ftp/ftpcontentidentifier.cxx index 9e76eee96cda..13d85ab65730 100644 --- a/ucb/source/ucp/ftp/ftpcontentidentifier.cxx +++ b/ucb/source/ucp/ftp/ftpcontentidentifier.cxx @@ -139,7 +139,7 @@ FTPContentIdentifier::getContentProviderScheme( com::sun::star::uno::RuntimeException ) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp")); + return rtl::OUString("ftp"); } diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx index 427527937a52..a7b281129e62 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx @@ -103,8 +103,8 @@ XTYPEPROVIDER_IMPL_3(FTPContentProvider, XSERVICEINFO_IMPL_1( FTPContentProvider, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.FTPContentProvider")), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(FTP_CONTENT_PROVIDER_SERVICE_NAME))); + rtl::OUString("com.sun.star.comp.FTPContentProvider"), + rtl::OUString(FTP_CONTENT_PROVIDER_SERVICE_NAME)); //========================================================================= // @@ -158,7 +158,7 @@ FTPContentProvider::queryContent( this); if(!m_pProxyDecider->shouldUseProxy( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ftp")), + rtl::OUString("ftp"), aURL.host(), aURL.port().toInt32())) { @@ -267,11 +267,10 @@ FTPContentProvider::getHttpProvider() if(xManager.is()) return xManager->queryContentProvider( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http:"))); + rtl::OUString("http:")); else throw RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "bad ucbhelper::ContentBroker")), + rtl::OUString( "bad ucbhelper::ContentBroker"), *this); } else return 0; diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx index 130b9b76b593..a38185eac213 100644 --- a/ucb/source/ucp/ftp/ftpresultsetI.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetI.cxx @@ -70,8 +70,7 @@ ResultSetI::ResultSetI(const Reference<XMultiServiceFactory>& xMSF, const rtl::OUString& Name = seqProp[i].Name; if(Name.compareToAscii("ContentType") == 0 ) xRow->appendString(seqProp[i], - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "application/ftp" ))); + rtl::OUString( "application/ftp" )); else if(Name.compareToAscii("Title") == 0) xRow->appendString(seqProp[i],dirvec[n].m_aName); else if(Name.compareToAscii("IsReadOnly") == 0) diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx b/ucb/source/ucp/ftp/ftpresultsetbase.cxx index 8d8d73f28fc3..a876bce0f6c2 100644 --- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx @@ -510,12 +510,12 @@ ResultSetBase::getPropertySetInfo() throw( uno::RuntimeException) { uno::Sequence< beans::Property > seq(2); - seq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")); + seq[0].Name = rtl::OUString("RowCount"); seq[0].Handle = -1; seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) ); seq[0].Attributes = beans::PropertyAttribute::READONLY; - seq[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")); + seq[1].Name = rtl::OUString("IsRowCountFinal"); seq[1].Handle = -1; seq[1].Type = getCppuType( static_cast< sal_Bool* >(0) ); seq[1].Attributes = beans::PropertyAttribute::READONLY; @@ -535,8 +535,8 @@ void SAL_CALL ResultSetBase::setPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) || - aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) + if( aPropertyName == rtl::OUString("IsRowCountFinal") || + aPropertyName == rtl::OUString("RowCount") ) return; throw beans::UnknownPropertyException(); @@ -549,13 +549,13 @@ uno::Any SAL_CALL ResultSetBase::getPropertyValue( lang::WrappedTargetException, uno::RuntimeException) { - if( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) + if( PropertyName == rtl::OUString("IsRowCountFinal") ) { uno::Any aAny; aAny <<= m_bRowCountFinal; return aAny; } - else if ( PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) + else if ( PropertyName == rtl::OUString("RowCount") ) { uno::Any aAny; sal_Int32 count = m_aItems.size(); @@ -574,7 +574,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) ) + if( aPropertyName == rtl::OUString("IsRowCountFinal") ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pIsFinalListeners ) @@ -583,7 +583,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener( m_pIsFinalListeners->addInterface( xListener ); } - else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) ) + else if ( aPropertyName == rtl::OUString("RowCount") ) { osl::MutexGuard aGuard( m_aMutex ); if ( ! m_pRowCountListeners ) @@ -603,13 +603,13 @@ void SAL_CALL ResultSetBase::removePropertyChangeListener( lang::WrappedTargetException, uno::RuntimeException) { - if( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal")) && + if( aPropertyName == rtl::OUString("IsRowCountFinal") && m_pIsFinalListeners ) { osl::MutexGuard aGuard( m_aMutex ); m_pIsFinalListeners->removeInterface( aListener ); } - else if ( aPropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) && + else if ( aPropertyName == rtl::OUString("RowCount") && m_pRowCountListeners ) { osl::MutexGuard aGuard( m_aMutex ); diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx index 17f50e52a845..39f2a65686fa 100644 --- a/ucb/source/ucp/ftp/ftpurl.cxx +++ b/ucb/source/ucp/ftp/ftpurl.cxx @@ -136,9 +136,9 @@ FTPURL::FTPURL(const rtl::OUString& url, malformed_exception ) : m_pFCP(pFCP), - m_aUsername(RTL_CONSTASCII_USTRINGPARAM("anonymous")), + m_aUsername("anonymous"), m_bShowPassword(false), - m_aPort(RTL_CONSTASCII_USTRINGPARAM("21")) + m_aPort("21") { parse(url); // can reset m_bShowPassword } @@ -401,7 +401,7 @@ namespace ftp { // Setting username:password #define SET_USER_PASSWORD(username,password) \ rtl::OUString combi(username + \ - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + \ + rtl::OUString(":") + \ password); \ rtl::OString aUserPsswd(combi.getStr(), \ combi.getLength(), \ @@ -549,7 +549,7 @@ rtl::OUString FTPURL::net_title() const if(try_more && 1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); // add end-slash + url += rtl::OUString("/"); // add end-slash else if(!try_more && 1+url.lastIndexOf(sal_Unicode('/')) == url.getLength()) url = url.copy(0,url.getLength()-1); // remove end-slash @@ -567,7 +567,7 @@ rtl::OUString FTPURL::net_title() const // Format of current working directory: // 257 "/bla/bla" is current directory sal_Int32 index1 = aNetTitle.lastIndexOf( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("257"))); + rtl::OUString("257")); index1 = 1+aNetTitle.indexOf(sal_Unicode('"'),index1); sal_Int32 index2 = aNetTitle.indexOf(sal_Unicode('"'),index1); aNetTitle = aNetTitle.copy(index1,index2-index1); @@ -595,7 +595,7 @@ rtl::OUString FTPURL::net_title() const aNetTitle = decodePathSegment(m_aPathSegmentVec.back()); else // must be root - aNetTitle = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aNetTitle = rtl::OUString("/"); try_more = false; } @@ -729,7 +729,7 @@ void FTPURL::mkdir(bool ReplaceExisting) const rtl::OUString url(parent(true)); if(1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + url += rtl::OUString("/"); SET_URL(url); CURLcode err = curl_easy_perform(curl); @@ -769,7 +769,7 @@ rtl::OUString FTPURL::ren(const rtl::OUString& NewTitle) rtl::OUString url(parent(true)); if(1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + url += rtl::OUString("/"); SET_URL(url); CURLcode err = curl_easy_perform(curl); @@ -819,7 +819,7 @@ void FTPURL::del() const rtl::OUString url(parent(true)); if(1+url.lastIndexOf(sal_Unicode('/')) != url.getLength()) - url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + url += rtl::OUString("/"); SET_URL(url); CURLcode err = curl_easy_perform(curl); diff --git a/ucb/source/ucp/ftp/test_ftpurl.cxx b/ucb/source/ucp/ftp/test_ftpurl.cxx index e2c2bb0f54aa..3e2a5c22a2dd 100644 --- a/ucb/source/ucp/ftp/test_ftpurl.cxx +++ b/ucb/source/ucp/ftp/test_ftpurl.cxx @@ -159,8 +159,7 @@ int test_ftplist(void) { FTPHandleProviderI provider; ftp::FTPURL url( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "ftp://abi:psswd@abi-1/dir")), + rtl::OUString( "ftp://abi:psswd@abi-1/dir"), &provider); std::vector<ftp::FTPDirentry> vec = @@ -223,8 +222,7 @@ int test_ftpproperties(void) { FTPHandleProviderI provider; ftp::FTPURL url( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "ftp://abi:psswd@abi-1/file")), + rtl::OUString( "ftp://abi:psswd@abi-1/file"), &provider); ftp::FTPDirentry ade(url.direntry()); @@ -243,8 +241,7 @@ int test_ftpopen(void) FTPHandleProviderI provider; ftp::FTPURL url( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "ftp://abi:psswd@abi-1/file")), + rtl::OUString( "ftp://abi:psswd@abi-1/file"), &provider); FILE* file = url.open(); diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index fbaf0f198c4a..5029e06bf026 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -149,8 +149,8 @@ void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ ) rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException ) { return isFolder(uno::Reference< ucb::XCommandEnvironment >()) - ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GIO_FOLDER_TYPE )) - : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GIO_FILE_TYPE )); + ? rtl::OUString( GIO_FOLDER_TYPE ) + : rtl::OUString( GIO_FILE_TYPE ); } #define EXCEPT(aExcept) \ @@ -304,7 +304,7 @@ uno::Any Content::mapGIOError( GError *pError ) uno::Any Content::getBadArgExcept() { return uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong argument type!")), + rtl::OUString("Wrong argument type!"), static_cast< cppu::OWeakObject * >( this ), -1) ); } @@ -528,7 +528,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( static lang::IllegalAccessException getReadOnlyException( const uno::Reference< uno::XInterface >& rContext ) { - return lang::IllegalAccessException ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only!")), rContext ); + return lang::IllegalAccessException ( rtl::OUString("Property is read-only!"), rContext ); } void Content::queryChildren( ContentRefList& rChildren ) @@ -544,7 +544,7 @@ void Content::queryChildren( ContentRefList& rChildren ) sal_Int32 nURLPos = aURL.lastIndexOf( '/' ); if ( nURLPos != ( aURL.getLength() - 1 ) ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); sal_Int32 nLen = aURL.getLength(); @@ -676,7 +676,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if (!( rValue.Value >>= aNewTitle )) { aRet[ n ] <<= beans::IllegalTypeException - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property value has wrong type!")), + ( rtl::OUString("Property value has wrong type!"), static_cast< cppu::OWeakObject * >( this ) ); continue; } @@ -684,7 +684,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( aNewTitle.getLength() <= 0 ) { aRet[ n ] <<= lang::IllegalArgumentException - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty title not allowed!")), + ( rtl::OUString("Empty title not allowed!"), static_cast< cppu::OWeakObject * >( this ), -1 ); continue; @@ -700,7 +700,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( g_warning ("Set new name to '%s'", newName); #endif - aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + aEvent.PropertyName = rtl::OUString("Title"); if (oldName) aEvent.OldValue = uno::makeAny(rtl::OUString(oldName, strlen(oldName), RTL_TEXTENCODING_UTF8)); aEvent.NewValue = uno::makeAny(aNewTitle); @@ -744,7 +744,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if (!exchangeIdentity( xNewId ) ) { aRet[ nTitlePos ] <<= uno::Exception - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), + ( rtl::OUString("Exchange failed!"), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1105,19 +1105,19 @@ uno::Sequence< ucb::ContentInfo > Content::queryCreatableContentsInfo( // Minimum set of props we really need uno::Sequence< beans::Property > props( 1 ); props[0] = beans::Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + rtl::OUString("Title"), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND ); // file - seq[0].Type = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GIO_FILE_TYPE )); + seq[0].Type = rtl::OUString( GIO_FILE_TYPE ); seq[0].Attributes = ( ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | ucb::ContentInfoAttribute::KIND_DOCUMENT ); seq[0].Properties = props; // folder - seq[1].Type = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GIO_FOLDER_TYPE )); + seq[1].Type = rtl::OUString( GIO_FOLDER_TYPE ); seq[1].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; seq[1].Properties = props; @@ -1162,7 +1162,7 @@ uno::Reference< ucb::XContent > rtl::OUString aURL = m_xIdentifier->getContentIdentifier(); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); name = create_document ? "[New_Content]" : "[New_Collection]"; aURL += rtl::OUString::createFromAscii( name ); @@ -1220,40 +1220,40 @@ uno::Sequence< beans::Property > Content::getProperties( { static const beans::Property aGenericProperties[] = { - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ), + beans::Property( rtl::OUString( "IsDocument" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ), + beans::Property( rtl::OUString( "IsFolder" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), + beans::Property( rtl::OUString( "Title" ), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" ) ), + beans::Property( rtl::OUString( "IsReadOnly" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateCreated" ) ), + beans::Property( rtl::OUString( "DateCreated" ), -1, getCppuType( static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ), + beans::Property( rtl::OUString( "DateModified" ), -1, getCppuType( static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ), + beans::Property( rtl::OUString( "Size" ), -1, getCppuType( static_cast< const sal_Int64 * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVolume" ) ), + beans::Property( rtl::OUString( "IsVolume" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsCompactDisc" ) ), + beans::Property( rtl::OUString( "IsCompactDisc" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsRemoveable" ) ), + beans::Property( rtl::OUString( "IsRemoveable" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsHidden" ) ), + beans::Property( rtl::OUString( "IsHidden" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CreatableContentsInfo" ) ), + beans::Property( rtl::OUString( "CreatableContentsInfo" ), -1, getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ) }; @@ -1268,35 +1268,35 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( const uno::Reference< uc { // Required commands ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ), + ( rtl::OUString( "getCommandInfo" ), -1, getCppuVoidType() ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ), + ( rtl::OUString( "getPropertySetInfo" ), -1, getCppuVoidType() ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ), + ( rtl::OUString( "getPropertyValues" ), -1, getCppuType( static_cast<uno::Sequence< beans::Property > * >( 0 ) ) ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ), + ( rtl::OUString( "setPropertyValues" ), -1, getCppuType( static_cast<uno::Sequence< beans::PropertyValue > * >( 0 ) ) ), // Optional standard commands ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ), + ( rtl::OUString( "delete" ), -1, getCppuBooleanType() ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ), + ( rtl::OUString( "insert" ), -1, getCppuType( static_cast<ucb::InsertCommandArgument * >( 0 ) ) ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), + ( rtl::OUString( "open" ), -1, getCppuType( static_cast<ucb::OpenCommandArgument2 * >( 0 ) ) ), // Folder Only, omitted if not a folder ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ), + ( rtl::OUString( "transfer" ), -1, getCppuType( static_cast<ucb::TransferInfo * >( 0 ) ) ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "createNewContent" ) ), + ( rtl::OUString( "createNewContent" ), -1, getCppuType( static_cast<ucb::ContentInfo * >( 0 ) ) ) }; @@ -1324,14 +1324,14 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) throw ( uno rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.GIOContent")); + return rtl::OUString("com.sun.star.comp.GIOContent"); } uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException ) { uno::Sequence< rtl::OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.GIOContent")); + aSNS.getArray()[ 0 ] = rtl::OUString("com.sun.star.ucb.GIOContent"); return aSNS; } diff --git a/ucb/source/ucp/gio/gio_datasupplier.cxx b/ucb/source/ucp/gio/gio_datasupplier.cxx index 57e4300be2f4..b41b96cc6f0f 100644 --- a/ucb/source/ucp/gio/gio_datasupplier.cxx +++ b/ucb/source/ucp/gio/gio_datasupplier.cxx @@ -130,7 +130,7 @@ DataSupplier::~DataSupplier() g_uri_escape_string( g_file_info_get_name(maResults[ nIndex ]->pInfo) , NULL, false); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aId += rtl::OUString("/"); aId += rtl::OUString::createFromAscii( escaped_name ); @@ -244,7 +244,7 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues( sal_uInt32 nInde xContent, uno::UNO_QUERY_THROW ); sal_Int32 nCmdId( xCmdProc->createCommandIdentifier() ); ucb::Command aCmd; - aCmd.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")); + aCmd.Name = rtl::OUString("getPropertyValues"); aCmd.Handle = -1; aCmd.Argument <<= getResultSet()->getProperties(); uno::Any aResult( xCmdProc->execute( diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx index 62e8d986fd20..e1c25cd1b11e 100644 --- a/ucb/source/ucp/gio/gio_provider.cxx +++ b/ucb/source/ucp/gio/gio_provider.cxx @@ -94,10 +94,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, com::sun::star::ucb::XContentProvider ); XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.GIOContentProvider" )), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.GIOContentProvider" )) ); + rtl::OUString( "com.sun.star.comp.GIOContentProvider" ), + rtl::OUString( "com.sun.star.ucb.GIOContentProvider" ) ); ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider ); diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx index 7b0605a1cd33..fd51030dbfc5 100644 --- a/ucb/source/ucp/gvfs/gvfs_content.cxx +++ b/ucb/source/ucp/gvfs/gvfs_content.cxx @@ -247,15 +247,14 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.GnomeVFSContent")); + return rtl::OUString("com.sun.star.comp.GnomeVFSContent"); } uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException ) { uno::Sequence< rtl::OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.GnomeVFSContent" )); + aSNS.getArray()[ 0 ] = rtl::OUString( "com.sun.star.ucb.GnomeVFSContent" ); return aSNS; } @@ -267,9 +266,9 @@ rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException ) { if ( isFolder( uno::Reference< ucb::XCommandEnvironment >() ) ) - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GVFS_FOLDER_TYPE )); + return rtl::OUString( GVFS_FOLDER_TYPE ); else - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GVFS_FILE_TYPE )); + return rtl::OUString( GVFS_FILE_TYPE ); } // @@ -279,7 +278,7 @@ rtl::OUString SAL_CALL Content::getContentType() uno::Any Content::getBadArgExcept() { return uno::makeAny( lang::IllegalArgumentException - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong argument type!")), + ( rtl::OUString("Wrong argument type!"), static_cast< cppu::OWeakObject * >( this ), -1 ) ); } @@ -459,19 +458,19 @@ uno::Sequence< ucb::ContentInfo > Content::queryCreatableContentsInfo( // Minimum set of props we really need uno::Sequence< beans::Property > props( 1 ); props[0] = beans::Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + rtl::OUString("Title"), -1, getCppuType( static_cast< rtl::OUString* >( 0 ) ), beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND ); // file - seq[0].Type = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GVFS_FILE_TYPE )); + seq[0].Type = rtl::OUString( GVFS_FILE_TYPE ); seq[0].Attributes = ( ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | ucb::ContentInfoAttribute::KIND_DOCUMENT ); seq[0].Properties = props; // folder - seq[1].Type = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( GVFS_FOLDER_TYPE )); + seq[1].Type = rtl::OUString( GVFS_FOLDER_TYPE ); seq[1].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; seq[1].Properties = props; @@ -515,7 +514,7 @@ Content::createNewContent( const ucb::ContentInfo& Info ) rtl::OUString aURL = getOUURI(); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); name = create_document ? "[New_Content]" : "[New_Collection]"; // This looks problematic to me cf. webdav @@ -704,7 +703,7 @@ static lang::IllegalAccessException getReadOnlyException( Content *ctnt ) { return lang::IllegalAccessException - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only!")), + ( rtl::OUString("Property is read-only!"), static_cast< cppu::OWeakObject * >( ctnt ) ); } @@ -713,7 +712,7 @@ Content::makeNewURL( const char */*newName*/ ) { rtl::OUString aNewURL = getParentURL(); if ( aNewURL.lastIndexOf( '/' ) != ( aNewURL.getLength() - 1 ) ) - aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aNewURL += rtl::OUString("/"); char *name = gnome_vfs_escape_string( m_info.name ); aNewURL += GnomeToOUString( name ); @@ -808,7 +807,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( rValue.Value >>= aNewTitle ) { if ( aNewTitle.isEmpty() ) aRet[ n ] <<= lang::IllegalArgumentException - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty title not allowed!")), + ( rtl::OUString("Empty title not allowed!"), static_cast< cppu::OWeakObject * >( this ), -1 ); else { char *newName = OUStringToGnome( aNewTitle ); @@ -818,7 +817,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( g_warning ("Set new name to '%s'", newName); #endif - aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + aEvent.PropertyName = rtl::OUString("Title"); aEvent.OldValue = uno::makeAny( GnomeToOUString( newInfo.name ) ); aEvent.NewValue = uno::makeAny( aNewTitle ); aChanges.getArray()[ nChanged ] = aEvent; @@ -831,7 +830,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( } } else aRet[ n ] <<= beans::IllegalTypeException - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property value has wrong type!")), + ( rtl::OUString("Property value has wrong type!"), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name == "DateCreated" || rValue.Name == "DateModified" ) { @@ -867,7 +866,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( aGuard.clear(); if (!exchangeIdentity( xNewId ) ) aRet[ nTitlePos ] <<= uno::Exception - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), + ( rtl::OUString("Exchange failed!"), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -896,7 +895,7 @@ void Content::queryChildren( ContentRefList& rChildren ) sal_Int32 nURLPos = aURL.lastIndexOf( '/' ); if ( nURLPos != ( aURL.getLength() - 1 ) ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); sal_Int32 nLen = aURL.getLength(); @@ -1030,7 +1029,7 @@ void Content::transfer(const ucb::TransferInfo & /*rArgs*/, ucbhelper::cancelCommandExecution ( uno::makeAny ( ucb::InteractiveBadTransferURLException - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unsupported URL scheme!")), + ( rtl::OUString("Unsupported URL scheme!"), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); } @@ -1184,7 +1183,7 @@ uno::Any Content::mapVFSException( const GnomeVFSResult result, sal_Bool bWrite aArgs[ 0 ] <<= m_xIdentifier->getContentIdentifier(); aException <<= ucb::InteractiveAugmentedIOException - ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Not found!")), + ( rtl::OUString("Not found!"), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING, @@ -1309,45 +1308,45 @@ uno::Sequence< beans::Property > Content::getProperties( const uno::Reference< ucb::XCommandEnvironment > & /*xEnv*/ ) { static const beans::Property aGenericProperties[] = { - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ContentType" ) ), + beans::Property( rtl::OUString( "ContentType" ), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ), + beans::Property( rtl::OUString( "IsDocument" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ), + beans::Property( rtl::OUString( "IsFolder" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), + beans::Property( rtl::OUString( "Title" ), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), // Optional ... - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateCreated" ) ), + beans::Property( rtl::OUString( "DateCreated" ), -1, getCppuType( static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ), + beans::Property( rtl::OUString( "DateModified" ), -1, getCppuType( static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), // FIXME: Too expensive for now (?) -// beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ), +// beans::Property( rtl::OUString( "MediaType" ), // -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), // beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ), + beans::Property( rtl::OUString( "Size" ), -1, getCppuType( static_cast< const sal_Int64 * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" ) ), + beans::Property( rtl::OUString( "IsReadOnly" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVolume" ) ), + beans::Property( rtl::OUString( "IsVolume" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsCompactDisk" ) ), + beans::Property( rtl::OUString( "IsCompactDisk" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsHidden" ) ), + beans::Property( rtl::OUString( "IsHidden" ), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), - beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CreatableContentsInfo" ) ), + beans::Property( rtl::OUString( "CreatableContentsInfo" ), -1, getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ) }; @@ -1364,35 +1363,35 @@ uno::Sequence< ucb::CommandInfo > Content::getCommands( static ucb::CommandInfo aCommandInfoTable[] = { // Required commands ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ), + ( rtl::OUString( "getCommandInfo" ), -1, getCppuVoidType() ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ), + ( rtl::OUString( "getPropertySetInfo" ), -1, getCppuVoidType() ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ), + ( rtl::OUString( "getPropertyValues" ), -1, getCppuType( static_cast<uno::Sequence< beans::Property > * >( 0 ) ) ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ), + ( rtl::OUString( "setPropertyValues" ), -1, getCppuType( static_cast<uno::Sequence< beans::PropertyValue > * >( 0 ) ) ), // Optional standard commands ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" ) ), + ( rtl::OUString( "delete" ), -1, getCppuBooleanType() ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ), + ( rtl::OUString( "insert" ), -1, getCppuType( static_cast<ucb::InsertCommandArgument * >( 0 ) ) ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), + ( rtl::OUString( "open" ), -1, getCppuType( static_cast<ucb::OpenCommandArgument2 * >( 0 ) ) ), // Folder Only, omitted if not a folder ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ), + ( rtl::OUString( "transfer" ), -1, getCppuType( static_cast<ucb::TransferInfo * >( 0 ) ) ), ucb::CommandInfo - ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "createNewContent" ) ), + ( rtl::OUString( "createNewContent" ), -1, getCppuType( static_cast<ucb::ContentInfo * >( 0 ) ) ) }; diff --git a/ucb/source/ucp/gvfs/gvfs_directory.cxx b/ucb/source/ucp/gvfs/gvfs_directory.cxx index 7d8976ba34b9..354723ebe8c6 100644 --- a/ucb/source/ucp/gvfs/gvfs_directory.cxx +++ b/ucb/source/ucp/gvfs/gvfs_directory.cxx @@ -173,7 +173,7 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) escaped_name = gnome_vfs_escape_string( m_pImpl->m_aResults[ nIndex ]->aInfo.name ); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aId += rtl::OUString("/"); aId += rtl::OUString::createFromAscii( escaped_name ); diff --git a/ucb/source/ucp/gvfs/gvfs_provider.cxx b/ucb/source/ucp/gvfs/gvfs_provider.cxx index 7552a20a82de..cb4f3ae6e248 100644 --- a/ucb/source/ucp/gvfs/gvfs_provider.cxx +++ b/ucb/source/ucp/gvfs/gvfs_provider.cxx @@ -84,10 +84,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.GnomeVFSContentProvider" )), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.GnomeVFSContentProvider" )) ); + rtl::OUString( "com.sun.star.comp.GnomeVFSContentProvider" ), + rtl::OUString( "com.sun.star.ucb.GnomeVFSContentProvider" ) ); //========================================================================= // // Service factory implementation. diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 8cc6cb26ef16..777147bc00ee 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -296,8 +296,7 @@ uno::Sequence< uno::Type > SAL_CALL HierarchyContent::getTypes() rtl::OUString SAL_CALL HierarchyContent::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.ucb.HierarchyContent" )); + return rtl::OUString( "com.sun.star.comp.ucb.HierarchyContent" ); } //========================================================================= @@ -309,14 +308,11 @@ HierarchyContent::getSupportedServiceNames() uno::Sequence< rtl::OUString > aSNS( 1 ); if ( m_eKind == LINK ) - aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - HIERARCHY_LINK_CONTENT_SERVICE_NAME )); + aSNS.getArray()[ 0 ] = rtl::OUString( HIERARCHY_LINK_CONTENT_SERVICE_NAME ); else if ( m_eKind == FOLDER ) - aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - HIERARCHY_FOLDER_CONTENT_SERVICE_NAME )); + aSNS.getArray()[ 0 ] = rtl::OUString( HIERARCHY_FOLDER_CONTENT_SERVICE_NAME ); else - aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME )); + aSNS.getArray()[ 0 ] = rtl::OUString( HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME ); return aSNS; } @@ -378,8 +374,7 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -399,8 +394,7 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -411,8 +405,7 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "No properties!" )), + rtl::OUString( "No properties!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -448,8 +441,7 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -472,8 +464,7 @@ uno::Any SAL_CALL HierarchyContent::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -502,8 +493,7 @@ uno::Any SAL_CALL HierarchyContent::execute( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -512,8 +502,7 @@ uno::Any SAL_CALL HierarchyContent::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot remove persistent data!" )), + rtl::OUString( "Cannot remove persistent data!" ), this ); // Unreachable } @@ -534,8 +523,7 @@ uno::Any SAL_CALL HierarchyContent::execute( OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -557,8 +545,7 @@ uno::Any SAL_CALL HierarchyContent::execute( OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -630,12 +617,12 @@ HierarchyContent::createNewContent( const ucb::ContentInfo& Info ) "HierarchyContent::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); if ( bCreateFolder ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Folder")); + aURL += rtl::OUString("New_Folder"); else - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Link")); + aURL += rtl::OUString("New_Link"); uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ); @@ -793,7 +780,7 @@ HierarchyContent::makeNewIdentifier( const rtl::OUString& rTitle ) // Assemble new content identifier... HierarchyUri aUri( m_xIdentifier->getContentIdentifier() ); rtl::OUString aNewURL = aUri.getParentUri(); - aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aNewURL += rtl::OUString("/"); aNewURL += ::ucb_impl::urihelper::encodeSegment( rTitle ); return uno::Reference< ucb::XContentIdentifier >( @@ -819,7 +806,7 @@ void HierarchyContent::queryChildren( HierarchyContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); } sal_Int32 nLen = aURL.getLength(); @@ -1025,28 +1012,28 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues( { // Append all Core Properties. xRow->appendString ( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), + beans::Property( rtl::OUString("ContentType"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.getContentType() ); xRow->appendString ( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + beans::Property( rtl::OUString("Title"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), // @@@ Might actually be read-only! beans::PropertyAttribute::BOUND ), rData.getTitle() ); xRow->appendBoolean( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), + beans::Property( rtl::OUString("IsDocument"), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.getIsDocument() ); xRow->appendBoolean( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), + beans::Property( rtl::OUString("IsFolder"), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1055,7 +1042,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues( if ( rData.getIsDocument() ) xRow->appendString( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), + beans::Property( rtl::OUString("TargetURL"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), @@ -1064,7 +1051,7 @@ uno::Reference< sdbc::XRow > HierarchyContent::getPropertyValues( rData.getTargetURL() ); xRow->appendObject( beans::Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreatableContentsInfo")), + rtl::OUString("CreatableContentsInfo"), -1, getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), @@ -1134,32 +1121,28 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name == "IsDocument" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name == "IsFolder" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name == "CreatableContentsInfo" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name == "Title" ) @@ -1167,8 +1150,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( if ( isReadOnly() ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1203,8 +1185,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Empty title not allowed!" )), + rtl::OUString( "Empty title not allowed!" ), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1212,8 +1193,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property value has wrong type!" )), + rtl::OUString( "Property value has wrong type!" ), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1223,8 +1203,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( if ( isReadOnly() ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1256,8 +1235,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Empty target URL not allowed!" )), + rtl::OUString( "Empty target URL not allowed!" ), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1265,16 +1243,14 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property value has wrong type!" )), + rtl::OUString( "Property value has wrong type!" ), static_cast< cppu::OWeakObject * >( this ) ); } } else { aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "TargetURL only supported by links!" )), + rtl::OUString( "TargetURL only supported by links!" ), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1328,8 +1304,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "No property set for storing the value!" )), + rtl::OUString( "No property set for storing the value!" ), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1363,14 +1338,14 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), + rtl::OUString("Exchange failed!"), static_cast< cppu::OWeakObject * >( this ) ); } } if ( !aOldTitle.isEmpty() ) { - aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + aEvent.PropertyName = rtl::OUString("Title"); aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( m_aProps.getTitle() ); @@ -1388,8 +1363,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -1398,8 +1372,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot store persistent data!" )), + rtl::OUString( "Cannot store persistent data!" ), this ); // Unreachable } @@ -1427,8 +1400,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Not supported by root folder!" )), + rtl::OUString( "Not supported by root folder!" ), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1438,7 +1410,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, if ( m_aProps.getTitle().isEmpty() ) { uno::Sequence< rtl::OUString > aProps( 1 ); - aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + aProps[ 0 ] = rtl::OUString("Title"); ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( rtl::OUString(), @@ -1486,7 +1458,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, do { rtl::OUString aNewId = xId->getContentIdentifier(); - aNewId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); + aNewId += rtl::OUString("_"); aNewId += rtl::OUString::valueOf( ++nTry ); xId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewId ); } @@ -1497,8 +1469,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unable to resolve name clash!" )), + rtl::OUString( "Unable to resolve name clash!" ), static_cast< cppu::OWeakObject * >( this ), nNameClashResolve ) ), xEnv ); @@ -1507,7 +1478,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, else { rtl::OUString aNewTitle( m_aProps.getTitle() ); - aNewTitle += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); + aNewTitle += rtl::OUString("_"); aNewTitle += rtl::OUString::valueOf( nTry ); m_aProps.setTitle( aNewTitle ); } @@ -1540,8 +1511,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -1550,7 +1520,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve, ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot store persistent data!")), + rtl::OUString("Cannot store persistent data!"), this ); // Unreachable } @@ -1581,8 +1551,7 @@ void HierarchyContent::destroy( sal_Bool bDeletePhysical, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Not persistent!" )), + rtl::OUString( "Not persistent!" ), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1593,8 +1562,7 @@ void HierarchyContent::destroy( sal_Bool bDeletePhysical, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Not supported by root folder!" )), + rtl::OUString( "Not supported by root folder!" ), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1636,8 +1604,7 @@ void HierarchyContent::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Not persistent!" )), + rtl::OUString( "Not persistent!" ), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1663,7 +1630,7 @@ void HierarchyContent::transfer( if ( nPos != ( aId.getLength() - 1 ) ) { // No trailing slash found. Append. - aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aId += rtl::OUString("/"); } if ( rInfo.SourceURL.getLength() <= aId.getLength() ) @@ -1673,8 +1640,7 @@ void HierarchyContent::transfer( { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(rInfo.SourceURL), beans::PropertyState_DIRECT_VALUE)); @@ -1682,8 +1648,7 @@ void HierarchyContent::transfer( ucb::IOErrorCode_RECURSIVE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Target is equal to or is a child of source!" )), + rtl::OUString( "Target is equal to or is a child of source!" ), this ); // Unreachable } @@ -1714,8 +1679,7 @@ void HierarchyContent::transfer( { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(xId->getContentIdentifier()), beans::PropertyState_DIRECT_VALUE)); @@ -1723,8 +1687,7 @@ void HierarchyContent::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot instanciate source object!" )), + rtl::OUString( "Cannot instanciate source object!" ), this ); // Unreachable } @@ -1734,8 +1697,8 @@ void HierarchyContent::transfer( ////////////////////////////////////////////////////////////////////// rtl::OUString aType = xSource->isFolder() - ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE )) - : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE )); + ? rtl::OUString( HIERARCHY_FOLDER_CONTENT_TYPE ) + : rtl::OUString( HIERARCHY_LINK_CONTENT_TYPE ); ucb::ContentInfo aContentInfo; aContentInfo.Type = aType; aContentInfo.Attributes = 0; @@ -1749,8 +1712,7 @@ void HierarchyContent::transfer( { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Folder")), + rtl::OUString( "Folder"), -1, uno::makeAny(aId), beans::PropertyState_DIRECT_VALUE)); @@ -1758,8 +1720,7 @@ void HierarchyContent::transfer( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "XContentCreator::createNewContent failed!" )), + rtl::OUString( "XContentCreator::createNewContent failed!" ), this ); // Unreachable } @@ -1852,7 +1813,7 @@ void HierarchyContent::transfer( rtl::OUString aChildId = xId->getContentIdentifier(); if ( ( aChildId.lastIndexOf( '/' ) + 1 ) != aChildId.getLength() ) - aChildId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aChildId += rtl::OUString("/"); aChildId += rResult.getName(); @@ -1881,8 +1842,7 @@ void HierarchyContent::transfer( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny( xSource->m_xIdentifier-> @@ -1892,8 +1852,7 @@ void HierarchyContent::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot remove persistent data of source object!" )), + rtl::OUString( "Cannot remove persistent data of source object!" ), this ); // Unreachable } @@ -1920,13 +1879,13 @@ HierarchyContentProperties::getCreatableContentsInfo() const // Folder. aSeq.getArray()[ 0 ].Type - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE )); + = rtl::OUString( HIERARCHY_FOLDER_CONTENT_TYPE ); aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; uno::Sequence< beans::Property > aFolderProps( 1 ); aFolderProps.getArray()[ 0 ] = beans::Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + rtl::OUString("Title"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ); @@ -1934,18 +1893,18 @@ HierarchyContentProperties::getCreatableContentsInfo() const // Link. aSeq.getArray()[ 1 ].Type - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE )); + = rtl::OUString( HIERARCHY_LINK_CONTENT_TYPE ); aSeq.getArray()[ 1 ].Attributes = ucb::ContentInfoAttribute::KIND_LINK; uno::Sequence< beans::Property > aLinkProps( 2 ); aLinkProps.getArray()[ 0 ] = beans::Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + rtl::OUString("Title"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ); aLinkProps.getArray()[ 1 ] = beans::Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), + rtl::OUString("TargetURL"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ); diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.hxx b/ucb/source/ucp/hierarchy/hierarchycontent.hxx index 9a1f49b9573d..115721fa5ceb 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.hxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.hxx @@ -71,14 +71,14 @@ public: HierarchyContentProperties( const HierarchyEntryData::Type & rType ) : m_aData( rType ), m_aContentType( rType == HierarchyEntryData::FOLDER - ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE )) - : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE )) ) {} + ? rtl::OUString( HIERARCHY_FOLDER_CONTENT_TYPE ) + : rtl::OUString( HIERARCHY_LINK_CONTENT_TYPE ) ) {} HierarchyContentProperties( const HierarchyEntryData & rData ) : m_aData( rData ), m_aContentType( rData.getType() == HierarchyEntryData::FOLDER - ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_FOLDER_CONTENT_TYPE )) - : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HIERARCHY_LINK_CONTENT_TYPE )) ) {} + ? rtl::OUString( HIERARCHY_FOLDER_CONTENT_TYPE ) + : rtl::OUString( HIERARCHY_LINK_CONTENT_TYPE ) ) {} const rtl::OUString & getName() const { return m_aData.getName(); } void setName( const rtl::OUString & rName ) { m_aData.setName( rName ); }; diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx index 164cde310045..63a90ad8ea4c 100644 --- a/ucb/source/ucp/hierarchy/hierarchydata.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx @@ -179,7 +179,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) if ( xRootReadAccess.is() ) { rtl::OUString aTitlePath = m_aPath; - aTitlePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Title")); + aTitlePath += rtl::OUString("/Title"); // Note: Avoid NoSuchElementExceptions, because exceptions are // relatively 'expensive'. Checking for availability of @@ -203,7 +203,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) // Get TargetURL value. rtl::OUString aTargetURLPath = m_aPath; - aTargetURLPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/TargetURL")); + aTargetURLPath += rtl::OUString("/TargetURL"); if ( !( xRootReadAccess->getByHierarchicalName( aTargetURLPath ) >>= aValue ) ) { @@ -222,7 +222,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) rData.setTargetURL( aValue ); rtl::OUString aTypePath = m_aPath; - aTypePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Type")); + aTypePath += rtl::OUString("/Type"); if ( xRootReadAccess->hasByHierarchicalName( aTypePath ) ) { // Might not be present since it was introduced long after @@ -304,15 +304,13 @@ sal_Bool HierarchyEntry::setData( uno::Sequence< uno::Any > aArguments( 1 ); beans::PropertyValue aProperty; - aProperty.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - CFGPROPERTY_NODEPATH ) ); + aProperty.Name = rtl::OUString( CFGPROPERTY_NODEPATH ); aProperty.Value <<= aParentPath; aArguments[ 0 ] <<= aProperty; uno::Reference< util::XChangesBatch > xBatch( m_xConfigProvider->createInstanceWithArguments( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - READWRITE_SERVICE_NAME ) ), + rtl::OUString( READWRITE_SERVICE_NAME ), aArguments ), uno::UNO_QUERY ); @@ -343,7 +341,7 @@ sal_Bool HierarchyEntry::setData( else { xParentNameAccess->getByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) + rtl::OUString("Children") ) >>= xNameAccess; } @@ -391,8 +389,7 @@ sal_Bool HierarchyEntry::setData( // Append new entry to parents child list, // which is a set of entries. xParentNameAccess->getByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Children" )) ) >>= xFac; + rtl::OUString( "Children" ) ) >>= xFac; } OSL_ENSURE( xFac.is(), @@ -423,7 +420,7 @@ sal_Bool HierarchyEntry::setData( { // Set Title value. xNameReplace->replaceByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + rtl::OUString("Title"), uno::makeAny( rData.getTitle() ) ); // Set TargetURL value. @@ -439,14 +436,14 @@ sal_Bool HierarchyEntry::setData( = m_xOfficeInstDirs->makeRelocatableURL( aValue ); xNameReplace->replaceByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), + rtl::OUString("TargetURL"), uno::makeAny( aValue ) ); // Set Type value. sal_Int32 nType = rData.getType() == HierarchyEntryData::LINK ? 0 : 1; xNameReplace->replaceByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")), + rtl::OUString("Type"), uno::makeAny( nType ) ); if ( xContainer.is() ) @@ -571,15 +568,13 @@ sal_Bool HierarchyEntry::move( uno::Sequence< uno::Any > aArguments( 1 ); beans::PropertyValue aProperty; - aProperty.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - CFGPROPERTY_NODEPATH ) ); + aProperty.Name = rtl::OUString( CFGPROPERTY_NODEPATH ); aProperty.Value <<= aOldParentPath; aArguments[ 0 ] <<= aProperty; xOldParentBatch = uno::Reference< util::XChangesBatch >( m_xConfigProvider->createInstanceWithArguments( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - READWRITE_SERVICE_NAME ) ), + rtl::OUString( READWRITE_SERVICE_NAME ), aArguments ), uno::UNO_QUERY ); @@ -597,15 +592,13 @@ sal_Bool HierarchyEntry::move( { bDifferentParents = sal_True; - aProperty.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - CFGPROPERTY_NODEPATH ) ); + aProperty.Name = rtl::OUString( CFGPROPERTY_NODEPATH ); aProperty.Value <<= aNewParentPath; aArguments[ 0 ] <<= aProperty; xNewParentBatch = uno::Reference< util::XChangesBatch >( m_xConfigProvider->createInstanceWithArguments( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - READWRITE_SERVICE_NAME ) ), + rtl::OUString( READWRITE_SERVICE_NAME ), aArguments ), uno::UNO_QUERY ); @@ -656,7 +649,7 @@ sal_Bool HierarchyEntry::move( else { xOldParentNameAccess->getByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) + rtl::OUString("Children") ) >>= xOldNameContainer; } @@ -735,7 +728,7 @@ sal_Bool HierarchyEntry::move( else { xNewParentNameAccess->getByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) + rtl::OUString("Children") ) >>= xNewNameContainer; } } @@ -746,7 +739,7 @@ sal_Bool HierarchyEntry::move( return sal_False; xNewNameReplace->replaceByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + rtl::OUString("Title"), uno::makeAny( rData.getTitle() ) ); // TargetURL property may contain a reference to the Office @@ -758,11 +751,11 @@ sal_Bool HierarchyEntry::move( if ( m_xOfficeInstDirs.is() && !aValue.isEmpty() ) aValue = m_xOfficeInstDirs->makeRelocatableURL( aValue ); xNewNameReplace->replaceByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TargetURL")), + rtl::OUString("TargetURL"), uno::makeAny( aValue ) ); sal_Int32 nType = rData.getType() == HierarchyEntryData::LINK ? 0 : 1; xNewNameReplace->replaceByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")), + rtl::OUString("Type"), uno::makeAny( nType ) ); xNewNameContainer->insertByName( aNewKey, aEntry ); @@ -836,15 +829,13 @@ sal_Bool HierarchyEntry::remove() uno::Sequence< uno::Any > aArguments( 1 ); beans::PropertyValue aProperty; - aProperty.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - CFGPROPERTY_NODEPATH ) ); + aProperty.Name = rtl::OUString( CFGPROPERTY_NODEPATH ); aProperty.Value <<= aParentPath; aArguments[ 0 ] <<= aProperty; uno::Reference< util::XChangesBatch > xBatch( m_xConfigProvider->createInstanceWithArguments( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - READWRITE_SERVICE_NAME ) ), + rtl::OUString( READWRITE_SERVICE_NAME ), aArguments ), uno::UNO_QUERY ); @@ -874,7 +865,7 @@ sal_Bool HierarchyEntry::remove() // Append new entry to parents child list, // which is a set of entries. xParentNameAccess->getByName( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Children")) ) + rtl::OUString("Children") ) >>= xContainer; } @@ -939,7 +930,7 @@ sal_Bool HierarchyEntry::first( iterator& it ) if ( !m_aPath.isEmpty() ) { rtl::OUString aPath = m_aPath; - aPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Children")); + aPath += rtl::OUString("/Children"); xRootHierNameAccess->getByHierarchicalName( aPath ) >>= xNameAccess; @@ -1078,7 +1069,7 @@ HierarchyEntry::getRootReadAccess() uno::Sequence< uno::Any > aArguments( 1 ); beans::PropertyValue aProperty; aProperty.Name = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( CFGPROPERTY_NODEPATH ) ); + CFGPROPERTY_NODEPATH ); aProperty.Value <<= rtl::OUString(); // root path aArguments[ 0 ] <<= aProperty; @@ -1087,9 +1078,7 @@ HierarchyEntry::getRootReadAccess() m_xRootReadAccess = uno::Reference< container::XHierarchicalNameAccess >( m_xConfigProvider->createInstanceWithArguments( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - READ_SERVICE_NAME ) ), + rtl::OUString( READ_SERVICE_NAME ), aArguments ), uno::UNO_QUERY ); } @@ -1147,9 +1136,9 @@ const HierarchyEntryData& HierarchyEntry::iterator::operator*() const rtl::OUString aTargetURL = aTitle; rtl::OUString aType = aTitle; - aTitle += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Title")); - aTargetURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/TargetURL")); - aType += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Type")); + aTitle += rtl::OUString("/Title"); + aTargetURL += rtl::OUString("/TargetURL"); + aType += rtl::OUString("/Type"); rtl::OUString aValue; m_pImpl->dir->getByHierarchicalName( aTitle ) >>= aValue; diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx index 334e551ab205..9430c56159a0 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx @@ -266,14 +266,11 @@ XTYPEPROVIDER_IMPL_4( HierarchyDataSource, //========================================================================= XSERVICEINFO_IMPL_0( HierarchyDataSource, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.ucb.HierarchyDataSource" )) ) + rtl::OUString( "com.sun.star.comp.ucb.HierarchyDataSource" ) ) { uno::Sequence< rtl::OUString > aSNS( 2 ); - aSNS[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.DefaultHierarchyDataSource" )); - aSNS[ 1 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.HierarchyDataSource" )); + aSNS[ 0 ] = rtl::OUString( "com.sun.star.ucb.DefaultHierarchyDataSource" ); + aSNS[ 1 ] = rtl::OUString( "com.sun.star.ucb.HierarchyDataSource" ); return aSNS; } @@ -340,10 +337,8 @@ HierarchyDataSource::createInstance( const rtl::OUString & aServiceSpecifier ) // Create view to root node. beans::PropertyValue aProp; - aProp.Name = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( CFGPROPERTY_NODEPATH ) ); - aProp.Value <<= - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CONFIG_DATA_ROOT_KEY ) ); + aProp.Name = rtl::OUString( CFGPROPERTY_NODEPATH ); + aProp.Value <<= rtl::OUString( CONFIG_DATA_ROOT_KEY ); uno::Sequence< uno::Any > aArguments( 1 ); aArguments[ 0 ] <<= aProp; @@ -369,10 +364,8 @@ HierarchyDataSource::getAvailableServiceNames() throw ( uno::RuntimeException ) { uno::Sequence< rtl::OUString > aNames( 2 ); - aNames[ 0 ] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( READ_SERVICE_NAME ) ); - aNames[ 1 ] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( READWRITE_SERVICE_NAME ) ); + aNames[ 0 ] = rtl::OUString( READ_SERVICE_NAME ); + aNames[ 1 ] = rtl::OUString( READWRITE_SERVICE_NAME ); return aNames; } @@ -487,8 +480,7 @@ HierarchyDataSource::createInstanceWithArguments( { // Create configuration read-only access object. xConfigAccess = xProv->createInstanceWithArguments( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - CONFIG_READ_SERVICE_NAME ) ), + rtl::OUString( CONFIG_READ_SERVICE_NAME ), aNewArgs ); } else @@ -500,16 +492,14 @@ HierarchyDataSource::createInstanceWithArguments( aNewArgs.realloc( nLen + 1 ); beans::PropertyValue aProp; - aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - CFGPROPERTY_LAZYWRITE ) ); + aProp.Name = rtl::OUString( CFGPROPERTY_LAZYWRITE ); aProp.Value <<= sal_True; aNewArgs[ nLen ] <<= aProp; } // Create configuration read-write access object. xConfigAccess = xProv->createInstanceWithArguments( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - CONFIG_READWRITE_SERVICE_NAME ) ), + rtl::OUString( CONFIG_READWRITE_SERVICE_NAME ), aNewArgs ); } } @@ -546,9 +536,7 @@ HierarchyDataSource::getConfigProvider() m_xConfigProvider = uno::Reference< lang::XMultiServiceFactory >( m_xSMgr->createInstance( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - CONFIG_PROVIDER_SERVICE_NAME ) ) ), + rtl::OUString( CONFIG_PROVIDER_SERVICE_NAME ) ), uno::UNO_QUERY ); OSL_ENSURE( m_xConfigProvider.is(), @@ -587,14 +575,13 @@ bool HierarchyDataSource::createConfigPath( } rtl::OUString aOutPath( - RTL_CONSTASCII_USTRINGPARAM( CONFIG_DATA_ROOT_KEY "/" ) ); + CONFIG_DATA_ROOT_KEY "/" ); aOutPath += rInPath; rOutPath = aOutPath; } else { - rOutPath = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( CONFIG_DATA_ROOT_KEY ) ); + rOutPath = rtl::OUString( CONFIG_DATA_ROOT_KEY ); } return true; @@ -756,14 +743,11 @@ uno::Sequence< uno::Type > SAL_CALL HierarchyDataAccess::getTypes() XSERVICEINFO_NOFACTORY_IMPL_0( HierarchyDataAccess, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.ucb.HierarchyDataAccess" ) ) ) + rtl::OUString( "com.sun.star.comp.ucb.HierarchyDataAccess" ) ) { uno::Sequence< rtl::OUString > aSNS( 2 ); - aSNS[ 0 ] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( READ_SERVICE_NAME ) ); - aSNS[ 1 ] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( READWRITE_SERVICE_NAME ) ); + aSNS[ 0 ] = rtl::OUString( READ_SERVICE_NAME ); + aSNS[ 1 ] = rtl::OUString( READWRITE_SERVICE_NAME ); return aSNS; } diff --git a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx index 51824af095b1..6dfdf6f8c9fc 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasupplier.cxx @@ -161,7 +161,7 @@ rtl::OUString HierarchyResultSetDataSupplier::queryContentIdentifierString( = m_pImpl->m_xContent->getIdentifier()->getContentIdentifier(); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aId += rtl::OUString("/"); aId += m_pImpl->m_aResults[ nIndex ]->aData.getName(); diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx index c5bf7c585968..cf0db7a82a90 100644 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx @@ -100,10 +100,8 @@ XTYPEPROVIDER_IMPL_4( HierarchyContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( HierarchyContentProvider, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.ucb.HierarchyContentProvider" )), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - HIERARCHY_CONTENT_PROVIDER_SERVICE_NAME )) ); + rtl::OUString( "com.sun.star.comp.ucb.HierarchyContentProvider" ), + rtl::OUString( HIERARCHY_CONTENT_PROVIDER_SERVICE_NAME ) ); //========================================================================= // @@ -239,9 +237,7 @@ HierarchyContentProvider::getRootConfigReadNameAccess( { uno::Sequence< uno::Any > aArguments( 1 ); beans::PropertyValue aProperty; - aProperty.Name - = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); + aProperty.Name = rtl::OUString( "nodepath" ); aProperty.Value <<= rtl::OUString(); // root path aArguments[ 0 ] <<= aProperty; @@ -250,10 +246,7 @@ HierarchyContentProvider::getRootConfigReadNameAccess( (*it).second.xRootReadAccess = uno::Reference< container::XHierarchicalNameAccess >( xConfigProv->createInstanceWithArguments( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb." - "HierarchyDataReadAccess" ) ), + rtl::OUString( "com.sun.star.ucb.HierarchyDataReadAccess" ), aArguments ), uno::UNO_QUERY ); } @@ -292,8 +285,7 @@ HierarchyContentProvider::getOfficeInstallationDirectories() if ( xPropSet.is() ) { xPropSet->getPropertyValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ) + rtl::OUString( "DefaultContext" ) ) >>= xCtx; } @@ -304,9 +296,7 @@ HierarchyContentProvider::getOfficeInstallationDirectories() if ( xCtx.is() ) { xCtx->getValueByName( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "/singletons/" - "com.sun.star.util.theOfficeInstallationDirectories" ) ) ) + rtl::OUString( "/singletons/com.sun.star.util.theOfficeInstallationDirectories" ) ) >>= m_xOfficeInstDirs; // Be silent. singleton only available in an Office environment. diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx b/ucb/source/ucp/hierarchy/hierarchyuri.cxx index c6b1785a9057..8d6d051177f1 100644 --- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyuri.cxx @@ -65,7 +65,7 @@ void HierarchyUri::init() const if ( ( m_aUri.getLength() < HIERARCHY_URL_SCHEME_LENGTH + 1 ) ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + m_aPath = rtl::OUString("/"); return; } @@ -84,11 +84,8 @@ void HierarchyUri::init() const if ( m_aUri.getLength() == HIERARCHY_URL_SCHEME_LENGTH + 1 ) { // root folder URI without path and service specifier. - m_aUri += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "//" DEFAULT_DATA_SOURCE_SERVICE "/" ) ); - m_aService - = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - DEFAULT_DATA_SOURCE_SERVICE ) ); + m_aUri += rtl::OUString( "//" DEFAULT_DATA_SOURCE_SERVICE "/" ); + m_aService = rtl::OUString( DEFAULT_DATA_SOURCE_SERVICE ); nPos = m_aUri.getLength() - 1; } @@ -98,11 +95,8 @@ void HierarchyUri::init() const == sal_Unicode( '/' ) ) ) { // root folder URI without service specifier. - m_aUri += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "/" DEFAULT_DATA_SOURCE_SERVICE "/" ) ); - m_aService - = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - DEFAULT_DATA_SOURCE_SERVICE ) ); + m_aUri += rtl::OUString( "/" DEFAULT_DATA_SOURCE_SERVICE "/" ); + m_aService = rtl::OUString( DEFAULT_DATA_SOURCE_SERVICE ); nPos = m_aUri.getLength() - 1; } @@ -115,11 +109,8 @@ void HierarchyUri::init() const m_aUri = m_aUri.replaceAt( HIERARCHY_URL_SCHEME_LENGTH + 2, 0, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "/" DEFAULT_DATA_SOURCE_SERVICE "/" ) ) ); - m_aService - = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - DEFAULT_DATA_SOURCE_SERVICE ) ); + rtl::OUString( "/" DEFAULT_DATA_SOURCE_SERVICE "/" ) ); + m_aService = rtl::OUString( DEFAULT_DATA_SOURCE_SERVICE ); nPos = HIERARCHY_URL_SCHEME_LENGTH + 3 + m_aService.getLength(); @@ -136,17 +127,17 @@ void HierarchyUri::init() const if ( nStart == m_aUri.getLength() ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + m_aPath = rtl::OUString("/"); return; } // Empty path segments? if ( m_aUri.indexOf( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("//")), + rtl::OUString("//"), nStart ) != -1 ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + m_aPath = rtl::OUString("/"); return; } @@ -156,7 +147,7 @@ void HierarchyUri::init() const if ( nEnd == nStart ) { // error, but remember that we did a init(). - m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + m_aPath = rtl::OUString("/"); return; } @@ -164,7 +155,7 @@ void HierarchyUri::init() const { // Trailing slash missing. nEnd = m_aUri.getLength(); - m_aUri += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + m_aUri += rtl::OUString("/"); } m_aService = m_aUri.copy( nStart, nEnd - nStart ); @@ -200,7 +191,7 @@ void HierarchyUri::init() const else { // error, but remember that we did a init(). - m_aPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + m_aPath = rtl::OUString("/"); } } } diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx index 6f1042d47278..01e9fd94df3c 100644 --- a/ucb/source/ucp/odma/odma_content.cxx +++ b/ucb/source/ucp/odma/odma_content.cxx @@ -175,7 +175,7 @@ rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { // @@@ Adjust implementation name. Keep the prefix "com.sun.star.comp."! - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.odma.Content")); + return rtl::OUString("com.sun.star.comp.odma.Content"); } //========================================================================= @@ -186,7 +186,7 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() // @@@ Adjust macro name. uno::Sequence< rtl::OUString > aSNS( 1 ); aSNS.getArray()[ 0 ] - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODMA_CONTENT_SERVICE_NAME )); + = rtl::OUString( ODMA_CONTENT_SERVICE_NAME ); return aSNS; } @@ -201,7 +201,7 @@ rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException ) { // @@@ Adjust macro name ( def in odma_provider.hxx ). - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODMA_CONTENT_TYPE )); + return rtl::OUString( ODMA_CONTENT_TYPE ); } //========================================================================= @@ -352,9 +352,9 @@ uno::Any SAL_CALL Content::execute( m_pContent = new ::ucbhelper::Content(sFileURL,NULL); if(!m_pContent->isDocument()) { - rtl::OUString sErrorMsg(RTL_CONSTASCII_USTRINGPARAM("File: ")); + rtl::OUString sErrorMsg("File: "); sErrorMsg += sFileURL; - sErrorMsg += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" could not be found.")); + sErrorMsg += rtl::OUString(" could not be found."); ucbhelper::cancelCommandExecution( uno::makeAny( io::IOException( sErrorMsg, @@ -511,7 +511,7 @@ uno::Any SAL_CALL Content::execute( // aTransferInfo.NameClash = ucb::NameClash::OVERWRITE; aTransferInfo.NewTitle = sFileURL.copy( 1 + nLastIndex ); // Copy our saved backup copy to the "shadow" file. - aContent.executeCommand(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")),uno::makeAny(aTransferInfo)); + aContent.executeCommand(::rtl::OUString("transfer"),uno::makeAny(aTransferInfo)); // Tell the DMS that the "shadow" file is done and can be // imported. getContentProvider()->saveDocument(aProp->m_sDocumentId); @@ -561,8 +561,8 @@ void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ ) ::rtl::OUString sURL = m_xIdentifier->getContentIdentifier(); // @@@ Extract URL of parent from aURL and return it... - static ::rtl::OUString sScheme1(RTL_CONSTASCII_USTRINGPARAM(ODMA_URL_SCHEME ODMA_URL_SHORT "/")); - static ::rtl::OUString sScheme2(RTL_CONSTASCII_USTRINGPARAM(ODMA_URL_SCHEME ODMA_URL_SHORT)); + static ::rtl::OUString sScheme1(ODMA_URL_SCHEME ODMA_URL_SHORT "/"); + static ::rtl::OUString sScheme2(ODMA_URL_SCHEME ODMA_URL_SHORT); if(sURL == sScheme1 || sURL == sScheme2) sURL = ::rtl::OUString(); else @@ -681,27 +681,27 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { // Append all Core Properties. xRow->appendString ( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), + beans::Property( rtl::OUString("ContentType"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_sContentType ); xRow->appendString ( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + beans::Property( rtl::OUString("Title"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData->m_sTitle ); xRow->appendBoolean( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), + beans::Property( rtl::OUString("IsDocument"), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_bIsDocument ); xRow->appendBoolean( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), + beans::Property( rtl::OUString("IsFolder"), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -710,40 +710,40 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // @@@ Append other properties supported directly. xRow->appendTimestamp( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateCreated")), + beans::Property( rtl::OUString("DateCreated"), -1, getCppuType(static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_aDateCreated ); xRow->appendTimestamp( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")), + beans::Property( rtl::OUString("DateModified"), -1, getCppuType(static_cast< const util::DateTime * >( 0 ) ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_aDateModified ); xRow->appendBoolean( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsReadOnly")), + beans::Property( rtl::OUString("IsReadOnly"), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData->m_bIsReadOnly ); xRow->appendString ( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Author")), + beans::Property( rtl::OUString("Author"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData->m_sAuthor ); xRow->appendString ( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Subject")), + beans::Property( rtl::OUString("Subject"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), rData->m_sSubject ); xRow->appendString ( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Keywords")), + beans::Property( rtl::OUString("Keywords"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ), @@ -836,8 +836,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!") ), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -900,8 +899,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "No property set for storing the value!" )), + rtl::OUString( "No property set for storing the value!" ), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -934,7 +932,7 @@ void Content::insert( OSL_FAIL( "Content::insert - property value missing!" ); uno::Sequence< rtl::OUString > aProps( 1 ); - aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("zzzz")); + aProps[ 0 ] = rtl::OUString("zzzz"); ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( rtl::OUString(), @@ -1055,8 +1053,7 @@ void Content::changePropertyValue(const beans::PropertyValue& _rValue, if(bError) { _rRet[ _rnCurrentPos ] <<= beans::IllegalTypeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property value has wrong type!" )), + rtl::OUString( "Property value has wrong type!" ), static_cast< cppu::OWeakObject * >( this ) ); } } diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx index f65f619793f4..618a6c7352c6 100644 --- a/ucb/source/ucp/odma/odma_provider.cxx +++ b/ucb/source/ucp/odma/odma_provider.cxx @@ -149,9 +149,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, // @@@ Adjust implementation name. Keep the prefix "com.sun.star.comp."! // @@@ Adjust service name. XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.odma.ContentProvider" )), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODMA_CONTENT_PROVIDER_SERVICE_NAME) ) ); + rtl::OUString( "com.sun.star.comp.odma.ContentProvider" ), + rtl::OUString(ODMA_CONTENT_PROVIDER_SERVICE_NAME ) ); //========================================================================= // @@ -176,7 +175,7 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent( if(!getHandle()) throw ucb::IllegalIdentifierException(); - rtl::OUString aScheme( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(ODMA_URL_SCHEME) ) ); + rtl::OUString aScheme( rtl::OUString( ODMA_URL_SCHEME ) ); sal_Int32 nIndex = 0; rtl::OUString sOdma = aScheme.getToken(3,'.',nIndex); rtl::OUString sCanonicURL = Identifier->getContentIdentifier(); @@ -227,7 +226,7 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent( aProp = new ContentProperties(); aProp->m_sDocumentName = ::rtl::OStringToOUString(rtl::OString(lpszDocName),RTL_TEXTENCODING_ASCII_US); aProp->m_sDocumentId = sDocId; - aProp->m_sContentType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODMA_CONTENT_TYPE)); + aProp->m_sContentType = ::rtl::OUString(ODMA_CONTENT_TYPE); append(aProp); } delete [] lpszDocName; @@ -451,7 +450,7 @@ void ContentProvider::append(const ::rtl::Reference<ContentProperties>& _rProp) sal_Char* lpszDocName = new sal_Char[ODM_NAME_MAX * nMaxCount]; sal_Char* lpszDocInfo = new sal_Char[ODM_DOCID_MAX]; - ::rtl::OUString sContentType(RTL_CONSTASCII_USTRINGPARAM(ODMA_CONTENT_TYPE)); + ::rtl::OUString sContentType(ODMA_CONTENT_TYPE); do { if(nCount >= nMaxCount) @@ -578,7 +577,7 @@ void ContentProvider::append(const ::rtl::Reference<ContentProperties>& _rProp) ::rtl::OUString sCanonicURL = _sCanonicURL; // now check what formats we allow if(nPos == _sCanonicURL.getLength()) // only ask for root entry - sCanonicURL = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + sCanonicURL = ::rtl::OUString("/"); if(nPos < sCanonicURL.getLength()) { @@ -589,7 +588,7 @@ void ContentProvider::append(const ::rtl::Reference<ContentProperties>& _rProp) { sCanonicURL = sCanonicURL.copy(1); if(sCanonicURL.getLength() == 1 && sCanonicURL.getStr()[0] == sal_Unicode('.')) - sCanonicURL = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + sCanonicURL = ::rtl::OUString("/"); } return sCanonicURL; } diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index 6bd5b0f0b064..3b4ee22660de 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -115,7 +115,7 @@ ContentProperties::getCreatableContentsInfo( PackageUri const & rUri ) const { uno::Sequence< beans::Property > aProps( 1 ); aProps.getArray()[ 0 ] = beans::Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + rtl::OUString("Title"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ); @@ -237,11 +237,11 @@ Content* Content::create( ::rtl::OUString Content::getContentType( const ::rtl::OUString& aScheme, sal_Bool bFolder ) { - return ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application/")) + return ( rtl::OUString("application/") + aScheme + ( bFolder - ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-folder")) - : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-stream")) ) ); + ? rtl::OUString("-folder") + : rtl::OUString("-stream") ) ); } //========================================================================= @@ -415,8 +415,7 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.ucb.PackageContent" )); + return rtl::OUString( "com.sun.star.comp.ucb.PackageContent" ); } //========================================================================= @@ -426,13 +425,9 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() { uno::Sequence< rtl::OUString > aSNS( 1 ); if ( isFolder() ) - aSNS.getArray()[ 0 ] - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - PACKAGE_FOLDER_CONTENT_SERVICE_NAME )); + aSNS.getArray()[ 0 ] = rtl::OUString( PACKAGE_FOLDER_CONTENT_SERVICE_NAME ); else - aSNS.getArray()[ 0 ] - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - PACKAGE_STREAM_CONTENT_SERVICE_NAME )); + aSNS.getArray()[ 0 ] = rtl::OUString( PACKAGE_STREAM_CONTENT_SERVICE_NAME ); return aSNS; } @@ -478,8 +473,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -499,8 +493,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -511,8 +504,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "No properties!" )), + rtl::OUString( "No properties!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -550,8 +542,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -571,8 +562,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -600,8 +590,7 @@ uno::Any SAL_CALL Content::execute( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -610,8 +599,7 @@ uno::Any SAL_CALL Content::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot remove persistent data!" )), + rtl::OUString( "Cannot remove persistent data!" ), this ); // Unreachable } @@ -631,8 +619,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -654,8 +641,7 @@ uno::Any SAL_CALL Content::execute( OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -676,8 +662,7 @@ uno::Any SAL_CALL Content::execute( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -686,8 +671,7 @@ uno::Any SAL_CALL Content::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot write file to disk!" )), + rtl::OUString( "Cannot write file to disk!" ), this ); // Unreachable } @@ -1581,8 +1565,7 @@ uno::Any Content::open( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -1594,8 +1577,7 @@ uno::Any Content::open( ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Got no data stream!" )), + rtl::OUString( "Got no data stream!" ), this ); // Unreachable } @@ -1662,7 +1644,7 @@ void Content::insert( rtl::OUString aNewURL = m_aUri.getParentUri(); if (1 + aNewURL.lastIndexOf('/') != aNewURL.getLength()) - aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aNewURL += rtl::OUString("/"); aNewURL += ::ucb_impl::urihelper::encodeSegment( m_aProps.aTitle ); PackageUri aNewUri( aNewURL ); @@ -1697,7 +1679,7 @@ void Content::insert( do { rtl::OUString aNew = aNewUri.getUri(); - aNew += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); + aNew += rtl::OUString("_"); aNew += rtl::OUString::valueOf( ++nTry ); aNewUri.setUri( aNew ); } @@ -1708,8 +1690,7 @@ void Content::insert( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unable to resolve name clash!" )), + rtl::OUString( "Unable to resolve name clash!" ), static_cast< cppu::OWeakObject * >( this ), nNameClashResolve ) ), xEnv ); @@ -1717,7 +1698,7 @@ void Content::insert( } else { - m_aProps.aTitle += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")); + m_aProps.aTitle += rtl::OUString("_"); m_aProps.aTitle += rtl::OUString::valueOf( nTry ); } } @@ -1753,8 +1734,7 @@ void Content::insert( { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -1763,7 +1743,7 @@ void Content::insert( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot store persistent data!")), + rtl::OUString("Cannot store persistent data!"), this ); // Unreachable } @@ -1801,8 +1781,7 @@ void Content::destroy( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Not persistent!" )), + rtl::OUString( "Not persistent!" ), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1844,8 +1823,7 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Not persistent!" )), + rtl::OUString( "Not persistent!" ), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1866,7 +1844,7 @@ void Content::transfer( // Is source not a parent of me / not me? rtl::OUString aId = m_aUri.getParentUri(); - aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aId += rtl::OUString("/"); if ( rInfo.SourceURL.getLength() <= aId.getLength() ) { @@ -1875,8 +1853,7 @@ void Content::transfer( { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(rInfo.SourceURL), beans::PropertyState_DIRECT_VALUE)); @@ -1884,8 +1861,7 @@ void Content::transfer( ucb::IOErrorCode_RECURSIVE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Target is equal to or is a child of source!" )), + rtl::OUString( "Target is equal to or is a child of source!" ), this ); // Unreachable } @@ -1916,8 +1892,7 @@ void Content::transfer( { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(xId->getContentIdentifier()), beans::PropertyState_DIRECT_VALUE)); @@ -1925,8 +1900,7 @@ void Content::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot instanciate source object!" )), + rtl::OUString( "Cannot instanciate source object!" ), this ); // Unreachable } @@ -1950,8 +1924,7 @@ void Content::transfer( { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Folder")), + rtl::OUString( "Folder"), -1, uno::makeAny(aId), beans::PropertyState_DIRECT_VALUE)); @@ -1959,8 +1932,7 @@ void Content::transfer( ucb::IOErrorCode_CANT_CREATE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "XContentCreator::createNewContent failed!" )), + rtl::OUString( "XContentCreator::createNewContent failed!" ), this ); // Unreachable } @@ -2072,7 +2044,7 @@ void Content::transfer( rtl::OUString aChildId = xId->getContentIdentifier(); if ( ( aChildId.lastIndexOf( '/' ) + 1 ) != aChildId.getLength() ) - aChildId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aChildId += rtl::OUString("/"); aChildId += ::ucb_impl::urihelper::encodeSegment( aName ); @@ -2109,8 +2081,7 @@ void Content::transfer( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny( xSource->m_xIdentifier-> @@ -2120,8 +2091,7 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot remove persistent data of source object!" )), + rtl::OUString( "Cannot remove persistent data of source object!" ), this ); // Unreachable } @@ -2218,7 +2188,7 @@ void Content::queryChildren( ContentRefList& rChildren ) OSL_ENSURE( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ), "Content::queryChildren - Invalid URL!" ); - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); sal_Int32 nLen = aURL.getLength(); @@ -2332,8 +2302,7 @@ sal_Bool Content::loadData( { uno::Any aHasEncryptedEntries = xPackagePropSet->getPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "HasEncryptedEntries" )) ); + rtl::OUString( "HasEncryptedEntries" ) ); if ( !( aHasEncryptedEntries >>= rProps.bHasEncryptedEntries ) ) { OSL_FAIL( "Content::loadData - " @@ -2381,7 +2350,7 @@ sal_Bool Content::loadData( { uno::Any aMediaType = xPropSet->getPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ); + rtl::OUString("MediaType") ); if ( !( aMediaType >>= rProps.aMediaType ) ) { OSL_FAIL( "Content::loadData - Got no MediaType value!" ); @@ -2425,7 +2394,7 @@ sal_Bool Content::loadData( { uno::Any aSize = xPropSet->getPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ); + rtl::OUString("Size") ); if ( !( aSize >>= rProps.nSize ) ) { OSL_FAIL( "Content::loadData - Got no Size value!" ); @@ -2448,7 +2417,7 @@ sal_Bool Content::loadData( { uno::Any aCompressed = xPropSet->getPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")) ); + rtl::OUString("Compressed") ); if ( !( aCompressed >>= rProps.bCompressed ) ) { OSL_FAIL( "Content::loadData - Got no Compressed value!" ); @@ -2471,7 +2440,7 @@ sal_Bool Content::loadData( { uno::Any aEncrypted = xPropSet->getPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Encrypted")) ); + rtl::OUString("Encrypted") ); if ( !( aEncrypted >>= rProps.bEncrypted ) ) { OSL_FAIL( "Content::loadData - Got no Encrypted value!" ); @@ -2569,7 +2538,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) try { xPackagePropSet->setPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EncryptionKey")), + rtl::OUString("EncryptionKey"), uno::makeAny( m_aProps.aEncryptionKey ) ); m_nModifiedProps &= ~ENCRYPTIONKEY_MODIFIED; } @@ -2694,7 +2663,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) if ( m_nModifiedProps & MEDIATYPE_MODIFIED ) { xPropSet->setPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), + rtl::OUString("MediaType"), uno::makeAny( m_aProps.aMediaType ) ); m_nModifiedProps &= ~MEDIATYPE_MODIFIED; } @@ -2703,7 +2672,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) { if ( !isFolder() ) xPropSet->setPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")), + rtl::OUString("Compressed"), uno::makeAny( m_aProps.bCompressed ) ); m_nModifiedProps &= ~COMPRESSED_MODIFIED; @@ -2713,7 +2682,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) { if ( !isFolder() ) xPropSet->setPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Encrypted")), + rtl::OUString("Encrypted"), uno::makeAny( m_aProps.bEncrypted ) ); m_nModifiedProps &= ~ENCRYPTED_MODIFIED; @@ -2723,7 +2692,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) { if ( !isFolder() ) xPropSet->setPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EncryptionKey")), + rtl::OUString("EncryptionKey"), uno::makeAny( m_aProps.aEncryptionKey ) ); m_nModifiedProps &= ~ENCRYPTIONKEY_MODIFIED; diff --git a/ucb/source/ucp/package/pkgdatasupplier.cxx b/ucb/source/ucp/package/pkgdatasupplier.cxx index 500c14cf6058..0758a09d406d 100644 --- a/ucb/source/ucp/package/pkgdatasupplier.cxx +++ b/ucb/source/ucp/package/pkgdatasupplier.cxx @@ -472,7 +472,7 @@ void DataSupplier::validate() sal_Int32 nPackageUrlEnd = aURL.lastIndexOf( '/' ); if ( nPackageUrlEnd != aURL.getLength() - 1 ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); aURL += ::ucb_impl::urihelper::encodeSegment( aName ); aURL += aContURL.copy( nParam ); @@ -483,7 +483,7 @@ void DataSupplier::validate() sal_Int32 nPackageUrlEnd = aURL.lastIndexOf( '/' ); if ( nPackageUrlEnd != aURL.getLength() - 1 ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); aURL += ::ucb_impl::urihelper::encodeSegment( aName ); } diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx index fbaa9fdddb52..38d463b9be5d 100644 --- a/ucb/source/ucp/package/pkgprovider.cxx +++ b/ucb/source/ucp/package/pkgprovider.cxx @@ -181,10 +181,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.ucb.PackageContentProvider" )), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - PACKAGE_CONTENT_PROVIDER_SERVICE_NAME )) ); + rtl::OUString( "com.sun.star.comp.ucb.PackageContentProvider" ), + rtl::OUString( PACKAGE_CONTENT_PROVIDER_SERVICE_NAME ) ); //========================================================================= // @@ -275,8 +273,7 @@ ContentProvider::createPackage( const rtl::OUString & rName, const rtl::OUString uno::Reference< uno::XInterface > xIfc = m_xSMgr->createInstanceWithArguments( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.packages.comp.ZipPackage" )), + rtl::OUString( "com.sun.star.packages.comp.ZipPackage" ), aArguments ); if ( xIfc.is() ) diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 6f9d6c422380..76ec1aefecb2 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -309,8 +309,7 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.ucb.TransientDocumentsContent" )); + return rtl::OUString( "com.sun.star.comp.ucb.TransientDocumentsContent" ); } //========================================================================= @@ -323,17 +322,13 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() uno::Sequence< rtl::OUString > aSNS( 1 ); if ( m_aProps.getType() == STREAM ) - aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - TDOC_STREAM_CONTENT_SERVICE_NAME )); + aSNS.getArray()[ 0 ] = rtl::OUString( TDOC_STREAM_CONTENT_SERVICE_NAME ); else if ( m_aProps.getType() == FOLDER ) - aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - TDOC_FOLDER_CONTENT_SERVICE_NAME )); + aSNS.getArray()[ 0 ] = rtl::OUString( TDOC_FOLDER_CONTENT_SERVICE_NAME ); else if ( m_aProps.getType() == DOCUMENT ) - aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - TDOC_DOCUMENT_CONTENT_SERVICE_NAME )); + aSNS.getArray()[ 0 ] = rtl::OUString( TDOC_DOCUMENT_CONTENT_SERVICE_NAME ); else - aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - TDOC_ROOT_CONTENT_SERVICE_NAME )); + aSNS.getArray()[ 0 ] = rtl::OUString( TDOC_ROOT_CONTENT_SERVICE_NAME ); return aSNS; } @@ -399,8 +394,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -420,8 +414,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -432,8 +425,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "No properties!" )), + rtl::OUString( "No properties!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -469,8 +461,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -490,10 +481,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "insert command only supported by " - "folders and streams!" ) ), + rtl::OUString( "insert command only supported by " + "folders and streams!" ), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); // Unreachable @@ -508,11 +497,9 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "insert command not supported by " + rtl::OUString( "insert command not supported by " "streams that are direct children " - "of document root!" ) ), + "of document root!" ), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); @@ -525,8 +512,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -552,10 +538,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "delete command only supported by " - "folders and streams!" ) ), + rtl::OUString( "delete command only supported by " + "folders and streams!" ), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); @@ -573,8 +557,7 @@ uno::Any SAL_CALL Content::execute( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -583,8 +566,7 @@ uno::Any SAL_CALL Content::execute( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), Environment, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot remove persistent data!" )), + rtl::OUString( "Cannot remove persistent data!" ), this ); // Unreachable } @@ -606,10 +588,8 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "transfer command only supported " - "by folders and documents!" ) ), + rtl::OUString( "transfer command only supported " + "by folders and documents!" ), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); @@ -623,8 +603,7 @@ uno::Any SAL_CALL Content::execute( OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -647,11 +626,9 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "createNewContent command only " + rtl::OUString( "createNewContent command only " "supported by folders and " - "documents!" ) ), + "documents!" ), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); @@ -665,8 +642,7 @@ uno::Any SAL_CALL Content::execute( OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -749,12 +725,12 @@ Content::createNewContent( const ucb::ContentInfo& Info ) "Content::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); if ( bCreateFolder ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Folder")); + aURL += rtl::OUString("New_Folder"); else - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Stream")); + aURL += rtl::OUString("New_Stream"); uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ); @@ -816,7 +792,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); } sal_Int32 nLen = aURL.getLength(); @@ -1069,7 +1045,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { // Append all Core Properties. xRow->appendString ( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")), + beans::Property( rtl::OUString("ContentType"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND @@ -1079,7 +1055,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( ContentType eType = rData.getType(); xRow->appendString ( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + beans::Property( rtl::OUString("Title"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), // Title is read-only for root and documents. @@ -1089,14 +1065,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( : 0 ), rData.getTitle() ); xRow->appendBoolean( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")), + beans::Property( rtl::OUString("IsDocument"), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), rData.getIsDocument() ); xRow->appendBoolean( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")), + beans::Property( rtl::OUString("IsFolder"), -1, getCppuBooleanType(), beans::PropertyAttribute::BOUND @@ -1104,7 +1080,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rData.getIsFolder() ); xRow->appendObject( beans::Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreatableContentsInfo")), + rtl::OUString("CreatableContentsInfo"), -1, getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), @@ -1115,7 +1091,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // Storage is only supported by folders. if ( eType == FOLDER ) xRow->appendObject( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Storage")), + beans::Property( rtl::OUString("Storage"), -1, getCppuType( static_cast< @@ -1127,7 +1103,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // DocumentModel is only supported by documents. if ( eType == DOCUMENT ) xRow->appendObject( - beans::Property( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentModel")), + beans::Property( rtl::OUString("DocumentModel"), -1, getCppuType( static_cast< @@ -1198,32 +1174,28 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name == "IsDocument" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name == "IsFolder" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name == "CreatableContentsInfo" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rValue.Name == "Title" ) @@ -1233,8 +1205,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( ( eType == ROOT ) || ( eType == DOCUMENT ) ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1264,8 +1235,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Empty Title not allowed!" )), + rtl::OUString( "Empty Title not allowed!" ), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1273,8 +1243,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Title Property value has wrong type!" )), + rtl::OUString( "Title Property value has wrong type!" ), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1285,16 +1254,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( eType == FOLDER ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else { // Storage is only supported by folders. aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Storage property only supported by folders" )), + rtl::OUString( "Storage property only supported by folders" ), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1304,17 +1271,15 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if ( eType == DOCUMENT ) { aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else { // Storage is only supported by folders. aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "DocumentModel property only supported by " - "documents" )), + rtl::OUString( "DocumentModel property only supported by " + "documents" ), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1367,8 +1332,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "No property set for storing the value!" )), + rtl::OUString( "No property set for storing the value!" ), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1400,14 +1364,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), + rtl::OUString("Exchange failed!"), static_cast< cppu::OWeakObject * >( this ) ); } } if ( !aOldTitle.isEmpty() ) { - aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + aEvent.PropertyName = rtl::OUString("Title"); aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( m_aProps.getTitle() ); @@ -1425,8 +1389,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -1435,8 +1398,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot store persistent data!" )), + rtl::OUString( "Cannot store persistent data!" ), this ); // Unreachable } @@ -1504,8 +1466,7 @@ uno::Any Content::open( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -1516,8 +1477,7 @@ uno::Any Content::open( m_eState == PERSISTENT ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Got no data stream!" )), + rtl::OUString( "Got no data stream!" ), this ); // Unreachable } @@ -1540,8 +1500,7 @@ uno::Any Content::open( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -1552,7 +1511,7 @@ uno::Any Content::open( m_eState == PERSISTENT ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Got no data stream!")), + rtl::OUString("Got no data stream!"), this ); // Unreachable } @@ -1601,8 +1560,7 @@ uno::Any Content::open( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -1614,8 +1572,7 @@ uno::Any Content::open( ? xEnv : uno::Reference< ucb::XCommandEnvironment >(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Got no data stream!" )), + rtl::OUString( "Got no data stream!" ), this ); // Unreachable } @@ -1743,8 +1700,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedNameClashException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unable to resolve name clash!" )), + rtl::OUString( "Unable to resolve name clash!" ), static_cast< cppu::OWeakObject * >( this ), nNameClashResolve ) ), xEnv ); @@ -1790,8 +1746,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny(m_xIdentifier-> getContentIdentifier()), @@ -1800,7 +1755,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData, ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cannot store persistent data!")), + rtl::OUString("Cannot store persistent data!"), this ); // Unreachable } @@ -1838,8 +1793,7 @@ void Content::destroy( sal_Bool bDeletePhysical, { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Not persistent!" )), + rtl::OUString( "Not persistent!" ), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -1980,8 +1934,7 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::UnsupportedCommandException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Not persistent!" )), + rtl::OUString( "Not persistent!" ), static_cast< cppu::OWeakObject * >( this ) ) ), xEnv ); // Unreachable @@ -2020,8 +1973,7 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Invalid source URI! Syntax!" )), + rtl::OUString( "Invalid source URI! Syntax!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2032,9 +1984,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Invalid source URI! " - "Must describe a folder or stream!" )), + rtl::OUString( "Invalid source URI! " + "Must describe a folder or stream!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2047,7 +1998,7 @@ void Content::transfer( if ( nPos != ( aId.getLength() - 1 ) ) { // No trailing slash found. Append. - aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aId += rtl::OUString("/"); } if ( rInfo.SourceURL.getLength() <= aId.getLength() ) @@ -2057,8 +2008,7 @@ void Content::transfer( { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny( rInfo.SourceURL ), beans::PropertyState_DIRECT_VALUE)); @@ -2066,8 +2016,7 @@ void Content::transfer( ucb::IOErrorCode_RECURSIVE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Target is equal to or is a child of source!" )), + rtl::OUString( "Target is equal to or is a child of source!" ), this ); // Unreachable } @@ -2089,10 +2038,9 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Invalid source URI! " + rtl::OUString( "Invalid source URI! " "Streams cannot be created as " - "children of document root!" )), + "children of document root!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -2119,9 +2067,8 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Invalid source URI! " - "Unabale to determine source type!" )), + rtl::OUString( "Invalid source URI! " + "Unabale to determine source type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), xEnv ); @@ -2143,8 +2090,7 @@ void Content::transfer( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny( rInfo.SourceURL ), beans::PropertyState_DIRECT_VALUE)); @@ -2152,8 +2098,7 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "Cannot copy data!" ) ), + rtl::OUString( "Cannot copy data!" ), this ); // Unreachable } @@ -2164,7 +2109,7 @@ void Content::transfer( rtl::OUString aTargetUri = m_xIdentifier->getContentIdentifier(); if ( ( aTargetUri.lastIndexOf( '/' ) + 1 ) != aTargetUri.getLength() ) - aTargetUri += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aTargetUri += rtl::OUString("/"); if ( !rInfo.NewTitle.isEmpty() ) aTargetUri += ::ucb_impl::urihelper::encodeSegment( rInfo.NewTitle ); @@ -2177,8 +2122,7 @@ void Content::transfer( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny( rInfo.SourceURL ), beans::PropertyState_DIRECT_VALUE)); @@ -2186,9 +2130,7 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "Cannot copy additional properties!" ) ), + rtl::OUString( "Cannot copy additional properties!" ), this ); // Unreachable } @@ -2218,8 +2160,7 @@ void Content::transfer( { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny( aTargetUri ), beans::PropertyState_DIRECT_VALUE)); @@ -2227,8 +2168,7 @@ void Content::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot instanciate target object!" )), + rtl::OUString( "Cannot instanciate target object!" ), this ); // Unreachable } @@ -2263,8 +2203,7 @@ void Content::transfer( { uno::Any aProps = uno::makeAny(beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny( rInfo.SourceURL ), beans::PropertyState_DIRECT_VALUE)); @@ -2272,8 +2211,7 @@ void Content::transfer( ucb::IOErrorCode_CANT_READ, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot instanciate target object!" )), + rtl::OUString( "Cannot instanciate target object!" ), this ); // Unreachable } @@ -2287,8 +2225,7 @@ void Content::transfer( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny( rInfo.SourceURL ), beans::PropertyState_DIRECT_VALUE)); @@ -2296,8 +2233,7 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot remove persistent data of source object!" )), + rtl::OUString( "Cannot remove persistent data of source object!" ), this ); // Unreachable } @@ -2308,8 +2244,7 @@ void Content::transfer( uno::Any aProps = uno::makeAny( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Uri")), + rtl::OUString( "Uri"), -1, uno::makeAny( rInfo.SourceURL ), beans::PropertyState_DIRECT_VALUE)); @@ -2317,8 +2252,7 @@ void Content::transfer( ucb::IOErrorCode_CANT_WRITE, uno::Sequence< uno::Any >(&aProps, 1), xEnv, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Cannot remove additional properties of source object!" )), + rtl::OUString( "Cannot remove additional properties of source object!" ), this ); // Unreachable } @@ -2468,11 +2402,10 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData, // According to MBA, if no mediatype is set, folder and all // its contents will be lost on save of the document!!! xPropSet->setPropertyValue( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ), + rtl::OUString( "MediaType" ), uno::makeAny( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - // @@@ better mediatype - "application/binary" ) ) ) ); + rtl::OUString( // @@@ better mediatype + "application/binary" ) ) ); } catch ( beans::UnknownPropertyException const & ) { @@ -2856,8 +2789,7 @@ static rtl::OUString obtainPassword( if ( xAbort.is() ) { throw ucb::CommandFailedException( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "Abort requested by Interaction Handler." ) ), + rtl::OUString( "Abort requested by Interaction Handler." ), uno::Reference< uno::XInterface >(), xRequest->getRequest() ); } @@ -2871,8 +2803,7 @@ static rtl::OUString obtainPassword( // Unknown selection. Should never happen. throw ucb::CommandFailedException( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "Interaction Handler selected unknown continuation!" ) ), + rtl::OUString( "Interaction Handler selected unknown continuation!" ), uno::Reference< uno::XInterface >(), xRequest->getRequest() ); } @@ -3024,7 +2955,7 @@ ContentProperties::getCreatableContentsInfo() const { uno::Sequence< beans::Property > aProps( 1 ); aProps.getArray()[ 0 ] = beans::Property( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), + rtl::OUString("Title"), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), beans::PropertyAttribute::BOUND ); @@ -3037,7 +2968,7 @@ ContentProperties::getCreatableContentsInfo() const // Folder. aSeq.getArray()[ 0 ].Type - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_FOLDER_CONTENT_TYPE )); + = rtl::OUString( TDOC_FOLDER_CONTENT_TYPE ); aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; aSeq.getArray()[ 0 ].Properties = aProps; @@ -3051,14 +2982,14 @@ ContentProperties::getCreatableContentsInfo() const // Folder. aSeq.getArray()[ 0 ].Type - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_FOLDER_CONTENT_TYPE )); + = rtl::OUString( TDOC_FOLDER_CONTENT_TYPE ); aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; aSeq.getArray()[ 0 ].Properties = aProps; // Stream. aSeq.getArray()[ 1 ].Type - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_STREAM_CONTENT_TYPE )); + = rtl::OUString( TDOC_STREAM_CONTENT_TYPE ); aSeq.getArray()[ 1 ].Attributes = ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | ucb::ContentInfoAttribute::KIND_DOCUMENT; diff --git a/ucb/source/ucp/tdoc/tdoc_content.hxx b/ucb/source/ucp/tdoc/tdoc_content.hxx index 629da6f4bd4b..4221015d72c5 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.hxx +++ b/ucb/source/ucp/tdoc/tdoc_content.hxx @@ -73,12 +73,12 @@ public: ContentProperties( const ContentType & rType, const rtl::OUString & rTitle ) : m_eType( rType ), m_aContentType( rType == STREAM - ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_STREAM_CONTENT_TYPE )) + ? rtl::OUString( TDOC_STREAM_CONTENT_TYPE ) : rType == FOLDER - ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_FOLDER_CONTENT_TYPE )) + ? rtl::OUString( TDOC_FOLDER_CONTENT_TYPE ) : rType == DOCUMENT - ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_DOCUMENT_CONTENT_TYPE )) - : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( TDOC_ROOT_CONTENT_TYPE )) ), + ? rtl::OUString( TDOC_DOCUMENT_CONTENT_TYPE ) + : rtl::OUString( TDOC_ROOT_CONTENT_TYPE ) ), m_aTitle( rTitle ) {} diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx index 87dc380412af..1bfc40a1f55b 100644 --- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx +++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx @@ -458,7 +458,7 @@ ResultSetDataSupplier::assembleChildURL( const ::rtl::OUString& aName ) sal_Int32 nUrlEnd = aURL.lastIndexOf( '/' ); if ( nUrlEnd != aURL.getLength() - 1 ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); aURL += aName; return aURL; diff --git a/ucb/source/ucp/tdoc/tdoc_uri.cxx b/ucb/source/ucp/tdoc/tdoc_uri.cxx index ce670c29cd7d..6526a10dc2e6 100644 --- a/ucb/source/ucp/tdoc/tdoc_uri.cxx +++ b/ucb/source/ucp/tdoc/tdoc_uri.cxx @@ -125,7 +125,7 @@ void Uri::init() const if ( nSlash != - 1 ) m_aInternalPath = m_aPath.copy( nSlash ); else - m_aInternalPath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + m_aInternalPath = rtl::OUString("/"); } m_eState = VALID; diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx index 39d0a1980fb7..dc9b03fe43cd 100644 --- a/ucb/source/ucp/webdav/ContentProperties.cxx +++ b/ucb/source/ucp/webdav/ContentProperties.cxx @@ -103,17 +103,17 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) NeonUri aURI( rResource.uri ); m_aEscapedTitle = aURI.GetPathBaseName(); - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] + (*m_xProps)[ rtl::OUString("Title") ] = PropertyValue( uno::makeAny( aURI.GetPathBaseNameUnescaped() ), true ); } catch ( DAVException const & ) { - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] + (*m_xProps)[ rtl::OUString("Title") ] = PropertyValue( uno::makeAny( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "*** unknown ***" ) ) ), + "*** unknown ***" ) ), true ); } @@ -139,11 +139,11 @@ ContentProperties::ContentProperties( : m_xProps( new PropertyValueMap ), m_bTrailingSlash( sal_False ) { - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] + (*m_xProps)[ rtl::OUString("Title") ] = PropertyValue( uno::makeAny( rTitle ), true ); - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")) ] + (*m_xProps)[ rtl::OUString("IsFolder") ] = PropertyValue( uno::makeAny( bFolder ), true ); - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")) ] + (*m_xProps)[ rtl::OUString("IsDocument") ] = PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true ); } @@ -152,7 +152,7 @@ ContentProperties::ContentProperties( const rtl::OUString & rTitle ) : m_xProps( new PropertyValueMap ), m_bTrailingSlash( sal_False ) { - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ] + (*m_xProps)[ rtl::OUString("Title") ] = PropertyValue( uno::makeAny( rTitle ), true ); } @@ -328,17 +328,17 @@ void ContentProperties::UCBNamesToHTTPNames( if ( rProp.Name == "DateModified" ) { propertyNames.push_back( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Last-Modified")) ); + rtl::OUString("Last-Modified") ); } else if ( rProp.Name == "MediaType" ) { propertyNames.push_back( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Content-Type")) ); + rtl::OUString("Content-Type") ); } else if ( rProp.Name == "Size" ) { propertyNames.push_back( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Content-Length")) ); + rtl::OUString("Content-Length") ); } else { @@ -417,7 +417,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateCreated")) ] + (*m_xProps)[ rtl::OUString("DateCreated") ] = PropertyValue( uno::makeAny( aDate ), true ); } // else if ( rName.equals( DAVProperties::DISPLAYNAME ) ) @@ -432,7 +432,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, rtl::OUString aValue; rValue >>= aValue; - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ] + (*m_xProps)[ rtl::OUString("Size") ] = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); } else if ( rName == "Content-Length" ) @@ -444,13 +444,13 @@ void ContentProperties::addProperty( const rtl::OUString & rName, rtl::OUString aValue; rValue >>= aValue; - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ] + (*m_xProps)[ rtl::OUString("Size") ] = PropertyValue( uno::makeAny( aValue.toInt64() ), true ); } else if ( rName.equals( DAVProperties::GETCONTENTTYPE ) ) { // Map DAV:getcontenttype to UCP:MediaType (1:1) - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ] + (*m_xProps)[ rtl::OUString("MediaType") ] = PropertyValue( rValue, true ); } else if ( rName == "Content-Type" ) @@ -459,7 +459,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(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ] + (*m_xProps)[ rtl::OUString("MediaType") ] = PropertyValue( rValue, true ); } // else if ( rName.equals( DAVProperties::GETETAG ) ) @@ -473,7 +473,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")) ] + (*m_xProps)[ rtl::OUString("DateModified") ] = PropertyValue( uno::makeAny( aDate ), true ); } else if ( rName == "Last-Modified" ) @@ -487,7 +487,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, util::DateTime aDate; DateTimeHelper::convert( aValue, aDate ); - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified")) ] + (*m_xProps)[ rtl::OUString("DateModified") ] = PropertyValue( uno::makeAny( aDate ), true ); } // else if ( rName.equals( DAVProperties::LOCKDISCOVERY ) ) @@ -503,14 +503,14 @@ void ContentProperties::addProperty( const rtl::OUString & rName, aValue.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "collection" ) ); - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")) ] + (*m_xProps)[ rtl::OUString("IsFolder") ] = PropertyValue( uno::makeAny( bFolder ), true ); - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")) ] + (*m_xProps)[ rtl::OUString("IsDocument") ] = PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true ); - (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")) ] + (*m_xProps)[ rtl::OUString("ContentType") ] = PropertyValue( uno::makeAny( bFolder - ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_COLLECTION_TYPE )) - : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_TYPE )) ), true ); + ? rtl::OUString( WEBDAV_COLLECTION_TYPE ) + : rtl::OUString( WEBDAV_CONTENT_TYPE ) ), true ); } // else if ( rName.equals( DAVProperties::SOURCE ) ) // { @@ -541,17 +541,17 @@ namespace DAVProperties::LOCKDISCOVERY, DAVProperties::GETETAG, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ETag" ) ), + rtl::OUString( "ETag" ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Last-Modified" ) ), + rtl::OUString( "DateModified" ), + rtl::OUString( "Last-Modified" ), DAVProperties::GETLASTMODIFIED, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Content-Length" ) ), + rtl::OUString( "Size" ), + rtl::OUString( "Content-Length" ), DAVProperties::GETCONTENTLENGTH, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Date" ) ) + rtl::OUString( "Date" ) }; for ( sal_uInt32 n = 0; diff --git a/ucb/source/ucp/webdav/DAVProperties.cxx b/ucb/source/ucp/webdav/DAVProperties.cxx index 40c6638c81bf..4b89cef5dcdc 100644 --- a/ucb/source/ucp/webdav/DAVProperties.cxx +++ b/ucb/source/ucp/webdav/DAVProperties.cxx @@ -32,19 +32,19 @@ using namespace webdav_ucp; -const ::rtl::OUString DAVProperties::CREATIONDATE(RTL_CONSTASCII_USTRINGPARAM("DAV:creationdate")); -const ::rtl::OUString DAVProperties::DISPLAYNAME(RTL_CONSTASCII_USTRINGPARAM("DAV:displayname")); -const ::rtl::OUString DAVProperties::GETCONTENTLANGUAGE(RTL_CONSTASCII_USTRINGPARAM("DAV:getcontentlanguage")); -const ::rtl::OUString DAVProperties::GETCONTENTLENGTH(RTL_CONSTASCII_USTRINGPARAM("DAV:getcontentlength")); -const ::rtl::OUString DAVProperties::GETCONTENTTYPE(RTL_CONSTASCII_USTRINGPARAM("DAV:getcontenttype")); -const ::rtl::OUString DAVProperties::GETETAG(RTL_CONSTASCII_USTRINGPARAM("DAV:getetag")); -const ::rtl::OUString DAVProperties::GETLASTMODIFIED(RTL_CONSTASCII_USTRINGPARAM("DAV:getlastmodified")); -const ::rtl::OUString DAVProperties::LOCKDISCOVERY(RTL_CONSTASCII_USTRINGPARAM("DAV:lockdiscovery")); -const ::rtl::OUString DAVProperties::RESOURCETYPE(RTL_CONSTASCII_USTRINGPARAM("DAV:resourcetype")); -const ::rtl::OUString DAVProperties::SOURCE(RTL_CONSTASCII_USTRINGPARAM("DAV:source")); -const ::rtl::OUString DAVProperties::SUPPORTEDLOCK(RTL_CONSTASCII_USTRINGPARAM("DAV:supportedlock")); - -const ::rtl::OUString DAVProperties::EXECUTABLE(RTL_CONSTASCII_USTRINGPARAM("http://apache.org/dav/props/executable")); +const ::rtl::OUString DAVProperties::CREATIONDATE("DAV:creationdate"); +const ::rtl::OUString DAVProperties::DISPLAYNAME("DAV:displayname"); +const ::rtl::OUString DAVProperties::GETCONTENTLANGUAGE("DAV:getcontentlanguage"); +const ::rtl::OUString DAVProperties::GETCONTENTLENGTH("DAV:getcontentlength"); +const ::rtl::OUString DAVProperties::GETCONTENTTYPE("DAV:getcontenttype"); +const ::rtl::OUString DAVProperties::GETETAG("DAV:getetag"); +const ::rtl::OUString DAVProperties::GETLASTMODIFIED("DAV:getlastmodified"); +const ::rtl::OUString DAVProperties::LOCKDISCOVERY("DAV:lockdiscovery"); +const ::rtl::OUString DAVProperties::RESOURCETYPE("DAV:resourcetype"); +const ::rtl::OUString DAVProperties::SOURCE("DAV:source"); +const ::rtl::OUString DAVProperties::SUPPORTEDLOCK("DAV:supportedlock"); + +const ::rtl::OUString DAVProperties::EXECUTABLE("http://apache.org/dav/props/executable"); // ------------------------------------------------------------------- // static @@ -137,7 +137,7 @@ void DAVProperties::createUCBPropName( const char * nspace, DAVProperties::GETETAG.matchIgnoreAsciiCase( aName, 4 ) || DAVProperties::GETLASTMODIFIED.matchIgnoreAsciiCase( aName, 4 ) || DAVProperties::SOURCE.matchIgnoreAsciiCase( aName, 4 ) ) - aNameSpace = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DAV:" ) ); + aNameSpace = rtl::OUString( "DAV:" ); } // Note: Concatenating strings BEFORE comparing against known namespaces @@ -166,11 +166,11 @@ void DAVProperties::createUCBPropName( const char * nspace, else { // Create property name that encodes, namespace and name ( XML ). - rFullName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("<prop:")); + rFullName = rtl::OUString("<prop:"); rFullName += aName; - rFullName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " xmlns:prop=\"" )); + rFullName += rtl::OUString( " xmlns:prop=\"" ); rFullName += aNameSpace; - rFullName += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "\">" )); + rFullName += rtl::OUString( "\">" ); } } diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index 4f9d4c6531a8..0e0f34a65d28 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -193,8 +193,7 @@ void DAVResourceAccess::OPTIONS( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "OPTIONS" )), + rtl::OUString( "OPTIONS" ), aHeaders ); m_xSession->OPTIONS( getRequestURI(), @@ -237,8 +236,7 @@ void DAVResourceAccess::PROPFIND( getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "PROPFIND" )), + rtl::OUString( "PROPFIND" ), aHeaders ); m_xSession->PROPFIND( getRequestURI(), @@ -280,8 +278,7 @@ void DAVResourceAccess::PROPFIND( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "PROPFIND" )), + rtl::OUString( "PROPFIND" ), aHeaders ); m_xSession->PROPFIND( getRequestURI(), @@ -321,8 +318,7 @@ void DAVResourceAccess::PROPPATCH( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "PROPPATCH" )), + rtl::OUString( "PROPPATCH" ), aHeaders ); m_xSession->PROPPATCH( getRequestURI(), @@ -362,7 +358,7 @@ void DAVResourceAccess::HEAD( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HEAD")), + rtl::OUString("HEAD"), aHeaders ); m_xSession->HEAD( getRequestURI(), @@ -402,7 +398,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GET")), + rtl::OUString("GET"), aHeaders ); xStream = m_xSession->GET( getRequestURI(), @@ -443,7 +439,7 @@ void DAVResourceAccess::GET( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GET")), + rtl::OUString("GET"), aHeaders ); m_xSession->GET( getRequestURI(), @@ -484,7 +480,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::GET( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GET")), + rtl::OUString("GET"), aHeaders ); xStream = m_xSession->GET( getRequestURI(), @@ -529,7 +525,7 @@ void DAVResourceAccess::GET( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GET")), + rtl::OUString("GET"), aHeaders ); m_xSession->GET( getRequestURI(), @@ -616,7 +612,7 @@ void DAVResourceAccess::PUT( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PUT")), + rtl::OUString("PUT"), aHeaders ); m_xSession->PUT( getRequestURI(), @@ -668,7 +664,7 @@ uno::Reference< io::XInputStream > DAVResourceAccess::POST( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("POST")), + rtl::OUString("POST"), aHeaders ); xStream = m_xSession->POST( getRequestURI(), @@ -731,7 +727,7 @@ void DAVResourceAccess::POST( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("POST")), + rtl::OUString("POST"), aHeaders ); m_xSession->POST( getRequestURI(), @@ -779,7 +775,7 @@ void DAVResourceAccess::MKCOL( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MKCOL")), + rtl::OUString("MKCOL"), aHeaders ); m_xSession->MKCOL( getRequestURI(), @@ -819,7 +815,7 @@ void DAVResourceAccess::COPY( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("COPY")), + rtl::OUString("COPY"), aHeaders ); m_xSession->COPY( rSourcePath, @@ -861,7 +857,7 @@ void DAVResourceAccess::MOVE( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MOVE")), + rtl::OUString("MOVE"), aHeaders ); m_xSession->MOVE( rSourcePath, @@ -900,8 +896,7 @@ void DAVResourceAccess::DESTROY( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "DESTROY" )), + rtl::OUString( "DESTROY" ), aHeaders ); m_xSession->DESTROY( getRequestURI(), @@ -940,7 +935,7 @@ void DAVResourceAccess::LOCK( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LOCK")), + rtl::OUString("LOCK"), aHeaders ); m_xSession->LOCK( getRequestURI(), @@ -982,7 +977,7 @@ sal_Int64 DAVResourceAccess::LOCK( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LOCK")), + rtl::OUString("LOCK"), aHeaders ); nNewTimeout = m_xSession->LOCK( getRequestURI(), @@ -1024,7 +1019,7 @@ void DAVResourceAccess::UNLOCK( DAVRequestHeaders aHeaders; getUserRequestHeaders( xEnv, getRequestURI(), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UNLOCK")), + rtl::OUString("UNLOCK"), aHeaders ); m_xSession->UNLOCK( getRequestURI(), diff --git a/ucb/source/ucp/webdav/LinkSequence.cxx b/ucb/source/ucp/webdav/LinkSequence.cxx index 93655ca475e6..26c5673eeab8 100644 --- a/ucb/source/ucp/webdav/LinkSequence.cxx +++ b/ucb/source/ucp/webdav/LinkSequence.cxx @@ -198,9 +198,9 @@ bool LinkSequence::toXML( const uno::Sequence< ucb::Link > & rInData, sal_Int32 nCount = rInData.getLength(); if ( nCount ) { - rtl::OUString aPre( RTL_CONSTASCII_USTRINGPARAM("<link><src>") ); - rtl::OUString aMid( RTL_CONSTASCII_USTRINGPARAM("</src><dst>") ); - rtl::OUString aEnd( RTL_CONSTASCII_USTRINGPARAM("</dst></link>") ); + rtl::OUString aPre( "<link><src>" ); + rtl::OUString aMid( "</src><dst>" ); + rtl::OUString aEnd( "</dst></link>" ); for ( sal_Int32 n = 0; n < nCount; ++n ) { diff --git a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx index c8d29f5149d1..7bba69d63984 100644 --- a/ucb/source/ucp/webdav/NeonPropFindRequest.cxx +++ b/ucb/source/ucp/webdav/NeonPropFindRequest.cxx @@ -144,7 +144,7 @@ extern "C" int NPFR_propfind_iter( void* userdata, RTL_CONSTASCII_STRINGPARAM( "<collection" ) ) == 0 ) { thePropertyValue.Value - <<= OUString(RTL_CONSTASCII_USTRINGPARAM("collection")); + <<= OUString("collection"); } } diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index e69aaf94cf07..18271b4f20c8 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -167,7 +167,7 @@ static bool noKeepAlive( const uno::Sequence< beans::NamedValue >& rFlags ) std::find_if(pAry,pAry+nLen, boost::bind(comphelper::TNamedValueEqualFunctor(), _1, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KeepAlive"))))); + rtl::OUString("KeepAlive")))); if ( pValue != pAry+nLen && !pValue->Value.get<sal_Bool>() ) return true; @@ -382,7 +382,7 @@ namespace { ::rtl::OUString GetHostnamePart( const ::rtl::OUString& _rRawString ) { ::rtl::OUString sPart; - ::rtl::OUString sPartId(RTL_CONSTASCII_USTRINGPARAM("CN=")); + ::rtl::OUString sPartId("CN="); sal_Int32 nContStart = _rRawString.indexOf( sPartId ); if ( nContStart != -1 ) { @@ -409,8 +409,7 @@ extern "C" int NeonSession_CertificationNotify( void *userdata, xCertificateContainer = uno::Reference< security::XCertificateContainer >( pSession->getMSF()->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.security.CertificateContainer" )) ), + rtl::OUString( "com.sun.star.security.CertificateContainer" ) ), uno::UNO_QUERY ); } catch ( uno::Exception const & ) @@ -442,7 +441,7 @@ extern "C" int NeonSession_CertificationNotify( void *userdata, { xSEInitializer = uno::Reference< xml::crypto::XSEInitializer >( pSession->getMSF()->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SEINITIALIZER_COMPONENT )) ), + rtl::OUString( SEINITIALIZER_COMPONENT ) ), uno::UNO_QUERY ); } catch ( uno::Exception const & ) @@ -487,8 +486,7 @@ extern "C" int NeonSession_CertificationNotify( void *userdata, uno::Reference< security::XCertificate> xImCert( xSecurityEnv->createCertificateFromAscii( - rtl::OStringToOUString( - sInterMediateCertB64, RTL_TEXTENCODING_ASCII_US ) ) ); + rtl::OStringToOUString( sInterMediateCertB64, RTL_TEXTENCODING_ASCII_US ) ) ); if ( xImCert.is() ) vecCerts.push_back( xImCert ); } @@ -778,7 +776,7 @@ void NeonSession::Init() m_aNeonLockStore.registerSession( m_pHttpSession ); if ( m_aScheme.equalsIgnoreAsciiCase( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "https" ) ) ) ) + rtl::OUString( "https" ) ) ) { // Set a failure callback for certificate check ne_ssl_set_verify( @@ -2169,7 +2167,7 @@ NeonSession::isDomainMatch( rtl::OUString certHostName ) if (hostName.equalsIgnoreAsciiCase( certHostName ) ) return sal_True; - if ( 0 == certHostName.indexOf( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) ) && + if ( 0 == certHostName.indexOf( rtl::OUString("*") ) && hostName.getLength() >= certHostName.getLength() ) { rtl::OUString cmpStr = certHostName.copy( 1 ); diff --git a/ucb/source/ucp/webdav/NeonUri.cxx b/ucb/source/ucp/webdav/NeonUri.cxx index 897e8a6e9c3a..530306c2badc 100644 --- a/ucb/source/ucp/webdav/NeonUri.cxx +++ b/ucb/source/ucp/webdav/NeonUri.cxx @@ -173,14 +173,14 @@ void NeonUri::init( const rtl::OString & rUri, const ne_uri * pUri ) if ( pUri->query ) { - mPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?")); + mPath += rtl::OUString("?"); mPath += rtl::OStringToOUString( pUri->query, RTL_TEXTENCODING_UTF8 ); } if ( pUri->fragment ) { - mPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#")); + mPath += rtl::OUString("#"); mPath += rtl::OStringToOUString( pUri->fragment, RTL_TEXTENCODING_UTF8 ); } diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx index 0bd9136f5a38..780e45f35461 100644 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx @@ -48,20 +48,20 @@ struct UCBDeadPropertyValueParseContext }; // static -const rtl::OUString UCBDeadPropertyValue::aTypeString(RTL_CONSTASCII_USTRINGPARAM("string")); -const rtl::OUString UCBDeadPropertyValue::aTypeLong(RTL_CONSTASCII_USTRINGPARAM("long")); -const rtl::OUString UCBDeadPropertyValue::aTypeShort(RTL_CONSTASCII_USTRINGPARAM("short")); -const rtl::OUString UCBDeadPropertyValue::aTypeBoolean(RTL_CONSTASCII_USTRINGPARAM("boolean")); -const rtl::OUString UCBDeadPropertyValue::aTypeChar(RTL_CONSTASCII_USTRINGPARAM("char")); -const rtl::OUString UCBDeadPropertyValue::aTypeByte(RTL_CONSTASCII_USTRINGPARAM("byte")); -const rtl::OUString UCBDeadPropertyValue::aTypeHyper(RTL_CONSTASCII_USTRINGPARAM("hyper")); -const rtl::OUString UCBDeadPropertyValue::aTypeFloat(RTL_CONSTASCII_USTRINGPARAM("float")); -const rtl::OUString UCBDeadPropertyValue::aTypeDouble(RTL_CONSTASCII_USTRINGPARAM("double")); +const rtl::OUString UCBDeadPropertyValue::aTypeString("string"); +const rtl::OUString UCBDeadPropertyValue::aTypeLong("long"); +const rtl::OUString UCBDeadPropertyValue::aTypeShort("short"); +const rtl::OUString UCBDeadPropertyValue::aTypeBoolean("boolean"); +const rtl::OUString UCBDeadPropertyValue::aTypeChar("char"); +const rtl::OUString UCBDeadPropertyValue::aTypeByte("byte"); +const rtl::OUString UCBDeadPropertyValue::aTypeHyper("hyper"); +const rtl::OUString UCBDeadPropertyValue::aTypeFloat("float"); +const rtl::OUString UCBDeadPropertyValue::aTypeDouble("double"); // static -const rtl::OUString UCBDeadPropertyValue::aXMLPre(RTL_CONSTASCII_USTRINGPARAM("<ucbprop><type>")); -const rtl::OUString UCBDeadPropertyValue::aXMLMid(RTL_CONSTASCII_USTRINGPARAM("</type><value>")); -const rtl::OUString UCBDeadPropertyValue::aXMLEnd(RTL_CONSTASCII_USTRINGPARAM("</value></ucbprop>")); +const rtl::OUString UCBDeadPropertyValue::aXMLPre("<ucbprop><type>"); +const rtl::OUString UCBDeadPropertyValue::aXMLMid("</type><value>"); +const rtl::OUString UCBDeadPropertyValue::aXMLEnd("</value></ucbprop>"); #define STATE_TOP (1) @@ -377,7 +377,7 @@ bool UCBDeadPropertyValue::createFromXML( const rtl::OString & rInData, else if ( aCtx.pType->equalsIgnoreAsciiCase( aTypeBoolean ) ) { if ( aStringValue.equalsIgnoreAsciiCase( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("true")) ) ) + rtl::OUString("true") ) ) rOutData <<= sal_Bool( sal_True ); else rOutData <<= sal_Bool( sal_False ); diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index aaf3b9cad1c6..88e2d9b77d04 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -203,8 +203,7 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) m_xSMgr, uno::UNO_QUERY_THROW ); uno::Reference< uno::XComponentContext > xCtx; xCtx.set( xProps->getPropertyValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ), + rtl::OUString( "DefaultContext" ) ), uno::UNO_QUERY_THROW ); uno::Reference< task::XInteractionHandler > xIH( @@ -342,8 +341,7 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes() rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) { - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.ucb.WebDAVContent" )); + return rtl::OUString( "com.sun.star.comp.ucb.WebDAVContent" ); } //========================================================================= @@ -353,7 +351,7 @@ uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() { uno::Sequence< rtl::OUString > aSNS( 1 ); aSNS.getArray()[ 0 ] - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_SERVICE_NAME )); + = rtl::OUString( WEBDAV_CONTENT_SERVICE_NAME ); return aSNS; } @@ -382,9 +380,9 @@ rtl::OUString SAL_CALL Content::getContentType() } if ( bFolder ) - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_COLLECTION_TYPE )); + return rtl::OUString( WEBDAV_COLLECTION_TYPE ); - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_TYPE )); + return rtl::OUString( WEBDAV_CONTENT_TYPE ); } //========================================================================= @@ -420,8 +418,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -441,8 +438,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -453,8 +449,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "No properties!" )), + rtl::OUString( "No properties!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -494,8 +489,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -524,8 +518,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -588,8 +581,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -609,8 +601,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -646,8 +637,7 @@ uno::Any SAL_CALL Content::execute( { ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Wrong argument type!" )), + rtl::OUString( "Wrong argument type!" ), static_cast< cppu::OWeakObject * >( this ), -1 ) ), Environment ); @@ -945,14 +935,14 @@ Content::queryCreatableContentsInfo() // document. aSeq.getArray()[ 0 ].Type - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_CONTENT_TYPE )); + = rtl::OUString( WEBDAV_CONTENT_TYPE ); aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | ucb::ContentInfoAttribute::KIND_DOCUMENT; beans::Property aProp; m_pProvider->getProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), aProp ); + rtl::OUString( "Title" ), aProp ); uno::Sequence< beans::Property > aDocProps( 1 ); aDocProps.getArray()[ 0 ] = aProp; @@ -960,7 +950,7 @@ Content::queryCreatableContentsInfo() // folder. aSeq.getArray()[ 1 ].Type - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( WEBDAV_COLLECTION_TYPE )); + = rtl::OUString( WEBDAV_COLLECTION_TYPE ); aSeq.getArray()[ 1 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; @@ -990,17 +980,17 @@ Content::createNewContent( const ucb::ContentInfo& Info ) "WebdavContent::createNewContent - empty identifier!" ); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); sal_Bool isCollection; if ( Info.Type == WEBDAV_COLLECTION_TYPE ) { - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Collection")); + aURL += rtl::OUString("New_Collection"); isCollection = sal_True; } else { - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Content")); + aURL += rtl::OUString("New_Content"); isCollection = sal_False; } @@ -1372,7 +1362,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( //xProps.reset( // new ContentProperties( aUnescapedTitle ) ); xProps->addProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), + rtl::OUString( "Title" ), uno::makeAny( aUnescapedTitle ), true ); } @@ -1382,16 +1372,16 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xProps.reset( new ContentProperties( aUnescapedTitle, false ) ); else xProps->addProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), + rtl::OUString( "Title" ), uno::makeAny( aUnescapedTitle ), true ); xProps->addProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ), + rtl::OUString( "IsFolder" ), uno::makeAny( false ), true ); xProps->addProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ), + rtl::OUString( "IsDocument" ), uno::makeAny( true ), true ); } @@ -1413,7 +1403,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( { // Add BaseURI property, if requested. xProps->addProperty( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" ) ), + rtl::OUString( "BaseURI" ), uno::makeAny( getBaseURI( xResAccess ) ), true ); } @@ -1422,11 +1412,10 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( // Add CreatableContentsInfo property, if requested. sal_Bool bFolder = sal_False; xProps->getValue( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ) ) + rtl::OUString( "IsFolder" ) ) >>= bFolder; xProps->addProperty( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( "CreatableContentsInfo" ) ), + rtl::OUString( "CreatableContentsInfo" ), uno::makeAny( bFolder ? queryCreatableContentsInfo() : uno::Sequence< ucb::ContentInfo >() ), @@ -1519,8 +1508,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); continue; } @@ -1533,24 +1521,21 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName == "IsDocument" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName == "IsFolder" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName == "Title" ) @@ -1583,8 +1568,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( catch ( DAVException const & ) { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Invalid content identifier!" )), + rtl::OUString( "Invalid content identifier!" ), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1592,8 +1576,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= lang::IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Empty title not allowed!" )), + rtl::OUString( "Empty title not allowed!" ), static_cast< cppu::OWeakObject * >( this ), -1 ); } @@ -1601,8 +1584,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= beans::IllegalTypeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property value has wrong type!" )), + rtl::OUString( "Property value has wrong type!" ), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1622,8 +1604,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // PROPPATCH::set would add the property automatically, which // is not allowed for "setPropertyValues" command! aRet[ n ] <<= beans::UnknownPropertyException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is unknown!" )), + rtl::OUString( "Property is unknown!" ), static_cast< cppu::OWeakObject * >( this ) ); continue; } @@ -1632,24 +1613,21 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName == "DateCreated" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName == "DateModified" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else if ( rName == "MediaType" ) @@ -1657,16 +1635,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Read-only property! // (but could be writable, if 'getcontenttype' would be) aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } if ( rName == "CreatableContentsInfo" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Property is read-only!" )), + rtl::OUString( "Property is read-only!" ), static_cast< cppu::OWeakObject * >( this ) ); } else @@ -1731,8 +1707,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( else { aRet[ n ] <<= uno::Exception( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "No property set for storing the value!" )), + rtl::OUString( "No property set for storing the value!" ), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1779,7 +1754,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( rtl::OUString aNewURL = getParentURL(); if ( aNewURL.lastIndexOf( '/' ) != ( aNewURL.getLength() - 1 ) ) - aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aNewURL += rtl::OUString("/"); aNewURL += NeonUri::escapeSegment( aNewTitle ); @@ -1822,7 +1797,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Set error . aRet[ nTitlePos ] <<= uno::Exception( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Exchange failed!")), + rtl::OUString("Exchange failed!"), static_cast< cppu::OWeakObject * >( this ) ); } } @@ -1840,7 +1815,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - aEvent.PropertyName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + aEvent.PropertyName = rtl::OUString("Title"); aEvent.OldValue = uno::makeAny( aOldTitle ); aEvent.NewValue = uno::makeAny( aNewTitle ); @@ -2154,7 +2129,7 @@ void Content::queryChildren( ContentRefList& rChildren ) if ( nURLPos != ( aURL.getLength() - 1 ) ) { // No trailing slash found. Append. - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); } sal_Int32 nLen = aURL.getLength(); @@ -2218,7 +2193,7 @@ void Content::insert( OSL_FAIL( "Content::insert - Title missing!" ); uno::Sequence< rtl::OUString > aProps( 1 ); - aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); + aProps[ 0 ] = rtl::OUString("Title"); ucbhelper::cancelCommandExecution( uno::makeAny( ucb::MissingPropertiesException( rtl::OUString(), @@ -2249,8 +2224,7 @@ void Content::insert( if ( !bTransient || ( bTransient && !bCollection ) ) { ucb::UnsupportedNameClashException aEx( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unable to write without overwrite!" )), + rtl::OUString( "Unable to write without overwrite!" ), static_cast< cppu::OWeakObject * >( this ), ucb::NameClash::ERROR ); @@ -2296,8 +2270,7 @@ void Content::insert( OSL_FAIL( "Content::insert - " "Unknown interaction selection!" ); throw ucb::CommandFailedException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unknown interaction selection!" )), + rtl::OUString( "Unknown interaction selection!" ), uno::Reference< uno::XInterface >(), aExAsAny ); // break; @@ -2316,7 +2289,7 @@ void Content::insert( // Assemble new content identifier... rtl::OUString aURL = getParentURL(); if ( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ) ) - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); aURL += aEscapedTitle; @@ -2471,17 +2444,17 @@ void Content::transfer( if ( aScheme == WEBDAV_URL_SCHEME ) { sourceURI.SetScheme( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) ); + rtl::OUString( HTTP_URL_SCHEME ) ); } else if ( aScheme == DAV_URL_SCHEME ) { sourceURI.SetScheme( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) ); + rtl::OUString( HTTP_URL_SCHEME ) ); } else if ( aScheme == DAVS_URL_SCHEME ) { sourceURI.SetScheme( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTPS_URL_SCHEME )) ); + rtl::OUString( HTTPS_URL_SCHEME ) ); } else { @@ -2490,8 +2463,7 @@ void Content::transfer( ucbhelper::cancelCommandExecution( uno::makeAny( ucb::InteractiveBadTransferURLException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unsupported URL scheme!" )), + rtl::OUString( "Unsupported URL scheme!" ), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); // Unreachable @@ -2500,10 +2472,10 @@ void Content::transfer( if ( targetURI.GetScheme().toAsciiLowerCase() == WEBDAV_URL_SCHEME ) targetURI.SetScheme( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) ); + rtl::OUString( HTTP_URL_SCHEME ) ); else if ( targetURI.GetScheme().toAsciiLowerCase() == DAV_URL_SCHEME ) targetURI.SetScheme( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( HTTP_URL_SCHEME )) ); + rtl::OUString( HTTP_URL_SCHEME ) ); // @@@ This implementation of 'transfer' only works // if the source and target are located at same host. @@ -2516,8 +2488,7 @@ void Content::transfer( { ucbhelper::cancelCommandExecution( uno::makeAny( ucb::InteractiveBadTransferURLException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Different hosts!" )), + rtl::OUString( "Different hosts!" ), static_cast< cppu::OWeakObject * >( this ) ) ), Environment ); // Unreachable @@ -2539,7 +2510,7 @@ void Content::transfer( rtl::OUString aTargetURL = xIdentifier->getContentIdentifier(); if ( ( aTargetURL.lastIndexOf( '/' ) + 1 ) != aTargetURL.getLength() ) - aTargetURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aTargetURL += rtl::OUString("/"); aTargetURL += aTitle; @@ -2747,7 +2718,7 @@ void Content::lock( uno::Any aOwnerAny; aOwnerAny - <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http://ucb.openoffice.org")); + <<= rtl::OUString("http://ucb.openoffice.org"); ucb::Lock aLock( ucb::LockScope_EXCLUSIVE, @@ -2882,7 +2853,7 @@ sal_Bool Content::isFolder( } uno::Sequence< beans::Property > aProperties( 1 ); - aProperties[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); + aProperties[ 0 ].Name = rtl::OUString("IsFolder"); aProperties[ 0 ].Handle = -1; uno::Reference< sdbc::XRow > xRow( getPropertyValues( aProperties, xEnv ) ); if ( xRow.is() ) @@ -2925,13 +2896,13 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) { uno::Sequence< uno::Any > aArgs( 1 ); aArgs[ 0 ] <<= beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")), -1, + rtl::OUString("Uri"), -1, uno::makeAny(aURL), beans::PropertyState_DIRECT_VALUE); aException <<= ucb::InteractiveAugmentedIOException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Not found!")), + rtl::OUString("Not found!"), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING, @@ -3012,7 +2983,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) case DAVException::DAV_LOCKED: aException <<= ucb::InteractiveLockingLockedException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Locked!")), + rtl::OUString("Locked!"), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, aURL, @@ -3022,7 +2993,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) case DAVException::DAV_LOCKED_SELF: aException <<= ucb::InteractiveLockingLockedException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Locked (self)!")), + rtl::OUString("Locked (self!)"), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, aURL, @@ -3032,7 +3003,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) case DAVException::DAV_NOT_LOCKED: aException <<= ucb::InteractiveLockingNotLockedException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Not locked!")), + rtl::OUString("Not locked!"), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, aURL ); @@ -3041,7 +3012,7 @@ uno::Any Content::MapDAVException( const DAVException & e, sal_Bool bWrite ) case DAVException::DAV_LOCK_EXPIRED: aException <<= ucb::InteractiveLockingLockExpiredException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Lock expired!")), + rtl::OUString("Lock expired!"), static_cast< cppu::OWeakObject * >( this ), task::InteractionClassification_ERROR, aURL ); @@ -3095,9 +3066,7 @@ Content::getBaseURI( const std::auto_ptr< DAVResourceAccess > & rResAccess ) if ( m_xCachedProps.get() ) { rtl::OUString aLocation; - m_xCachedProps->getValue( rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "Content-Location" ) ) ) >>= aLocation; + m_xCachedProps->getValue( rtl::OUString( "Content-Location" ) ) >>= aLocation; if ( !aLocation.isEmpty() ) { try @@ -3149,13 +3118,13 @@ const Content::ResourceType & Content::getResourceType( std::vector< rtl::OUString > aPropNames; uno::Sequence< beans::Property > aProperties( 5 ); aProperties[ 0 ].Name - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); + = rtl::OUString("IsFolder"); aProperties[ 1 ].Name - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")); + = rtl::OUString("IsDocument"); aProperties[ 2 ].Name - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsReadOnly")); + = rtl::OUString("IsReadOnly"); aProperties[ 3 ].Name - = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")); + = rtl::OUString("MediaType"); aProperties[ 4 ].Name = DAVProperties::SUPPORTEDLOCK; diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx index 6c672f6c355a..f5f662062973 100644 --- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx @@ -161,12 +161,12 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) = *( m_pImpl->m_aResults[ nIndex ]->pData ); if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() ) - aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aId += rtl::OUString("/"); aId += props.getEscapedTitle(); if ( props.isTrailingSlash() ) - aId += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aId += rtl::OUString("/"); m_pImpl->m_aResults[ nIndex ]->aId = aId; return aId; @@ -456,9 +456,7 @@ sal_Bool DataSupplier::getData() const uno::Any & rValue = pContentProperties->getValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "IsFolder" ) ) ); + rtl::OUString( "IsFolder" ) ); rValue >>= bFolder; if ( !bFolder ) @@ -473,9 +471,7 @@ sal_Bool DataSupplier::getData() const uno::Any & rValue = pContentProperties->getValue( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "IsDocument" ) ) ); + rtl::OUString( "IsDocument" ) ); rValue >>= bDocument; if ( !bDocument ) diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx index c789e120e595..fd7371d7428d 100644 --- a/ucb/source/ucp/webdav/webdavprovider.cxx +++ b/ucb/source/ucp/webdav/webdavprovider.cxx @@ -93,10 +93,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, //========================================================================= XSERVICEINFO_IMPL_1( ContentProvider, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.WebDAVContentProvider" )), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - WEBDAV_CONTENT_PROVIDER_SERVICE_NAME )) ); + rtl::OUString( "com.sun.star.comp.WebDAVContentProvider" ), + rtl::OUString( WEBDAV_CONTENT_PROVIDER_SERVICE_NAME ) ); //========================================================================= // @@ -147,24 +145,21 @@ ContentProvider::queryContent( { aURL = aURL.replaceAt( 0, WEBDAV_URL_SCHEME_LENGTH, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - HTTP_URL_SCHEME )) ); + rtl::OUString( HTTP_URL_SCHEME ) ); bNewId = true; } else if ( aScheme == DAV_URL_SCHEME ) { aURL = aURL.replaceAt( 0, DAV_URL_SCHEME_LENGTH, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - HTTP_URL_SCHEME )) ); + rtl::OUString( HTTP_URL_SCHEME ) ); bNewId = true; } else if ( aScheme == DAVS_URL_SCHEME ) { aURL = aURL.replaceAt( 0, DAVS_URL_SCHEME_LENGTH, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - HTTPS_URL_SCHEME )) ); + rtl::OUString( HTTPS_URL_SCHEME ) ); bNewId = true; } @@ -179,7 +174,7 @@ ContentProvider::queryContent( nPos = aURL.indexOf( '/', nPos + 1 ); if ( nPos == -1 ) { - aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); + aURL += rtl::OUString("/"); bNewId = true; } } |