[Libreoffice-commits] core.git: 2 commits - sw/qa
Miklos Vajna
vmiklos at collabora.co.uk
Tue Jun 17 02:57:00 PDT 2014
sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx | 29 ++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
New commits:
commit d801926e0ad2ee64c41208b5ab5984d9dc5248f0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jun 17 11:47:11 2014 +0200
CppunitTest_sw_ooxmlsdrexport: port testFdo70942 to textboxes
Change-Id: I417405192a74f340aaf80b911d9a8b16b3a83d6f
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index 722775b..5845479 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -685,8 +685,18 @@ DECLARE_OOXMLEXPORT_TEST(testFdo70942, "fdo70942.docx")
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if (!pXmlDoc)
return;
- assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
- "prst", "ellipse");
+ 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[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "ellipse");
+ }
+ else
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "ellipse");
}
DECLARE_OOXMLEXPORT_TEST(testDrawinglayerPicPos, "drawinglayer-pic-pos.docx")
commit edde2b02e1e01e044f7927fdf7440a9e6eb8651b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jun 17 11:44:59 2014 +0200
CppunitTest_sw_ooxmlsdrexport: port testFdo73247 to textboxes
Change-Id: Ie9653c3a4c4e09d052027580036d73c20cc576ab
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index fdeb061..722775b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -665,8 +665,19 @@ DECLARE_OOXMLEXPORT_TEST(testFdo73247, "fdo73247.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:spPr/a:xfrm",
- "rot", "1969698");
+
+ 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:spPr/a:xfrm",
+ "rot", "1969698");
+ }
+ 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:spPr/a:xfrm",
+ "rot", "1969200");
}
DECLARE_OOXMLEXPORT_TEST(testFdo70942, "fdo70942.docx")
More information about the Libreoffice-commits
mailing list