summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRosemary <rosemaryseb8@gmail.com>2015-11-19 21:48:47 +0530
committerKatarina Behrens <Katarina.Behrens@cib.de>2015-11-30 09:58:41 +0000
commitc7b2d473e32af9b2dad4f294105505084ee0a1f6 (patch)
tree126c8173f2b732bba7d5b06f3eb1d52ce037e1f7 /oox
parent2e565fe8d040c61f5491f3df13665735fb8d9d84 (diff)
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/20062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx38
1 files changed, 36 insertions, 2 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 8c90ffaa982b..f9902127951e 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -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 );