diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-04-03 20:37:38 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-04-03 23:27:39 +0200 |
commit | 56f0144b0a40048505de4bac81e25f2454e43704 (patch) | |
tree | 6f9691c6eb80ebc6f07ea0850d5262fca2a7a975 | |
parent | 0ae1a6248434d60f2530fbf948cc302c987de1a5 (diff) |
we don't need a macro here
Change-Id: I7b063f54f354ade05dd0f2c4b10b161a44895076
-rw-r--r-- | sfx2/source/bastyp/helper.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx index 7c026352e20a..cc439db6c8ce 100644 --- a/sfx2/source/bastyp/helper.cxx +++ b/sfx2/source/bastyp/helper.cxx @@ -58,15 +58,20 @@ using ::rtl::OUString; using ::rtl::OStringBuffer; using ::rtl::OStringToOUString; -#define CONVERT_DATETIME( aUnoDT, aToolsDT ) \ - aToolsDT = DateTime( Date( aUnoDT.Day, aUnoDT.Month, aUnoDT.Year ), \ - Time( aUnoDT.Hours, aUnoDT.Minutes, aUnoDT.Seconds, aUnoDT.HundredthSeconds ) ); +namespace { + +DateTime convertDateTime( const util::DateTime& rUnoDT ) +{ + return DateTime( Date( rUnoDT.Day, rUnoDT.Month, rUnoDT.Year ), + Time( rUnoDT.Hours, rUnoDT.Minutes, rUnoDT.Seconds, rUnoDT.HundredthSeconds ) ); +} + +} void AppendDateTime_Impl( const util::DateTime rDT, String& rRow, const LocaleDataWrapper& rWrapper ) { - DateTime aDT( DateTime::EMPTY ); - CONVERT_DATETIME( rDT, aDT ); + DateTime aDT = convertDateTime(rDT); String aDateStr = rWrapper.getDate( aDT ); aDateStr += rtl::OUString(", "); aDateStr += rWrapper.getTime( aDT ); |