diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-07-07 12:08:33 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:55:45 +0200 |
commit | d0525e56abc7f85f9e38e3e9ba070317adfa06f1 (patch) | |
tree | 0ac724eabc56bf36312aa7e721e43002acd334b2 /vcl/generic | |
parent | d8722a7e0f9854b4a2c625dc8209788bd4d2edb8 (diff) |
Related tdf#91362: disable paper size & orientation selection
Unless 'Use only papersize from printer prefs' is toggled on,
whatever the user sets here doesn't have any effect on the actual
printing (page settings from the document are used instead). It is
misleading to have the user believe otherwise.
It was really challenging to have this one toggle get all the way
down through several layers of abstraction, though ...
Change-Id: If240084ca23b3946a92882a6ee47dbc161b3b86c
Reviewed-on: https://gerrit.libreoffice.org/16822
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl/generic')
-rw-r--r-- | vcl/generic/print/genprnpsp.cxx | 1 | ||||
-rw-r--r-- | vcl/generic/print/prtsetup.cxx | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index 425b71764b0e..6f4a9075052a 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -560,6 +560,7 @@ bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) SetData( ~0, pJobSetup ); JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo ); } + aInfo.m_bPapersizeFromSetup = pJobSetup->mbPapersizeFromSetup; if (SetupPrinterDriver(aInfo)) { diff --git a/vcl/generic/print/prtsetup.cxx b/vcl/generic/print/prtsetup.cxx index 41fd69c5fa32..8a5fd70c82f6 100644 --- a/vcl/generic/print/prtsetup.cxx +++ b/vcl/generic/print/prtsetup.cxx @@ -256,6 +256,14 @@ void RTSPaperPage::update() m_pSlotText->Enable( false ); m_pSlotBox->Enable( false ); } + + // disable those, unless user wants to use papersize from printer prefs + // as they have no influence on what's going to be printed anyway + if (!m_pParent->m_aJobData.m_bPapersizeFromSetup) + { + m_pPaperBox->Enable( false ); + m_pOrientBox->Enable( false ); + } } IMPL_LINK( RTSPaperPage, SelectHdl, ListBox*, pBox ) |