summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-01-12 09:50:54 +0100
committerChr. Rossmanith <ChrRossmanith@gmx.de>2013-01-12 10:04:30 +0100
commit3c91d336bf92cc297bab70112a5c94ac26fa863b (patch)
tree63dd7f8a428a644b517698b02ce9f89c27e446a9 /vcl
parent08def320062ad7c5cf98e577a2af1fad7c8eb267 (diff)
RTL_CONSTASCII_(U)STRINGPARAM removed in vcl/generic
Change-Id: I9d1ebdba22dc59f4761b3ff53d6d5df02a3496e0
Diffstat (limited to 'vcl')
-rw-r--r--vcl/generic/app/gensys.cxx28
-rw-r--r--vcl/generic/fontmanager/fontcache.cxx19
-rw-r--r--vcl/generic/fontmanager/fontmanager.cxx60
-rw-r--r--vcl/generic/fontmanager/helper.cxx12
-rw-r--r--vcl/generic/print/common_gfx.cxx6
-rw-r--r--vcl/generic/print/genprnpsp.cxx44
-rw-r--r--vcl/generic/print/genpspgraphics.cxx4
-rw-r--r--vcl/generic/print/printerjob.cxx4
8 files changed, 86 insertions, 91 deletions
diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx
index a9f13f46dfd2..6144f37d7f24 100644
--- a/vcl/generic/app/gensys.cxx
+++ b/vcl/generic/app/gensys.cxx
@@ -86,12 +86,12 @@ SalGenericSystem::~SalGenericSystem()
{
}
-int SalGenericSystem::ShowNativeMessageBox( const rtl::OUString& rTitle, const rtl::OUString& rMessage,
+int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUString& rMessage,
int nButtonCombination, int nDefaultButton,
bool bUseResources )
{
int nDefButton = 0;
- std::list< rtl::OUString > aButtons;
+ std::list< OUString > aButtons;
int nButtonIds[5], nBut = 0;
ImplHideSplash();
@@ -157,18 +157,18 @@ const char* SalGenericSystem::getFrameResName()
* then try RESOURCE_NAME environment variable
* then use argv[0] stripped by directories
*/
- static rtl::OStringBuffer aResName;
+ static OStringBuffer aResName;
if( !aResName.getLength() )
{
int nArgs = osl_getCommandArgCount();
for( int n = 0; n < nArgs-1; n++ )
{
- rtl::OUString aArg;
+ OUString aArg;
if( ! osl_getCommandArg( n, &aArg.pData ) &&
- aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("-name")) &&
+ aArg.equalsIgnoreAsciiCase("-name") &&
! osl_getCommandArg( n+1, &aArg.pData ) )
{
- aResName.append( rtl::OUStringToOString( aArg, osl_getThreadTextEncoding() ) );
+ aResName.append( OUStringToOString( aArg, osl_getThreadTextEncoding() ) );
break;
}
}
@@ -186,26 +186,26 @@ const char* SalGenericSystem::getFrameResName()
const char* SalGenericSystem::getFrameClassName()
{
- static rtl::OStringBuffer aClassName;
+ static OStringBuffer aClassName;
if( !aClassName.getLength() )
{
- rtl::OUString aIni, aProduct;
- rtl::Bootstrap::get( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BRAND_BASE_DIR" ) ), aIni );
- aIni += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" SAL_CONFIGFILE( "bootstrap" ) ) );
+ OUString aIni, aProduct;
+ rtl::Bootstrap::get( "BRAND_BASE_DIR", aIni );
+ aIni += OUString("/program/") + SAL_CONFIGFILE( "bootstrap" );
rtl::Bootstrap aBootstrap( aIni );
- aBootstrap.getFrom( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ProductKey" ) ), aProduct );
+ aBootstrap.getFrom( "ProductKey", aProduct );
if( !aProduct.isEmpty() )
- aClassName.append( rtl::OUStringToOString( aProduct, osl_getThreadTextEncoding() ) );
+ aClassName.append( OUStringToOString( aProduct, osl_getThreadTextEncoding() ) );
else
aClassName.append( "VCLSalFrame" );
}
return aClassName.getStr();
}
-rtl::OString SalGenericSystem::getFrameResName( SalExtStyle nStyle )
+OString SalGenericSystem::getFrameResName( SalExtStyle nStyle )
{
- rtl::OStringBuffer aBuf( 64 );
+ OStringBuffer aBuf( 64 );
aBuf.append( getFrameResName() );
if( (nStyle & SAL_FRAME_EXT_STYLE_DOCUMENT) )
aBuf.append( ".DocumentWindow" );
diff --git a/vcl/generic/fontmanager/fontcache.cxx b/vcl/generic/fontmanager/fontcache.cxx
index c8a9df10d060..ea5cc3518473 100644
--- a/vcl/generic/fontmanager/fontcache.cxx
+++ b/vcl/generic/fontmanager/fontcache.cxx
@@ -109,7 +109,7 @@ void FontCache::flush()
}
aStream.SetLineDelimiter( LINEEND_LF );
- aStream.WriteLine(rtl::OString(RTL_CONSTASCII_STRINGPARAM(CACHE_MAGIC)));
+ aStream.WriteLine( CACHE_MAGIC );
PrintFontManager& rManager( PrintFontManager::get() );
MultiAtomProvider* pAtoms = rManager.m_pAtoms;
@@ -119,13 +119,12 @@ void FontCache::flush()
const FontDirMap& rDir( dir_it->second.m_aEntries );
rtl::OString aDirectory(rManager.getDirectory(dir_it->first));
- rtl::OStringBuffer aLine(
- RTL_CONSTASCII_STRINGPARAM("FontCacheDirectory:"));
+ rtl::OStringBuffer aLine("FontCacheDirectory:");
aLine.append(dir_it->second.m_nTimestamp);
aLine.append(':');
aLine.append(aDirectory);
if( rDir.empty() && dir_it->second.m_bNoFiles )
- aLine.insert(0, RTL_CONSTASCII_STRINGPARAM("Empty"));
+ aLine.insert(0, "Empty");
aStream.WriteLine(aLine.makeStringAndClear());
for( FontDirMap::const_iterator entry_it = rDir.begin(); entry_it != rDir.end(); ++entry_it )
@@ -135,7 +134,7 @@ void FontCache::flush()
if( rEntry.begin() == rEntry.end() )
continue;
- aLine.append(RTL_CONSTASCII_STRINGPARAM("File:"));
+ aLine.append("File:");
aLine.append(entry_it->first);
aStream.WriteLine(aLine.makeStringAndClear());
@@ -254,7 +253,7 @@ void FontCache::read()
OString aLine;
aStream.ReadLine( aLine );
- if (!aLine.equalsL(RTL_CONSTASCII_STRINGPARAM(CACHE_MAGIC)))
+ if ( !(aLine == CACHE_MAGIC) )
{
#if OSL_DEBUG_LEVEL >1
fprintf( stderr, "FontCache::read: cache file %s fails magic test\n", rtl::OUStringToOString(m_aCacheFile, osl_getThreadTextEncoding()).getStr() );
@@ -268,10 +267,10 @@ void FontCache::read()
do
{
aStream.ReadLine( aLine );
- if( aLine.compareTo( RTL_CONSTASCII_STRINGPARAM( "FontCacheDirectory:" ) ) == 0 ||
- aLine.compareTo( RTL_CONSTASCII_STRINGPARAM( "EmptyFontCacheDirectory:" ) ) == 0 )
+ if( aLine.compareTo( "FontCacheDirectory:" ) == 0 ||
+ aLine.compareTo( "EmptyFontCacheDirectory:" ) == 0 )
{
- bool bEmpty = (aLine.compareTo( RTL_CONSTASCII_STRINGPARAM ("Empty" ) ) == 0);
+ bool bEmpty = (aLine.compareTo( "Empty" ) == 0);
sal_Int32 nSearchIndex = bEmpty ? 24 : 19;
OString aDir;
@@ -313,7 +312,7 @@ void FontCache::read()
m_aCache[ nDir ].m_bUserOverrideOnly = bKeepOnlyUserOverridden;
}
}
- else if( pDir && aLine.compareTo( RTL_CONSTASCII_STRINGPARAM( "File:" ) ) == 0 )
+ else if( pDir && aLine.compareTo( "File:" ) == 0 )
{
OString aFile( aLine.copy( 5 ) );
aStream.ReadLine( aLine );
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index aa84fc749d34..f2ccc291d0c1 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -124,34 +124,34 @@ inline sal_uInt32 getUInt32BE( const sal_uInt8*& pBuffer )
static FontWeight parseWeight( const rtl::OString& rWeight )
{
FontWeight eWeight = WEIGHT_DONTKNOW;
- if (rWeight.indexOfL(RTL_CONSTASCII_STRINGPARAM("bold") ) != -1)
+ if (rWeight.indexOf("bold") != -1)
{
- if (rWeight.indexOfL(RTL_CONSTASCII_STRINGPARAM("emi")) != -1) // semi, demi
+ if (rWeight.indexOf("emi") != -1) // semi, demi
eWeight = WEIGHT_SEMIBOLD;
- else if (rWeight.indexOfL(RTL_CONSTASCII_STRINGPARAM("ultra")) != -1)
+ else if (rWeight.indexOf("ultra") != -1)
eWeight = WEIGHT_ULTRABOLD;
else
eWeight = WEIGHT_BOLD;
}
- else if (rWeight.indexOfL(RTL_CONSTASCII_STRINGPARAM("heavy")) != -1)
+ else if (rWeight.indexOf("heavy") != -1)
eWeight = WEIGHT_BOLD;
- else if (rWeight.indexOfL(RTL_CONSTASCII_STRINGPARAM("light")) != -1)
+ else if (rWeight.indexOf("light") != -1)
{
- if (rWeight.indexOfL(RTL_CONSTASCII_STRINGPARAM("emi")) != -1) // semi, demi
+ if (rWeight.indexOf("emi") != -1) // semi, demi
eWeight = WEIGHT_SEMILIGHT;
- else if (rWeight.indexOfL(RTL_CONSTASCII_STRINGPARAM("ultra")) != -1)
+ else if (rWeight.indexOf("ultra") != -1)
eWeight = WEIGHT_ULTRALIGHT;
else
eWeight = WEIGHT_LIGHT;
}
- else if (rWeight.indexOfL(RTL_CONSTASCII_STRINGPARAM("black")) != -1)
+ else if (rWeight.indexOf("black") != -1)
eWeight = WEIGHT_BLACK;
- else if (rWeight.equalsL(RTL_CONSTASCII_STRINGPARAM("demi")))
+ else if (rWeight == "demi")
eWeight = WEIGHT_SEMIBOLD;
- else if (rWeight.equalsL(RTL_CONSTASCII_STRINGPARAM("book")) ||
- rWeight.equalsL(RTL_CONSTASCII_STRINGPARAM("semicondensed")))
+ else if ((rWeight == "book") ||
+ (rWeight == "semicondensed"))
eWeight = WEIGHT_LIGHT;
- else if (rWeight.equalsL(RTL_CONSTASCII_STRINGPARAM("medium")) || rWeight.equalsL(RTL_CONSTASCII_STRINGPARAM("roman")))
+ else if ((rWeight == "medium") || (rWeight == "roman"))
eWeight = WEIGHT_MEDIUM;
else
eWeight = WEIGHT_NORMAL;
@@ -544,14 +544,10 @@ static bool familyNameOverride( const OUString& i_rPSname, OUString& o_rFamilyNa
static boost::unordered_map< OUString, OUString, OUStringHash > aPSNameToFamily( 16 );
if( aPSNameToFamily.empty() ) // initialization
{
- aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow" ) ) ] =
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) );
- aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow-Bold" ) ) ] =
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) );
- aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow-BoldOblique" ) ) ] =
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) );
- aPSNameToFamily[ OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica-Narrow-Oblique" ) ) ] =
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Helvetica Narrow" ) );
+ aPSNameToFamily[ "Helvetica-Narrow" ] = "Helvetica Narrow";
+ aPSNameToFamily[ "Helvetica-Narrow-Bold" ] = "Helvetica Narrow";
+ aPSNameToFamily[ "Helvetica-Narrow-BoldOblique" ] = "Helvetica Narrow";
+ aPSNameToFamily[ "Helvetica-Narrow-Oblique" ] = "Helvetica Narrow";
}
boost::unordered_map<OUString,OUString,OUStringHash>::const_iterator it =
aPSNameToFamily.find( i_rPSname );
@@ -1110,15 +1106,15 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, ::
if (eFormat == UNKNOWN)
{
rtl::OString aExt( rFontFile.copy( rFontFile.lastIndexOf( '.' )+1 ) );
- if( aExt.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("pfb")) || aExt.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("pfa")) )
+ if( aExt.equalsIgnoreAsciiCase("pfb") || aExt.equalsIgnoreAsciiCase("pfa") )
eFormat = TYPE1;
- else if( aExt.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("afm")))
+ else if( aExt.equalsIgnoreAsciiCase("afm"))
eFormat = AFM;
- else if( aExt.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("ttf"))
- || aExt.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("ttc"))
- || aExt.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("tte")) ) // #i33947# for Gaiji support
+ else if( aExt.equalsIgnoreAsciiCase("ttf")
+ || aExt.equalsIgnoreAsciiCase("ttc")
+ || aExt.equalsIgnoreAsciiCase("tte") ) // #i33947# for Gaiji support
eFormat = TRUETYPE;
- else if( aExt.equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("otf")) ) // check for TTF- and PS-OpenType too
+ else if( aExt.equalsIgnoreAsciiCase("otf") ) // check for TTF- and PS-OpenType too
eFormat = CFF;
}
@@ -1134,17 +1130,17 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, ::
rFontFile.copy(0, rFontFile.getLength() - 4)).
append(pSuffix[i]).makeStringAndClear();
- rtl::OStringBuffer aFilePath(aDir);
+ OStringBuffer aFilePath(aDir);
aFilePath.append('/').append(aName);
- rtl::OString aAfmFile;
+ OString aAfmFile;
if( access( aFilePath.makeStringAndClear().getStr(), R_OK ) )
{
// try in subdirectory afm instead
- aFilePath.append(aDir).append(RTL_CONSTASCII_STRINGPARAM("/afm/")).append(aName);
+ aFilePath.append(aDir).append("/afm/").append(aName);
if (!access(aFilePath.getStr(), R_OK))
- aAfmFile = rtl::OString(RTL_CONSTASCII_STRINGPARAM("afm/")) + aName;
+ aAfmFile = OString("afm/") + aName;
}
else
aAfmFile = aName;
@@ -1407,7 +1403,7 @@ namespace
if ( rName == "Berling Antiqua" )
{
::std::set< OUString >::iterator aEnd = rSet.end();
- ::std::set< OUString >::iterator aI = rSet.find(OUString(RTL_CONSTASCII_USTRINGPARAM("Times New Roman")));
+ ::std::set< OUString >::iterator aI = rSet.find("Times New Roman");
if (aI != aEnd)
{
bRet = true;
@@ -2891,7 +2887,7 @@ bool PrintFontManager::readOverrideMetrics()
if( !xFact.is() )
return false;
css::uno::Reference< XMaterialHolder > xMat(
- xFact->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.psprint.CompatMetricOverride" ) ) ),
+ xFact->createInstance( "com.sun.star.psprint.CompatMetricOverride" ),
UNO_QUERY );
if( !xMat.is() )
return false;
diff --git a/vcl/generic/fontmanager/helper.cxx b/vcl/generic/fontmanager/helper.cxx
index 9a3296b7bbf1..414c82f33ee7 100644
--- a/vcl/generic/fontmanager/helper.cxx
+++ b/vcl/generic/fontmanager/helper.cxx
@@ -52,11 +52,11 @@ OUString getOfficePath( enum whichOfficePath ePath )
{
bOnce = true;
OUString aIni;
- Bootstrap::get( OUString( RTL_CONSTASCII_USTRINGPARAM( "BRAND_BASE_DIR" ) ), aInstallationRootPath );
- aIni = aInstallationRootPath + OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" SAL_CONFIGFILE( "bootstrap" ) ) );
+ Bootstrap::get( "BRAND_BASE_DIR", aInstallationRootPath );
+ aIni = aInstallationRootPath + "/program/" + SAL_CONFIGFILE( "bootstrap" );
Bootstrap aBootstrap( aIni );
- aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "CustomDataUrl" ) ), aConfigPath );
- aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "UserInstallation" ) ), aUserPath );
+ aBootstrap.getFrom( "CustomDataUrl", aConfigPath );
+ aBootstrap.getFrom( "UserInstallation", aUserPath );
OUString aUPath = aUserPath;
if( ! aConfigPath.compareToAscii( "file://", 7 ) )
@@ -78,7 +78,7 @@ OUString getOfficePath( enum whichOfficePath ePath )
aUserPath = aSysPath;
}
// ensure user path exists
- aUPath += OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/psprint" ) );
+ aUPath += "/user/psprint";
#if OSL_DEBUG_LEVEL > 1
oslFileError eErr =
#endif
@@ -363,7 +363,7 @@ void psp::normPath( OString& rPath )
if( !aPath.isEmpty() && aPath[aPath.getLength()-1] == '/' )
aPath = aPath.copy(0, aPath.getLength()-1);
- if( ( aPath.indexOfL(RTL_CONSTASCII_STRINGPARAM("./")) != -1 ||
+ if( ( aPath.indexOf("./") != -1 ||
aPath.indexOf( '~' ) != -1 )
&& realpath( aPath.getStr(), buf ) )
{
diff --git a/vcl/generic/print/common_gfx.cxx b/vcl/generic/print/common_gfx.cxx
index 20f7dddce520..e73c6aa9dbb4 100644
--- a/vcl/generic/print/common_gfx.cxx
+++ b/vcl/generic/print/common_gfx.cxx
@@ -1179,7 +1179,7 @@ PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize
char cChar = aLine[1];
if( cChar == '%' )
{
- if( aLine.matchIgnoreAsciiCase( rtl::OString( RTL_CONSTASCII_STRINGPARAM("%%BoundingBox:") ) ) )
+ if( aLine.matchIgnoreAsciiCase( rtl::OString( "%%BoundingBox:") ) )
{
aLine = WhitespaceToSpace( aLine.getToken(1, ':') );
if( !aLine.isEmpty() && aLine.indexOf( "atend" ) == -1 )
@@ -1190,9 +1190,9 @@ PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize
fTop = StringToDouble( GetCommandLineToken( 3, aLine ) );
}
}
- else if( aLine.matchIgnoreAsciiCase( rtl::OString( RTL_CONSTASCII_STRINGPARAM("%%Title:") ) ) )
+ else if( aLine.matchIgnoreAsciiCase( "%%Title:" ) )
aDocTitle = WhitespaceToSpace( aLine.copy( 8 ) );
- else if( aLine.matchIgnoreAsciiCase( rtl::OString( RTL_CONSTASCII_STRINGPARAM("%%EndComments") ) ) )
+ else if( aLine.matchIgnoreAsciiCase( "%%EndComments" ) )
bEndComments = true;
}
else if( cChar == ' ' || cChar == '\t' || cChar == '\r' || cChar == '\n' )
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx
index a55cb21ab43f..bbd0fc81e733 100644
--- a/vcl/generic/print/genprnpsp.cxx
+++ b/vcl/generic/print/genprnpsp.cxx
@@ -103,7 +103,7 @@ static void getPaLib()
#if defined( UNX ) && !( defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) )
if( ! driverLib )
{
- OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( _XSALSET_LIBNAME ) );
+ OUString aLibName( _XSALSET_LIBNAME );
driverLib = osl_loadModuleRelative( (oslGenericFunction)getPaLib, aLibName.pData, SAL_LOADMODULE_DEFAULT );
if ( !driverLib )
{
@@ -162,7 +162,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->mnPaperBin = 0;
if( rData.m_pParser )
- pKey = rData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) );
+ pKey = rData.m_pParser->getKey( OUString("InputSlot") );
if( pKey )
pValue = rData.m_aContext.getValue( pKey );
if( pKey && pValue )
@@ -182,7 +182,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->meDuplexMode = DUPLEX_UNKNOWN;
if( rData.m_pParser )
- pKey = rData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
+ pKey = rData.m_pParser->getKey( OUString("Duplex") );
if( pKey )
pValue = rData.m_aContext.getValue( pKey );
if( pKey && pValue )
@@ -326,8 +326,8 @@ static bool sendAFax( const OUString& rFaxNumber, const OUString& rFileName, con
{
sal_Int32 nIndex = 0;
OUString aFaxes( rFaxNumber );
- OUString aBeginToken( RTL_CONSTASCII_USTRINGPARAM("<Fax#>") );
- OUString aEndToken( RTL_CONSTASCII_USTRINGPARAM("</Fax#>") );
+ OUString aBeginToken( "<Fax#>" );
+ OUString aEndToken( "</Fax#>" );
while( nIndex != -1 )
{
nIndex = aFaxes.indexOf( aBeginToken, nIndex );
@@ -467,7 +467,7 @@ void SalGenericInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
while( nIndex != -1 )
{
rtl::OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) );
- if( aToken.matchAsciiL( RTL_CONSTASCII_STRINGPARAM("pdf=") ) )
+ if( aToken.match( "pdf=" ) )
{
pInfo->maLocation = getPdfDir( rInfo );
break;
@@ -516,7 +516,7 @@ void PspSalInfoPrinter::InitPaperFormats( const ImplJobSetup* )
if( m_aJobData.m_pParser )
{
- const PPDKey* pKey = m_aJobData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
+ const PPDKey* pKey = m_aJobData.m_pParser->getKey( OUString("PageSize") );
if( pKey )
{
int nValues = pKey->countValues();
@@ -645,7 +645,7 @@ sal_Bool PspSalInfoPrinter::SetData(
else
aPaper = rtl::OStringToOUString(PaperInfo::toPSName(pJobSetup->mePaperFormat), RTL_TEXTENCODING_ISO_8859_1);
- pKey = aData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
+ pKey = aData.m_pParser->getKey( OUString("PageSize") );
pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL;
// some PPD files do not specify the standard paper names (e.g. C5 instead of EnvC5)
@@ -666,7 +666,7 @@ sal_Bool PspSalInfoPrinter::SetData(
// merge paperbin if necessary
if( nSetDataFlags & SAL_JOBSET_PAPERBIN )
{
- pKey = aData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) );
+ pKey = aData.m_pParser->getKey( OUString("InputSlot") );
if( pKey )
{
int nPaperBin = pJobSetup->mnPaperBin;
@@ -690,22 +690,22 @@ sal_Bool PspSalInfoPrinter::SetData(
// merge duplex if necessary
if( nSetDataFlags & SAL_JOBSET_DUPLEXMODE )
{
- pKey = aData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
+ pKey = aData.m_pParser->getKey( OUString("Duplex") );
if( pKey )
{
pValue = NULL;
switch( pJobSetup->meDuplexMode )
{
case DUPLEX_OFF:
- pValue = pKey->getValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "None" ) ) );
+ pValue = pKey->getValue( OUString("None") );
if( pValue == NULL )
- pValue = pKey->getValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "SimplexNoTumble" ) ) );
+ pValue = pKey->getValue( OUString("SimplexNoTumble") );
break;
case DUPLEX_SHORTEDGE:
- pValue = pKey->getValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DuplexTumble" ) ) );
+ pValue = pKey->getValue( OUString("DuplexTumble") );
break;
case DUPLEX_LONGEDGE:
- pValue = pKey->getValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DuplexNoTumble" ) ) );
+ pValue = pKey->getValue( OUString("DuplexNoTumble") );
break;
case DUPLEX_UNKNOWN:
default:
@@ -776,7 +776,7 @@ sal_uLong PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
JobData aData;
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData );
- const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ): NULL;
+ const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( OUString("InputSlot") ): NULL;
return pKey ? pKey->countValues() : 0;
}
@@ -788,7 +788,7 @@ rtl::OUString PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup,
OUString aRet;
if( aData.m_pParser )
{
- const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ): NULL;
+ const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( OUString("InputSlot") ): NULL;
if( ! pKey || nPaperBin >= (sal_uLong)pKey->countValues() )
aRet = aData.m_pParser->getDefaultInputSlot();
else
@@ -816,8 +816,8 @@ sal_uLong PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, sal
JobData aData;
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData );
- const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "Collate" ) ) ) : NULL;
- const PPDValue* pVal = pKey ? pKey->getValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "True" ) ) ) : NULL;
+ const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( OUString("Collate") ) : NULL;
+ const PPDValue* pVal = pKey ? pKey->getValue(OUString("True")) : NULL;
// PPDs don't mention the number of possible collated copies.
// so let's guess as many as we want ?
@@ -931,8 +931,8 @@ sal_Bool PspSalPrinter::StartJob(
m_aTmpFile = getTmpName();
nMode = S_IRUSR | S_IWUSR;
- ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash >::const_iterator it;
- it = pJobSetup->maValueMap.find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAX#")) );
+ ::boost::unordered_map< OUString, OUString, ::rtl::OUStringHash >::const_iterator it;
+ it = pJobSetup->maValueMap.find( OUString("FAX#") );
if( it != pJobSetup->maValueMap.end() )
m_aFaxNr = it->second;
@@ -952,7 +952,7 @@ sal_Bool PspSalPrinter::StartJob(
rtl::OUStringBuffer aFileName( getPdfDir( rInfo ) );
aFileName.append( '/' );
aFileName.append( rJobName );
- aFileName.appendAscii( RTL_CONSTASCII_STRINGPARAM( ".pdf" ) );
+ aFileName.appendAscii( ".pdf" );
m_aFileName = aFileName.makeStringAndClear();
}
break;
@@ -1088,7 +1088,7 @@ sal_Bool PspSalPrinter::StartJob( const rtl::OUString* i_pFileName, const rtl::O
// possibly create one job for collated output
sal_Bool bSinglePrintJobs = sal_False;
- beans::PropertyValue* pSingleValue = i_rController.getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintCollateAsSingleJobs" ) ) );
+ beans::PropertyValue* pSingleValue = i_rController.getValue( OUString( "PrintCollateAsSingleJobs" ) );
if( pSingleValue )
{
pSingleValue->Value >>= bSinglePrintJobs;
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index 7b2ce32eff0e..523a0e9a8e3d 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -1283,9 +1283,9 @@ bool GenPspGraphics::filterText( const rtl::OUString& rOrig, rtl::OUString& rNew
if( ! m_bPhoneCollectionActive )
{
rtl::OUStringBuffer aPhoneNr;
- aPhoneNr.appendAscii( RTL_CONSTASCII_STRINGPARAM( "<Fax#>" ) );
+ aPhoneNr.append( "<Fax#>" );
aPhoneNr.append( m_aPhoneCollection );
- aPhoneNr.appendAscii( RTL_CONSTASCII_STRINGPARAM( "</Fax#>" ) );
+ aPhoneNr.append( "</Fax#>" );
*m_pPhoneNr = aPhoneNr.makeStringAndClear();
m_aPhoneCollection = rtl::OUString();
}
diff --git a/vcl/generic/print/printerjob.cxx b/vcl/generic/print/printerjob.cxx
index 30ad0fd9f769..2d7ada98857c 100644
--- a/vcl/generic/print/printerjob.cxx
+++ b/vcl/generic/print/printerjob.cxx
@@ -1009,9 +1009,9 @@ bool PrinterJob::writeSetup( osl::File* pFile, const JobData& rJob )
if( ! bExternalDialog && rJob.m_nCopies > 1 )
{
// setup code
- rtl::OStringBuffer aLine(RTL_CONSTASCII_STRINGPARAM("/#copies "));
+ rtl::OStringBuffer aLine("/#copies ");
aLine.append(static_cast<sal_Int32>(rJob.m_nCopies));
- aLine.append(RTL_CONSTASCII_STRINGPARAM(" def\n"));
+ aLine.append(" def\n");
sal_uInt64 nWritten = 0;
bSuccess = pFile->write(aLine.getStr(), aLine.getLength(), nWritten)
|| nWritten != static_cast<sal_uInt64>(aLine.getLength()) ?