Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : */
9 :
10 : #include <swmodeltestbase.hxx>
11 :
12 : #include <string>
13 :
14 36 : class Test : public SwModelTestBase
15 : {
16 : public:
17 36 : Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
18 :
19 : protected:
20 : /**
21 : * Blacklist handling
22 : */
23 18 : bool mustTestImportOf(const char* filename) const SAL_OVERRIDE {
24 : // If the testcase is stored in some other format, it's pointless to test.
25 18 : return (OString(filename).endsWith(".docx"));
26 : }
27 : };
28 :
29 28 : DECLARE_OOXMLEXPORT_TEST(Test_TextEffects_GlowShadowReflection, "TextEffects_Glow_Shadow_Reflection.docx")
30 : {
31 4 : xmlDocPtr pXmlDoc = parseExport("word/document.xml");
32 4 : if (!pXmlDoc)
33 6 : return;
34 :
35 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:rPr/w14:glow", "rad").match("63500"));
36 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:rPr/w14:glow/w14:srgbClr", "val").match("00B0F0"));
37 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/w:rPr/w14:glow/w14:srgbClr/w14:alpha", "val").match("60000"));
38 :
39 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow", "rad").match("228600"));
40 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow/w14:schemeClr", "val").match("accent6"));
41 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow/w14:schemeClr/w14:alpha", "val").match("60000"));
42 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w14:glow/w14:schemeClr/w14:satMod", "val").match("175000"));
43 :
44 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "blurRad").match("63500"));
45 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "dist").match("0"));
46 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "dir").match("1800000"));
47 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "sx").match("100000"));
48 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "sy").match("-30000"));
49 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "kx").match("-800400"));
50 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "ky").match("0"));
51 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow", "algn").match("bl"));
52 :
53 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow/w14:schemeClr", "val").match("accent3"));
54 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow/w14:schemeClr/w14:alpha", "val").match("38000"));
55 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:rPr/w14:shadow/w14:schemeClr/w14:lumMod", "val").match("75000"));
56 :
57 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "blurRad").match("190500"));
58 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "dist").match("190500"));
59 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "dir").match("3000000"));
60 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "sx").match("100000"));
61 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "sy").match("100000"));
62 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "kx").match("0"));
63 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "ky").match("0"));
64 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow", "algn").match("ctr"));
65 :
66 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow/w14:srgbClr", "val").match("FF0000"));
67 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:rPr/w14:shadow/w14:srgbClr/w14:alpha", "val").match("10000"));
68 :
69 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "blurRad").match("6350"));
70 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "stA").match("60000"));
71 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "stPos").match("0"));
72 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "endA").match("900"));
73 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "endPos").match("60000"));
74 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "dist").match("60007"));
75 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "dir").match("5400000"));
76 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "fadeDir").match("5400000"));
77 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "sx").match("100000"));
78 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "sy").match("-100000"));
79 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "kx").match("0"));
80 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "ky").match("0"));
81 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[6]/w:rPr/w14:reflection", "algn").match("bl"));
82 :
83 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "blurRad").match("6350"));
84 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "stA").match("55000"));
85 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "stPos").match("0"));
86 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "endA").match("300"));
87 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "endPos").match("45500"));
88 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "dist").match("0"));
89 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "dir").match("5400000"));
90 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "fadeDir").match("5400000"));
91 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "sx").match("100000"));
92 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "sy").match("-100000"));
93 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "kx").match("0"));
94 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "ky").match("0"));
95 2 : CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[7]/w:rPr/w14:reflection", "algn").match("bl"));
96 : }
97 :
98 28 : DECLARE_OOXMLEXPORT_TEST(Test_TextEffects_TextOutline, "TextEffects_TextOutline.docx")
99 : {
100 4 : xmlDocPtr pXmlDoc = parseExport("word/document.xml");
101 4 : if (!pXmlDoc)
102 6 : return;
103 :
104 : // Paragraph 1
105 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline", "w", "50800");
106 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline", "cap", "rnd");
107 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline", "cmpd", "dbl");
108 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline", "algn", "ctr");
109 :
110 2 : 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");
111 2 : 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");
112 2 : 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");
113 2 : 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");
114 2 : 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");
115 :
116 2 : 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");
117 2 : 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");
118 2 : 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");
119 2 : 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");
120 2 : 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");
121 :
122 2 : 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");
123 2 : 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");
124 :
125 2 : 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");
126 2 : 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");
127 :
128 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:lin", "ang", "3600000");
129 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:gradFill/w14:lin", "scaled", "0");
130 :
131 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:prstDash", "val", "dash");
132 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:textOutline/w14:miter", "lim", "0");
133 :
134 : // Paragraph 2
135 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline", "w", "9525");
136 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline", "cap", "rnd");
137 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline", "cmpd", "sng");
138 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline", "algn", "ctr");
139 :
140 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline/w14:solidFill/w14:srgbClr", "val", "FF0000");
141 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline/w14:prstDash", "val", "solid");
142 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textOutline/w14:bevel", 1);
143 :
144 : // Paragraph 3
145 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline", "w", "9525");
146 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline", "cap", "rnd");
147 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline", "cmpd", "sng");
148 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline", "algn", "ctr");
149 :
150 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline/w14:noFill", 1);
151 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline/w14:prstDash", "val", "solid");
152 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textOutline/w14:bevel", 1);
153 : }
154 :
155 28 : DECLARE_OOXMLEXPORT_TEST(Test_TextEffects_TextFill, "TextEffects_TextFill.docx")
156 : {
157 4 : xmlDocPtr pXmlDoc = parseExport("word/document.xml");
158 4 : if (!pXmlDoc)
159 6 : return;
160 : // Paragraph 1 has no textFill
161 :
162 : // Paragraph 2
163 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:textFill/w14:noFill", 1);
164 :
165 : // Paragraph 3
166 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill", 1);
167 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr", "val", "accent1");
168 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr/w14:alpha", "val", "5000");
169 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr/w14:lumMod", "val", "40000");
170 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[1]/w:rPr/w14:textFill/w14:solidFill/w14:schemeClr/w14:lumOff", "val", "60000");
171 :
172 : // Paragraph 4
173 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill", 1);
174 2 : 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");
175 2 : 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");
176 2 : 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");
177 2 : 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");
178 :
179 2 : 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");
180 2 : 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");
181 2 : 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");
182 2 : 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");
183 :
184 2 : 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");
185 2 : 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");
186 2 : 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");
187 2 : 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");
188 2 : 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");
189 :
190 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:lin", "ang", "16200000");
191 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:r[1]/w:rPr/w14:textFill/w14:gradFill/w14:lin", "scaled", "0");
192 : }
193 :
194 28 : DECLARE_OOXMLEXPORT_TEST(Test_TextEffects_Props3d_Ligatures_NumForm_NumSpacing, "TextEffects_Props3d_Ligatures_NumForm_NumSpacing.docx")
195 : {
196 4 : xmlDocPtr pXmlDoc = parseExport("word/document.xml");
197 4 : if (!pXmlDoc)
198 6 : return;
199 :
200 : // Paragraph 1 - w14:props3d
201 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d", 1);
202 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d", "extrusionH", "63500");
203 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d", "contourW", "25400");
204 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d", "prstMaterial", "softEdge");
205 :
206 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelT", "w", "38100");
207 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelT", "h", "38100");
208 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelT", "prst", "relaxedInset");
209 :
210 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelB", "w", "69850");
211 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelB", "h", "38100");
212 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:bevelB", "prst", "cross");
213 :
214 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr", 1);
215 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr/w14:schemeClr", "val", "accent2");
216 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr/w14:schemeClr/w14:lumMod", "val", "20000");
217 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:extrusionClr/w14:schemeClr/w14:lumOff", "val", "80000");
218 :
219 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:contourClr", 1);
220 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:props3d/w14:contourClr/w14:srgbClr", "val", "92D050");
221 :
222 : // Paragraph 2 - w14:ligatures
223 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:ligatures", 1);
224 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:ligatures", "val", "standard");
225 :
226 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:rPr/w14:ligatures", 1);
227 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[3]/w:rPr/w14:ligatures", "val", "standardContextual");
228 :
229 : // Paragraph 3 - w14:numFurm and w14:numSpacing
230 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numForm", 1);
231 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numForm", "val", "lining");
232 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numSpacing", 1);
233 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:rPr/w14:numSpacing", "val", "tabular");
234 :
235 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numForm", 1);
236 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numForm", "val", "oldStyle");
237 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numSpacing", 1);
238 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[4]/w:rPr/w14:numSpacing", "val", "proportional");
239 : }
240 :
241 28 : DECLARE_OOXMLEXPORT_TEST(Test_TextEffects_StylisticSets_CntxtAlts, "TextEffects_StylisticSets_CntxtAlts.docx")
242 : {
243 4 : xmlDocPtr pXmlDoc = parseExport("word/document.xml");
244 4 : if (!pXmlDoc)
245 6 : return;
246 :
247 : // Paragraph 1 - w14:stylisticSets
248 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:stylisticSets/w14:styleSet", 1);
249 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w14:stylisticSets/w14:styleSet", "id", "4");
250 :
251 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w14:stylisticSets/w14:styleSet", 1);
252 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w14:stylisticSets/w14:styleSet", "id", "2");
253 :
254 : // Paragraph 1 - w14:cntxtAlts
255 2 : assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:rPr/w14:cntxtAlts", 1);
256 :
257 : }
258 :
259 28 : DECLARE_OOXMLEXPORT_TEST(Test_McIgnorable, "TextEffects_StylisticSets_CntxtAlts.docx")
260 : {
261 4 : xmlDocPtr pXmlDocument = parseExport("word/document.xml");
262 4 : if (!pXmlDocument)
263 2 : return;
264 :
265 2 : assertXPath(pXmlDocument, "/w:document", "Ignorable", "w14 wp14");
266 :
267 2 : xmlDocPtr pXmlStyles = parseExport("word/styles.xml");
268 2 : if (!pXmlStyles)
269 0 : return;
270 :
271 2 : assertXPath(pXmlStyles, "/w:styles", "Ignorable", "w14");
272 : }
273 :
274 28 : DECLARE_OOXMLEXPORT_TEST(Test_CompatSettingsForW14, "TextEffects_StylisticSets_CntxtAlts.docx")
275 : {
276 4 : xmlDocPtr pXmlDoc = parseExport("word/settings.xml");
277 4 : if (!pXmlDoc)
278 6 : return;
279 :
280 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting", 5);
281 :
282 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]", "name", "compatibilityMode");
283 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]", "uri", "http://schemas.microsoft.com/office/word");
284 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[1]", "val", "15"); // document was made with Word2013 -> 15
285 :
286 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[2]", "name", "overrideTableStyleFontSizeAndJustification");
287 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[2]", "uri", "http://schemas.microsoft.com/office/word");
288 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[2]", "val", "1");
289 :
290 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[3]", "name", "enableOpenTypeFeatures");
291 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[3]", "uri", "http://schemas.microsoft.com/office/word");
292 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[3]", "val", "1");
293 :
294 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[4]", "name", "doNotFlipMirrorIndents");
295 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[4]", "uri", "http://schemas.microsoft.com/office/word");
296 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[4]", "val", "1");
297 :
298 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[5]", "name", "differentiateMultirowTableHeaders");
299 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[5]", "uri", "http://schemas.microsoft.com/office/word");
300 2 : assertXPath(pXmlDoc, "/w:settings/w:compat/w:compatSetting[5]", "val", "1");
301 : }
302 :
303 28 : DECLARE_OOXMLEXPORT_TEST(Test_TextEffects_Groupshapes, "TextEffects_Groupshapes.docx")
304 : {
305 4 : xmlDocPtr pXmlDoc = parseExport("word/document.xml");
306 4 : if (!pXmlDoc)
307 6 : return;
308 :
309 2 : std::string 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";
310 :
311 2 : assertXPath(pXmlDoc, (sPathToWGP + "/wps:wsp").c_str(), 2);
312 :
313 4 : std::string sPathToShapeRunProperties = sPathToWGP + "/wps:wsp[2]/wps:txbx/w:txbxContent/w:p/w:r/w:rPr";
314 :
315 : // Glow
316 4 : std::string sPathGlow = sPathToShapeRunProperties + "/w14:glow";
317 2 : assertXPath(pXmlDoc, (sPathGlow).c_str(), 1);
318 2 : assertXPath(pXmlDoc, (sPathGlow).c_str(), "rad", "127000");
319 2 : assertXPath(pXmlDoc, (sPathGlow+"/w14:srgbClr").c_str(), "val", "00B050");
320 2 : assertXPath(pXmlDoc, (sPathGlow+"/w14:srgbClr/w14:alpha").c_str(), "val", "60000");
321 :
322 : // Shadow
323 4 : std::string sPathShadow = sPathToShapeRunProperties + "/w14:shadow";
324 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), 1);
325 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "blurRad", "127000");
326 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "dist", "787400");
327 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "dir", "12720000");
328 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "sx", "70000");
329 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "sy", "70000");
330 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "kx", "0");
331 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "ky", "0");
332 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "algn", "l");
333 2 : assertXPath(pXmlDoc, (sPathShadow+"/w14:srgbClr").c_str(), "val", "92D050");
334 2 : assertXPath(pXmlDoc, (sPathShadow+"/w14:srgbClr/w14:alpha").c_str(), "val", "40000");
335 :
336 : // Reflection
337 4 : std::string sPathReflection = sPathToShapeRunProperties + "/w14:reflection";
338 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), 1);
339 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "blurRad", "139700");
340 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "stA", "47000");
341 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "stPos", "0");
342 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "endA", "0");
343 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "endPos", "85000");
344 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "dist", "63500");
345 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "dir", "5400000");
346 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "fadeDir", "5400000");
347 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "sx", "100000");
348 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "sy", "-100000");
349 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "kx", "0");
350 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "ky", "0");
351 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "algn", "bl");
352 :
353 : // TextOutline
354 4 : std::string sPathTextOutline = sPathToShapeRunProperties + "/w14:textOutline";
355 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), 1);
356 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "w", "25400");
357 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "cap", "rnd");
358 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "cmpd", "sng");
359 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "algn", "ctr");
360 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:solidFill/w14:schemeClr").c_str(), "val", "accent2");
361 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:alpha").c_str(), "val", "40000");
362 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:lumMod").c_str(), "val", "75000");
363 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:prstDash").c_str(), "val", "solid");
364 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:round").c_str(), 1);
365 :
366 : // TextFill
367 4 : std::string sPathTextFill = sPathToShapeRunProperties + "/w14:textFill";
368 2 : assertXPath(pXmlDoc, (sPathTextFill).c_str(), 1);
369 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]").c_str(), "pos", "0");
370 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr").c_str(), "val", "accent4");
371 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]").c_str(), "pos", "41000");
372 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr").c_str(), "val", "accent6");
373 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumMod").c_str(), "val", "60000");
374 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumOff").c_str(), "val", "40000");
375 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]").c_str(), "pos", "87000");
376 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr").c_str(), "val", "accent5");
377 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumMod").c_str(), "val", "60000");
378 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumOff").c_str(), "val", "40000");
379 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:lin").c_str(), "ang", "5400000");
380 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:lin").c_str(), "scaled", "0");
381 :
382 : // Props3D
383 4 : std::string sPathProps3D = sPathToShapeRunProperties + "/w14:props3d";
384 2 : assertXPath(pXmlDoc, (sPathProps3D).c_str(), 1);
385 2 : assertXPath(pXmlDoc, (sPathProps3D).c_str(), "extrusionH", "63500");
386 2 : assertXPath(pXmlDoc, (sPathProps3D).c_str(), "contourW", "12700");
387 2 : assertXPath(pXmlDoc, (sPathProps3D).c_str(), "prstMaterial", "warmMatte");
388 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelT").c_str(), "w", "38100");
389 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelT").c_str(), "h", "38100");
390 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelT").c_str(), "prst", "circle");
391 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:extrusionClr/w14:schemeClr").c_str(), "val", "accent2");
392 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumMod").c_str(), "val", "60000");
393 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumOff").c_str(), "val", "40000");
394 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:contourClr/w14:schemeClr").c_str(), "val", "accent4");
395 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:contourClr/w14:schemeClr/w14:lumMod").c_str(), "val", "75000");
396 :
397 : // Ligatures
398 4 : std::string sPathLigatures = sPathToShapeRunProperties + "/w14:ligatures";
399 2 : assertXPath(pXmlDoc, (sPathLigatures).c_str(), 1);
400 2 : assertXPath(pXmlDoc, (sPathLigatures).c_str(), "val", "standard");
401 :
402 : // NumForm
403 4 : std::string sPathNumForm = sPathToShapeRunProperties + "/w14:numForm";
404 2 : assertXPath(pXmlDoc, (sPathNumForm).c_str(), 1);
405 2 : assertXPath(pXmlDoc, (sPathNumForm).c_str(), "val", "oldStyle");
406 :
407 : // NumSpacing
408 4 : std::string sPathNumSpacing = sPathToShapeRunProperties + "/w14:numSpacing";
409 2 : assertXPath(pXmlDoc, (sPathNumSpacing).c_str(), 1);
410 2 : assertXPath(pXmlDoc, (sPathNumSpacing).c_str(), "val", "tabular");
411 :
412 : // StylisticSets
413 4 : std::string sPathStylisticSets = sPathToShapeRunProperties + "/w14:stylisticSets";
414 2 : assertXPath(pXmlDoc, (sPathStylisticSets).c_str(), 1);
415 4 : assertXPath(pXmlDoc, (sPathStylisticSets+"/w14:styleSet").c_str(), "id", "1");
416 : }
417 :
418 28 : DECLARE_OOXMLEXPORT_TEST(Test_TextEffects_InStyleXml, "TextEffects_InStyle.docx")
419 : {
420 4 : xmlDocPtr pXmlDoc = parseExport("word/styles.xml");
421 4 : if (!pXmlDoc)
422 6 : return;
423 :
424 2 : std::string sPathToCharacterStyle = "/w:styles/w:style[3]";
425 :
426 2 : assertXPath(pXmlDoc, (sPathToCharacterStyle).c_str(), "type", "character");
427 2 : assertXPath(pXmlDoc, (sPathToCharacterStyle).c_str(), "styleId", "TextEffectsStyleChar");
428 2 : assertXPath(pXmlDoc, (sPathToCharacterStyle).c_str(), "customStyle", "1");
429 :
430 : {
431 2 : std::string sPathToRun = sPathToCharacterStyle + "/w:rPr";
432 :
433 : // Glow
434 4 : std::string sPathGlow = sPathToRun + "/w14:glow";
435 2 : assertXPath(pXmlDoc, (sPathGlow).c_str(), "rad", "63500");
436 2 : assertXPath(pXmlDoc, (sPathGlow+"/w14:schemeClr").c_str(), "val", "accent2");
437 2 : assertXPath(pXmlDoc, (sPathGlow+"/w14:schemeClr/w14:alpha").c_str(), "val", "60000");
438 2 : assertXPath(pXmlDoc, (sPathGlow+"/w14:schemeClr/w14:satMod").c_str(), "val", "175000");
439 :
440 : // Shadow
441 4 : std::string sPathShadow = sPathToRun + "/w14:shadow";
442 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "blurRad", "50800");
443 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "dist", "38100");
444 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "dir", "16200000");
445 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "sx", "100000");
446 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "sy", "100000");
447 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "kx", "0");
448 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "ky", "0");
449 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "algn", "b");
450 2 : assertXPath(pXmlDoc, (sPathShadow+"/w14:srgbClr").c_str(), "val", "000000");
451 2 : assertXPath(pXmlDoc, (sPathShadow+"/w14:srgbClr/w14:alpha").c_str(), "val", "60000");
452 :
453 : // Reflection
454 4 : std::string sPathReflection = sPathToRun + "/w14:reflection";
455 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "blurRad", "6350");
456 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "stA", "50000");
457 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "stPos", "0");
458 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "endA", "300");
459 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "endPos", "50000");
460 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "dist", "29997");
461 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "dir", "5400000");
462 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "fadeDir", "5400000");
463 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "sx", "100000");
464 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "sy", "-100000");
465 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "kx", "0");
466 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "ky", "0");
467 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "algn", "bl");
468 :
469 : // TextOutline
470 4 : std::string sPathTextOutline = sPathToRun + "/w14:textOutline";
471 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "w", "25400");
472 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "cap", "rnd");
473 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "cmpd", "sng");
474 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "algn", "ctr");
475 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:solidFill/w14:schemeClr").c_str(), "val", "accent1");
476 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:alpha").c_str(), "val", "40000");
477 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:lumMod").c_str(), "val", "75000");
478 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:prstDash").c_str(), "val", "solid");
479 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:bevel").c_str(), 1);
480 :
481 : // TextFill
482 4 : std::string sPathTextFill = sPathToRun + "/w14:textFill";
483 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]").c_str(), "pos", "0");
484 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr").c_str(), "val", "accent1");
485 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:alpha").c_str(), "val", "10000");
486 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumMod").c_str(), "val", "40000");
487 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumOff").c_str(), "val", "60000");
488 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]").c_str(), "pos", "46000");
489 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr").c_str(), "val", "accent1");
490 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumMod").c_str(), "val", "95000");
491 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumOff").c_str(), "val", "5000");
492 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]").c_str(), "pos", "100000");
493 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr").c_str(), "val", "accent1");
494 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumMod").c_str(), "val", "60000");
495 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:path").c_str(), "path", "circle");
496 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect").c_str(), "b", "-30000");
497 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect").c_str(), "r", "50000");
498 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect").c_str(), "t", "130000");
499 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect").c_str(), "l", "50000");
500 :
501 : // Props3D
502 4 : std::string sPathProps3D = sPathToRun + "/w14:props3d";
503 2 : assertXPath(pXmlDoc, (sPathProps3D).c_str(), "extrusionH", "57150");
504 2 : assertXPath(pXmlDoc, (sPathProps3D).c_str(), "contourW", "12700");
505 2 : assertXPath(pXmlDoc, (sPathProps3D).c_str(), "prstMaterial", "metal");
506 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelT").c_str(), "w", "38100");
507 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelT").c_str(), "h", "38100");
508 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelT").c_str(), "prst", "angle");
509 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelB").c_str(), "w", "69850");
510 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelB").c_str(), "h", "69850");
511 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelB").c_str(), "prst", "divot");
512 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:extrusionClr/w14:schemeClr").c_str(), "val", "accent1");
513 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumMod").c_str(), "val", "20000");
514 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumOff").c_str(), "val", "80000");
515 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:contourClr/w14:schemeClr").c_str(), "val", "accent1");
516 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:contourClr/w14:schemeClr/w14:lumMod").c_str(), "val", "75000");
517 :
518 : // Ligatures
519 4 : std::string sPathLigatures = sPathToRun + "/w14:ligatures";
520 2 : assertXPath(pXmlDoc, (sPathLigatures).c_str(), "val", "standard");
521 :
522 : // NumForm
523 4 : std::string sPathNumForm = sPathToRun + "/w14:numForm";
524 2 : assertXPath(pXmlDoc, (sPathNumForm).c_str(), "val", "lining");
525 :
526 : // NumSpacing
527 4 : std::string sPathNumSpacing = sPathToRun + "/w14:numSpacing";
528 2 : assertXPath(pXmlDoc, (sPathNumSpacing).c_str(), "val", "proportional");
529 :
530 : // StylisticSets
531 4 : std::string sPathStylisticSets = sPathToRun + "/w14:stylisticSets";
532 4 : assertXPath(pXmlDoc, (sPathStylisticSets+"/w14:styleSet").c_str(), "id", "1");
533 : }
534 :
535 4 : std::string sPathToParagraphStyle = "/w:styles/w:style[9]";
536 :
537 2 : assertXPath(pXmlDoc, (sPathToParagraphStyle).c_str(), "type", "paragraph");
538 2 : assertXPath(pXmlDoc, (sPathToParagraphStyle).c_str(), "styleId", "TextEffectsStyle");
539 2 : assertXPath(pXmlDoc, (sPathToParagraphStyle).c_str(), "customStyle", "1");
540 :
541 : {
542 2 : std::string sPathToRun = sPathToParagraphStyle + "/w:rPr";
543 :
544 : // Glow
545 4 : std::string sPathGlow = sPathToRun + "/w14:glow";
546 2 : assertXPath(pXmlDoc, (sPathGlow).c_str(), "rad", "63500");
547 2 : assertXPath(pXmlDoc, (sPathGlow+"/w14:schemeClr").c_str(), "val", "accent2");
548 2 : assertXPath(pXmlDoc, (sPathGlow+"/w14:schemeClr/w14:alpha").c_str(), "val", "60000");
549 2 : assertXPath(pXmlDoc, (sPathGlow+"/w14:schemeClr/w14:satMod").c_str(), "val", "175000");
550 :
551 : // Shadow
552 4 : std::string sPathShadow = sPathToRun + "/w14:shadow";
553 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "blurRad", "50800");
554 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "dist", "38100");
555 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "dir", "16200000");
556 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "sx", "100000");
557 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "sy", "100000");
558 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "kx", "0");
559 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "ky", "0");
560 2 : assertXPath(pXmlDoc, (sPathShadow).c_str(), "algn", "b");
561 2 : assertXPath(pXmlDoc, (sPathShadow+"/w14:srgbClr").c_str(), "val", "000000");
562 2 : assertXPath(pXmlDoc, (sPathShadow+"/w14:srgbClr/w14:alpha").c_str(), "val", "60000");
563 :
564 : // Reflection
565 4 : std::string sPathReflection = sPathToRun + "/w14:reflection";
566 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "blurRad", "6350");
567 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "stA", "50000");
568 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "stPos", "0");
569 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "endA", "300");
570 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "endPos", "50000");
571 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "dist", "29997");
572 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "dir", "5400000");
573 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "fadeDir", "5400000");
574 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "sx", "100000");
575 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "sy", "-100000");
576 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "kx", "0");
577 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "ky", "0");
578 2 : assertXPath(pXmlDoc, (sPathReflection).c_str(), "algn", "bl");
579 :
580 : // TextOutline
581 4 : std::string sPathTextOutline = sPathToRun + "/w14:textOutline";
582 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "w", "25400");
583 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "cap", "rnd");
584 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "cmpd", "sng");
585 2 : assertXPath(pXmlDoc, (sPathTextOutline).c_str(), "algn", "ctr");
586 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:solidFill/w14:schemeClr").c_str(), "val", "accent1");
587 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:alpha").c_str(), "val", "40000");
588 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:solidFill/w14:schemeClr/w14:lumMod").c_str(), "val", "75000");
589 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:prstDash").c_str(), "val", "solid");
590 2 : assertXPath(pXmlDoc, (sPathTextOutline+"/w14:bevel").c_str(), 1);
591 :
592 : // TextFill
593 4 : std::string sPathTextFill = sPathToRun + "/w14:textFill";
594 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]").c_str(), "pos", "0");
595 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr").c_str(), "val", "accent1");
596 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:alpha").c_str(), "val", "10000");
597 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumMod").c_str(), "val", "40000");
598 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[1]/w14:schemeClr/w14:lumOff").c_str(), "val", "60000");
599 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]").c_str(), "pos", "46000");
600 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr").c_str(), "val", "accent1");
601 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumMod").c_str(), "val", "95000");
602 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[2]/w14:schemeClr/w14:lumOff").c_str(), "val", "5000");
603 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]").c_str(), "pos", "100000");
604 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr").c_str(), "val", "accent1");
605 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:gsLst/w14:gs[3]/w14:schemeClr/w14:lumMod").c_str(), "val", "60000");
606 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:path").c_str(), "path", "circle");
607 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect").c_str(), "b", "-30000");
608 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect").c_str(), "r", "50000");
609 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect").c_str(), "t", "130000");
610 2 : assertXPath(pXmlDoc, (sPathTextFill+"/w14:gradFill/w14:path/w14:fillToRect").c_str(), "l", "50000");
611 :
612 : // Props3D
613 4 : std::string sPathProps3D = sPathToRun + "/w14:props3d";
614 2 : assertXPath(pXmlDoc, (sPathProps3D).c_str(), "extrusionH", "57150");
615 2 : assertXPath(pXmlDoc, (sPathProps3D).c_str(), "contourW", "12700");
616 2 : assertXPath(pXmlDoc, (sPathProps3D).c_str(), "prstMaterial", "metal");
617 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelT").c_str(), "w", "38100");
618 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelT").c_str(), "h", "38100");
619 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelT").c_str(), "prst", "angle");
620 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelB").c_str(), "w", "69850");
621 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelB").c_str(), "h", "69850");
622 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:bevelB").c_str(), "prst", "divot");
623 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:extrusionClr/w14:schemeClr").c_str(), "val", "accent1");
624 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumMod").c_str(), "val", "20000");
625 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:extrusionClr/w14:schemeClr/w14:lumOff").c_str(), "val", "80000");
626 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:contourClr/w14:schemeClr").c_str(), "val", "accent1");
627 2 : assertXPath(pXmlDoc, (sPathProps3D+"/w14:contourClr/w14:schemeClr/w14:lumMod").c_str(), "val", "75000");
628 :
629 : // Ligatures
630 4 : std::string sPathLigatures = sPathToRun + "/w14:ligatures";
631 2 : assertXPath(pXmlDoc, (sPathLigatures).c_str(), "val", "standard");
632 :
633 : // NumForm
634 4 : std::string sPathNumForm = sPathToRun + "/w14:numForm";
635 2 : assertXPath(pXmlDoc, (sPathNumForm).c_str(), "val", "lining");
636 :
637 : // NumSpacing
638 4 : std::string sPathNumSpacing = sPathToRun + "/w14:numSpacing";
639 2 : assertXPath(pXmlDoc, (sPathNumSpacing).c_str(), "val", "proportional");
640 :
641 : // StylisticSets
642 4 : std::string sPathStylisticSets = sPathToRun + "/w14:stylisticSets";
643 4 : assertXPath(pXmlDoc, (sPathStylisticSets+"/w14:styleSet").c_str(), "id", "1");
644 2 : }
645 : }
646 :
647 :
648 8 : CPPUNIT_PLUGIN_IMPLEMENT();
649 :
650 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|