summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-07-03 14:43:54 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-07-12 06:11:25 +0200
commit9c2feb75a6104d4376cccb157244dd7f6e88968a (patch)
treedfdcf540750ae743911bcee59156e13bcdea51fc /sw/source
parent9e007eb2b0ab44b436da9d00559150cc4fa37dc5 (diff)
MSForms: DOCX filter: handle date formats with quotation marks.
Change-Id: I61cc6d47200acdd55f147b4f1829330dec8562a0 Reviewed-on: https://gerrit.libreoffice.org/75454 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 82c5c30896ea..68d2e120bf5b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1891,8 +1891,11 @@ void DocxAttributeOutput::WriteFormDate(const OUString& sCurrentDate, const OUSt
else
m_pSerializer->startElementNS(XML_w, XML_date);
+ OString sUTF8DateFormat = sDateFormat.toUtf8();
+ // Replace quotation mark used for marking static strings in date format
+ sUTF8DateFormat = sUTF8DateFormat.replaceAll("\"", "'");
m_pSerializer->singleElementNS(XML_w, XML_dateFormat,
- FSNS(XML_w, XML_val), sDateFormat.toUtf8());
+ FSNS(XML_w, XML_val), sUTF8DateFormat);
m_pSerializer->singleElementNS(XML_w, XML_lid,
FSNS(XML_w, XML_val), sLang.toUtf8());
m_pSerializer->singleElementNS(XML_w, XML_storeMappedDataAs,