[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - vcl/source vcl/unx
Katarina Behrens
Katarina.Behrens at cib.de
Thu Jan 11 15:24:53 UTC 2018
vcl/source/gdi/print3.cxx | 3 +++
vcl/source/window/printdlg.cxx | 1 +
vcl/unx/generic/print/prtsetup.cxx | 6 ++++--
3 files changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 53086872ed900fce65127856e06cf296f4eee953
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Mon Jan 8 13:45:43 2018 +0100
tdf#79077: Harmonize PapersizeFromSetup checkboxes in printer config
job setup and options tab page. Also fix a small UI regression
Change-Id: I48532ac4e188d68008e947924da651239262d8b2
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 3fc31287aa57..162eb9ce33f7 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -321,6 +321,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
VclPtrInstance<Printer> xPrinter( aPrinterName );
xPrinter->SetJobSetup(i_rInitSetup);
xController->setPrinter(xPrinter);
+ xController->setPapersizeFromSetup(xPrinter->GetPrinterSettingsPreferred());
}
// reset last page property
@@ -822,6 +823,7 @@ bool PrinterController::setupPrinter( vcl::Window* i_pParent )
if (bRet)
{
bool bInvalidateCache = false;
+ setPapersizeFromSetup(mpImplData->mxPrinter->GetPrinterSettingsPreferred());
// was papersize overridden ? if so we need to take action if we're
// configured to use the driver papersize
@@ -1359,6 +1361,7 @@ bool PrinterController::getReversePrint() const
void PrinterController::setPapersizeFromSetup( bool i_bPapersizeFromSetup )
{
mpImplData->mbPapersizeFromSetup = i_bPapersizeFromSetup;
+ mpImplData->mxPrinter->SetPrinterSettingsPreferred( i_bPapersizeFromSetup );
}
bool PrinterController::getPapersizeFromSetup() const
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index c03d76fc7752..bf819aebf351 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -679,6 +679,7 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterC
maJobPage.mpSetupButton->SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
maNUpPage.mpBorderCB->SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
maOptionsPage.mpPapersizeFromSetup->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) );
+ maOptionsPage.mpPapersizeFromSetup->Check( maPController->getPapersizeFromSetup() );
maJobPage.mpReverseOrderBox->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) );
maOptionsPage.mpCollateSingleJobsBox->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) );
maNUpPage.mpPagesBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleRadioHdl ) );
diff --git a/vcl/unx/generic/print/prtsetup.cxx b/vcl/unx/generic/print/prtsetup.cxx
index c8da1cc96418..4e2536a42890 100644
--- a/vcl/unx/generic/print/prtsetup.cxx
+++ b/vcl/unx/generic/print/prtsetup.cxx
@@ -143,8 +143,8 @@ IMPL_LINK_TYPED( RTSDialog, ClickButton, Button*, pButton, void )
orientation::Portrait : orientation::Landscape;
// assume use of paper size from printer setup if the user
// got here via File > Printer Settings ...
- m_aJobData.m_bPapersizeFromSetup =
- ( m_aJobData.meSetupMode == PrinterSetupMode::DocumentGlobal );
+ if ( m_aJobData.meSetupMode == PrinterSetupMode::DocumentGlobal )
+ m_aJobData.m_bPapersizeFromSetup = true;
}
if( m_pDevicePage )
{
@@ -317,7 +317,9 @@ IMPL_LINK_TYPED( RTSPaperPage, CheckBoxHdl, CheckBox&, /*cBox*/, void )
{
bool bFromSetup = m_pCbFromSetup->IsChecked();
m_pParent->m_aJobData.m_bPapersizeFromSetup = bFromSetup;
+ m_pPaperText->Enable( bFromSetup );
m_pPaperBox->Enable( bFromSetup );
+ m_pOrientText->Enable( bFromSetup );
m_pOrientBox->Enable( bFromSetup );
m_pParent->SetDataModified( true );
}
More information about the Libreoffice-commits
mailing list