summaryrefslogtreecommitdiff
path: root/dtrans/source/cnttype
diff options
context:
space:
mode:
authorGert Faller <gertfaller@aliceadsl.fr>2010-11-22 17:03:48 +0100
committerGert Faller <gertfaller@aliceadsl.fr>2010-11-22 17:03:48 +0100
commita23d54eed27736eda876e975c510d7b3c230c5b8 (patch)
treeac7f118911c831732893cbacca8e37195e7b00b6 /dtrans/source/cnttype
parent433b107ea2bcc5242ab515cb82a9e6954e0c899b (diff)
RTL_CONSTASCII_USTRINGPARAM in libs-gui 02
Diffstat (limited to 'dtrans/source/cnttype')
-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
3 files changed, 25 insertions, 25 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( ) )
{