summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorPallavi Jadhav <pallavi.jadhav@synerzip.com>2014-08-08 17:20:31 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-08-11 08:28:57 +0000
commitf6e7b94042070241cd1cfb1d7f8610fe1801b4f2 (patch)
treec723d3680b05f35a468371db60508115f7500915 /sw/qa
parentba774649fb6f53c8d3251d417c4537ae7c495881 (diff)
fdo#82123 : DOCX: Corruption: File was getting corrupt fafter RT
Issue : - In issue file there were two runs(first run=SDT, second run=Image). - These two runs were consecutive(no text/space/tab was there in between two runs). - Due to such scenario, "SdtEndBefore" was not getting set. - Hence at Export EndSdtBlock() was getting called form EndParagraph() Instead EndSdtBlock() should ge called from EndRun() in order to end sdt after first run(as in Original file) Implementation : - Set "SdtEndBefore" on Graphic in DomainMapper_Impl::ImportGraphic() - Retrieved same property at export. - Added export unit test case. Change-Id: Id514b91f1831af371924f94388f0a404d762c042 Reviewed-on: https://gerrit.libreoffice.org/10827 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo82123.docxbin0 -> 36087 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo82123.docx b/sw/qa/extras/ooxmlexport/data/fdo82123.docx
new file mode 100644
index 000000000000..fc2632cb6abd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo82123.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index be347b5134b1..9ab1ba22c80a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -591,6 +591,16 @@ DECLARE_OOXMLEXPORT_TEST(testFdo81945, "fdo81945.docx")
assertXPath(pXmlDoc, "//w:sdt//w:sdt", 0);
}
+DECLARE_OOXMLEXPORT_TEST(testfdo82123, "fdo82123.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+
+ // make sure there is only one run inside first SDT after RT as in the Original file.
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[2]/w:p/w:sdt[1]/w:sdtContent/w:r",1);
+}
+
DECLARE_OOXMLEXPORT_TEST(testfdo81946, "fdo81946.docx")
{
xmlDocPtr pXmlDoc = parseExport("word/header1.xml");