[Libreoffice-commits] core.git: 2 commits - include/vcl vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 5 09:44:40 UTC 2019
include/vcl/field.hxx | 6 ----
vcl/source/control/field2.cxx | 59 +++++++++++++++++-------------------------
2 files changed, 25 insertions(+), 40 deletions(-)
New commits:
commit 5796b4f90bfb7394ca89530cd67f6cf23e1ac693
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Dec 4 20:32:23 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Dec 5 10:43:19 2019 +0100
turn TimeFormatter::ImplInit into initializer list
Change-Id: I2f21241f753b1fe1300a284cc80a29911cd223ae
Reviewed-on: https://gerrit.libreoffice.org/84465
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index 01256da135a5..8f0d1b350771 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -353,8 +353,6 @@ private:
bool mbDuration;
bool mbEnforceValidValue;
- SAL_DLLPRIVATE void ImplInit();
-
protected:
tools::Time maFieldTime;
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 3b4c51ce0832..e703f20ffb20 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -2287,22 +2287,17 @@ void TimeField::ImplTimeSpinArea( bool bUp )
}
}
-void TimeFormatter::ImplInit()
-{
- meFormat = TimeFieldFormat::F_NONE;
- mbDuration = false;
- mnTimeFormat = TimeFormat::Hour24; // Should become an ExtTimeFieldFormat in next implementation, merge with mbDuration and meFormat
-}
-
-TimeFormatter::TimeFormatter(Edit* pEdit) :
- FormatterBase(pEdit),
- maLastTime( 0, 0 ),
- maMin( 0, 0 ),
- maMax( 23, 59, 59, 999999999 ),
- mbEnforceValidValue( true ),
- maFieldTime( 0, 0 )
+TimeFormatter::TimeFormatter(Edit* pEdit)
+ : FormatterBase(pEdit)
+ , maLastTime(0, 0)
+ , maMin(0, 0)
+ , maMax(23, 59, 59, 999999999)
+ , meFormat(TimeFieldFormat::F_NONE)
+ , mnTimeFormat(TimeFormat::Hour24) // Should become an ExtTimeFieldFormat in next implementation, merge with mbDuration and meFormat
+ , mbDuration(false)
+ , mbEnforceValidValue(true)
+ , maFieldTime(0, 0)
{
- ImplInit();
}
TimeFormatter::~TimeFormatter()
commit 3d3cb7808b4ca2ce10b16644846e6709d98e593c
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Dec 4 20:29:07 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Dec 5 10:43:00 2019 +0100
turn DateFormatter::ImplInit into initializer list
Change-Id: If58b8f5c65f7d920dd3a186cf648db605799b790
Reviewed-on: https://gerrit.libreoffice.org/84464
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index e7c193dad617..01256da135a5 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -267,7 +267,7 @@ public:
class VCL_DLLPUBLIC DateFormatter : public FormatterBase
{
private:
- std::unique_ptr<CalendarWrapper> mpCalendarWrapper;
+ std::unique_ptr<CalendarWrapper> mxCalendarWrapper;
Date maFieldDate;
Date maLastDate;
Date maMin;
@@ -277,8 +277,6 @@ private:
ExtDateFieldFormat mnExtDateFormat;
bool mbEnforceValidValue;
- SAL_DLLPRIVATE void ImplInit();
-
protected:
DateFormatter(Edit* pEdit);
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 7652af9dd165..3b4c51ce0832 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -1397,23 +1397,17 @@ void DateField::ImplDateSpinArea( bool bUp )
}
}
-void DateFormatter::ImplInit()
-{
- mbLongFormat = false;
- mbShowDateCentury = true;
- mpCalendarWrapper = nullptr;
- mnExtDateFormat = ExtDateFieldFormat::SystemShort;
-}
-
-DateFormatter::DateFormatter(Edit* pEdit) :
- FormatterBase(pEdit),
- maFieldDate( 0 ),
- maLastDate( 0 ),
- maMin( 1, 1, 1900 ),
- maMax( 31, 12, 2200 ),
- mbEnforceValidValue( true )
+DateFormatter::DateFormatter(Edit* pEdit)
+ : FormatterBase(pEdit)
+ , maFieldDate(0)
+ , maLastDate(0)
+ , maMin(1, 1, 1900)
+ , maMax(31, 12, 2200)
+ , mbLongFormat(false)
+ , mbShowDateCentury(true)
+ , mnExtDateFormat(ExtDateFieldFormat::SystemShort)
+ , mbEnforceValidValue(true)
{
- ImplInit();
}
DateFormatter::~DateFormatter()
@@ -1422,13 +1416,13 @@ DateFormatter::~DateFormatter()
CalendarWrapper& DateFormatter::GetCalendarWrapper() const
{
- if ( !mpCalendarWrapper )
+ if (!mxCalendarWrapper)
{
- const_cast<DateFormatter*>(this)->mpCalendarWrapper.reset( new CalendarWrapper( comphelper::getProcessComponentContext() ) );
- mpCalendarWrapper->loadDefaultCalendar( GetLocale() );
+ const_cast<DateFormatter*>(this)->mxCalendarWrapper.reset( new CalendarWrapper( comphelper::getProcessComponentContext() ) );
+ mxCalendarWrapper->loadDefaultCalendar( GetLocale() );
}
- return *mpCalendarWrapper;
+ return *mxCalendarWrapper;
}
void DateFormatter::SetExtDateFormat( ExtDateFieldFormat eFormat )
More information about the Libreoffice-commits
mailing list