summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2011-06-07 10:59:42 +0100
committerNoel Power <noel.power@novell.com>2011-06-07 10:59:42 +0100
commit97e68e53ec92aef2d5de188166e2c70a40e8935a (patch)
tree071b2e6f9da458b1bb3d432f243607bd16b87c7c
parenta4b592dbc7aae6a56a6ea6f8a697cad441af3b8f (diff)
fix date format export, N is not a recognised format code
patch tweaks the date formating as follows NNNN -> dddd NN -> ddd
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 76770985ca2b..2f4921bbdaee 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -756,6 +756,15 @@ void DocxAttributeOutput::CmdField_Impl( FieldInfos& rInfos )
for ( xub_StrLen i = 0; i < nNbToken; i++ )
{
String sToken = rInfos.sCmd.GetToken( i, '\t' );
+ if ( rInfos.eType == ww::eCREATEDATE
+ || rInfos.eType == ww::eSAVEDATE
+ || rInfos.eType == ww::ePRINTDATE
+ || rInfos.eType == ww::eDATE
+ || rInfos.eType == ww::eTIME )
+ {
+ sToken.SearchAndReplaceAll( String( RTL_CONSTASCII_USTRINGPARAM("NNNN") ), String( RTL_CONSTASCII_USTRINGPARAM("dddd") ) );
+ sToken.SearchAndReplaceAll( String( RTL_CONSTASCII_USTRINGPARAM("NN") ), String( RTL_CONSTASCII_USTRINGPARAM("ddd") ) );
+ }
// Write the Field command
DoWriteCmd( sToken );