diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-06-01 09:39:35 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-06-01 09:41:50 -0500 |
commit | df9ecb71c7b2622a082849b556dba5008d271b6a (patch) | |
tree | 3b111d581fdddc854ffb8b28fd86b7561ca16be2 /dtrans/source | |
parent | a30795ce516b273a3a56a136b9b8802a23dd632a (diff) |
targeted string re-work
Change-Id: I44518bb1b464bb0b458c0b5f1c249ef160ea3b26
Diffstat (limited to 'dtrans/source')
-rw-r--r-- | dtrans/source/cnttype/mcnttfactory.cxx | 4 | ||||
-rw-r--r-- | dtrans/source/cnttype/mcnttype.cxx | 26 | ||||
-rw-r--r-- | dtrans/source/cnttype/wbench/testcnttype.cxx | 22 | ||||
-rw-r--r-- | dtrans/source/generic/clipboardmanager.cxx | 14 | ||||
-rw-r--r-- | dtrans/source/generic/generic_clipboard.cxx | 4 | ||||
-rw-r--r-- | dtrans/source/test/test_dtrans.cxx | 18 | ||||
-rw-r--r-- | dtrans/source/win32/clipb/WinClipboard.cxx | 24 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/DOTransferable.cxx | 2 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/DataFmtTransl.cxx | 10 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/FetcList.cxx | 5 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/XTDataObject.cxx | 2 | ||||
-rw-r--r-- | dtrans/source/win32/ftransl/ftransl.cxx | 8 | ||||
-rw-r--r-- | dtrans/source/win32/workbench/test_wincb.cxx | 4 |
13 files changed, 71 insertions, 72 deletions
diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx index 71ca6d97950f..5c01ec700c94 100644 --- a/dtrans/source/cnttype/mcnttfactory.cxx +++ b/dtrans/source/cnttype/mcnttfactory.cxx @@ -59,7 +59,7 @@ namespace Sequence< OUString > SAL_CALL MimeContentTypeFactory_getSupportedServiceNames( ) { Sequence< OUString > aRet(1); - aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory")); + aRet[0] = OUString("com.sun.star.datatransfer.MimeContentTypeFactory"); return aRet; } } @@ -91,7 +91,7 @@ Reference< XMimeContentType > CMimeContentTypeFactory::createMimeContentType( co OUString SAL_CALL CMimeContentTypeFactory::getImplementationName( ) throw( RuntimeException ) { - return OUString(RTL_CONSTASCII_USTRINGPARAM( MIMECONTENTTYPEFACTORY_IMPL_NAME )); + return OUString( MIMECONTENTTYPEFACTORY_IMPL_NAME ); } // ------------------------------------------------- diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx index 14b20107a7d4..9b14b786bc0e 100644 --- a/dtrans/source/cnttype/mcnttype.cxx +++ b/dtrans/source/cnttype/mcnttype.cxx @@ -85,7 +85,7 @@ OUString SAL_CALL CMimeContentType::getMediaSubtype( ) throw(RuntimeException) OUString SAL_CALL CMimeContentType::getFullMediaType( ) throw(RuntimeException) { - return m_MediaType + OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + m_MediaSubtype; + return m_MediaType + OUString("/") + m_MediaSubtype; } //------------------------------------------------------------------------ @@ -206,7 +206,7 @@ void SAL_CALL CMimeContentType::type( void ) { if ( isInRange( m_nxtSym, sToken ) ) m_MediaType += m_nxtSym; - else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("/ ")) ) ) + else if ( isInRange( m_nxtSym, OUString("/ ") ) ) break; else throw IllegalArgumentException( ); @@ -215,7 +215,7 @@ void SAL_CALL CMimeContentType::type( void ) // check FOLLOW( type ) skipSpaces( ); - acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM("/")) ); + acceptSym( OUString("/") ); subtype( ); } @@ -238,7 +238,7 @@ void SAL_CALL CMimeContentType::subtype( void ) { if ( isInRange( m_nxtSym, sToken ) ) m_MediaSubtype += m_nxtSym; - else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("; ")) ) ) + else if ( isInRange( m_nxtSym, OUString("; ") ) ) break; else throw IllegalArgumentException( ); @@ -259,13 +259,13 @@ void SAL_CALL CMimeContentType::trailer( void ) rtl::OUString sToken(TOKEN); while( !m_nxtSym.isEmpty( ) ) { - if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM("(")) ) + if ( m_nxtSym == OUString("(") ) { getSym( ); comment( ); - acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM(")")) ); + acceptSym( OUString(")") ); } - else if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM(";")) ) + else if ( m_nxtSym == OUString(";") ) { // get the parameter name getSym( ); @@ -277,7 +277,7 @@ void SAL_CALL CMimeContentType::trailer( void ) OUString pname = pName( ); skipSpaces(); - acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM("=")) ); + acceptSym( OUString("=") ); // get the parameter value skipSpaces( ); @@ -308,7 +308,7 @@ OUString SAL_CALL CMimeContentType::pName( ) { if ( isInRange( m_nxtSym, sToken ) ) pname += m_nxtSym; - else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("= ")) ) ) + else if ( isInRange( m_nxtSym, OUString("= ") ) ) break; else throw IllegalArgumentException( ); @@ -328,7 +328,7 @@ OUString SAL_CALL CMimeContentType::pValue( ) rtl::OUString sToken(TOKEN); // quoted pvalue - if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM( "\"" )) ) + if ( m_nxtSym == OUString( "\"" ) ) { getSym( ); pvalue = quotedPValue( ); @@ -375,7 +375,7 @@ OUString SAL_CALL CMimeContentType::quotedPValue( ) else if ( isInRange( m_nxtSym, rtl::OUString(TOKEN) + rtl::OUString(TSPECIALS) + rtl::OUString(SPACE) ) ) { pvalue += m_nxtSym; - if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM( "\"" )) ) + if ( m_nxtSym == OUString( "\"" ) ) bAfterQuoteSign = sal_True; else bAfterQuoteSign = sal_False; @@ -401,7 +401,7 @@ OUString SAL_CALL CMimeContentType::nonquotedPValue( ) { if ( isInRange( m_nxtSym, sToken ) ) pvalue += m_nxtSym; - else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("; ")) ) ) + else if ( isInRange( m_nxtSym, OUString("; ") ) ) break; else throw IllegalArgumentException( ); @@ -421,7 +421,7 @@ void SAL_CALL CMimeContentType::comment( void ) { if ( isInRange( m_nxtSym, rtl::OUString(TOKEN) + rtl::OUString(SPACE) ) ) getSym( ); - else if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM(")")) ) + else if ( m_nxtSym == OUString(")") ) break; else throw IllegalArgumentException( ); diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx index 011b2c467ea4..4c95f07ac749 100644 --- a/dtrans/source/cnttype/wbench/testcnttype.cxx +++ b/dtrans/source/cnttype/wbench/testcnttype.cxx @@ -93,7 +93,7 @@ void CheckMimeContentType( const OUString& aCntType, const OUString& aType, cons pvalue = xMimeCntType->getParameterValue( param ); } - pvalue = xMimeCntType->getParameterValue( OUString(RTL_CONSTASCII_USTRINGPARAM("aparam")) ); + pvalue = xMimeCntType->getParameterValue( OUString("aparam") ); } catch( IllegalArgumentException& ) { @@ -175,32 +175,32 @@ sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& v Reference< XMimeContentType > xMCntTyp = cnttypeFactory->createMimeContentType( OUString::createFromAscii( iter->c_str( ) ) ); - fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Type: %s\n")), xMCntTyp->getMediaType( ).getStr( ) ); - fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Subtype: %s\n")), xMCntTyp->getMediaSubtype( ).getStr( ) ); + fwprintf( fstream, OUString("Type: %s\n"), xMCntTyp->getMediaType( ).getStr( ) ); + fwprintf( fstream, OUString("Subtype: %s\n"), xMCntTyp->getMediaSubtype( ).getStr( ) ); Sequence< OUString > seqParam = xMCntTyp->getParameters( ); sal_Int32 nParams = seqParam.getLength( ); for ( sal_Int32 i = 0; i < nParams; i++ ) { - fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("PName: %s\n")), seqParam[i].getStr( ) ); - fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("PValue: %s\n")), xMCntTyp->getParameterValue( seqParam[i] ).getStr( ) ); + fwprintf( fstream, OUString("PName: %s\n"), seqParam[i].getStr( ) ); + fwprintf( fstream, OUString("PValue: %s\n"), xMCntTyp->getParameterValue( seqParam[i] ).getStr( ) ); } } catch( IllegalArgumentException& ex ) { - fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Fehlerhafter Content-Type gelesen!!!\n\n")) ); + fwprintf( fstream, OUString("Fehlerhafter Content-Type gelesen!!!\n\n") ); } catch( NoSuchElementException& ) { - fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Parameterwert nicht vorhanden\n")) ); + fwprintf( fstream, OUString("Parameterwert nicht vorhanden\n") ); } catch( ... ) { - fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Unbekannter Fehler!!!\n\n")) ); + fwprintf( fstream, OUString("Unbekannter Fehler!!!\n\n") ); } - fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("\n#############################################\n\n")) ); + fwprintf( fstream, OUString("\n#############################################\n\n") ); } fclose( fstream ); @@ -220,7 +220,7 @@ int SAL_CALL main( int nArgc, char* argv[] ) //------------------------------------------------- // get the global service-manager //------------------------------------------------- - OUString rdbName = OUString( RTL_CONSTASCII_USTRINGPARAM( RDB_SYSPATH ) ); + OUString rdbName = OUString( RDB_SYSPATH ); Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); // Print a message if an error occurred. @@ -240,7 +240,7 @@ int SAL_CALL main( int nArgc, char* argv[] ) } Reference< XMimeContentTypeFactory > - xMCntTypeFactory( g_xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory")) ), UNO_QUERY ); + xMCntTypeFactory( g_xFactory->createInstance( OUString("com.sun.star.datatransfer.MimeContentTypeFactory") ), UNO_QUERY ); if ( !xMCntTypeFactory.is( ) ) { diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx index c8b2ab497a1e..fba3e64820c5 100644 --- a/dtrans/source/generic/clipboardmanager.cxx +++ b/dtrans/source/generic/clipboardmanager.cxx @@ -45,7 +45,7 @@ using ::rtl::OUString; ClipboardManager::ClipboardManager(): WeakComponentImplHelper3< XClipboardManager, XEventListener, XServiceInfo > (m_aMutex), - m_aDefaultName(OUString(RTL_CONSTASCII_USTRINGPARAM("default"))) + m_aDefaultName(OUString("default")) { } @@ -60,7 +60,7 @@ ClipboardManager::~ClipboardManager() OUString SAL_CALL ClipboardManager::getImplementationName( ) throw(RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM(CLIPBOARDMANAGER_IMPLEMENTATION_NAME)); + return OUString(CLIPBOARDMANAGER_IMPLEMENTATION_NAME); } // ------------------------------------------------------------------------ @@ -94,7 +94,7 @@ Reference< XClipboard > SAL_CALL ClipboardManager::getClipboard( const OUString& // object is disposed already if (rBHelper.bDisposed) - throw DisposedException(OUString(RTL_CONSTASCII_USTRINGPARAM("object is disposed.")), + throw DisposedException(OUString("object is disposed."), static_cast < XClipboardManager * > (this)); ClipboardMap::iterator iter = @@ -115,13 +115,13 @@ void SAL_CALL ClipboardManager::addClipboard( const Reference< XClipboard >& xCl // check parameter if (!xClipboard.is()) - throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")), + throw IllegalArgumentException(OUString("empty reference"), static_cast < XClipboardManager * > (this), 1); // the name "default" is reserved for internal use OUString aName = xClipboard->getName(); if (m_aDefaultName.compareTo(aName) == 0) - throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("name reserved")), + throw IllegalArgumentException(OUString("name reserved"), static_cast < XClipboardManager * > (this), 1); // try to add new clipboard to the list @@ -164,7 +164,7 @@ Sequence< OUString > SAL_CALL ClipboardManager::listClipboardNames() MutexGuard aGuard(m_aMutex); if (rBHelper.bDisposed) - throw DisposedException(OUString(RTL_CONSTASCII_USTRINGPARAM("object is disposed.")), + throw DisposedException(OUString("object is disposed."), static_cast < XClipboardManager * > (this)); if (rBHelper.bInDispose) @@ -253,7 +253,7 @@ Sequence< OUString > SAL_CALL ClipboardManager_getSupportedServiceNames() { Sequence < OUString > SupportedServicesNames( 1 ); SupportedServicesNames[0] = - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.ClipboardManager")); + OUString("com.sun.star.datatransfer.clipboard.ClipboardManager"); return SupportedServicesNames; } diff --git a/dtrans/source/generic/generic_clipboard.cxx b/dtrans/source/generic/generic_clipboard.cxx index 320ef9390ef6..275e0917d153 100644 --- a/dtrans/source/generic/generic_clipboard.cxx +++ b/dtrans/source/generic/generic_clipboard.cxx @@ -73,7 +73,7 @@ void SAL_CALL GenericClipboard::initialize( const Sequence< Any >& aArguments ) OUString SAL_CALL GenericClipboard::getImplementationName( ) throw(RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM(GENERIC_CLIPBOARD_IMPLEMENTATION_NAME)); + return OUString(GENERIC_CLIPBOARD_IMPLEMENTATION_NAME); } // ------------------------------------------------------------------------ @@ -190,7 +190,7 @@ void SAL_CALL GenericClipboard::removeClipboardListener( const Reference< XClipb Sequence< OUString > SAL_CALL GenericClipboard_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboard")); + aRet[0] = OUString("com.sun.star.datatransfer.clipboard.GenericClipboard"); return aRet; } diff --git a/dtrans/source/test/test_dtrans.cxx b/dtrans/source/test/test_dtrans.cxx index 4b53d8db4e3e..c0a89413b365 100644 --- a/dtrans/source/test/test_dtrans.cxx +++ b/dtrans/source/test/test_dtrans.cxx @@ -232,7 +232,7 @@ private: StringTransferable::StringTransferable( ) : m_seqDFlv( 1 ), m_receivedLostOwnership( sal_False ), - m_Data( OUString(RTL_CONSTASCII_USTRINGPARAM("clipboard test content")) ) + m_Data( OUString("clipboard test content") ) { DataFlavor df; @@ -244,7 +244,7 @@ StringTransferable::StringTransferable( ) : */ //df.MimeType = L"text/plain; charset=windows1252"; - df.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM("text/html")); + df.MimeType = OUString("text/html"); df.DataType = getCppuType( ( Sequence< sal_Int8 >* )0 ); m_seqDFlv[0] = df; @@ -355,10 +355,10 @@ int SAL_CALL main( int argc, const char* argv[] ) //-------------------------------------------------------------- Sequence< Any > arguments(1); - arguments[0] = makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ); + arguments[0] = makeAny( OUString("generic") ); Reference< XClipboard > xClipboard( xServiceManager->createInstanceWithArguments( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboard")), + OUString("com.sun.star.datatransfer.clipboard.GenericClipboard"), arguments ), UNO_QUERY ); ENSURE( xClipboard.is(), "*** ERROR *** generic clipboard service could not be created." ); @@ -438,7 +438,7 @@ int SAL_CALL main( int argc, const char* argv[] ) //-------------------------------------------------------------- Reference< XClipboardManager > xClipboardManager( xServiceManager->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.ClipboardManager")) ), UNO_QUERY ); + OUString("com.sun.star.datatransfer.clipboard.ClipboardManager") ), UNO_QUERY ); ENSURE( xClipboardManager.is(), "*** ERROR *** clipboard manager service could not be created." ); @@ -451,14 +451,14 @@ int SAL_CALL main( int argc, const char* argv[] ) TEST( "initial number of clipboards (0): ", xClipboardManager->listClipboardNames().getLength() == 0 ); PERFORM( "insertion of generic clipboard: ", xClipboardManager->addClipboard( xClipboard ) ); TEST( "number of inserted clipboards (1): ", xClipboardManager->listClipboardNames().getLength() == 1 ); - TEST( "name of inserted clipboard (generic): ", xClipboardManager->listClipboardNames()[0] == OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ); - TEST( "inserted clipboard instance: ", xClipboardManager->getClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ) == xClipboard ); - PERFORM( "removal of generic clipboard: ", xClipboardManager->removeClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ) ); + TEST( "name of inserted clipboard (generic): ", xClipboardManager->listClipboardNames()[0] == OUString("generic") ); + TEST( "inserted clipboard instance: ", xClipboardManager->getClipboard( OUString("generic") ) == xClipboard ); + PERFORM( "removal of generic clipboard: ", xClipboardManager->removeClipboard( OUString("generic") ) ); TEST( "number of inserted clipboards (0): ", xClipboardManager->listClipboardNames().getLength() == 0 ); TRACE( "Testing inserted clipboard instance (none): " ); try { - xClipboardManager->getClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ); + xClipboardManager->getClipboard( OUString("generic") ); TRACE( "FAILED\n" ); } catch (const NoSuchElementException&) diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index 30bb0e23c4b2..f77e518f1bed 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.cxx @@ -66,7 +66,7 @@ namespace Sequence< OUString > SAL_CALL WinClipboard_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.SystemClipboard")); + aRet[0] = OUString("com.sun.star.datatransfer.clipboard.SystemClipboard"); return aRet; } } @@ -100,7 +100,7 @@ Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw( Runtime MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), + throw DisposedException( OUString("object is already disposed"), static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -120,7 +120,7 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), + throw DisposedException( OUString("object is already disposed"), static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -134,13 +134,13 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra OUString SAL_CALL CWinClipboard::getName( ) throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), + throw DisposedException( OUString("object is already disposed"), static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) return m_pImpl->getName( ); - return OUString(RTL_CONSTASCII_USTRINGPARAM("")); + return OUString(""); } //======================================================================== @@ -152,7 +152,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException ) MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), + throw DisposedException( OUString("object is already disposed"), static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -166,7 +166,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException ) sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( ) throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), + throw DisposedException( OUString("object is already disposed"), static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -187,12 +187,12 @@ void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardLi throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), + throw DisposedException( OUString("object is already disposed"), static_cast< XClipboardEx* >( this ) ); // check input parameter if ( !listener.is( ) ) - throw IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")), + throw IllegalArgumentException( OUString("empty reference"), static_cast< XClipboardEx* >( this ), 1 ); @@ -207,12 +207,12 @@ void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboar throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")), + throw DisposedException( OUString("object is already disposed"), static_cast< XClipboardEx* >( this ) ); // check input parameter if ( !listener.is( ) ) - throw IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")), + throw IllegalArgumentException( OUString("empty reference"), static_cast< XClipboardEx* >( this ), 1 ); @@ -291,7 +291,7 @@ void SAL_CALL CWinClipboard::disposing() OUString SAL_CALL CWinClipboard::getImplementationName( ) throw(RuntimeException) { - return OUString(RTL_CONSTASCII_USTRINGPARAM( WINCLIPBOARD_IMPL_NAME )); + return OUString( WINCLIPBOARD_IMPL_NAME ); } // ------------------------------------------------- diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index 499509e0e76a..49922a35707f 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -509,7 +509,7 @@ sal_Bool SAL_CALL CDOTransferable::compareDataFlavors( if ( !m_rXMimeCntFactory.is( ) ) { m_rXMimeCntFactory = Reference< XMimeContentTypeFactory >( m_SrvMgr->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory")) ), UNO_QUERY ); + OUString("com.sun.star.datatransfer.MimeContentTypeFactory") ), UNO_QUERY ); } OSL_ASSERT( m_rXMimeCntFactory.is( ) ); diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index 3c6ba1a76154..09abf8354d0a 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx @@ -75,11 +75,11 @@ const Type CPPUTYPE_OUSTRING = getCppuType((OUString*)0); const Type CPPUTYPE_SEQSALINT8 = getCppuType((Sequence< sal_Int8>*)0); const sal_Int32 MAX_CLIPFORMAT_NAME = 256; -const OUString TEXT_PLAIN_CHARSET (RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=")); -const OUString HPNAME_OEM_ANSI_TEXT (RTL_CONSTASCII_USTRINGPARAM("OEM/ANSI Text")); +const OUString TEXT_PLAIN_CHARSET ("text/plain;charset="); +const OUString HPNAME_OEM_ANSI_TEXT ("OEM/ANSI Text"); -const OUString HTML_FORMAT_NAME_WINDOWS (RTL_CONSTASCII_USTRINGPARAM("HTML Format")); -const OUString HTML_FORMAT_NAME_SOFFICE (RTL_CONSTASCII_USTRINGPARAM("HTML (HyperText Markup Language)")); +const OUString HTML_FORMAT_NAME_WINDOWS ("HTML Format"); +const OUString HTML_FORMAT_NAME_SOFFICE ("HTML (HyperText Markup Language")); //------------------------------------------------------------------------ // @@ -89,7 +89,7 @@ CDataFormatTranslator::CDataFormatTranslator( const Reference< XMultiServiceFact m_SrvMgr( aServiceManager ) { m_XDataFormatTranslator = Reference< XDataFormatTranslator >( - m_SrvMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.DataFormatTranslator")) ), UNO_QUERY ); + m_SrvMgr->createInstance( OUString("com.sun.star.datatransfer.DataFormatTranslator") ), UNO_QUERY ); } //------------------------------------------------------------------------ diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx index 3599da875e08..0083861b30e2 100644 --- a/dtrans/source/win32/dtobj/FetcList.cxx +++ b/dtrans/source/win32/dtobj/FetcList.cxx @@ -281,7 +281,7 @@ void SAL_CALL CFormatRegistrar::RegisterFormats( aFormatEtcContainer.addFormatEtc( fetc ); // and HTML Format - OUString htmlFormat( RTL_CONSTASCII_USTRINGPARAM("HTML Format") ); + OUString htmlFormat( "HTML Format" ); aFormatEtcContainer.addFormatEtc( m_DataFormatTranslator.getFormatEtcForClipformatName( htmlFormat ) ); } @@ -359,8 +359,7 @@ OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor& try { Reference< XMimeContentTypeFactory > xMimeFac( - m_SrvMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( \ - "com.sun.star.datatransfer.MimeContentTypeFactory" )) ), UNO_QUERY ); + m_SrvMgr->createInstance( OUString( "com.sun.star.datatransfer.MimeContentTypeFactory" ) ), UNO_QUERY ); if( xMimeFac.is( ) ) { diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index 31028ac97b3f..9c522c3fc358 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -455,7 +455,7 @@ void SAL_CALL CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium( FORMATETC& DataFlavor aFlavor; // creating a DataFlavor on the fly - aFlavor.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM("text/html")); + aFlavor.MimeType = OUString("text/html"); aFlavor.DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); Any aAny = m_XTransferable->getTransferData( aFlavor ); diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 7bd6966f3477..c73ab121af7e 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -55,10 +55,10 @@ #define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8 #define CPPUTYPE_OUSTR getCppuType( (const ::rtl::OUString*) 0 ) #define CPPUTYPE_SALINT32 getCppuType( ( sal_Int32 * ) 0 ) -#define OUSTR( str ) OUString(RTL_CONSTASCII_USTRINGPARAM( #str )) +#define OUSTR( str ) OUString( #str ) #define EMPTY_OUSTR OUString() -const rtl::OUString Windows_FormatName (RTL_CONSTASCII_USTRINGPARAM("windows_formatname")); +const rtl::OUString Windows_FormatName ("windows_formatname"); const com::sun::star::uno::Type CppuType_ByteSequence = ::getCppuType((const com::sun::star::uno::Sequence<sal_Int8>*)0); const com::sun::star::uno::Type CppuType_String = ::getCppuType((const ::rtl::OUString*)0); @@ -84,7 +84,7 @@ namespace MODULE_PRIVATE Sequence< OUString > SAL_CALL DataFormatTranslator_getSupportedServiceNames( ) { Sequence< OUString > aRet(1); - aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.DataFormatTranslator")); + aRet[0] = OUString("com.sun.star.datatransfer.DataFormatTranslator"); return aRet; } } @@ -231,7 +231,7 @@ DataFlavor SAL_CALL CDataFormatTranslator::getDataFlavorFromSystemDataType( cons OUString SAL_CALL CDataFormatTranslator::getImplementationName( ) throw( RuntimeException ) { - return OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME )); + return OUString( IMPL_NAME ); } // ------------------------------------------------- diff --git a/dtrans/source/win32/workbench/test_wincb.cxx b/dtrans/source/win32/workbench/test_wincb.cxx index 3801f67e321f..ac067865f1eb 100644 --- a/dtrans/source/win32/workbench/test_wincb.cxx +++ b/dtrans/source/win32/workbench/test_wincb.cxx @@ -163,7 +163,7 @@ private: CTransferable::CTransferable( ) : m_FlavorList( 1 ), - m_Data( OUString(RTL_CONSTASCII_USTRINGPARAM("Ich habe mir ein neues Fahrrad gekauft!")) ) + m_Data( OUString("Ich habe mir ein neues Fahrrad gekauft!") ) { DataFlavor df; @@ -269,7 +269,7 @@ int SAL_CALL main( int nArgc, char* Argv[] ) // get the global service-manager //------------------------------------------------- - OUString rdbName = OUString( RTL_CONSTASCII_USTRINGPARAM( RDB_SYSPATH ) ); + OUString rdbName = OUString( RDB_SYSPATH ); Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); // Print a message if an error occurred. |