summaryrefslogtreecommitdiff
path: root/vcl/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 /vcl/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 'vcl/source')
-rw-r--r--vcl/source/control/field2.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index a300bf50627a..511976249c8d 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -25,6 +25,7 @@
#include <tools/diagnose_ex.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
+#include <officecfg/Office/Common.hxx>
#include <vcl/svapp.hxx>
#include <vcl/event.hxx>
#include <vcl/toolkit/field.hxx>
@@ -39,7 +40,6 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/calendarwrapper.hxx>
#include <unotools/charclass.hxx>
-#include <unotools/misccfg.hxx>
using namespace ::com::sun::star;
using namespace ::comphelper;
@@ -1339,7 +1339,7 @@ bool DateFormatter::TextToDate(const OUString& rStr, Date& rDate, ExtDateFieldFo
return false;
Date aNewDate( nDay, nMonth, nYear );
- DateFormatter::ExpandCentury( aNewDate, utl::MiscCfg().GetYear2000() );
+ DateFormatter::ExpandCentury( aNewDate, officecfg::Office::Common::DateFormat::TwoDigitYear::get() );
if ( aNewDate.IsValidDate() )
{
rDate = aNewDate;
@@ -1411,7 +1411,7 @@ OUString DateFormatter::FormatDate(const Date& rDate, ExtDateFieldFormat eExtFor
if ( !bShowCentury )
{
// Check if I have to use force showing the century
- sal_uInt16 nTwoDigitYearStart = utl::MiscCfg().GetYear2000();
+ sal_uInt16 nTwoDigitYearStart = officecfg::Office::Common::DateFormat::TwoDigitYear::get();
sal_uInt16 nYear = rDate.GetYearUnsigned();
// If year is not in double digit range
@@ -1948,7 +1948,7 @@ void DateFormatter::Reformat()
void DateFormatter::ExpandCentury( Date& rDate )
{
- ExpandCentury( rDate, utl::MiscCfg().GetYear2000() );
+ ExpandCentury(rDate, officecfg::Office::Common::DateFormat::TwoDigitYear::get());
}
void DateFormatter::ExpandCentury( Date& rDate, sal_uInt16 nTwoDigitYearStart )