summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorPallavi Jadhav <pallavi.jadhav@synerzip.com>2014-08-28 12:23:20 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-09-01 00:54:10 -0500
commit61ed5a1f959a7903cfb56dc293dcc511ea28d15e (patch)
tree8c99dea58e0d803d1325d700478af71186650a7a /writerfilter
parent3ee78b9c4e9e68d8c88792b08a11288df7d1e9b0 (diff)
fdo#83048: DOCX: Corrupt: LO exports wrong SDT properties of Date
Issue : -File was getting corrupt due to wrong SDT Properties were getting export and only one SDT tag was getting written. -Issue file contained a Date SDT and a FieldChar SDT(Page numbers) -Issue was at Import side. LO GRAB BAGS Properties of SDT using PARA_GRAB_BAG or CHAR_GRAB_BAG -For Date SDT it should be grab bagged using CHAR_GRAB_BAG in order to get correct data inside <w:sdtPr> But LO was handling it with PARA_GRAB_BAG due to which wrong properties were getting written and file was getting corrupt. Implementation : -Added a check for Date SDT to handle it through CHAR_GRAB_BAG -Now correct SDT properties are getting exported due to which Date is getting written inside an SDT tag. -Added UT at export side. Change-Id: Ibcfb6dbbec1c23ffd14ba924ab56dc4122b98595 Reviewed-on: https://gerrit.libreoffice.org/11160 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index b5ce4a317578..8a4910e8915b 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2961,6 +2961,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_text") ||
m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_dataBinding") ||
m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_citation") ||
+ m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_date") ||
(m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_id") &&
m_pImpl->m_pSdtHelper->getInteropGrabBagSize() == 1)) && !m_pImpl->m_pSdtHelper->isOutsideAParagraph())
{