[Libreoffice-commits] .: sw/source
Noel Power
noelp at kemper.freedesktop.org
Tue Jun 7 03:00:04 PDT 2011
sw/source/filter/ww8/docxattributeoutput.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 8a0d9026b949af066eba7379bc8002a9eb36b83f
Author: Noel Power <noel.power at novell.com>
Date: Tue Jun 7 10:59:42 2011 +0100
fix date format export, N is not a recognised format code
patch tweaks the date formating as follows
NNNN -> dddd
NN -> ddd
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 85ee6df..a70d5fe 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 );
More information about the Libreoffice-commits
mailing list