diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2010-02-03 15:34:13 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2010-02-03 15:34:13 +0100 |
commit | 051e2c7af86d0b9213276088306f727b91c86513 (patch) | |
tree | 2c7d5b3d02bbca2a655e706981ad228e0cea3364 /padmin | |
parent | cc053a3e354ddcbdb5e6d9be95ef046972bb3d25 (diff) | |
parent | da2c680d23b67d4721aa29f740475fd6d40e2e08 (diff) |
merge with DEV300_m71
Diffstat (limited to 'padmin')
-rw-r--r-- | padmin/source/prtsetup.cxx | 23 | ||||
-rw-r--r-- | padmin/source/prtsetup.hxx | 2 |
2 files changed, 13 insertions, 12 deletions
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx index 6cf4f8b257b1..69217e2d0063 100644 --- a/padmin/source/prtsetup.cxx +++ b/padmin/source/prtsetup.cxx @@ -44,9 +44,9 @@ using namespace rtl; using namespace psp; using namespace padmin; -void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDKey* pKey ) +void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, const PPDKey* pKey ) { - if( ! pKey ) + if( ! pKey || ! pParser ) return; const PPDValue* pValue = NULL; @@ -56,7 +56,7 @@ void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDKey* pKey ) for( int i = 0; i < pKey->countValues(); i++ ) { pValue = pKey->getValue( i ); - aOptionText = pValue->m_aOptionTranslation.Len() ? pValue->m_aOptionTranslation : pValue->m_aOption; + aOptionText = pParser->translateOption( pKey->getKey(), pValue->m_aOption) ; if( m_aJobData.m_aContext.checkConstraints( pKey, pValue ) ) { @@ -282,7 +282,7 @@ void RTSPaperPage::update() if( m_pParent->m_aJobData.m_pParser && (pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) )) ) { - m_pParent->insertAllPPDValues( m_aDuplexBox, pKey ); + m_pParent->insertAllPPDValues( m_aDuplexBox, m_pParent->m_aJobData.m_pParser, pKey ); } else { @@ -294,7 +294,7 @@ void RTSPaperPage::update() if( m_pParent->m_aJobData.m_pParser && (pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) )) ) { - m_pParent->insertAllPPDValues( m_aPaperBox, pKey ); + m_pParent->insertAllPPDValues( m_aPaperBox, m_pParent->m_aJobData.m_pParser, pKey ); } else { @@ -306,7 +306,7 @@ void RTSPaperPage::update() if( m_pParent->m_aJobData.m_pParser && (pKey = m_pParent->m_aJobData.m_pParser->getKey( String::CreateFromAscii( "InputSlot" ) )) ) { - m_pParent->insertAllPPDValues( m_aSlotBox, pKey ); + m_pParent->insertAllPPDValues( m_aSlotBox, m_pParent->m_aJobData.m_pParser, pKey ); } else { @@ -411,8 +411,8 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent ) : ! pKey->getKey().EqualsAscii( "Duplex" ) ) { - USHORT nPos = - m_aPPDKeyBox.InsertEntry( pKey->getUITranslation().Len() ? pKey->getUITranslation() : pKey->getKey() ); + String aEntry( m_pParent->m_aJobData.m_pParser->translateKey( pKey->getKey() ) ); + USHORT nPos = m_aPPDKeyBox.InsertEntry( aEntry ); m_aPPDKeyBox.SetEntryData( nPos, (void*)pKey ); } } @@ -466,10 +466,11 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey ) for( int i = 0; i < pKey->countValues(); i++ ) { pValue = pKey->getValue( i ); - if( m_pParent->m_aJobData.m_aContext.checkConstraints( pKey, pValue ) ) + if( m_pParent->m_aJobData.m_aContext.checkConstraints( pKey, pValue ) && + m_pParent->m_aJobData.m_pParser ) { - USHORT nPos = - m_aPPDValueBox.InsertEntry( pValue->m_aOptionTranslation.Len() ? pValue->m_aOptionTranslation : pValue->m_aOption ); + String aEntry( m_pParent->m_aJobData.m_pParser->translateOption( pKey->getKey(), pValue->m_aOption ) ); + USHORT nPos = m_aPPDValueBox.InsertEntry( aEntry ); m_aPPDValueBox.SetEntryData( nPos, (void*)pValue ); } } diff --git a/padmin/source/prtsetup.hxx b/padmin/source/prtsetup.hxx index 8487daa158da..1e296fa9ed88 100644 --- a/padmin/source/prtsetup.hxx +++ b/padmin/source/prtsetup.hxx @@ -85,7 +85,7 @@ class RTSDialog : public TabDialog DECL_LINK( ClickButton, Button* ); // helper functions - void insertAllPPDValues( ListBox&, const ::psp::PPDKey* ); + void insertAllPPDValues( ListBox&, const psp::PPDParser*, const psp::PPDKey* ); public: RTSDialog( const ::psp::PrinterInfo& rJobData, const String& rPrinter, bool bAllPages, Window* pParent = NULL ); ~RTSDialog(); |