summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-06-18 00:19:36 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-06-18 02:02:50 +0200
commitb779dc1364af3082fa92070222a1946cb0c6e9b0 (patch)
treeb18acaa2eca451065155486400300e5a1f56ac85 /sw/qa
parent059ad394a8cfba191a2662953eea30f034f0e572 (diff)
CppunitTest_sw_ooxmlsdrexport: port fdo78474 to textboxes
Change-Id: Icadf4b44377684e40334c52887883320805a8e89
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index 9256f1b1fc03..2fbf4a917f2f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1617,7 +1617,16 @@ DECLARE_OOXMLEXPORT_TEST(fdo78474, "fdo78474.docx")
xmlDocPtr pXmlDoc1 = parseExport("word/document.xml");
if (!pXmlDoc1) return;
//docx file after RT is getting corrupted.
- assertXPath(pXmlDoc1, "/w:document[1]/w:body[1]/w:p[1]/w:r[2]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/pic:pic[1]/pic:blipFill[1]/a:blip[1]", "embed", "rId2");
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ if (xIndexAccess->getCount())
+ {
+ // TODO TextBox: remove this when TextBox is enabled by default
+ // This second run is a bug, should be the first ideally
+ assertXPath(pXmlDoc1, "/w:document[1]/w:body[1]/w:p[1]/w:r[2]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/pic:pic[1]/pic:blipFill[1]/a:blip[1]", "embed", "rId2");
+ }
+ else
+ assertXPath(pXmlDoc1, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/pic:pic[1]/pic:blipFill[1]/a:blip[1]", "embed", "rId2");
xmlDocPtr pXmlDoc2 = parseExport("word/_rels/document.xml.rels");
if (!pXmlDoc2) return;