summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-07-29 10:06:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-07-29 16:48:42 +0200
commit2d2497dd3cea9ad01f7ade0b2bf4129083cd5875 (patch)
tree3c99f83a9b43cb68eabbfec5daabefca551e5f85 /sc/source
parent917fadedee4459ff75e78e1b746ba320503301e0 (diff)
replace and drop MiscCfg
Change-Id: I5ea9e3663fc5d30d725cf18757badb9b9802da18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99675 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/documen8.cxx16
-rw-r--r--sc/source/ui/docshell/docsh3.cxx4
2 files changed, 9 insertions, 11 deletions
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 <comphelper/fileformat.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/servicehelper.hxx>
+#include <officecfg/Office/Common.hxx>
#include <tools/urlobj.hxx>
#include <editeng/editobj.hxx>
#include <editeng/frmdiritem.hxx>
@@ -35,7 +36,6 @@
#include <svl/intitem.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
-#include <unotools/misccfg.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <sal/log.hxx>
@@ -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<int>(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<SfxPrinter>::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<int>(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 <editeng/flstitem.hxx>
#include <editeng/paperinf.hxx>
#include <editeng/sizeitem.hxx>
+#include <officecfg/Office/Common.hxx>
#include <sal/log.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/app.hxx>
@@ -33,7 +34,6 @@
#include <svx/pageitem.hxx>
#include <svx/postattr.hxx>
#include <svx/svxids.hrc>
-#include <unotools/misccfg.hxx>
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
#include <vcl/weld.hxx>
@@ -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<sal_uInt16>( ::utl::MiscCfg().GetYear2000() ) );
+ aDocOpt.SetYear2000(officecfg::Office::Common::DateFormat::TwoDigitYear::get());
if (bForLoading)
{