diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-15 13:55:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-18 13:16:23 +0200 |
commit | 7d14555ef7e867c5b1a0e195e3ef056885697c59 (patch) | |
tree | af39963caf1328d41756e4463a2a39019448026d /oox | |
parent | 0083b33650c2f584ceff6eeaf9ef6993bfe0ae9b (diff) |
convert SvxDateFormat to scoped enum
And simplify the code in sd/headerfooterdlg, no
need for the complex encoding of date and time when we
can just index into a static array.
Change-Id: I677400bf1f956c81eba665b71dbda9183b63f55c
Reviewed-on: https://gerrit.libreoffice.org/42346
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/drawingml.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 7ca7d765ec6a..1ce02a7e2b53 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1654,16 +1654,17 @@ OUString DrawingML::GetFieldValue( const css::uno::Reference< css::text::XTextRa { sal_Int32 nNumFmt = -1; rXPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= nNumFmt; - switch(nNumFmt) + switch(static_cast<SvxDateFormat>(nNumFmt)) { - case SVXDATEFORMAT_STDSMALL: - case SVXDATEFORMAT_A: aFieldValue = "datetime"; // 13/02/96 + case SvxDateFormat::StdSmall: + case SvxDateFormat::A: aFieldValue = "datetime"; // 13/02/96 break; - case SVXDATEFORMAT_B: aFieldValue = "datetime1"; // 13/02/1996 + case SvxDateFormat::B: aFieldValue = "datetime1"; // 13/02/1996 break; - case SVXDATEFORMAT_STDBIG: - case SVXDATEFORMAT_D: aFieldValue = "datetime3"; // 13 February 1996 + case SvxDateFormat::StdBig: + case SvxDateFormat::D: aFieldValue = "datetime3"; // 13 February 1996 break; + default: break; } } else if(aFieldKind == "ExtTime") |