Kaydet (Commit) c7b2d473 authored tarafından Rosemary's avatar Rosemary Kaydeden (comit) Katarina Behrens

export date and time fields in impress

only those fields that are currently implemented
in editeng/source/items/flditem.cxx and also match
with those in the specification are exported

Change-Id: I542cb0f827e161005e55452b5b6961dc642cd4e7
Reviewed-on: https://gerrit.libreoffice.org/20062Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst 2e565fe8
......@@ -81,10 +81,13 @@
#include <filter/msfilter/util.hxx>
#include <editeng/outlobj.hxx>
#include <editeng/svxenum.hxx>
#include <editeng/unonames.hxx>
#include <editeng/flditem.hxx>
#include <svx/unoapi.hxx>
#include <svx/svdoashp.hxx>
#include <svx/unoshape.hxx>
using namespace ::css;
using namespace ::css::beans;
using namespace ::css::drawing;
......@@ -1494,10 +1497,42 @@ OUString DrawingML::GetFieldValue( css::uno::Reference< css::text::XTextRange >
GET( aFieldValue, Representation)
}
else if(aFieldKind == "Date")
{
sal_Int32 nNumFmt = -1;
rXPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= nNumFmt;
switch(nNumFmt)
{
case SVXDATEFORMAT_STDSMALL:
case SVXDATEFORMAT_A: aFieldValue = "datetime"; // 13/02/96
break;
case SVXDATEFORMAT_B: aFieldValue = "datetime1"; // 13/02/1996
break;
case SVXDATEFORMAT_STDBIG:
case SVXDATEFORMAT_D: aFieldValue = "datetime3"; // 13 February 1996
break;
}
}
else if(aFieldKind == "ExtTime")
{
sal_Int32 nNumFmt = -1;
rXPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= nNumFmt;
switch(nNumFmt)
{
case SVXTIMEFORMAT_STANDARD:
case SVXTIMEFORMAT_24_HMS: aFieldValue = "datetime11"; // 13:49:38
break;
case SVXTIMEFORMAT_24_HM: aFieldValue = "datetime10"; // 13:49
break;
case SVXTIMEFORMAT_12_HM: aFieldValue = "datetime12"; // 01:49 PM
break;
case SVXTIMEFORMAT_12_HMS: aFieldValue = "datetime13"; // 01:49:38 PM
break;
}
}
}
}
}
return aFieldValue;
}
......@@ -1568,7 +1603,6 @@ void DrawingML::WriteRun( Reference< XTextRange > rRun )
Reference< XPropertySet > xPropSet( rRun, uno::UNO_QUERY );
WriteRunProperties( xPropSet, bIsURLField );
mpFS->startElementNS( XML_a, XML_t, FSEND );
mpFS->writeEscaped( sText );
mpFS->endElementNS( XML_a, XML_t );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment