diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2015-10-27 11:06:22 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-10-27 12:25:21 +0000 |
commit | f8d0dc09e15b36ae83a5e89280d1f7fbc01da48b (patch) | |
tree | 83d19d30d41a87bfdebb441fc8f297dc4d9ebacb /vcl/generic | |
parent | d4484f726a78f1c2839ac0b4d0181e3e4357396c (diff) |
tdf#94022 Print dialog: hide Installable Options
Options specified in PPD files can be grouped using the
keywords "OpenGroup" and "CloseGroup".
The keyword "InstallableOptions" is used as a group name
for a group containing options that define
optional hardware features of the printer that can
be present or not (s. section 5.4 in version 4.3 of
the PPD specification).
As they are not print job specific, it is recommended
not to show them in the print dialog.
To be able to distinguish those options, the
PPD group name was added as an attribute to the PPDKey
class.
Change-Id: I4a3abf23a711ad98556c0b608a07ef0a91e77e2b
Reviewed-on: https://gerrit.libreoffice.org/19623
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'vcl/generic')
-rw-r--r-- | vcl/generic/print/prtsetup.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/vcl/generic/print/prtsetup.cxx b/vcl/generic/print/prtsetup.cxx index 07ca53878bff..3f8d0dae4518 100644 --- a/vcl/generic/print/prtsetup.cxx +++ b/vcl/generic/print/prtsetup.cxx @@ -367,12 +367,19 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent ) for( int i = 0; i < m_pParent->m_aJobData.m_pParser->getKeys(); i++ ) { const PPDKey* pKey = m_pParent->m_aJobData.m_pParser->getKey( i ); + + // skip options already shown somewhere else + // also skip options from the "InstallableOptions" PPD group + // Options in that group define hardware features that are not + // job-specific and should better be handled in the system-wide + // printer configuration. Keyword is defined in PPD specification + // (version 4.3), section 5.4. if( pKey->isUIKey() && pKey->getKey() != "PageSize" && pKey->getKey() != "InputSlot" && pKey->getKey() != "PageRegion" && - pKey->getKey() != "Duplex" - ) + pKey->getKey() != "Duplex" && + pKey->getGroup() != "InstallableOptions") { OUString aEntry( m_pParent->m_aJobData.m_pParser->translateKey( pKey->getKey() ) ); sal_uInt16 nPos = m_pPPDKeyBox->InsertEntry( aEntry ); |