summaryrefslogtreecommitdiff
path: root/dtrans/source/win32
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-06-01 09:39:35 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-06-01 09:41:50 -0500
commitdf9ecb71c7b2622a082849b556dba5008d271b6a (patch)
tree3b111d581fdddc854ffb8b28fd86b7561ca16be2 /dtrans/source/win32
parenta30795ce516b273a3a56a136b9b8802a23dd632a (diff)
targeted string re-work
Change-Id: I44518bb1b464bb0b458c0b5f1c249ef160ea3b26
Diffstat (limited to 'dtrans/source/win32')
-rw-r--r--dtrans/source/win32/clipb/WinClipboard.cxx24
-rw-r--r--dtrans/source/win32/dtobj/DOTransferable.cxx2
-rw-r--r--dtrans/source/win32/dtobj/DataFmtTransl.cxx10
-rw-r--r--dtrans/source/win32/dtobj/FetcList.cxx5
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.cxx2
-rw-r--r--dtrans/source/win32/ftransl/ftransl.cxx8
-rw-r--r--dtrans/source/win32/workbench/test_wincb.cxx4
7 files changed, 27 insertions, 28 deletions
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.