[Libreoffice-commits] core.git: 2 commits - sw/qa
Miklos Vajna
vmiklos at collabora.co.uk
Tue Jun 17 04:49:35 PDT 2014
sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
New commits:
commit 7b811b689c3980ea466a96de16833c01226beeb1
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jun 17 13:42:03 2014 +0200
CppunitTest_sw_ooxmlsdrexport: port testMSwordHang to textboxes
Change-Id: Ia13c3d5657c32b89e200ede572d4615b833374de
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index af4fdca..15ed98f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -984,7 +984,16 @@ DECLARE_OOXMLEXPORT_TEST(testMSwordHang,"test_msword_hang.docx")
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if (!pXmlDoc)
return;
- assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r[2]/w:drawing/wp:inline", "distT", "0");
+ 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(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r[2]/w:drawing/wp:inline", "distT", "0");
+ }
+ else
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r[2]/w:drawing/wp:inline", "distT", "0");
}
DECLARE_OOXMLEXPORT_TEST(testGroupshapeThemeFont, "groupshape-theme-font.docx")
commit dfacd379b0e8a347ae4f69e5a17208942711e9ec
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jun 17 13:39:52 2014 +0200
CppunitTest_sw_ooxmlsdrexport: port testLineStyle_DashType_VML to textboxes
Change-Id: Idb4807a58b6008afeb3e26d03b699671c0b88f7c
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index 1e23de8..af4fdca 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -919,7 +919,16 @@ DECLARE_OOXMLEXPORT_TEST(testLineStyle_DashType_VML, "LineStyle_DashType_VML.doc
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if (!pXmlDoc)
return;
- assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:stroke", "dashstyle", "dash");
+ 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(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:stroke", "dashstyle", "dash");
+ }
+ else
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:stroke", "dashstyle", "dash");
}
DECLARE_OOXMLEXPORT_TEST(testFdo74110,"fdo74110.docx")
More information about the Libreoffice-commits
mailing list