Kaydet (Commit) 6833a02d authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith

Remove RTL_CONSTASCII_(U)STRINGPARAM in padmin

Change-Id: Icdf78be74a1ce82de50772e9424dbc172f355484
üst 8333cbf2
...@@ -506,8 +506,8 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent ) ...@@ -506,8 +506,8 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
rtl::OString aDriver(aValue.getToken(0, ' ')); rtl::OString aDriver(aValue.getToken(0, ' '));
rtl::OString aPS( aValue.getToken(0, ',').getToken(1, ' ') ); rtl::OString aPS( aValue.getToken(0, ',').getToken(1, ' ') );
rtl::OString aNewDriver(aDriver); rtl::OString aNewDriver(aDriver);
if( aDriver.equalsL(RTL_CONSTASCII_STRINGPARAM("GENERIC"))) if( aDriver == "GENERIC")
aNewDriver = rtl::OString(RTL_CONSTASCII_STRINGPARAM("SGENPRT")); aNewDriver = rtl::OString("SGENPRT");
if( aPS != "PostScript" ) if( aPS != "PostScript" )
continue; continue;
...@@ -547,7 +547,7 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent ) ...@@ -547,7 +547,7 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
// read the printer settings // read the printer settings
rtl::OStringBuffer aGroup(aDriver); rtl::OStringBuffer aGroup(aDriver);
aGroup.append(RTL_CONSTASCII_STRINGPARAM(",PostScript,")); aGroup.append(",PostScript,");
aGroup.append(aPort); aGroup.append(aPort);
aConfig.SetGroup(aGroup.makeStringAndClear()); aConfig.SetGroup(aGroup.makeStringAndClear());
...@@ -598,13 +598,12 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent ) ...@@ -598,13 +598,12 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
// should never have been writte because they are defaults // should never have been writte because they are defaults
// PageRegion leads to problems in conjunction // PageRegion leads to problems in conjunction
// with a not matching PageSize // with a not matching PageSize
if (aPPDKey.matchL(RTL_CONSTASCII_STRINGPARAM("PPD_")) && if (aPPDKey.match("PPD_") && aPPDKey != "PPD_PageRegion")
!aPPDKey.equalsL(RTL_CONSTASCII_STRINGPARAM("PPD_PageRegion")))
{ {
aValue = aConfig.ReadKey( nPPDKey ); aValue = aConfig.ReadKey( nPPDKey );
aPPDKey = aPPDKey.copy(4); aPPDKey = aPPDKey.copy(4);
const PPDKey* pKey = aInfo.m_pParser->getKey( rtl::OStringToOUString(aPPDKey, RTL_TEXTENCODING_ISO_8859_1) ); const PPDKey* pKey = aInfo.m_pParser->getKey( rtl::OStringToOUString(aPPDKey, RTL_TEXTENCODING_ISO_8859_1) );
const PPDValue* pValue = pKey ? ( aValue.equalsL(RTL_CONSTASCII_STRINGPARAM("*nil")) ? NULL : pKey->getValue(rtl::OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)) ) : NULL; const PPDValue* pValue = pKey ? ( aValue == "*nil" ? NULL : pKey->getValue(rtl::OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)) ) : NULL;
if( pKey ) if( pKey )
aInfo.m_aContext.setValue( pKey, pValue, true ); aInfo.m_aContext.setValue( pKey, pValue, true );
} }
...@@ -1087,18 +1086,16 @@ String AddPrinterDialog::getOldPrinterLocation() ...@@ -1087,18 +1086,16 @@ String AddPrinterDialog::getOldPrinterLocation()
if( pHome ) if( pHome )
{ {
aFileName = rtl::OStringBuffer().append(pHome). aFileName = rtl::OStringBuffer().append(pHome).
append(RTL_CONSTASCII_STRINGPARAM("/.Xpdefaults")). append("/.Xpdefaults").makeStringAndClear();
makeStringAndClear();
if (access(aFileName.getStr(), F_OK)) if (access(aFileName.getStr(), F_OK))
{ {
aFileName = rtl::OStringBuffer().append(pHome). aFileName = rtl::OStringBuffer().append(pHome).
append(RTL_CONSTASCII_STRINGPARAM("/.sversionrc")). append("/.sversionrc").makeStringAndClear();
makeStringAndClear();
Config aSVer(rtl::OStringToOUString(aFileName, aEncoding)); Config aSVer(rtl::OStringToOUString(aFileName, aEncoding));
aSVer.SetGroup( "Versions" ); aSVer.SetGroup( "Versions" );
aFileName = aSVer.ReadKey( "StarOffice 5.2" ); aFileName = aSVer.ReadKey( "StarOffice 5.2" );
if (!aFileName.isEmpty()) if (!aFileName.isEmpty())
aFileName = aFileName + rtl::OString(RTL_CONSTASCII_STRINGPARAM("/share/xp3/Xpdefaults")); aFileName = aFileName + rtl::OString("/share/xp3/Xpdefaults");
else if( else if(
(aFileName = aSVer.ReadKey( "StarOffice 5.1" ) ).getLength() (aFileName = aSVer.ReadKey( "StarOffice 5.1" ) ).getLength()
|| ||
...@@ -1107,7 +1104,7 @@ String AddPrinterDialog::getOldPrinterLocation() ...@@ -1107,7 +1104,7 @@ String AddPrinterDialog::getOldPrinterLocation()
(aFileName = aSVer.ReadKey( "StarOffice 4.0" ) ).getLength() (aFileName = aSVer.ReadKey( "StarOffice 4.0" ) ).getLength()
) )
{ {
aFileName = aFileName + rtl::OString(RTL_CONSTASCII_STRINGPARAM("/xp3/Xpdefaults")); aFileName = aFileName + rtl::OString("/xp3/Xpdefaults");
} }
if (!aFileName.isEmpty() && access(aFileName.getStr(), F_OK)) if (!aFileName.isEmpty() && access(aFileName.getStr(), F_OK))
aFileName = rtl::OString(); aFileName = rtl::OString();
......
...@@ -408,7 +408,7 @@ void SpaPrinterController::printPage( int ) const ...@@ -408,7 +408,7 @@ void SpaPrinterController::printPage( int ) const
Size( aPaperSize.Width()-600, Size( aPaperSize.Width()-600,
aPaperSize.Height()-600 ) ) ); aPaperSize.Height()-600 ) ) );
Font aFont( String( RTL_CONSTASCII_USTRINGPARAM( "Courier" ) ), Size( 0, 400 ) ); Font aFont( String( "Courier" ), Size( 0, 400 ) );
aFont.SetWeight( WEIGHT_NORMAL ); aFont.SetWeight( WEIGHT_NORMAL );
aFont.SetItalic( ITALIC_NONE ); aFont.SetItalic( ITALIC_NONE );
pPrinter->SetFont( aFont ); pPrinter->SetFont( aFont );
...@@ -458,7 +458,7 @@ void SpaPrinterController::printPage( int ) const ...@@ -458,7 +458,7 @@ void SpaPrinterController::printPage( int ) const
if( pPrintParser ) if( pPrintParser )
aPrintText.append( pPrintParser->getPrinterName() ); aPrintText.append( pPrintParser->getPrinterName() );
aPrintText.appendAscii( "\n: " ); aPrintText.appendAscii( "\n: " );
INetURLObject aDriverPath( pPrintParser ? pPrintParser->getFilename() : String( RTL_CONSTASCII_USTRINGPARAM( "<undef>" ) ), INetURLObject aDriverPath( pPrintParser ? pPrintParser->getFilename() : String( "<undef>" ),
INET_PROT_FILE, INetURLObject::ENCODE_ALL ); INET_PROT_FILE, INetURLObject::ENCODE_ALL );
aPrintText.append( aDriverPath.GetName() ); aPrintText.append( aDriverPath.GetName() );
aPrintText.appendAscii( "\n: " ); aPrintText.appendAscii( "\n: " );
...@@ -581,8 +581,7 @@ void PADialog::PrintTestPage() ...@@ -581,8 +581,7 @@ void PADialog::PrintTestPage()
boost::shared_ptr<vcl::PrinterController> pController( new SpaPrinterController( pPrinter ) ); boost::shared_ptr<vcl::PrinterController> pController( new SpaPrinterController( pPrinter ) );
JobSetup aJobSetup( pPrinter->GetJobSetup() ); JobSetup aJobSetup( pPrinter->GetJobSetup() );
aJobSetup.SetValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ), aJobSetup.SetValue( "IsQuickJob", "true" );
String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) );
Printer::PrintJob( pController, aJobSetup ); Printer::PrintJob( pController, aJobSetup );
} }
...@@ -605,7 +604,7 @@ void PADialog::RemDevice() ...@@ -605,7 +604,7 @@ void PADialog::RemDevice()
if( ! m_rPIManager.removePrinter( aPrinter ) ) if( ! m_rPIManager.removePrinter( aPrinter ) )
{ {
String aText( PaResId( RID_ERR_PRINTERNOTREMOVEABLE ) ); String aText( PaResId( RID_ERR_PRINTERNOTREMOVEABLE ) );
aText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), aPrinter ); aText.SearchAndReplace( String( "%s" ), aPrinter );
ErrorBox aBox( this, WB_OK | WB_DEF_OK, aText ); ErrorBox aBox( this, WB_OK | WB_DEF_OK, aText );
aBox.Execute(); aBox.Execute();
return; return;
......
...@@ -95,7 +95,7 @@ RTSDialog::RTSDialog( const PrinterInfo& rJobData, const String& rPrinter, bool ...@@ -95,7 +95,7 @@ RTSDialog::RTSDialog( const PrinterInfo& rJobData, const String& rPrinter, bool
get(m_pTabControl, "notebook"); get(m_pTabControl, "notebook");
String aTitle( GetText() ); String aTitle( GetText() );
aTitle.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), m_aJobData.m_aPrinterName ); aTitle.SearchAndReplace( String( "%s" ), m_aJobData.m_aPrinterName );
SetText( aTitle ); SetText( aTitle );
if( ! bAllPages ) if( ! bAllPages )
...@@ -259,7 +259,7 @@ void RTSPaperPage::update() ...@@ -259,7 +259,7 @@ void RTSPaperPage::update()
// duplex // duplex
if( m_pParent->m_aJobData.m_pParser && if( m_pParent->m_aJobData.m_pParser &&
(pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) )) ) (pKey = m_pParent->m_aJobData.m_pParser->getKey( String( "Duplex" ) )) )
{ {
m_pParent->insertAllPPDValues( *m_pDuplexBox, m_pParent->m_aJobData.m_pParser, pKey ); m_pParent->insertAllPPDValues( *m_pDuplexBox, m_pParent->m_aJobData.m_pParser, pKey );
} }
...@@ -271,7 +271,7 @@ void RTSPaperPage::update() ...@@ -271,7 +271,7 @@ void RTSPaperPage::update()
// paper // paper
if( m_pParent->m_aJobData.m_pParser && if( m_pParent->m_aJobData.m_pParser &&
(pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) )) ) (pKey = m_pParent->m_aJobData.m_pParser->getKey( String( "PageSize" ) )) )
{ {
m_pParent->insertAllPPDValues( *m_pPaperBox, m_pParent->m_aJobData.m_pParser, pKey ); m_pParent->insertAllPPDValues( *m_pPaperBox, m_pParent->m_aJobData.m_pParser, pKey );
} }
...@@ -302,17 +302,17 @@ IMPL_LINK( RTSPaperPage, SelectHdl, ListBox*, pBox ) ...@@ -302,17 +302,17 @@ IMPL_LINK( RTSPaperPage, SelectHdl, ListBox*, pBox )
if( pBox == m_pPaperBox ) if( pBox == m_pPaperBox )
{ {
if( m_pParent->m_aJobData.m_pParser ) if( m_pParent->m_aJobData.m_pParser )
pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) ); pKey = m_pParent->m_aJobData.m_pParser->getKey( String( "PageSize" ) );
} }
else if( pBox == m_pDuplexBox ) else if( pBox == m_pDuplexBox )
{ {
if( m_pParent->m_aJobData.m_pParser ) if( m_pParent->m_aJobData.m_pParser )
pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) ); pKey = m_pParent->m_aJobData.m_pParser->getKey( String( "Duplex" ) );
} }
else if( pBox == m_pSlotBox ) else if( pBox == m_pSlotBox )
{ {
if( m_pParent->m_aJobData.m_pParser ) if( m_pParent->m_aJobData.m_pParser )
pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) ); pKey = m_pParent->m_aJobData.m_pParser->getKey( String( "InputSlot" ) );
} }
else if( pBox == m_pOrientBox ) else if( pBox == m_pOrientBox )
{ {
...@@ -800,7 +800,7 @@ RTSPWDialog::RTSPWDialog( const OString& rServer, const OString& rUserName, Wind ...@@ -800,7 +800,7 @@ RTSPWDialog::RTSPWDialog( const OString& rServer, const OString& rUserName, Wind
{ {
FreeResource(); FreeResource();
String aText( m_aText.GetText() ); String aText( m_aText.GetText() );
aText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), OStringToOUString( rServer, osl_getThreadTextEncoding() ) ); aText.SearchAndReplace( String( "%s" ), OStringToOUString( rServer, osl_getThreadTextEncoding() ) );
m_aText.SetText( aText ); m_aText.SetText( aText );
m_aUserEdit.SetText( OStringToOUString( rUserName, osl_getThreadTextEncoding() ) ); m_aUserEdit.SetText( OStringToOUString( rUserName, osl_getThreadTextEncoding() ) );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment