summaryrefslogtreecommitdiff
path: root/include/tools
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-10-28 11:23:36 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-10-28 14:08:34 +0100
commita3de32acc06cfcf9bb343a29c4b9854c92645f70 (patch)
treee06ec2460b33c3353a018e914f1d3050f52c2f0f /include/tools
parent24c28ac7b08848f80001d6e69595804d3ab64b47 (diff)
Rename (private) Date::init and reuse it
Change-Id: I3123876860cf6cce1e16c8f516f3d08fa7e15d83
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/date.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/tools/date.hxx b/include/tools/date.hxx
index 22cec9abf78f..ffb425c2a0ff 100644
--- a/include/tools/date.hxx
+++ b/include/tools/date.hxx
@@ -32,7 +32,7 @@ class TOOLS_DLLPUBLIC SAL_WARN_UNUSED Date
{
private:
sal_uInt32 nDate;
- void init( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
+ void setDateFromDMY( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
{ nDate = ( sal_uInt32( nDay % 100 ) ) +
( ( sal_uInt32( nMonth % 100 ) ) * 100 ) +
( ( sal_uInt32( nYear % 10000 ) ) * 10000); }
@@ -56,11 +56,11 @@ public:
Date( const Date& rDate )
{ nDate = rDate.nDate; }
Date( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
- { init(nDay, nMonth, nYear); }
+ { setDateFromDMY(nDay, nMonth, nYear); }
Date( const css::util::Date& _rDate )
{
SAL_WARN_IF(_rDate.Year < 0, "tools.datetime", "Negative year in css::util::Date to ::Date conversion");
- init(_rDate.Day, _rDate.Month, _rDate.Year);
+ setDateFromDMY(_rDate.Day, _rDate.Month, _rDate.Year);
}
Date( const css::util::DateTime& _rDateTime );