summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-11 13:35:38 +0200
committerEike Rathke <erack@redhat.com>2015-01-13 15:24:04 +0000
commitc32a5a3b8e2e3a49ac9f1fd3f2872b00612676b7 (patch)
treecb2de3eab8dbbcff359d367177d91b67725e1b69 /editeng
parent86db1702d72a103ffeafc69dcaa63318539c147a (diff)
simplify Date/Time/DateTime conversion code
add constructors to Date/DateTime/Time, that take the css::util counterparts, to simplify code converting between these type Change-Id: I4b03da02c63f65b6ec18cb4d6ecc3859bdef1ff7 Reviewed-on: https://gerrit.libreoffice.org/13855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/flditem.cxx2
-rw-r--r--editeng/source/uno/unofield.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 57f1e2af0427..57de9870c461 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -81,7 +81,7 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe
if (nFieldType != text::textfield::Type::TIME)
{
util::DateTime aDateTime = xPropSet->getPropertyValue(UNO_TC_PROP_DATE_TIME).get<util::DateTime>();
- tools::Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds);
+ tools::Time aTime(aDateTime);
bool bIsFixed = false;
xPropSet->getPropertyValue(UNO_TC_PROP_IS_FIXED) >>= bIsFixed;
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index 7c7cae965430..48042ebf8f54 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -212,7 +212,7 @@ static util::DateTime getTime(sal_Int64 const nTime)
inline tools::Time setTime( util::DateTime& rDate )
{
- return tools::Time( rDate.Hours, rDate.Minutes, rDate.Seconds, rDate.NanoSeconds );
+ return tools::Time( rDate );
}