summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dtrans/source/cnttype/mcnttfactory.cxx2
-rw-r--r--dtrans/source/cnttype/mcnttype.cxx28
-rw-r--r--dtrans/source/cnttype/wbench/testcnttype.cxx20
-rw-r--r--dtrans/source/generic/clipboardmanager.cxx12
-rw-r--r--dtrans/source/generic/generic_clipboard.cxx2
-rw-r--r--dtrans/source/os2/clipb/Os2Clipboard.cxx6
-rw-r--r--dtrans/source/os2/clipb/Os2Transferable.cxx6
-rw-r--r--dtrans/source/test/test_dtrans.cxx18
-rw-r--r--dtrans/source/win32/clipb/WinClipboard.cxx22
-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.cxx2
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.cxx2
-rw-r--r--dtrans/source/win32/ftransl/ftransl.cxx6
-rw-r--r--dtrans/source/win32/workbench/test_wincb.cxx2
-rw-r--r--dtrans/test/win32/dnd/targetlistener.cxx2
16 files changed, 71 insertions, 71 deletions
diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx
index 3197ed8b050b..13e650ec8f42 100644
--- a/dtrans/source/cnttype/mcnttfactory.cxx
+++ b/dtrans/source/cnttype/mcnttfactory.cxx
@@ -62,7 +62,7 @@ namespace
Sequence< OUString > SAL_CALL MimeContentTypeFactory_getSupportedServiceNames( )
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.MimeContentTypeFactory");
+ aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory"));
return aRet;
}
}
diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx
index 98518ea59508..021e0c75d45f 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -50,9 +50,9 @@ using namespace osl;
//------------------------------------------------------------------------
const OUString TSPECIALS = OUString::createFromAscii( "()<>@,;:\\\"/[]?=" );
-const OUString TOKEN = OUString::createFromAscii( "!#$%&'*+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~." );
-const OUString SPACE = OUString::createFromAscii( " " );
-const OUString SEMICOLON = OUString::createFromAscii( ";" );
+const OUString TOKEN (RTL_CONSTASCII_USTRINGPARAM("!#$%&'*+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~."));
+const OUString SPACE (RTL_CONSTASCII_USTRINGPARAM(" "));
+const OUString SEMICOLON (RTL_CONSTASCII_USTRINGPARAM(";"));
//------------------------------------------------------------------------
// ctor
@@ -87,7 +87,7 @@ OUString SAL_CALL CMimeContentType::getMediaSubtype( ) throw(RuntimeException)
OUString SAL_CALL CMimeContentType::getFullMediaType( ) throw(RuntimeException)
{
- return m_MediaType + OUString::createFromAscii( "/" ) + m_MediaSubtype;
+ return m_MediaType + OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + m_MediaSubtype;
}
//------------------------------------------------------------------------
@@ -206,7 +206,7 @@ void SAL_CALL CMimeContentType::type( void )
{
if ( isInRange( m_nxtSym, TOKEN ) )
m_MediaType += m_nxtSym;
- else if ( isInRange( m_nxtSym, OUString::createFromAscii( "/ " ) ) )
+ else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("/ ")) ) )
break;
else
throw IllegalArgumentException( );
@@ -215,7 +215,7 @@ void SAL_CALL CMimeContentType::type( void )
// check FOLLOW( type )
skipSpaces( );
- acceptSym( OUString::createFromAscii( "/" ) );
+ acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM("/")) );
subtype( );
}
@@ -236,7 +236,7 @@ void SAL_CALL CMimeContentType::subtype( void )
{
if ( isInRange( m_nxtSym, TOKEN ) )
m_MediaSubtype += m_nxtSym;
- else if ( isInRange( m_nxtSym, OUString::createFromAscii( "; " ) ) )
+ else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("; ")) ) )
break;
else
throw IllegalArgumentException( );
@@ -256,13 +256,13 @@ void SAL_CALL CMimeContentType::trailer( void )
{
while( m_nxtSym.getLength( ) )
{
- if ( m_nxtSym == OUString::createFromAscii( "(" ) )
+ if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM("(")) )
{
getSym( );
comment( );
- acceptSym( OUString::createFromAscii( ")" ) );
+ acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM(")")) );
}
- else if ( m_nxtSym == OUString::createFromAscii( ";" ) )
+ else if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM(";")) )
{
// get the parameter name
getSym( );
@@ -274,7 +274,7 @@ void SAL_CALL CMimeContentType::trailer( void )
OUString pname = pName( );
skipSpaces();
- acceptSym( OUString::createFromAscii( "=" ) );
+ acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM("=")) );
// get the parameter value
skipSpaces( );
@@ -304,7 +304,7 @@ OUString SAL_CALL CMimeContentType::pName( )
{
if ( isInRange( m_nxtSym, TOKEN ) )
pname += m_nxtSym;
- else if ( isInRange( m_nxtSym, OUString::createFromAscii( "= " ) ) )
+ else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("= ")) ) )
break;
else
throw IllegalArgumentException( );
@@ -391,7 +391,7 @@ OUString SAL_CALL CMimeContentType::nonquotedPValue( )
{
if ( isInRange( m_nxtSym, TOKEN ) )
pvalue += m_nxtSym;
- else if ( isInRange( m_nxtSym, OUString::createFromAscii( "; " ) ) )
+ else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("; ")) ) )
break;
else
throw IllegalArgumentException( );
@@ -411,7 +411,7 @@ void SAL_CALL CMimeContentType::comment( void )
{
if ( isInRange( m_nxtSym, TOKEN + SPACE ) )
getSym( );
- else if ( m_nxtSym == OUString::createFromAscii( ")" ) )
+ else if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM(")")) )
break;
else
throw IllegalArgumentException( );
diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx
index dc569a8446d1..5013ff8b714e 100644
--- a/dtrans/source/cnttype/wbench/testcnttype.cxx
+++ b/dtrans/source/cnttype/wbench/testcnttype.cxx
@@ -97,7 +97,7 @@ void CheckMimeContentType( const OUString& aCntType, const OUString& aType, cons
pvalue = xMimeCntType->getParameterValue( param );
}
- pvalue = xMimeCntType->getParameterValue( OUString::createFromAscii( "aparam" ) );
+ pvalue = xMimeCntType->getParameterValue( OUString(RTL_CONSTASCII_USTRINGPARAM("aparam")) );
}
catch( IllegalArgumentException& )
{
@@ -181,32 +181,32 @@ sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& v
Reference< XMimeContentType > xMCntTyp = cnttypeFactory->createMimeContentType( OUString::createFromAscii( iter->c_str( ) ) );
- fwprintf( fstream, OUString::createFromAscii( "Type: %s\n" ), xMCntTyp->getMediaType( ).getStr( ) );
- fwprintf( fstream, OUString::createFromAscii( "Subtype: %s\n" ), xMCntTyp->getMediaSubtype( ).getStr( ) );
+ fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Type: %s\n")), xMCntTyp->getMediaType( ).getStr( ) );
+ fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("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::createFromAscii("PName: %s\n" ), seqParam[i].getStr( ) );
- fwprintf( fstream, OUString::createFromAscii("PValue: %s\n" ), xMCntTyp->getParameterValue( seqParam[i] ).getStr( ) );
+ 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( ) );
}
}
catch( IllegalArgumentException& ex )
{
- fwprintf( fstream, OUString::createFromAscii( "Fehlerhafter Content-Type gelesen!!!\n\n" ) );
+ fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Fehlerhafter Content-Type gelesen!!!\n\n")) );
}
catch( NoSuchElementException& )
{
- fwprintf( fstream, OUString::createFromAscii( "Parameterwert nicht vorhanden\n" ) );
+ fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Parameterwert nicht vorhanden\n")) );
}
catch( ... )
{
- fwprintf( fstream, OUString::createFromAscii( "Unbekannter Fehler!!!\n\n" ) );
+ fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Unbekannter Fehler!!!\n\n")) );
}
- fwprintf( fstream, OUString::createFromAscii( "\n#############################################\n\n" ) );
+ fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("\n#############################################\n\n")) );
}
fclose( fstream );
@@ -246,7 +246,7 @@ int SAL_CALL main( int nArgc, char* argv[] )
}
Reference< XMimeContentTypeFactory >
- xMCntTypeFactory( g_xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.MimeContentTypeFactory" ) ), UNO_QUERY );
+ xMCntTypeFactory( g_xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("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 1221cd20f046..99b6a7b24b36 100644
--- a/dtrans/source/generic/clipboardmanager.cxx
+++ b/dtrans/source/generic/clipboardmanager.cxx
@@ -48,7 +48,7 @@ using ::rtl::OUString;
ClipboardManager::ClipboardManager():
WeakComponentImplHelper3< XClipboardManager, XEventListener, XServiceInfo > (m_aMutex),
- m_aDefaultName(OUString::createFromAscii("default"))
+ m_aDefaultName(OUString(RTL_CONSTASCII_USTRINGPARAM("default")))
{
}
@@ -97,7 +97,7 @@ Reference< XClipboard > SAL_CALL ClipboardManager::getClipboard( const OUString&
// object is disposed already
if (rBHelper.bDisposed)
- throw DisposedException(OUString::createFromAscii("object is disposed."),
+ throw DisposedException(OUString(RTL_CONSTASCII_USTRINGPARAM("object is disposed.")),
static_cast < XClipboardManager * > (this));
ClipboardMap::iterator iter =
@@ -118,13 +118,13 @@ void SAL_CALL ClipboardManager::addClipboard( const Reference< XClipboard >& xCl
// check parameter
if (!xClipboard.is())
- throw IllegalArgumentException(OUString::createFromAscii("empty reference"),
+ throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("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::createFromAscii("name reserved"),
+ throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("name reserved")),
static_cast < XClipboardManager * > (this), 1);
// try to add new clipboard to the list
@@ -167,7 +167,7 @@ Sequence< OUString > SAL_CALL ClipboardManager::listClipboardNames()
MutexGuard aGuard(m_aMutex);
if (rBHelper.bDisposed)
- throw DisposedException(OUString::createFromAscii("object is disposed."),
+ throw DisposedException(OUString(RTL_CONSTASCII_USTRINGPARAM("object is disposed.")),
static_cast < XClipboardManager * > (this));
if (rBHelper.bInDispose)
@@ -257,7 +257,7 @@ Sequence< OUString > SAL_CALL ClipboardManager_getSupportedServiceNames()
{
Sequence < OUString > SupportedServicesNames( 1 );
SupportedServicesNames[0] =
- OUString::createFromAscii("com.sun.star.datatransfer.clipboard.ClipboardManager");
+ OUString(RTL_CONSTASCII_USTRINGPARAM("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 eacab35dc9f6..bec52b9c5b3f 100644
--- a/dtrans/source/generic/generic_clipboard.cxx
+++ b/dtrans/source/generic/generic_clipboard.cxx
@@ -193,7 +193,7 @@ void SAL_CALL GenericClipboard::removeClipboardListener( const Reference< XClipb
Sequence< OUString > SAL_CALL GenericClipboard_getSupportedServiceNames()
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.clipboard.GenericClipboard");
+ aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboard"));
return aRet;
}
diff --git a/dtrans/source/os2/clipb/Os2Clipboard.cxx b/dtrans/source/os2/clipb/Os2Clipboard.cxx
index 8ac20f9db56e..18f68fec9897 100644
--- a/dtrans/source/os2/clipb/Os2Clipboard.cxx
+++ b/dtrans/source/os2/clipb/Os2Clipboard.cxx
@@ -237,10 +237,10 @@ void SAL_CALL Os2Clipboard::setContents( const Reference< XTransferable >& xTran
#endif
// we can only export text or bitmap
- DataFlavor nFlavorText( OUString::createFromAscii( "text/plain;charset=utf-16" ),
- OUString::createFromAscii( "Unicode-Text" ), CPPUTYPE_OUSTRING);
+ DataFlavor nFlavorText( OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Unicode-Text")), CPPUTYPE_OUSTRING);
DataFlavor nFlavorBitmap( OUString::createFromAscii( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ),
- OUString::createFromAscii( "Bitmap" ), CPPUTYPE_DEFAULT);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Bitmap")), CPPUTYPE_DEFAULT);
// try text transfer data (if any)
PSZ pSharedText = NULL;
diff --git a/dtrans/source/os2/clipb/Os2Transferable.cxx b/dtrans/source/os2/clipb/Os2Transferable.cxx
index 5028799715dc..410e60ee7de4 100644
--- a/dtrans/source/os2/clipb/Os2Transferable.cxx
+++ b/dtrans/source/os2/clipb/Os2Transferable.cxx
@@ -60,7 +60,7 @@ Os2Transferable::Os2Transferable(
{
ULONG handle = UWinQueryClipbrdData( hAB, UCLIP_CF_UNICODETEXT);
if (handle) {
- aFlavor.MimeType = OUString::createFromAscii( "text/plain;charset=utf-16" );
+ aFlavor.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16"));
aFlavor.DataType = getCppuType( (OUString*)0 );
//debug_printf("Os2Transferable::Os2Transferable pszText %s\n", pszText);
}
@@ -97,7 +97,7 @@ Any SAL_CALL Os2Transferable::getTransferData( const DataFlavor& rFlavor )
Sequence< sal_Int8 > aData;
// retrieve unicode text
- if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString::createFromAscii( "text/plain;charset=utf-16" ) ) )
+ if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16")) ) )
{
if( UWinOpenClipbrd( hAB ) )
{
@@ -161,7 +161,7 @@ sal_Bool SAL_CALL Os2Transferable::isDataFlavorSupported( const DataFlavor& aFla
if( aFlavor.DataType != getCppuType( (Sequence< sal_Int8 >*)0 ) )
{
- if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( OUString::createFromAscii( "text/plain;charset=utf-16" ) ) &&
+ if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16")) ) &&
aFlavor.DataType == getCppuType( (OUString*)0 ) )
return false;
}
diff --git a/dtrans/source/test/test_dtrans.cxx b/dtrans/source/test/test_dtrans.cxx
index 430c63071228..3bb0966e286d 100644
--- a/dtrans/source/test/test_dtrans.cxx
+++ b/dtrans/source/test/test_dtrans.cxx
@@ -236,7 +236,7 @@ private:
StringTransferable::StringTransferable( ) :
m_seqDFlv( 1 ),
m_receivedLostOwnership( sal_False ),
- m_Data( OUString::createFromAscii("clipboard test content") )
+ m_Data( OUString(RTL_CONSTASCII_USTRINGPARAM("clipboard test content")) )
{
DataFlavor df;
@@ -248,7 +248,7 @@ StringTransferable::StringTransferable( ) :
*/
//df.MimeType = L"text/plain; charset=windows1252";
- df.MimeType = OUString::createFromAscii( "text/html" );
+ df.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM("text/html"));
df.DataType = getCppuType( ( Sequence< sal_Int8 >* )0 );
m_seqDFlv[0] = df;
@@ -359,10 +359,10 @@ int SAL_CALL main( int argc, const char* argv[] )
//--------------------------------------------------------------
Sequence< Any > arguments(1);
- arguments[0] = makeAny( OUString::createFromAscii( "generic" ) );
+ arguments[0] = makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) );
Reference< XClipboard > xClipboard( xServiceManager->createInstanceWithArguments(
- OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboard" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboard")),
arguments ), UNO_QUERY );
ENSURE( xClipboard.is(), "*** ERROR *** generic clipboard service could not be created." );
@@ -442,7 +442,7 @@ int SAL_CALL main( int argc, const char* argv[] )
//--------------------------------------------------------------
Reference< XClipboardManager > xClipboardManager( xServiceManager->createInstance(
- OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.ClipboardManager" ) ), UNO_QUERY );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.ClipboardManager")) ), UNO_QUERY );
ENSURE( xClipboardManager.is(), "*** ERROR *** clipboard manager service could not be created." );
@@ -455,14 +455,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::createFromAscii( "generic" ) );
- TEST( "inserted clipboard instance: ", xClipboardManager->getClipboard( OUString::createFromAscii( "generic" ) ) == xClipboard );
- PERFORM( "removal of generic clipboard: ", xClipboardManager->removeClipboard( OUString::createFromAscii( "generic" ) ) );
+ 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( "number of inserted clipboards (0): ", xClipboardManager->listClipboardNames().getLength() == 0 );
TRACE( "Testing inserted clipboard instance (none): " );
try
{
- xClipboardManager->getClipboard( OUString::createFromAscii( "generic" ) );
+ xClipboardManager->getClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) );
TRACE( "FAILED\n" );
}
catch( NoSuchElementException e )
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx
index 8439040a6337..48f60629905a 100644
--- a/dtrans/source/win32/clipb/WinClipboard.cxx
+++ b/dtrans/source/win32/clipb/WinClipboard.cxx
@@ -68,7 +68,7 @@ namespace
Sequence< OUString > SAL_CALL WinClipboard_getSupportedServiceNames()
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.clipboard.SystemClipboard");
+ aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.SystemClipboard"));
return aRet;
}
}
@@ -102,7 +102,7 @@ Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw( Runtime
MutexGuard aGuard( m_aMutex );
if ( rBHelper.bDisposed )
- throw DisposedException( OUString::createFromAscii( "object is already disposed" ),
+ throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
static_cast< XClipboardEx* >( this ) );
if ( NULL != m_pImpl.get( ) )
@@ -122,7 +122,7 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra
MutexGuard aGuard( m_aMutex );
if ( rBHelper.bDisposed )
- throw DisposedException( OUString::createFromAscii( "object is already disposed" ),
+ throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
static_cast< XClipboardEx* >( this ) );
if ( NULL != m_pImpl.get( ) )
@@ -136,13 +136,13 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra
OUString SAL_CALL CWinClipboard::getName( ) throw( RuntimeException )
{
if ( rBHelper.bDisposed )
- throw DisposedException( OUString::createFromAscii( "object is already disposed" ),
+ throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
static_cast< XClipboardEx* >( this ) );
if ( NULL != m_pImpl.get( ) )
return m_pImpl->getName( );
- return OUString::createFromAscii( "" );
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(""));
}
//========================================================================
@@ -154,7 +154,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException )
MutexGuard aGuard( m_aMutex );
if ( rBHelper.bDisposed )
- throw DisposedException( OUString::createFromAscii( "object is already disposed" ),
+ throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
static_cast< XClipboardEx* >( this ) );
if ( NULL != m_pImpl.get( ) )
@@ -168,7 +168,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException )
sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( ) throw( RuntimeException )
{
if ( rBHelper.bDisposed )
- throw DisposedException( OUString::createFromAscii( "object is already disposed" ),
+ throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
static_cast< XClipboardEx* >( this ) );
if ( NULL != m_pImpl.get( ) )
@@ -189,12 +189,12 @@ void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardLi
throw( RuntimeException )
{
if ( rBHelper.bDisposed )
- throw DisposedException( OUString::createFromAscii( "object is already disposed" ),
+ throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
static_cast< XClipboardEx* >( this ) );
// check input parameter
if ( !listener.is( ) )
- throw IllegalArgumentException( OUString::createFromAscii( "empty reference" ),
+ throw IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")),
static_cast< XClipboardEx* >( this ),
1 );
@@ -209,12 +209,12 @@ void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboar
throw( RuntimeException )
{
if ( rBHelper.bDisposed )
- throw DisposedException( OUString::createFromAscii( "object is already disposed" ),
+ throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
static_cast< XClipboardEx* >( this ) );
// check input parameter
if ( !listener.is( ) )
- throw IllegalArgumentException( OUString::createFromAscii( "empty reference" ),
+ throw IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")),
static_cast< XClipboardEx* >( this ),
1 );
diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx
index 5c051da5678d..11d963da3093 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.cxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.cxx
@@ -502,7 +502,7 @@ sal_Bool SAL_CALL CDOTransferable::compareDataFlavors(
if ( !m_rXMimeCntFactory.is( ) )
{
m_rXMimeCntFactory = Reference< XMimeContentTypeFactory >( m_SrvMgr->createInstance(
- OUString::createFromAscii( "com.sun.star.datatransfer.MimeContentTypeFactory" ) ), UNO_QUERY );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("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 c832a7a24996..6ed4450333f4 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx
+++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
@@ -77,11 +77,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 = OUString::createFromAscii( "text/plain;charset=" );
-const OUString HPNAME_OEM_ANSI_TEXT = OUString::createFromAscii( "OEM/ANSI Text" );
+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 HTML_FORMAT_NAME_WINDOWS = OUString::createFromAscii( "HTML Format" );
-const OUString HTML_FORMAT_NAME_SOFFICE = OUString::createFromAscii( "HTML (HyperText Markup Language)" );
+const OUString HTML_FORMAT_NAME_WINDOWS (RTL_CONSTASCII_USTRINGPARAM("HTML Format"));
+const OUString HTML_FORMAT_NAME_SOFFICE (RTL_CONSTASCII_USTRINGPARAM("HTML (HyperText Markup Language)"));
//------------------------------------------------------------------------
//
@@ -91,7 +91,7 @@ CDataFormatTranslator::CDataFormatTranslator( const Reference< XMultiServiceFact
m_SrvMgr( aServiceManager )
{
m_XDataFormatTranslator = Reference< XDataFormatTranslator >(
- m_SrvMgr->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.DataFormatTranslator" ) ), UNO_QUERY );
+ m_SrvMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.DataFormatTranslator")) ), UNO_QUERY );
}
//------------------------------------------------------------------------
diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx
index 2364a0a14341..98f88db21ea0 100644
--- a/dtrans/source/win32/dtobj/FetcList.cxx
+++ b/dtrans/source/win32/dtobj/FetcList.cxx
@@ -283,7 +283,7 @@ void SAL_CALL CFormatRegistrar::RegisterFormats(
aFormatEtcContainer.addFormatEtc( fetc );
// and HTML Format
- OUString htmlFormat( OUString::createFromAscii( "HTML Format" ) );
+ OUString htmlFormat( RTL_CONSTASCII_USTRINGPARAM("HTML Format") );
aFormatEtcContainer.addFormatEtc(
m_DataFormatTranslator.getFormatEtcForClipformatName( htmlFormat ) );
}
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index 16c0e0f0afd0..f2e1fd579f8e 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -454,7 +454,7 @@ void SAL_CALL CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium( FORMATETC&
DataFlavor aFlavor;
// creating a DataFlavor on the fly
- aFlavor.MimeType = OUString::createFromAscii( "text/html" );
+ aFlavor.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM("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 e27cefcc3f22..e7db01af1cb4 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -60,10 +60,10 @@
#define CPPUTYPE_SALINT32 getCppuType( ( sal_Int32 * ) 0 )
#define OUSTR( str ) OUString::createFromAscii( #str )
#define OUSTR_( str ) OUString::createFromAscii( str )
-#define EMPTY_OUSTR OUString::createFromAscii( "" )
+#define EMPTY_OUSTR OUString(RTL_CONSTASCII_USTRINGPARAM(""))
//#define PRIVATE_OO OUString::createFromAscii( "application/x-openoffice;" "windows_formatname=" )
-const rtl::OUString Windows_FormatName = rtl::OUString::createFromAscii("windows_formatname");
+const rtl::OUString Windows_FormatName (RTL_CONSTASCII_USTRINGPARAM("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);
@@ -89,7 +89,7 @@ namespace MODULE_PRIVATE
Sequence< OUString > SAL_CALL DataFormatTranslator_getSupportedServiceNames( )
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii("com.sun.star.datatransfer.DataFormatTranslator");
+ aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.DataFormatTranslator"));
return aRet;
}
}
diff --git a/dtrans/source/win32/workbench/test_wincb.cxx b/dtrans/source/win32/workbench/test_wincb.cxx
index 65118eed7fbd..ccfff019f461 100644
--- a/dtrans/source/win32/workbench/test_wincb.cxx
+++ b/dtrans/source/win32/workbench/test_wincb.cxx
@@ -168,7 +168,7 @@ private:
CTransferable::CTransferable( ) :
m_FlavorList( 1 ),
- m_Data( OUString::createFromAscii( "Ich habe mir ein neues Fahrrad gekauft!" ) )
+ m_Data( OUString(RTL_CONSTASCII_USTRINGPARAM("Ich habe mir ein neues Fahrrad gekauft!")) )
{
DataFlavor df;
diff --git a/dtrans/test/win32/dnd/targetlistener.cxx b/dtrans/test/win32/dnd/targetlistener.cxx
index 7b74d1cde55a..ecc70e472916 100644
--- a/dtrans/test/win32/dnd/targetlistener.cxx
+++ b/dtrans/test/win32/dnd/targetlistener.cxx
@@ -67,7 +67,7 @@ void SAL_CALL DropTargetListener::drop( const DropTargetDropEvent& e )
// for( int i=0; i < flavors.getLength(); i++)
// aFlavor= flavors[4];
- DataFlavor flavor( OUString(OUString::createFromAscii("text/plain;charset=windows-1252")),
+ DataFlavor flavor( OUString(OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=windows-1252"))),
OUString(L"Text plain"), getCppuType( ( Sequence<sal_Int8>*)0 ) );
Any anyData= e.Transferable->getTransferData( flavor);