From c05adac9229aad0683d2e75a8f8dcd5421c66b02 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 24 Jul 2021 22:56:15 +0200 Subject: use officecfg for print options Change-Id: I2a85d802b9edda638da467e273ad3d24cbf2bcf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119476 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/source/dialog/printopt.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sfx2/source/dialog/printopt.cxx') diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index d6fe953c785b..f94b0204cd6f 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -91,9 +91,6 @@ std::unique_ptr SfxCommonPrintOptionsTabPage::Create(weld::Container bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet* /*rSet*/ ) { - SvtPrinterOptions aPrinterOptions; - SvtPrintFileOptions aPrintFileOptions; - std::shared_ptr batch(comphelper::ConfigurationChanges::create()); if( m_xPaperSizeCB->get_state_changed_from_saved()) @@ -107,8 +104,8 @@ bool SfxCommonPrintOptionsTabPage::FillItemSet( SfxItemSet* /*rSet*/ ) ImplSaveControls( m_xPrinterOutputRB->get_active() ? &maPrinterOptions : &maPrintFileOptions ); - aPrinterOptions.SetPrinterOptions( maPrinterOptions ); - aPrintFileOptions.SetPrinterOptions( maPrintFileOptions ); + svtools::SetPrinterOptions(maPrinterOptions, /*bFile*/false); + svtools::SetPrinterOptions(maPrintFileOptions, /*bFile*/true); return false; } @@ -123,8 +120,8 @@ void SfxCommonPrintOptionsTabPage::Reset( const SfxItemSet* /*rSet*/ ) m_xPaperOrientationCB->save_state(); m_xTransparencyCB->save_state(); - SvtBasePrintOptions::GetPrinterOptions( maPrinterOptions ); - SvtBasePrintOptions::GetPrinterOptions( maPrintFileOptions ); + svtools::GetPrinterOptions( maPrinterOptions, /*bFile*/false ); + svtools::GetPrinterOptions( maPrintFileOptions, /*bFile*/true ); if(m_xPrintFileOutputRB->get_active()){ m_xPrinterOutputRB->set_active(true); } -- cgit