1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include <swmodeltestbase.hxx>
14 #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
15 #include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
16 #include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp>
17 #include <com/sun/star/drawing/FillStyle.hpp>
18 #include <com/sun/star/drawing/Hatch.hpp>
19 #include <com/sun/star/drawing/LineJoint.hpp>
20 #include <com/sun/star/drawing/LineStyle.hpp>
21 #include <com/sun/star/drawing/PointSequenceSequence.hpp>
22 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
23 #include <com/sun/star/style/LineSpacing.hpp>
24 #include <com/sun/star/style/LineSpacingMode.hpp>
25 #include <com/sun/star/text/GraphicCrop.hpp>
27 #include <comphelper/sequenceashashmap.hxx>
29 class Test
: public SwModelTestBase
32 Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
38 bool mustTestImportOf(const char* filename
) const SAL_OVERRIDE
{
39 // If the testcase is stored in some other format, it's pointless to test.
40 return (OString(filename
).endsWith(".docx"));
44 DECLARE_OOXMLEXPORT_TEST( testChildNodesOfCubicBezierTo
, "FDO74774.docx")
46 /* Number of children required by cubicBexTo is 3 of type "pt".
47 While exporting, sometimes the child nodes are less than 3.
48 The test case ensures that there are 3 child nodes of type "pt"
51 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
56 "/w:document/w:body/w:p[2]/w:r[1]/mc:AlternateContent[1]/mc:Choice/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/wpg:wgp[1]/wps:wsp[3]/wps:spPr[1]/a:custGeom[1]/a:pathLst[1]/a:path[1]/a:cubicBezTo[2]/a:pt[3]");
59 DECLARE_OOXMLEXPORT_TEST(testMSwordHang
,"test_msword_hang.docx")
62 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
65 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");
68 DECLARE_OOXMLEXPORT_TEST(testGroupshapeThemeFont
, "groupshape-theme-font.docx")
70 // Font was specified using a theme reference, which wasn't handled.
71 uno::Reference
<container::XIndexAccess
> xGroup(getShape(1), uno::UNO_QUERY
);
72 uno::Reference
<text::XText
> xText
= uno::Reference
<text::XTextRange
>(xGroup
->getByIndex(0), uno::UNO_QUERY
)->getText();
73 uno::Reference
<text::XTextRange
> xRun
= getRun(getParagraphOfText(1, xText
),1);
75 CPPUNIT_ASSERT_EQUAL(OUString("Cambria"), getProperty
<OUString
>(xRun
, "CharFontName"));
78 DECLARE_OOXMLEXPORT_TEST(testAnchorIdForWP14AndW14
, "AnchorId.docx")
80 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
84 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[3]/mc:AlternateContent/mc:Choice/w:drawing/wp:inline", "anchorId", "78735EFD");
85 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[3]/mc:AlternateContent/mc:Fallback/w:pict/v:rect", "anchorId", "78735EFD");
90 DECLARE_OOXMLEXPORT_TEST(testDkVert
, "dkvert.docx")
92 // <a:pattFill prst="dkVert"> was exported as ltVert.
93 uno::Reference
<container::XIndexAccess
> xGroup(getShape(1), uno::UNO_QUERY
);
94 uno::Reference
<beans::XPropertySet
> xShape(xGroup
->getByIndex(0), uno::UNO_QUERY
);
96 CPPUNIT_ASSERT_EQUAL(sal_Int32(25), getProperty
<drawing::Hatch
>(xShape
, "FillHatch").Distance
);
99 DECLARE_OOXMLEXPORT_TEST(testTextWatermark
, "textWatermark.docx")
101 //The problem was that the watermark ID was not preserved,
102 //and Word uses the object ID to identify if it is a watermark.
103 //It has to have the 'PowerPlusWaterMarkObject' string in it
104 xmlDocPtr pXmlHeader1
= parseExport("word/header1.xml");
108 assertXPath(pXmlHeader1
, "/w:hdr[1]/w:p[1]/w:r[1]/w:pict[1]/v:shape[1]","id","PowerPlusWaterMarkObject93701316");
111 DECLARE_OOXMLEXPORT_TEST(testPictureWatermark
, "pictureWatermark.docx")
113 //The problem was that the watermark ID was not preserved,
114 //and Word uses the object ID to identify if it is a watermark.
115 //It has to have the 'WordPictureWaterMarkObject' string in it
117 xmlDocPtr pXmlHeader1
= parseExport("word/header1.xml");
121 // Check the watermark ID
122 assertXPath(pXmlHeader1
, "/w:hdr[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Fallback[1]/w:pict[1]/v:rect[1]","id","WordPictureWatermark11962361");
126 DECLARE_OOXMLEXPORT_TEST(testFdo76249
, "fdo76249.docx")
129 * The Locked Canvas is imported correctly, but while exporting
130 * the drawing element is exported inside a textbox. However a the drawing has to exported
131 * as a Locked Canvas inside a text-box for the RT file to work in MS Word, as drawing elements
132 * are not allowed inside the textboxes.
134 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
137 assertXPath(pXmlDoc
, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Fallback[1]/w:pict[1]/v:rect[1]/v:textbox[1]/w:txbxContent[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/lc:lockedCanvas[1]",1);
140 DECLARE_OOXMLEXPORT_TEST(testFdo76979
, "fdo76979.docx")
142 // The problem was that black was exported as "auto" fill color, resulting in well-formed, but invalid XML.
143 xmlDocPtr pXmlDoc
= parseExport("word/header2.xml");
146 // This was "auto", not "FFFFFF".
147 assertXPath(pXmlDoc
, "//wps:spPr/a:solidFill/a:srgbClr", "val", "FFFFFF");
150 DECLARE_OOXMLEXPORT_TEST(testShapeEffectPreservation
, "shape-effect-preservation.docx")
152 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
156 // first shape with outer shadow, rgb color
157 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
158 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw",
160 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
161 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw",
163 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
164 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw",
166 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
167 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw",
169 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
170 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw",
171 "rotWithShape", "0");
172 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
173 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:srgbClr",
175 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
176 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:srgbClr/a:alpha",
179 // second shape with outer shadow, scheme color
180 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
181 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw",
183 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
184 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw",
185 "blurRad", "114300");
186 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
187 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw",
189 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
190 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw",
192 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
193 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw",
194 "rotWithShape", "0");
195 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
196 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:schemeClr",
198 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
199 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:schemeClr/a:lumMod",
201 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
202 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:schemeClr/a:lumOff",
204 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
205 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw/a:schemeClr/a:alpha",
208 // third shape with inner shadow, rgb color
209 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
210 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw",
212 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
213 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw",
215 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
216 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw",
218 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
219 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw/a:srgbClr",
221 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
222 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw/a:srgbClr/a:alpha",
225 // 4th shape with soft edge
226 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
227 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:softEdge",
229 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
230 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:softEdge/*",
231 0 ); // should not be present
233 // 5th shape with glow effect, scheme color
234 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
235 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow",
237 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
238 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow/a:schemeClr",
240 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
241 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow/a:schemeClr/a:satMod",
243 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
244 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow/a:schemeClr/a:alpha",
247 // 6th shape with reflection
248 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[7]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
249 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection",
251 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[7]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
252 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection",
254 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[7]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
255 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection",
257 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[7]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
258 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection",
260 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[7]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
261 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection/*",
262 0 ); // should not be present
264 // 7th shape with several effects: glow, inner shadow and reflection
265 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
266 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow",
268 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
269 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow/a:schemeClr",
271 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
272 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:glow/a:schemeClr/*",
274 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
275 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw",
277 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
278 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw",
280 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
281 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw/a:srgbClr",
283 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
284 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:innerShdw/a:srgbClr/a:alpha",
286 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
287 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection",
289 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[8]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
290 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:reflection",
294 DECLARE_OOXMLEXPORT_TEST(testShape3DEffectPreservation
, "shape-3d-effect-preservation.docx")
296 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
300 // first shape: extrusion and shift on z, rotated camera with zoom, rotated light rig
301 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
302 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera",
303 "prst", "perspectiveRelaxedModerately");
304 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
305 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera",
307 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
308 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera/a:rot",
310 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
311 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera/a:rot",
313 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
314 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera/a:rot",
317 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
318 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig",
320 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
321 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig",
323 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
324 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig/a:rot",
326 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
327 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig/a:rot",
329 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
330 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig/a:rot",
333 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
334 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d",
335 "extrusionH", "63500");
336 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
337 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d",
340 // second shape: extrusion with theme color, no camera or light rotation, metal material
341 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
342 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera",
343 "prst", "isometricLeftDown");
344 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
345 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:camera/a:rot",
347 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
348 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig",
350 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
351 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig",
353 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
354 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:scene3d/a:lightRig/a:rot",
357 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
358 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d",
359 "extrusionH", "25400");
360 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
361 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d",
362 "prstMaterial", "metal");
363 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
364 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:extrusionClr/a:schemeClr",
366 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
367 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:extrusionClr/a:schemeClr/a:lumMod",
369 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
370 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:extrusionClr/a:schemeClr/a:lumOff",
373 // third shape: colored countour and top and bottom bevel, plastic material
374 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
375 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d",
376 "contourW", "50800");
377 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
378 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d",
379 "prstMaterial", "plastic");
380 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
381 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:bevelT",
383 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
384 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:bevelT",
386 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
387 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:bevelT",
389 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
390 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:bevelB",
392 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
393 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:bevelB",
394 "prst", "relaxedInset");
395 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
396 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d/a:contourClr/a:srgbClr",
399 // fourth shape: wireframe
400 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
401 "wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:sp3d",
402 "prstMaterial", "legacyWireframe");
405 DECLARE_OOXMLEXPORT_TEST(testPictureEffectPreservation
, "picture-effects-preservation.docx")
407 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
411 // first picture: glow effect with theme color and transformations, 3d rotation and extrusion
412 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
413 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:glow",
415 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
416 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:glow/a:schemeClr",
418 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
419 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:glow/a:schemeClr/*",
422 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
423 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:scene3d/a:camera",
424 "prst", "isometricRightUp");
425 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
426 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:scene3d/a:lightRig",
428 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
429 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:sp3d",
430 "extrusionH", "76200");
431 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
432 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:sp3d/a:extrusionClr/a:srgbClr",
435 // second picture: shadow and reflection effects
436 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
437 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:outerShdw",
439 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
440 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:outerShdw/a:srgbClr",
442 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
443 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:outerShdw/a:srgbClr/a:alpha",
445 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
446 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:reflection",
448 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
449 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:reflection/*",
450 0 ); // should not be present
452 // third picture: soft edge effect
453 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
454 "wp:anchor/a:graphic/a:graphicData/pic:pic/pic:spPr/a:effectLst/a:softEdge",
458 DECLARE_OOXMLEXPORT_TEST(testPictureArtisticEffectPreservation
, "picture-artistic-effects-preservation.docx")
460 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
461 xmlDocPtr pRelsDoc
= parseExport("word/_rels/document.xml.rels");
462 if (!pXmlDoc
|| !pRelsDoc
)
465 uno::Reference
<packages::zip::XZipFileAccess2
> xNameAccess
= packages::zip::ZipFileAccess::createWithURL(
466 comphelper::getComponentContext(m_xSFactory
), maTempFile
.GetURL());
468 // 1st picture: marker effect
469 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
470 "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
471 "a14:artisticMarker",
473 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
474 "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
475 "a14:artisticMarker",
478 OUString sEmbedId1
= getXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
479 "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer",
481 OUString sXmlPath
= "/rels:Relationships/rels:Relationship[@Id='" + sEmbedId1
+ "']";
482 OUString sFile
= getXPath(pRelsDoc
, OUStringToOString( sXmlPath
, RTL_TEXTENCODING_UTF8
), "Target");
483 CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess
->hasByName("word/" + sFile
)));
485 // 2nd picture: pencil grayscale
486 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
487 "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
488 "a14:artisticPencilGrayscale",
490 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
491 "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
492 "a14:artisticPencilGrayscale",
495 OUString sEmbedId2
= getXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
496 "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer",
498 CPPUNIT_ASSERT_EQUAL(sEmbedId1
, sEmbedId2
);
500 // 3rd picture: pencil sketch
501 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
502 "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
503 "a14:artisticPencilSketch",
505 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
506 "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
507 "a14:artisticPencilSketch",
510 OUString sEmbedId3
= getXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
511 "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer",
513 CPPUNIT_ASSERT_EQUAL(sEmbedId1
, sEmbedId3
);
515 // 4th picture: light screen
516 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
517 "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
518 "a14:artisticLightScreen",
520 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
521 "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
522 "a14:artisticLightScreen",
525 OUString sEmbedId4
= getXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
526 "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer",
528 sXmlPath
= "/rels:Relationships/rels:Relationship[@Id='" + sEmbedId4
+ "']";
529 sFile
= getXPath(pRelsDoc
, OUStringToOString( sXmlPath
, RTL_TEXTENCODING_UTF8
), "Target");
530 CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess
->hasByName("word/" + sFile
)));
532 // 5th picture: watercolor sponge
533 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
534 "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
535 "a14:artisticWatercolorSponge",
538 OUString sEmbedId5
= getXPath(pXmlDoc
, "/w:document/w:body/w:p[5]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
539 "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer",
541 CPPUNIT_ASSERT_EQUAL(sEmbedId1
, sEmbedId5
);
543 // 6th picture: photocopy (no attributes)
544 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/"
545 "a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer/a14:imgEffect/"
546 "a14:artisticPhotocopy", 1);
548 OUString sEmbedId6
= getXPath(pXmlDoc
, "/w:document/w:body/w:p[6]/w:r/mc:AlternateContent/mc:Choice/w:drawing/"
549 "wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:extLst/a:ext/a14:imgProps/a14:imgLayer",
551 CPPUNIT_ASSERT_EQUAL(sEmbedId1
, sEmbedId6
);
553 // no redundant wdp files saved
554 CPPUNIT_ASSERT_EQUAL(false, bool(xNameAccess
->hasByName("word/media/hdphoto3.wdp")));
557 DECLARE_OOXMLEXPORT_TEST(fdo77719
, "fdo77719.docx")
559 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
562 assertXPath(pXmlDoc
, "/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:spPr[1]/a:custGeom[1]", 1);
565 DECLARE_OOXMLEXPORT_TEST(testNestedAlternateContent
, "nestedAlternateContent.docx")
567 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
570 // We check alternateContent could not contains alternateContent (i.e. nested alternateContent)
571 assertXPath(pXmlDoc
,"/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]/wpg:wgp[1]/wps:wsp[2]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[2]/mc:AlternateContent[1]",0);
575 // Currently LibreOffice exports custom geometry for this hexagon, not preset shape.
576 // When LibreOffice can export preset shapes with correct modifiers, then this test can be re-enabled.
578 DECLARE_OOXMLEXPORT_TEST(test76317
, "test76317.docx")
580 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
581 if (!pXmlDoc
) return;
582 assertXPath(pXmlDoc
, "/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:spPr[1]/a:prstGeom[1]", "prst", "hexagon");
587 DECLARE_OOXMLEXPORT_TEST(fdo76591
, "fdo76591.docx")
589 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
592 assertXPath(pXmlDoc
, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]", "relativeHeight", "3");
595 DECLARE_OOXMLEXPORT_TEST(test76317_2K10
, "test76317_2K10.docx")
597 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
598 if (!pXmlDoc
) return;
599 assertXPath(pXmlDoc
, "/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:spPr[1]/a:prstGeom[1]/a:avLst[1]/a:gd[1]", "name", "adj");
602 DECLARE_OOXMLEXPORT_TEST(testFDO77122
, "LinkedTextBoxes.docx")
604 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
607 //ensure that the text box links are preserved.
608 assertXPath(pXmlDoc
, "//wps:txbx[1]", "id", "1");
609 assertXPath(pXmlDoc
, "//wps:linkedTxbx[1]", "id", "1");
612 DECLARE_OOXMLEXPORT_TEST(test76734_2K7
, "test76734_2K7.docx")
614 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
617 assertXPath(pXmlDoc
, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]", "Requires", "wps");
620 DECLARE_OOXMLEXPORT_TEST(test77219
, "test77219.docx")
622 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
625 assertXPath(pXmlDoc
, "/w:document[1]/w:body[1]/w:p[6]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]", "behindDoc", "1");
628 DECLARE_OOXMLEXPORT_TEST(testPresetShape
, "preset-shape.docx")
630 // Document contains a flowChartMultidocument preset shape, our date for that shape wasn't correct.
631 uno::Reference
<beans::XPropertySet
> xPropertySet(getShape(1), uno::UNO_QUERY
);
632 comphelper::SequenceAsHashMap
aCustomShapeGeometry(xPropertySet
->getPropertyValue("CustomShapeGeometry"));
633 comphelper::SequenceAsHashMap
aPath(aCustomShapeGeometry
["Path"]);
634 uno::Sequence
<awt::Size
> aSubViewSize((aPath
["SubViewSize"]).get
<uno::Sequence
<awt::Size
> >() );
637 CPPUNIT_ASSERT_EQUAL(sal_Int32(21600), aSubViewSize
[0].Height
);
640 DECLARE_OOXMLEXPORT_TEST(testFdo76101
, "fdo76101.docx")
642 xmlDocPtr pXmlDoc
= parseExport("word/styles.xml");
646 xmlXPathObjectPtr pXmlObj
= getXPathNode(pXmlDoc
, "/w:styles/w:style");
647 xmlNodeSetPtr pXmlNodes
= pXmlObj
->nodesetval
;
648 CPPUNIT_ASSERT(4091 >= xmlXPathNodeSetGetLength(pXmlNodes
));
649 xmlXPathFreeObject(pXmlObj
);
652 DECLARE_OOXMLEXPORT_TEST(testSdtAndShapeOverlapping
,"ShapeOverlappingWithSdt.docx")
654 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
657 assertXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[1]/mc:AlternateContent");
658 assertXPath(pXmlDoc
, "/w:document/w:body/w:p/w:sdt[1]/w:sdtContent[1]/w:r[1]/w:t[1]");
661 DECLARE_OOXMLEXPORT_TEST(testLockedCanvas
, "fdo78658.docx")
663 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
666 // Checking for lockedCanvas tag
667 assertXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/lc:lockedCanvas", 1);
670 DECLARE_OOXMLEXPORT_TEST(fdo78474
, "fdo78474.docx")
672 xmlDocPtr pXmlDoc1
= parseExport("word/document.xml");
673 if (!pXmlDoc1
) return;
674 //docx file after RT is getting corrupted.
675 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");
677 xmlDocPtr pXmlDoc2
= parseExport("word/_rels/document.xml.rels");
678 if (!pXmlDoc2
) return;
679 assertXPath(pXmlDoc2
,"/rels:Relationships/rels:Relationship[2]","Id","rId2");
682 DECLARE_OOXMLEXPORT_TEST(testAbsolutePositionOffsetValue
,"fdo78432.docx")
684 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
688 sal_Int32 IntMax
= SAL_MAX_INT32
;
690 xmlXPathObjectPtr pXmlObjs
[6];
691 pXmlObjs
[0] = getXPathNode(pXmlDoc
,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionH[1]/wp:posOffset[1]");
692 pXmlObjs
[1] = getXPathNode(pXmlDoc
,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionV[1]/wp:posOffset[1]");
694 pXmlObjs
[2] = getXPathNode(pXmlDoc
,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[2]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionH[1]/wp:posOffset[1]");
695 pXmlObjs
[3] = getXPathNode(pXmlDoc
,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[2]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionV[1]/wp:posOffset[1]");
697 pXmlObjs
[4] = getXPathNode(pXmlDoc
,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[3]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionH[1]/wp:posOffset[1]");
698 pXmlObjs
[5] = getXPathNode(pXmlDoc
,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[3]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionV[1]/wp:posOffset[1]");
700 for(sal_Int32 index
= 0; index
<6; ++index
)
702 CPPUNIT_ASSERT(pXmlObjs
[index
]->nodesetval
!= 0);
703 xmlNodePtr pXmlNode
= pXmlObjs
[index
]->nodesetval
->nodeTab
[0];
704 OUString contents
= OUString::createFromAscii(reinterpret_cast<const char*>((pXmlNode
->children
[0]).content
));
705 CPPUNIT_ASSERT( contents
.toInt64() <= IntMax
);
706 xmlXPathFreeObject(pXmlObjs
[index
]);
710 DECLARE_OOXMLEXPORT_TEST(testRubyHyperlink
, "rubyhyperlink.fodt")
712 // test that export doesn't assert with overlapping ruby / hyperlink attr
715 DECLARE_OOXMLEXPORT_TEST(testfdo78300
,"fdo78300.docx")
717 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
721 "/w:document/w:body/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing[1]/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p[1]/w:r[1]/w:drawing[1]",
725 DECLARE_OOXMLEXPORT_TEST(testWordArtWithinDraingtool
, "testWordArtWithinDraingtool.docx")
727 /* * Within a file, there is a 2007 wordArt enclosed in a drawing tool
728 * LO was exporting it as below:
729 * Sample XML as in Original file:
730 * <p> <r> <ac> <drawing> <txbx> <txbxContent> .. <pict> </pict> </txbxContent></txbx> </drawing> </ac> </r> </p>
732 * <p> <r> <ac> <drawing> <txbx> <txbxContent> .. <drawing> <txbx> <txbxContent> .. </txbxContent></txbx> </drawing> .. </txbxContent></txbx> </drawing> </ac> </r> </p>
733 * Expected : As there is nesting of a 2007 Word Art within a draing tool, then can be separated in two different runs.
736 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
739 assertXPath(pXmlDoc
,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent",1);
740 assertXPath(pXmlDoc
,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:textbox/w:txbxContent/w:p/w:r/w:pict/v:shape",1);
741 // Make sure that the shape inside a shape is exported as VML-only, no embedded mc:AlternateContent before w:pict.
742 assertXPath(pXmlDoc
,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r/w:pict",1);
745 DECLARE_OOXMLEXPORT_TEST(testfdo78663
, "fdo78663.docx")
747 /* * A 2007 word art tool is enclosed in a 2010 drawing toolWithin a file,
748 * Originally the file has the following xml tag hierarchy.
750 * <p> <r> <ac> <drawing> <txbx> <txbxContent> <pict><shapetype> <shape> ...</shape></shapetype> </pict> </txbxContent></txbx> </drawing> </ac> </r> </p>
752 * <p> <r> <ac> <drawing> <txbx> <txbxContent> <pict><shapetype> <shape> <textbox><txbxContent> ... </txbxContent></textbox></shape></shapetype> </pict> </txbxContent></txbx> </drawing> </ac> </r> </p>
753 * MSO doesn't allow nesting of txbxContent tags.
754 * As the text of the wordart tool is written in the tag <v:textpath string="Welcome to... "History is fun and informative"/>
755 * We shouldn't repeat it again in <shapetype><shape> <textbox><txbxContent>
758 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
761 assertXPath(pXmlDoc
,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r/w:pict/v:shape/v:path",1);
762 assertXPath(pXmlDoc
,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:textbox/w:txbxContent/w:p/w:r/w:pict/v:shape/v:path",1);
763 // Make sure that the shape inside a shape is exported as VML-only, no embedded mc:AlternateContent before w:pict.
764 assertXPath(pXmlDoc
,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:txbx/w:txbxContent/w:p/w:r/w:pict",1);
767 DECLARE_OOXMLEXPORT_TEST(testFdo78957
, "fdo78957.docx")
769 xmlDocPtr pXmlHeader
= parseExport("word/header2.xml");
774 const sal_Int64 IntMax
= SAL_MAX_INT32
;
775 sal_Int64 cx
= 0, cy
= 0;
776 cx
= getXPath(pXmlHeader
,"/w:hdr[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:extent[1]","cx").toInt64();
777 cy
= getXPath(pXmlHeader
,"/w:hdr[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:extent[1]","cy").toInt64();
778 // Here we check the values of extent width & height
779 CPPUNIT_ASSERT(cx
<= IntMax
);
780 CPPUNIT_ASSERT(cy
>= 0 );
783 DECLARE_OOXMLEXPORT_TEST(testfdo79256
, "fdo79256.docx")
785 /* Corruption issue containing Line Style with Long Dashes and Dots
786 * After RT checking the Dash Length value. Dash Length value should not be greater than 2147483.
788 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
792 const sal_Int32 maxLimit
= 2147483;
793 sal_Int32 d
= getXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1]","d").toInt32();
794 CPPUNIT_ASSERT(d
<= maxLimit
);
797 DECLARE_OOXMLEXPORT_TEST(testDashedLinePreset
, "dashed_line_preset.docx")
799 /* Make sure that preset line is exported correctly as "1000th of a percent".
800 * This test-file has a PRESET dash-line which will be converted by LO import
801 * to a custom-dash (dash-dot-dot). This test-case makes sure that the exporter
802 * outputs the correct values.
804 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
808 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1]", "d" , "800000");
809 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1]", "sp", "300000");
811 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[2]", "d" , "100000");
812 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[2]", "sp", "300000");
814 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[3]", "d" , "100000");
815 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[3]", "sp", "300000");
818 DECLARE_OOXMLEXPORT_TEST(testDashedLine_CustDash1000thOfPercent
, "dashed_line_custdash_1000th_of_percent.docx")
820 /* Make sure that preset line is exported correctly as "1000th of a percent".
821 * This test-file has a CUSTOM dash-line that is defined as '1000th of a percent'.
822 * This should be imported by LO as-is, and exported back with the same values.
824 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
828 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1]", "d" , "800000");
829 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1]", "sp", "300000");
831 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[2]", "d" , "100000");
832 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[2]", "sp", "300000");
834 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[3]", "d" , "100000");
835 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[3]", "sp", "300000");
838 DECLARE_OOXMLEXPORT_TEST(testDashedLine_CustDashPercentage
, "dashed_line_custdash_percentage.docx")
840 /* Make sure that preset line is exported correctly as "1000th of a percent".
841 * This test-file has a CUSTOM dash-line that is defined as percentages.
842 * This should be imported by LO as '1000th of a percent', and exported back
843 * as '1000th of a percent'.
845 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
849 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1]", "d" , "800000");
850 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[1]", "sp", "300000");
852 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[2]", "d" , "100000");
853 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[2]", "sp", "300000");
855 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[3]", "d" , "100000");
856 assertXPath(pXmlDoc
,"/w:document/w:body/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:spPr[1]/a:ln[1]/a:custDash[1]/a:ds[3]", "sp", "300000");
859 DECLARE_OOXMLEXPORT_TEST(testCommentInitials
, "comment_initials.odt")
861 xmlDocPtr pXmlDoc
= parseExport("word/comments.xml");
865 assertXPath(pXmlDoc
,"/w:comments/w:comment[1]", "initials", "initials");
868 DECLARE_OOXMLEXPORT_TEST(testTextboxRoundedCorners
, "textbox-rounded-corners.docx")
870 uno::Reference
<drawing::XShape
> xShape
= getShape(1);
871 comphelper::SequenceAsHashMap aCustomShapeGeometry
= comphelper::SequenceAsHashMap(getProperty
< uno::Sequence
<beans::PropertyValue
> >(xShape
, "CustomShapeGeometry"));
873 // Test that the shape is a rounded rectangle.
874 CPPUNIT_ASSERT_EQUAL(OUString("ooxml-roundRect"), aCustomShapeGeometry
["Type"].get
<OUString
>());
876 // The shape text should start with a table, with "a" in its A1 cell.
877 uno::Reference
<text::XText
> xText
= uno::Reference
<text::XTextRange
>(xShape
, uno::UNO_QUERY
)->getText();
878 uno::Reference
<text::XTextTable
> xTable(getParagraphOrTable(1, xText
), uno::UNO_QUERY
);
879 uno::Reference
<text::XTextRange
> xCell(xTable
->getCellByName("A1"), uno::UNO_QUERY
);
880 CPPUNIT_ASSERT_EQUAL(OUString("a"), xCell
->getString());
883 DECLARE_OOXMLEXPORT_TEST(testfdo79591
, "fdo79591.docx")
885 /* Values set for docPr name and shape ID attributes
886 * in RT file were not valid as per UTF-8 encoding format
887 * and hence was showing RT document as corrupt with error
888 * message "invalid character"
890 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
894 assertXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:docPr", "name", "");
895 assertXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape", "ID", "");
898 DECLARE_OOXMLEXPORT_TEST(testBnc884615
, "bnc884615.docx")
900 // The problem was that the shape in the header wasn't in the background.
901 CPPUNIT_ASSERT_EQUAL(false, bool(getProperty
<sal_Bool
>(getShape(1), "Opaque")));
904 DECLARE_OOXMLEXPORT_TEST(testFdo80894
, "TextFrameRotation.docx")
906 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
910 // Rotation value was not roundtripped for textframe.
911 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:xfrm",
915 DECLARE_OOXMLEXPORT_TEST(testfdo80895
, "fdo80895.docx")
917 // DML shapes in header and footer were not getting rendered in LO and the same were not preserved after RT.
918 // In actual there was a shape but because of fetching wrong theme for header.xml or footer.xml
919 // resultant shape was with <a:noFill/> prop in <wps:spPr> hence was not visible.
920 // Checking there is a shape in header without <a:noFill/> element.
922 xmlDocPtr pXmlDoc
= parseExport("word/header1.xml");
925 assertXPath(pXmlDoc
, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:noFill",0);
926 assertXPath(pXmlDoc
, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:noFill",0);
928 // Check for fallback (required for MSO-2007)
929 assertXPath(pXmlDoc
, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:rect", "fillcolor", "#4f81bd");
930 assertXPath(pXmlDoc
, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:fill", "type", "solid");
933 DECLARE_OOXMLEXPORT_TEST(testWrapTightThrough
, "wrap-tight-through.docx")
935 // These were wrapSquare without a wrap polygon before.
936 if (xmlDocPtr pXmlDoc
= parseExport("word/document.xml"))
938 // The first shape should be wrapThrough with a wrap polygon (was wrapSquare).
939 assertXPath(pXmlDoc
, "//w:drawing/wp:anchor[1]/wp:wrapThrough/wp:wrapPolygon/wp:start", "x", "-1104");
940 // The second shape should be wrapTight with a wrap polygon (was wrapSquare).
941 assertXPath(pXmlDoc
, "//w:drawing/wp:anchor[1]/wp:wrapTight/wp:wrapPolygon/wp:start", "y", "792");
945 DECLARE_OOXMLEXPORT_TEST(testPictureWrapPolygon
, "picture-wrap-polygon.docx")
947 // The problem was that the wrap polygon was ignored during export.
948 drawing::PointSequenceSequence aSeqSeq
= getProperty
<drawing::PointSequenceSequence
>(getShape(1), "ContourPolyPolygon");
949 // This was 0: the polygon list was empty.
950 CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aSeqSeq
.getLength());
952 drawing::PointSequence aSeq
= aSeqSeq
[0];
953 CPPUNIT_ASSERT_EQUAL(sal_Int32(11), aSeq
.getLength());
956 DECLARE_OOXMLEXPORT_TEST(testPictureColormodeGrayscale
, "picture_colormode_grayscale.docx")
958 // THe problem was that the grayscale was not exported
959 xmlDocPtr pXmlDoc
= parseExport ("word/document.xml");
963 assertXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r/w:drawing/wp:inline/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:grayscl", 1);
966 DECLARE_OOXMLEXPORT_TEST(testPictureColormodeBlackWhite
, "picture_colormode_black_white.odt")
968 xmlDocPtr pXmlDoc
= parseExport ("word/document.xml");
972 assertXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:biLevel", "thresh", "50000");
975 DECLARE_OOXMLEXPORT_TEST(testPictureColormodeWatermark
, "picture_colormode_watermark.odt")
977 xmlDocPtr pXmlDoc
= parseExport ("word/document.xml");
981 assertXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:lum", "bright", "50000");
982 assertXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r/w:drawing/wp:anchor/a:graphic/a:graphicData/pic:pic/pic:blipFill/a:blip/a:lum", "contrast", "-70000");
986 DECLARE_OOXMLEXPORT_TEST(testExportShadow
, "bnc637947.odt")
988 // The problem was that shadows of shapes from non-OOXML origin were not exported to DrawingML
989 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
993 assertXPath(pXmlDoc
,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:spPr/a:effectLst/a:outerShdw", "dist" , "109865");
994 assertXPath(pXmlDoc
,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:spPr/a:effectLst/a:outerShdw", "dir" , "634411");
995 assertXPath(pXmlDoc
,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:spPr/a:effectLst/a:outerShdw/a:srgbClr", "val" , "000000");
996 assertXPath(pXmlDoc
,"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:spPr/a:effectLst/a:outerShdw/a:srgbClr/a:alpha", "val" , "38000");
999 DECLARE_OOXMLEXPORT_TEST(testExportAdjustmentValue
, "tdf91429.docx")
1001 xmlDocPtr pXmlDoc
= parseExport("word/document.xml");
1005 assertXPath(pXmlDoc
,"/w:document/w:body/w:p/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd", "fmla", "val 50000");
1009 CPPUNIT_PLUGIN_IMPLEMENT();
1011 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */