[Libreoffice-commits] .: 2 commits - cppcanvas/source dtrans/source dtrans/test
Gert Faller
gfaller at kemper.freedesktop.org
Mon Nov 22 08:04:51 PST 2010
cppcanvas/source/mtfrenderer/emfplus.cxx | 10 ++++-----
cppcanvas/source/mtfrenderer/implrenderer.cxx | 18 ++++++++--------
dtrans/source/cnttype/mcnttfactory.cxx | 2 -
dtrans/source/cnttype/mcnttype.cxx | 28 +++++++++++++-------------
dtrans/source/cnttype/wbench/testcnttype.cxx | 20 +++++++++---------
dtrans/source/generic/clipboardmanager.cxx | 12 +++++------
dtrans/source/generic/generic_clipboard.cxx | 2 -
dtrans/source/os2/clipb/Os2Clipboard.cxx | 6 ++---
dtrans/source/os2/clipb/Os2Transferable.cxx | 6 ++---
dtrans/source/test/test_dtrans.cxx | 18 ++++++++--------
dtrans/source/win32/clipb/WinClipboard.cxx | 22 ++++++++++----------
dtrans/source/win32/dtobj/DOTransferable.cxx | 2 -
dtrans/source/win32/dtobj/DataFmtTransl.cxx | 10 ++++-----
dtrans/source/win32/dtobj/FetcList.cxx | 2 -
dtrans/source/win32/dtobj/XTDataObject.cxx | 2 -
dtrans/source/win32/ftransl/ftransl.cxx | 6 ++---
dtrans/source/win32/workbench/test_wincb.cxx | 2 -
dtrans/test/win32/dnd/targetlistener.cxx | 2 -
18 files changed, 85 insertions(+), 85 deletions(-)
New commits:
commit 41416241db299347cad9517addb3fde3c9e281c5
Author: Gert Faller <gertfaller at aliceadsl.fr>
Date: Mon Nov 22 17:03:48 2010 +0100
RTL_CONSTASCII_USTRINGPARAM in libs-gui 02
diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx
index 9ed538c..b656bc1 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 dff702d..87c52cd 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 c297203..7c2fe52 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 2ef87ec..76c7efa 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 604f177..a42cfb3 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 a43570b..d1016b3 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 5766285..4c4c528 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 ae10c4d..02ed79e 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 36f05be..31c6f50 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 630f08b..09ebef7 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 fe5845f..24897ff 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 00cd28c..ab6e758 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 ef961ff..a1aba1e 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 ce828d6..cd6f3a8 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 f548c03..ac181f2 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 93c65ea..86907eb 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);
commit 9ce1010ee6abeec08b4e842911b8e0f998eb75a3
Author: Gert Faller <gertfaller at aliceadsl.fr>
Date: Mon Nov 22 16:56:04 2010 +0100
RTL_CONSTASCII_USTRINGPARAM in libs-gui 01
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 02c9ca1..320c393 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1022,7 +1022,7 @@ namespace cppcanvas
EMFP_DEBUG (printf ("EMF+\t\tset gradient\n"));
basegfx::B2DRange aBoundsRectangle (0, 0, 1, 1);
if (brush->type == 4) {
- aGradientService = rtl::OUString::createFromAscii("LinearGradient");
+ aGradientService = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LinearGradient"));
basegfx::tools::createLinearODFGradientInfo( aGradInfo,
aBoundsRectangle,
aStops.getLength(),
@@ -1030,7 +1030,7 @@ namespace cppcanvas
0 );
} else {
- aGradientService = rtl::OUString::createFromAscii("EllipticalGradient");
+ aGradientService = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EllipticalGradient"));
basegfx::tools::createEllipticalODFGradientInfo( aGradInfo,
aBoundsRectangle,
::basegfx::B2DVector( 0, 0 ),
@@ -1045,13 +1045,13 @@ namespace cppcanvas
if( xFactory.is() ) {
uno::Sequence<uno::Any> args( 3 );
beans::PropertyValue aProp;
- aProp.Name = rtl::OUString::createFromAscii( "Colors" );
+ aProp.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Colors"));
aProp.Value <<= aColors;
args[0] <<= aProp;
- aProp.Name = rtl::OUString::createFromAscii( "Stops" );
+ aProp.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Stops"));
aProp.Value <<= aStops;
args[1] <<= aProp;
- aProp.Name = rtl::OUString::createFromAscii( "AspectRatio" );
+ aProp.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AspectRatio"));
aProp.Value <<= static_cast<sal_Int32>(1);
args[2] <<= aProp;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 4429ece..1a5e651 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -681,7 +681,7 @@ namespace cppcanvas
// map odf to svg gradient orientation - x
// instead of y direction
aGradInfo.maTextureTransform = aGradInfo.maTextureTransform * aRot90;
- aGradientService = rtl::OUString::createFromAscii("LinearGradient");
+ aGradientService = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LinearGradient"));
break;
case GRADIENT_AXIAL:
@@ -701,7 +701,7 @@ namespace cppcanvas
aShift.translate(-0.5,0);
aGradInfo.maTextureTransform = aGradInfo.maTextureTransform * aShift;
- aGradientService = rtl::OUString::createFromAscii("LinearGradient");
+ aGradientService = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LinearGradient"));
break;
}
@@ -711,7 +711,7 @@ namespace cppcanvas
aOffset,
nSteps,
fBorder);
- aGradientService = rtl::OUString::createFromAscii("EllipticalGradient");
+ aGradientService = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EllipticalGradient"));
break;
case GRADIENT_ELLIPTICAL:
@@ -721,7 +721,7 @@ namespace cppcanvas
nSteps,
fBorder,
fRotation);
- aGradientService = rtl::OUString::createFromAscii("EllipticalGradient");
+ aGradientService = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EllipticalGradient"));
break;
case GRADIENT_SQUARE:
@@ -731,7 +731,7 @@ namespace cppcanvas
nSteps,
fBorder,
fRotation);
- aGradientService = rtl::OUString::createFromAscii("RectangularGradient");
+ aGradientService = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RectangularGradient"));
break;
case GRADIENT_RECT:
@@ -741,7 +741,7 @@ namespace cppcanvas
nSteps,
fBorder,
fRotation);
- aGradientService = rtl::OUString::createFromAscii("RectangularGradient");
+ aGradientService = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RectangularGradient"));
break;
default:
@@ -764,13 +764,13 @@ namespace cppcanvas
uno::Sequence<uno::Any> args(3);
beans::PropertyValue aProp;
- aProp.Name = rtl::OUString::createFromAscii("Colors");
+ aProp.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Colors"));
aProp.Value <<= aColors;
args[0] <<= aProp;
- aProp.Name = rtl::OUString::createFromAscii("Stops");
+ aProp.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Stops"));
aProp.Value <<= aStops;
args[1] <<= aProp;
- aProp.Name = rtl::OUString::createFromAscii("AspectRatio");
+ aProp.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AspectRatio"));
aProp.Value <<= aGradInfo.mfAspectRatio;
args[2] <<= aProp;
More information about the Libreoffice-commits
mailing list