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>
11 #include <o3tl/string_view.hxx>
13 class Test
: public SwModelTestBase
16 Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
19 CPPUNIT_TEST_FIXTURE(Test
, Test_TextEffects_GlowShadowReflection
)
21 loadAndReload("TextEffects_Glow_Shadow_Reflection.docx");
22 xmlDocUniquePtr pXmlDoc
= parseExport("word/document.xml");
24 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[1]/w:rPr/w14:glow", "rad").match("63500"));
25 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[1]/w:rPr/w14:glow/w14:srgbClr", "val").match("00B0F0"));
26 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[1]/w:rPr/w14:glow/w14:srgbClr/w14:alpha", "val").match("60000"));
28 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow", "rad").match("228600"));
29 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow/w14:schemeClr", "val").match("accent6"));
30 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow/w14:schemeClr/w14:alpha", "val").match("60000"));
31 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow/w14:schemeClr/w14:satMod", "val").match("175000"));
33 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "blurRad").match("63500"));
34 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "dist").match("0"));
35 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "dir").match("1800000"));
36 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "sx").match("100000"));
37 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "sy").match("-30000"));
38 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "kx").match("-800400"));
39 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "ky").match("0"));
40 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "algn").match("bl"));
42 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow/w14:schemeClr", "val").match("accent3"));
43 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow/w14:schemeClr/w14:alpha", "val").match("38000"));
44 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow/w14:schemeClr/w14:lumMod", "val").match("75000"));
46 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "blurRad").match("190500"));
47 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "dist").match("190500"));
48 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "dir").match("3000000"));
49 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "sx").match("100000"));
50 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "sy").match("100000"));
51 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "kx").match("0"));
52 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "ky").match("0"));
53 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "algn").match("ctr"));
55 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow/w14:srgbClr", "val").match("FF0000"));
56 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow/w14:srgbClr/w14:alpha", "val").match("10000"));
58 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "blurRad").match("6350"));
59 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "stA").match("60000"));
60 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "stPos").match("0"));
61 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "endA").match("900"));
62 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "endPos").match("60000"));
63 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "dist").match("60007"));
64 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "dir").match("5400000"));
65 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "fadeDir").match("5400000"));
66 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "sx").match("100000"));
67 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "sy").match("-100000"));
68 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "kx").match("0"));
69 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "ky").match("0"));
70 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "algn").match("bl"));
72 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "blurRad").match("6350"));
73 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "stA").match("55000"));
74 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "stPos").match("0"));
75 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "endA").match("300"));
76 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "endPos").match("45500"));
77 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "dist").match("0"));
78 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "dir").match("5400000"));
79 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "fadeDir").match("5400000"));
80 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "sx").match("100000"));
81 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "sy").match("-100000"));
82 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "kx").match("0"));
83 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "ky").match("0"));
84 CPPUNIT_ASSERT(getXPath(pXmlDoc
, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "algn").match("bl"));
87 CPPUNIT_TEST_FIXTURE(Test
, Test_TextEffects_TextOutline
)
89 loadAndReload("TextEffects_TextOutline.docx");
90 xmlDocUniquePtr pXmlDoc
= parseExport("word/document.xml");
93 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline", "w", "50800");
94 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline", "cap", "rnd");
95 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline", "cmpd", "dbl");
96 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline", "algn", "ctr");
98 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[1]", "pos", "70000");
99 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[1]/w14:srgbClr", "val", "92D050");
100 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[1]/w14:srgbClr/w14:alpha", "val", "30000");
101 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[1]/w14:srgbClr/w14:lumMod", "val", "75000");
102 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[1]/w14:srgbClr/w14:lumOff", "val", "25000");
104 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[2]", "pos", "30000");
105 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr", "val", "accent1");
106 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:alpha", "val", "55000");
107 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumMod", "val", "40000");
108 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumOff", "val", "60000");
110 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[3]", "pos", "0");
111 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[3]/w14:srgbClr", "val", "0070C0");
113 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[4]", "pos", "100000");
114 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:gsLst/w14:gs[4]/w14:schemeClr", "val", "accent4");
116 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:lin", "ang", "3600000");
117 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:lin", "scaled", "0");
119 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:prstDash", "val", "dash");
120 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:miter", "lim", "0");
123 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline", "w", "9525");
124 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline", "cap", "rnd");
125 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline", "cmpd", "sng");
126 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline", "algn", "ctr");
128 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline/w14:solidFill/w14:srgbClr", "val", "FF0000");
129 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline/w14:prstDash", "val", "solid");
130 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline/w14:bevel", 1);
133 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline", "w", "9525");
134 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline", "cap", "rnd");
135 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline", "cmpd", "sng");
136 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline", "algn", "ctr");
138 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline/w14:noFill", 1);
139 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline/w14:prstDash", "val", "solid");
140 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline/w14:bevel", 1);
143 CPPUNIT_TEST_FIXTURE(Test
, Test_TextEffects_TextFill
)
145 loadAndReload("TextEffects_TextFill.docx");
146 xmlDocUniquePtr pXmlDoc
= parseExport("word/document.xml");
147 // Paragraph 1 has no textFill
150 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textFill/w14:noFill", 1);
153 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill", 1);
154 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr", "val", "accent1");
155 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr/w14:alpha", "val", "5000");
156 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr/w14:lumMod", "val", "40000");
157 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr/w14:lumOff", "val", "60000");
160 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill", 1);
161 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[1]", "pos", "0");
162 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr", "val", "accent1");
163 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:alpha", "val", "5000");
164 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumMod", "val", "67000");
166 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[2]", "pos", "50000");
167 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[2]/w14:srgbClr", "val", "00B0F0");
168 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[2]/w14:srgbClr/w14:alpha", "val", "10000");
169 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[2]/w14:srgbClr/w14:lumMod", "val", "80000");
171 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[3]", "pos", "100000");
172 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr", "val", "accent1");
173 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:alpha", "val", "15000");
174 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumMod", "val", "60000");
175 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumOff", "val", "40000");
177 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:lin", "ang", "16200000");
178 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:lin", "scaled", "0");
181 CPPUNIT_TEST_FIXTURE(Test
, Test_TextEffects_Props3d_Ligatures_NumForm_NumSpacing
)
183 loadAndReload("TextEffects_Props3d_Ligatures_NumForm_NumSpacing.docx");
184 xmlDocUniquePtr pXmlDoc
= parseExport("word/document.xml");
186 // Paragraph 1 - w14:props3d
187 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d", 1);
188 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d", "extrusionH", "63500");
189 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d", "contourW", "25400");
190 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d", "prstMaterial", "softEdge");
192 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelT", "w", "38100");
193 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelT", "h", "38100");
194 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelT", "prst", "relaxedInset");
196 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelB", "w", "69850");
197 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelB", "h", "38100");
198 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelB", "prst", "cross");
200 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr", 1);
201 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr/w14:schemeClr", "val", "accent2");
202 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr/w14:schemeClr/w14:lumMod", "val", "20000");
203 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr/w14:schemeClr/w14:lumOff", "val", "80000");
205 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:contourClr", 1);
206 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:contourClr/w14:srgbClr", "val", "92D050");
208 // Paragraph 2 - w14:ligatures
209 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:ligatures", 1);
210 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:ligatures", "val", "standard");
212 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[3]/w:rPr/w14:ligatures", 1);
213 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[3]/w:rPr/w14:ligatures", "val", "standardContextual");
215 // Paragraph 3 - w14:numForm and w14:numSpacing
216 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numForm", 1);
217 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numForm", "val", "lining");
218 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numSpacing", 1);
219 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numSpacing", "val", "tabular");
221 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numForm", 1);
222 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numForm", "val", "oldStyle");
223 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numSpacing", 1);
224 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numSpacing", "val", "proportional");
227 CPPUNIT_TEST_FIXTURE(Test
, Test_TextEffects_StylisticSets_CntxtAlts
)
229 loadAndReload("TextEffects_StylisticSets_CntxtAlts.docx");
230 xmlDocUniquePtr pXmlDoc
= parseExport("word/document.xml");
232 // Paragraph 1 - w14:stylisticSets
233 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:stylisticSets/w14:styleSet", 1);
234 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:stylisticSets/w14:styleSet", "id", "4");
236 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w14:stylisticSets/w14:styleSet", 1);
237 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w14:stylisticSets/w14:styleSet", "id", "2");
239 // Paragraph 1 - w14:cntxtAlts
240 assertXPath(pXmlDoc
, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:cntxtAlts", 1);
244 CPPUNIT_TEST_FIXTURE(Test
, Test_McIgnorable
)
246 loadAndReload("TextEffects_StylisticSets_CntxtAlts.docx");
247 xmlDocUniquePtr pXmlDocument
= parseExport("word/document.xml");
249 assertXPath(pXmlDocument
, "/w:document", "Ignorable", "w14 wp14 w15");
251 xmlDocUniquePtr pXmlStyles
= parseExport("word/styles.xml");
253 assertXPath(pXmlStyles
, "/w:styles", "Ignorable", "w14");
256 CPPUNIT_TEST_FIXTURE(Test
, Test_CompatSettingsForW14
)
258 loadAndReload("TextEffects_StylisticSets_CntxtAlts.docx");
259 xmlDocUniquePtr pXmlDoc
= parseExport("word/settings.xml");
261 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting", 5);
263 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[1]", "name", "compatibilityMode");
264 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[1]", "uri", "http://schemas.microsoft.com/office/word");
265 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[1]", "val", "15"); // document was made with Word2013 -> 15
267 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[2]", "name", "overrideTableStyleFontSizeAndJustification");
268 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[2]", "uri", "http://schemas.microsoft.com/office/word");
269 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[2]", "val", "1");
271 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[3]", "name", "enableOpenTypeFeatures");
272 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[3]", "uri", "http://schemas.microsoft.com/office/word");
273 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[3]", "val", "1");
275 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[4]", "name", "doNotFlipMirrorIndents");
276 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[4]", "uri", "http://schemas.microsoft.com/office/word");
277 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[4]", "val", "1");
279 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[5]", "name", "differentiateMultirowTableHeaders");
280 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[5]", "uri", "http://schemas.microsoft.com/office/word");
281 assertXPath(pXmlDoc
, "/w:settings/w:compat/w:compatSetting[5]", "val", "1");
284 CPPUNIT_TEST_FIXTURE(Test
, Test_TextEffects_Groupshapes
)
286 loadAndReload("TextEffects_Groupshapes.docx");
287 xmlDocUniquePtr pXmlDoc
= parseExport("word/document.xml");
289 OString sPathToWGP
= "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wpg:wgp";
291 assertXPath(pXmlDoc
, sPathToWGP
+ "/wps:wsp", 2);
293 OString sPathToShapeRunProperties
= sPathToWGP
+ "/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr";
296 OString sPathGlow
= sPathToShapeRunProperties
+ "/w14:glow";
297 assertXPath(pXmlDoc
, sPathGlow
, 1);
298 assertXPath(pXmlDoc
, sPathGlow
, "rad", "127000");
299 assertXPath(pXmlDoc
, sPathGlow
+"/w14:srgbClr", "val", "00B050");
300 assertXPath(pXmlDoc
, sPathGlow
+"/w14:srgbClr/w14:alpha", "val", "60000");
303 OString sPathShadow
= sPathToShapeRunProperties
+ "/w14:shadow";
304 assertXPath(pXmlDoc
, sPathShadow
, 1);
305 assertXPath(pXmlDoc
, sPathShadow
, "blurRad", "127000");
306 assertXPath(pXmlDoc
, sPathShadow
, "dist", "787400");
307 assertXPath(pXmlDoc
, sPathShadow
, "dir", "12720000");
308 assertXPath(pXmlDoc
, sPathShadow
, "sx", "70000");
309 assertXPath(pXmlDoc
, sPathShadow
, "sy", "70000");
310 assertXPath(pXmlDoc
, sPathShadow
, "kx", "0");
311 assertXPath(pXmlDoc
, sPathShadow
, "ky", "0");
312 assertXPath(pXmlDoc
, sPathShadow
, "algn", "l");
313 assertXPath(pXmlDoc
, sPathShadow
+"/w14:srgbClr", "val", "92D050");
314 assertXPath(pXmlDoc
, sPathShadow
+"/w14:srgbClr/w14:alpha", "val", "40000");
317 OString sPathReflection
= sPathToShapeRunProperties
+ "/w14:reflection";
318 assertXPath(pXmlDoc
, sPathReflection
, 1);
319 assertXPath(pXmlDoc
, sPathReflection
, "blurRad", "139700");
320 assertXPath(pXmlDoc
, sPathReflection
, "stA", "47000");
321 assertXPath(pXmlDoc
, sPathReflection
, "stPos", "0");
322 assertXPath(pXmlDoc
, sPathReflection
, "endA", "0");
323 assertXPath(pXmlDoc
, sPathReflection
, "endPos", "85000");
324 assertXPath(pXmlDoc
, sPathReflection
, "dist", "63500");
325 assertXPath(pXmlDoc
, sPathReflection
, "dir", "5400000");
326 assertXPath(pXmlDoc
, sPathReflection
, "fadeDir", "5400000");
327 assertXPath(pXmlDoc
, sPathReflection
, "sx", "100000");
328 assertXPath(pXmlDoc
, sPathReflection
, "sy", "-100000");
329 assertXPath(pXmlDoc
, sPathReflection
, "kx", "0");
330 assertXPath(pXmlDoc
, sPathReflection
, "ky", "0");
331 assertXPath(pXmlDoc
, sPathReflection
, "algn", "bl");
334 OString sPathTextOutline
= sPathToShapeRunProperties
+ "/w14:textOutline";
335 assertXPath(pXmlDoc
, sPathTextOutline
, 1);
336 assertXPath(pXmlDoc
, sPathTextOutline
, "w", "25400");
337 assertXPath(pXmlDoc
, sPathTextOutline
, "cap", "rnd");
338 assertXPath(pXmlDoc
, sPathTextOutline
, "cmpd", "sng");
339 assertXPath(pXmlDoc
, sPathTextOutline
, "algn", "ctr");
340 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:solidFill/w14:schemeClr", "val", "accent2");
341 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:solidFill/w14:schemeClr/w14:alpha", "val", "40000");
342 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:solidFill/w14:schemeClr/w14:lumMod", "val", "75000");
343 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:prstDash", "val", "solid");
344 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:round", 1);
347 OString sPathTextFill
= sPathToShapeRunProperties
+ "/w14:textFill";
348 assertXPath(pXmlDoc
, sPathTextFill
, 1);
349 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]", "pos", "0");
350 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr", "val", "accent4");
351 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]", "pos", "41000");
352 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr", "val", "accent6");
353 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumMod", "val", "60000");
354 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumOff", "val", "40000");
355 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[3]", "pos", "87000");
356 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr", "val", "accent5");
357 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumMod", "val", "60000");
358 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumOff", "val", "40000");
359 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:lin", "ang", "5400000");
360 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:lin", "scaled", "0");
363 OString sPathProps3D
= sPathToShapeRunProperties
+ "/w14:props3d";
364 assertXPath(pXmlDoc
, sPathProps3D
, 1);
365 assertXPath(pXmlDoc
, sPathProps3D
, "extrusionH", "63500");
366 assertXPath(pXmlDoc
, sPathProps3D
, "contourW", "12700");
367 assertXPath(pXmlDoc
, sPathProps3D
, "prstMaterial", "warmMatte");
368 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelT", "w", "38100");
369 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelT", "h", "38100");
370 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelT", "prst", "circle");
371 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:extrusionClr/w14:schemeClr", "val", "accent2");
372 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:extrusionClr/w14:schemeClr/w14:lumMod", "val", "60000");
373 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:extrusionClr/w14:schemeClr/w14:lumOff", "val", "40000");
374 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:contourClr/w14:schemeClr", "val", "accent4");
375 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:contourClr/w14:schemeClr/w14:lumMod", "val", "75000");
378 OString sPathLigatures
= sPathToShapeRunProperties
+ "/w14:ligatures";
379 assertXPath(pXmlDoc
, sPathLigatures
, 1);
380 assertXPath(pXmlDoc
, sPathLigatures
, "val", "standard");
383 OString sPathNumForm
= sPathToShapeRunProperties
+ "/w14:numForm";
384 assertXPath(pXmlDoc
, sPathNumForm
, 1);
385 assertXPath(pXmlDoc
, sPathNumForm
, "val", "oldStyle");
388 OString sPathNumSpacing
= sPathToShapeRunProperties
+ "/w14:numSpacing";
389 assertXPath(pXmlDoc
, sPathNumSpacing
, 1);
390 assertXPath(pXmlDoc
, sPathNumSpacing
, "val", "tabular");
393 OString sPathStylisticSets
= sPathToShapeRunProperties
+ "/w14:stylisticSets";
394 assertXPath(pXmlDoc
, sPathStylisticSets
, 1);
395 assertXPath(pXmlDoc
, sPathStylisticSets
+"/w14:styleSet", "id", "1");
398 CPPUNIT_TEST_FIXTURE(Test
, Test_TextEffects_InStyleXml
)
400 loadAndReload("TextEffects_InStyle.docx");
401 xmlDocUniquePtr pXmlDoc
= parseExport("word/styles.xml");
403 OString sPathToCharacterStyle
= "/w:styles/w:style[3]";
405 assertXPath(pXmlDoc
, sPathToCharacterStyle
, "type", "character");
406 assertXPath(pXmlDoc
, sPathToCharacterStyle
, "styleId", "TextEffectsStyleChar");
407 assertXPath(pXmlDoc
, sPathToCharacterStyle
, "customStyle", "1");
410 OString sPathToRun
= sPathToCharacterStyle
+ "/w:rPr";
413 OString sPathGlow
= sPathToRun
+ "/w14:glow";
414 assertXPath(pXmlDoc
, sPathGlow
, "rad", "63500");
415 assertXPath(pXmlDoc
, sPathGlow
+"/w14:schemeClr", "val", "accent2");
416 assertXPath(pXmlDoc
, sPathGlow
+"/w14:schemeClr/w14:alpha", "val", "60000");
417 assertXPath(pXmlDoc
, sPathGlow
+"/w14:schemeClr/w14:satMod", "val", "175000");
420 OString sPathShadow
= sPathToRun
+ "/w14:shadow";
421 assertXPath(pXmlDoc
, sPathShadow
, "blurRad", "50800");
422 assertXPath(pXmlDoc
, sPathShadow
, "dist", "38100");
423 assertXPath(pXmlDoc
, sPathShadow
, "dir", "16200000");
424 assertXPath(pXmlDoc
, sPathShadow
, "sx", "100000");
425 assertXPath(pXmlDoc
, sPathShadow
, "sy", "100000");
426 assertXPath(pXmlDoc
, sPathShadow
, "kx", "0");
427 assertXPath(pXmlDoc
, sPathShadow
, "ky", "0");
428 assertXPath(pXmlDoc
, sPathShadow
, "algn", "b");
429 assertXPath(pXmlDoc
, sPathShadow
+"/w14:srgbClr", "val", "000000");
430 assertXPath(pXmlDoc
, sPathShadow
+"/w14:srgbClr/w14:alpha", "val", "60000");
433 OString sPathReflection
= sPathToRun
+ "/w14:reflection";
434 assertXPath(pXmlDoc
, sPathReflection
, "blurRad", "6350");
435 assertXPath(pXmlDoc
, sPathReflection
, "stA", "50000");
436 assertXPath(pXmlDoc
, sPathReflection
, "stPos", "0");
437 assertXPath(pXmlDoc
, sPathReflection
, "endA", "300");
438 assertXPath(pXmlDoc
, sPathReflection
, "endPos", "50000");
439 assertXPath(pXmlDoc
, sPathReflection
, "dist", "29997");
440 assertXPath(pXmlDoc
, sPathReflection
, "dir", "5400000");
441 assertXPath(pXmlDoc
, sPathReflection
, "fadeDir", "5400000");
442 assertXPath(pXmlDoc
, sPathReflection
, "sx", "100000");
443 assertXPath(pXmlDoc
, sPathReflection
, "sy", "-100000");
444 assertXPath(pXmlDoc
, sPathReflection
, "kx", "0");
445 assertXPath(pXmlDoc
, sPathReflection
, "ky", "0");
446 assertXPath(pXmlDoc
, sPathReflection
, "algn", "bl");
449 OString sPathTextOutline
= sPathToRun
+ "/w14:textOutline";
450 assertXPath(pXmlDoc
, sPathTextOutline
, "w", "25400");
451 assertXPath(pXmlDoc
, sPathTextOutline
, "cap", "rnd");
452 assertXPath(pXmlDoc
, sPathTextOutline
, "cmpd", "sng");
453 assertXPath(pXmlDoc
, sPathTextOutline
, "algn", "ctr");
454 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:solidFill/w14:schemeClr", "val", "accent1");
455 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:solidFill/w14:schemeClr/w14:alpha", "val", "40000");
456 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:solidFill/w14:schemeClr/w14:lumMod", "val", "75000");
457 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:prstDash", "val", "solid");
458 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:bevel", 1);
461 OString sPathTextFill
= sPathToRun
+ "/w14:textFill";
462 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]", "pos", "0");
463 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr", "val", "accent1");
464 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:alpha", "val", "10000");
465 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumMod", "val", "40000");
466 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumOff", "val", "60000");
467 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]", "pos", "46000");
468 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr", "val", "accent1");
469 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumMod", "val", "95000");
470 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumOff", "val", "5000");
471 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[3]", "pos", "100000");
472 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr", "val", "accent1");
473 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumMod", "val", "60000");
474 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:path", "path", "circle");
475 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:path/w14:fillToRect", "b", "-30000");
476 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:path/w14:fillToRect", "r", "50000");
477 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:path/w14:fillToRect", "t", "130000");
478 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:path/w14:fillToRect", "l", "50000");
481 OString sPathProps3D
= sPathToRun
+ "/w14:props3d";
482 assertXPath(pXmlDoc
, sPathProps3D
, "extrusionH", "57150");
483 assertXPath(pXmlDoc
, sPathProps3D
, "contourW", "12700");
484 assertXPath(pXmlDoc
, sPathProps3D
, "prstMaterial", "metal");
485 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelT", "w", "38100");
486 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelT", "h", "38100");
487 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelT", "prst", "angle");
488 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelB", "w", "69850");
489 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelB", "h", "69850");
490 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelB", "prst", "divot");
491 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:extrusionClr/w14:schemeClr", "val", "accent1");
492 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:extrusionClr/w14:schemeClr/w14:lumMod", "val", "20000");
493 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:extrusionClr/w14:schemeClr/w14:lumOff", "val", "80000");
494 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:contourClr/w14:schemeClr", "val", "accent1");
495 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:contourClr/w14:schemeClr/w14:lumMod", "val", "75000");
498 OString sPathLigatures
= sPathToRun
+ "/w14:ligatures";
499 assertXPath(pXmlDoc
, sPathLigatures
, "val", "standard");
502 OString sPathNumForm
= sPathToRun
+ "/w14:numForm";
503 assertXPath(pXmlDoc
, sPathNumForm
, "val", "lining");
506 OString sPathNumSpacing
= sPathToRun
+ "/w14:numSpacing";
507 assertXPath(pXmlDoc
, sPathNumSpacing
, "val", "proportional");
510 OString sPathStylisticSets
= sPathToRun
+ "/w14:stylisticSets";
511 assertXPath(pXmlDoc
, sPathStylisticSets
+"/w14:styleSet", "id", "1");
514 OString sPathToParagraphStyle
= "/w:styles/w:style[9]";
516 assertXPath(pXmlDoc
, sPathToParagraphStyle
, "type", "paragraph");
517 assertXPath(pXmlDoc
, sPathToParagraphStyle
, "styleId", "TextEffectsStyle");
518 assertXPath(pXmlDoc
, sPathToParagraphStyle
, "customStyle", "1");
521 OString sPathToRun
= sPathToParagraphStyle
+ "/w:rPr";
524 OString sPathGlow
= sPathToRun
+ "/w14:glow";
525 assertXPath(pXmlDoc
, sPathGlow
, "rad", "63500");
526 assertXPath(pXmlDoc
, sPathGlow
+"/w14:schemeClr", "val", "accent2");
527 assertXPath(pXmlDoc
, sPathGlow
+"/w14:schemeClr/w14:alpha", "val", "60000");
528 assertXPath(pXmlDoc
, sPathGlow
+"/w14:schemeClr/w14:satMod", "val", "175000");
531 OString sPathShadow
= sPathToRun
+ "/w14:shadow";
532 assertXPath(pXmlDoc
, sPathShadow
, "blurRad", "50800");
533 assertXPath(pXmlDoc
, sPathShadow
, "dist", "38100");
534 assertXPath(pXmlDoc
, sPathShadow
, "dir", "16200000");
535 assertXPath(pXmlDoc
, sPathShadow
, "sx", "100000");
536 assertXPath(pXmlDoc
, sPathShadow
, "sy", "100000");
537 assertXPath(pXmlDoc
, sPathShadow
, "kx", "0");
538 assertXPath(pXmlDoc
, sPathShadow
, "ky", "0");
539 assertXPath(pXmlDoc
, sPathShadow
, "algn", "b");
540 assertXPath(pXmlDoc
, sPathShadow
+"/w14:srgbClr", "val", "000000");
541 assertXPath(pXmlDoc
, sPathShadow
+"/w14:srgbClr/w14:alpha", "val", "60000");
544 OString sPathReflection
= sPathToRun
+ "/w14:reflection";
545 assertXPath(pXmlDoc
, sPathReflection
, "blurRad", "6350");
546 assertXPath(pXmlDoc
, sPathReflection
, "stA", "50000");
547 assertXPath(pXmlDoc
, sPathReflection
, "stPos", "0");
548 assertXPath(pXmlDoc
, sPathReflection
, "endA", "300");
549 assertXPath(pXmlDoc
, sPathReflection
, "endPos", "50000");
550 assertXPath(pXmlDoc
, sPathReflection
, "dist", "29997");
551 assertXPath(pXmlDoc
, sPathReflection
, "dir", "5400000");
552 assertXPath(pXmlDoc
, sPathReflection
, "fadeDir", "5400000");
553 assertXPath(pXmlDoc
, sPathReflection
, "sx", "100000");
554 assertXPath(pXmlDoc
, sPathReflection
, "sy", "-100000");
555 assertXPath(pXmlDoc
, sPathReflection
, "kx", "0");
556 assertXPath(pXmlDoc
, sPathReflection
, "ky", "0");
557 assertXPath(pXmlDoc
, sPathReflection
, "algn", "bl");
560 OString sPathTextOutline
= sPathToRun
+ "/w14:textOutline";
561 assertXPath(pXmlDoc
, sPathTextOutline
, "w", "25400");
562 assertXPath(pXmlDoc
, sPathTextOutline
, "cap", "rnd");
563 assertXPath(pXmlDoc
, sPathTextOutline
, "cmpd", "sng");
564 assertXPath(pXmlDoc
, sPathTextOutline
, "algn", "ctr");
565 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:solidFill/w14:schemeClr", "val", "accent1");
566 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:solidFill/w14:schemeClr/w14:alpha", "val", "40000");
567 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:solidFill/w14:schemeClr/w14:lumMod", "val", "75000");
568 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:prstDash", "val", "solid");
569 assertXPath(pXmlDoc
, sPathTextOutline
+"/w14:bevel", 1);
572 OString sPathTextFill
= sPathToRun
+ "/w14:textFill";
573 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]", "pos", "0");
574 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr", "val", "accent1");
575 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:alpha", "val", "10000");
576 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumMod", "val", "40000");
577 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumOff", "val", "60000");
578 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]", "pos", "46000");
579 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr", "val", "accent1");
580 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumMod", "val", "95000");
581 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumOff", "val", "5000");
582 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[3]", "pos", "100000");
583 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr", "val", "accent1");
584 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumMod", "val", "60000");
585 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:path", "path", "circle");
586 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:path/w14:fillToRect", "b", "-30000");
587 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:path/w14:fillToRect", "r", "50000");
588 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:path/w14:fillToRect", "t", "130000");
589 assertXPath(pXmlDoc
, sPathTextFill
+"/w14:gradFill/w14:path/w14:fillToRect", "l", "50000");
592 OString sPathProps3D
= sPathToRun
+ "/w14:props3d";
593 assertXPath(pXmlDoc
, sPathProps3D
, "extrusionH", "57150");
594 assertXPath(pXmlDoc
, sPathProps3D
, "contourW", "12700");
595 assertXPath(pXmlDoc
, sPathProps3D
, "prstMaterial", "metal");
596 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelT", "w", "38100");
597 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelT", "h", "38100");
598 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelT", "prst", "angle");
599 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelB", "w", "69850");
600 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelB", "h", "69850");
601 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:bevelB", "prst", "divot");
602 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:extrusionClr/w14:schemeClr", "val", "accent1");
603 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:extrusionClr/w14:schemeClr/w14:lumMod", "val", "20000");
604 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:extrusionClr/w14:schemeClr/w14:lumOff", "val", "80000");
605 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:contourClr/w14:schemeClr", "val", "accent1");
606 assertXPath(pXmlDoc
, sPathProps3D
+"/w14:contourClr/w14:schemeClr/w14:lumMod", "val", "75000");
609 OString sPathLigatures
= sPathToRun
+ "/w14:ligatures";
610 assertXPath(pXmlDoc
, sPathLigatures
, "val", "standard");
613 OString sPathNumForm
= sPathToRun
+ "/w14:numForm";
614 assertXPath(pXmlDoc
, sPathNumForm
, "val", "lining");
617 OString sPathNumSpacing
= sPathToRun
+ "/w14:numSpacing";
618 assertXPath(pXmlDoc
, sPathNumSpacing
, "val", "proportional");
621 OString sPathStylisticSets
= sPathToRun
+ "/w14:stylisticSets";
622 assertXPath(pXmlDoc
, sPathStylisticSets
+"/w14:styleSet", "id", "1");
626 CPPUNIT_TEST_FIXTURE(Test
, Test_no_tag_if_no_fill
)
628 loadAndReload("tdf112103_tablebgnofill.docx");
629 xmlDocUniquePtr pXmlDoc
= parseExport("word/document.xml");
631 assertXPath(pXmlDoc
, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tcPr/w:shd", 0);
634 CPPUNIT_PLUGIN_IMPLEMENT();
636 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */