From 2d2497dd3cea9ad01f7ade0b2bf4129083cd5875 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 29 Jul 2020 10:06:54 +0100 Subject: replace and drop MiscCfg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5ea9e3663fc5d30d725cf18757badb9b9802da18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99675 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sc/source/core/data/documen8.cxx | 16 +++++++--------- sc/source/ui/docshell/docsh3.cxx | 4 ++-- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'sc/source') diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 293e66552d75..312df8333f3b 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -35,7 +36,6 @@ #include #include #include -#include #include #include @@ -121,14 +121,13 @@ SfxPrinter* ScDocument::GetPrinter(bool bCreateIfNotExist) SID_PRINT_SELECTEDSHEET, SID_PRINT_SELECTEDSHEET, SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS>{} ); - ::utl::MiscCfg aMisc; SfxPrinterChangeFlags nFlags = SfxPrinterChangeFlags::NONE; - if ( aMisc.IsPaperOrientationWarning() ) + if (officecfg::Office::Common::Print::Warning::PaperOrientation::get()) nFlags |= SfxPrinterChangeFlags::CHG_ORIENTATION; - if ( aMisc.IsPaperSizeWarning() ) + if (officecfg::Office::Common::Print::Warning::PaperSize::get()) nFlags |= SfxPrinterChangeFlags::CHG_SIZE; pSet->Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast(nFlags) ) ); - pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning() ) ); + pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, officecfg::Office::Common::Print::Warning::NotFound::get() ) ); mpPrinter = VclPtr::Create( std::move(pSet) ); mpPrinter->SetMapMode(MapMode(MapUnit::Map100thMM)); @@ -165,16 +164,15 @@ void ScDocument::SetPrintOptions() if ( mpPrinter ) { - ::utl::MiscCfg aMisc; SfxItemSet aOptSet( mpPrinter->GetOptions() ); SfxPrinterChangeFlags nFlags = SfxPrinterChangeFlags::NONE; - if ( aMisc.IsPaperOrientationWarning() ) + if (officecfg::Office::Common::Print::Warning::PaperOrientation::get()) nFlags |= SfxPrinterChangeFlags::CHG_ORIENTATION; - if ( aMisc.IsPaperSizeWarning() ) + if (officecfg::Office::Common::Print::Warning::PaperSize::get()) nFlags |= SfxPrinterChangeFlags::CHG_SIZE; aOptSet.Put( SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast(nFlags) ) ); - aOptSet.Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aMisc.IsNotFoundWarning() ) ); + aOptSet.Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, officecfg::Office::Common::Print::Warning::NotFound::get() ) ); mpPrinter->SetOptions( aOptSet ); } diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 8d9133f98735..a3fc1cb492fe 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -33,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -413,7 +413,7 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L aDocOpt.SetAutoSpell( bAutoSpell ); // two-digit year entry from Tools->Options->General - aDocOpt.SetYear2000( sal::static_int_cast( ::utl::MiscCfg().GetYear2000() ) ); + aDocOpt.SetYear2000(officecfg::Office::Common::DateFormat::TwoDigitYear::get()); if (bForLoading) { -- cgit