Line data Source code
1 : /*
2 : * This file is part of the LibreOffice project.
3 : *
4 : * This Source Code Form is subject to the terms of the Mozilla Public
5 : * License, v. 2.0. If a copy of the MPL was not distributed with this
6 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 : */
8 :
9 : #include <swmodeltestbase.hxx>
10 :
11 : #if !defined(MACOSX) && !defined(WNT)
12 :
13 : #include <com/sun/star/table/BorderLine2.hpp>
14 : #include <com/sun/star/table/TableBorder.hpp>
15 : #include <com/sun/star/table/TableBorder2.hpp>
16 : #include <com/sun/star/text/XDependentTextField.hpp>
17 : #include <com/sun/star/text/XTextFramesSupplier.hpp>
18 : #include <com/sun/star/text/XTextTablesSupplier.hpp>
19 :
20 : #include <vcl/svapp.hxx>
21 :
22 : #include <bordertest.hxx>
23 :
24 : #define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
25 :
26 18 : class Test : public SwModelTestBase
27 : {
28 : public:
29 18 : Test() : SwModelTestBase("/sw/qa/extras/ww8import/data/", "MS Word 97")
30 : {
31 18 : }
32 : };
33 :
34 : #define DECLARE_WW8IMPORT_TEST(TestName, filename) DECLARE_SW_IMPORT_TEST(TestName, filename, Test)
35 :
36 9 : DECLARE_WW8IMPORT_TEST(testN757910, "n757910.doc")
37 : {
38 : // The internal margin was larger than 0.28cm
39 1 : uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
40 2 : uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
41 2 : uno::Reference<beans::XPropertySet> xPropertySet(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
42 1 : sal_Int32 nValue = 0;
43 1 : xPropertySet->getPropertyValue("LeftBorderDistance") >>= nValue;
44 1 : CPPUNIT_ASSERT_EQUAL(sal_Int32(280), nValue);
45 :
46 : // The border width was zero
47 1 : table::BorderLine2 aBorder;
48 1 : xPropertySet->getPropertyValue("LeftBorder") >>= aBorder;
49 2 : CPPUNIT_ASSERT(aBorder.LineWidth > 0);
50 1 : }
51 :
52 9 : DECLARE_WW8IMPORT_TEST(testN760294, "n760294.doc")
53 : {
54 1 : uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
55 2 : uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
56 2 : uno::Reference<beans::XPropertySet> xTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
57 1 : table::TableBorder aTableBorder;
58 1 : xTable->getPropertyValue("TableBorder") >>= aTableBorder;
59 1 : CPPUNIT_ASSERT_EQUAL(aTableBorder.TopLine.InnerLineWidth, aTableBorder.TopLine.OuterLineWidth);
60 2 : CPPUNIT_ASSERT_EQUAL(aTableBorder.TopLine.InnerLineWidth, aTableBorder.TopLine.LineDistance);
61 1 : }
62 :
63 9 : DECLARE_WW8IMPORT_TEST(testN750255, "n750255.doc")
64 : {
65 : /*
66 : Column break without columns on the page is a page break, so check those paragraphs
67 : are on page 2 (page style 'Convert 1') and page 3 (page style 'Convert 2')
68 : enum = ThisComponent.Text.createEnumeration
69 : enum.nextElement
70 : para1 = enum.nextElement
71 : xray para1.String
72 : xray para1.PageStyleName
73 : para2 = enum.nextElement
74 : xray para2.String
75 : xray para2.PageStyleName
76 : */
77 1 : uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
78 2 : uno::Reference<container::XEnumerationAccess> paraEnumAccess(textDocument->getText(), uno::UNO_QUERY);
79 : // list of paragraphs
80 2 : uno::Reference<container::XEnumeration> paraEnum = paraEnumAccess->createEnumeration();
81 : // go to 1st paragraph
82 1 : (void) paraEnum->nextElement();
83 : // get the 2nd and 3rd paragraph
84 2 : uno::Reference<uno::XInterface> paragraph1(paraEnum->nextElement(), uno::UNO_QUERY);
85 2 : uno::Reference<uno::XInterface> paragraph2(paraEnum->nextElement(), uno::UNO_QUERY);
86 2 : uno::Reference<text::XTextRange> text1(paragraph1, uno::UNO_QUERY);
87 2 : uno::Reference<text::XTextRange> text2(paragraph2, uno::UNO_QUERY);
88 1 : CPPUNIT_ASSERT_EQUAL( OUString( "one" ), text1->getString());
89 1 : CPPUNIT_ASSERT_EQUAL( OUString( "two" ), text2->getString());
90 2 : uno::Reference<beans::XPropertySet> paragraphProperties1(paragraph1, uno::UNO_QUERY);
91 2 : uno::Reference<beans::XPropertySet> paragraphProperties2(paragraph2, uno::UNO_QUERY);
92 2 : OUString pageStyle1, pageStyle2;
93 1 : paragraphProperties1->getPropertyValue( "PageStyleName" ) >>= pageStyle1;
94 1 : paragraphProperties2->getPropertyValue( "PageStyleName" ) >>= pageStyle2;
95 1 : CPPUNIT_ASSERT_EQUAL( OUString( "Convert 1" ), pageStyle1 );
96 2 : CPPUNIT_ASSERT_EQUAL( OUString( "Convert 2" ), pageStyle2 );
97 :
98 1 : }
99 :
100 9 : DECLARE_WW8IMPORT_TEST(testN652364, "n652364.doc")
101 : {
102 : /*
103 : Related to 750255 above, column break with columns on the page however should be a column break.
104 : enum = ThisComponent.Text.createEnumeration
105 : enum.nextElement
106 : para1 = enum.nextElement
107 : xray para1.String
108 : xray para1.PageStyleName
109 : enum.nextElement
110 : para2 = enum.nextElement
111 : xray para2.String
112 : xray para2.PageStyleName
113 : */
114 1 : uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
115 2 : uno::Reference<container::XEnumerationAccess> paraEnumAccess(textDocument->getText(), uno::UNO_QUERY);
116 : // list of paragraphs
117 2 : uno::Reference<container::XEnumeration> paraEnum = paraEnumAccess->createEnumeration();
118 : // get the 2nd and 4th paragraph
119 1 : (void) paraEnum->nextElement();
120 2 : uno::Reference<uno::XInterface> paragraph1(paraEnum->nextElement(), uno::UNO_QUERY);
121 1 : (void) paraEnum->nextElement();
122 2 : uno::Reference<uno::XInterface> paragraph2(paraEnum->nextElement(), uno::UNO_QUERY);
123 2 : uno::Reference<text::XTextRange> text1(paragraph1, uno::UNO_QUERY);
124 2 : uno::Reference<text::XTextRange> text2(paragraph2, uno::UNO_QUERY);
125 1 : CPPUNIT_ASSERT_EQUAL( OUString( "text1" ), text1->getString());
126 1 : CPPUNIT_ASSERT_EQUAL( OUString( "text2" ), text2->getString());
127 2 : uno::Reference<beans::XPropertySet> paragraphProperties1(paragraph1, uno::UNO_QUERY);
128 2 : uno::Reference<beans::XPropertySet> paragraphProperties2(paragraph2, uno::UNO_QUERY);
129 2 : OUString pageStyle1, pageStyle2;
130 1 : paragraphProperties1->getPropertyValue( "PageStyleName" ) >>= pageStyle1;
131 1 : paragraphProperties2->getPropertyValue( "PageStyleName" ) >>= pageStyle2;
132 : // "Standard" is the style for the first page (2nd is "Convert 1").
133 1 : CPPUNIT_ASSERT_EQUAL( OUString( "Standard" ), pageStyle1 );
134 2 : CPPUNIT_ASSERT_EQUAL( OUString( "Standard" ), pageStyle2 );
135 1 : }
136 :
137 9 : DECLARE_WW8IMPORT_TEST(testN757118, "n757118.doc")
138 : {
139 : /*
140 : Two pairs of horizontal rules (one absolute width, one relative width)
141 : have the same width (full page width, half page width).
142 : xray ThisComponent.DrawPage.getByIndex(0).BoundRect
143 : */
144 1 : uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
145 2 : uno::Reference<drawing::XShape> rule1 = getShape(1), rule2 = getShape(2), rule3 = getShape(3), rule4 = getShape(4);
146 2 : uno::Reference<beans::XPropertySet> ruleProperties1(rule1, uno::UNO_QUERY);
147 2 : uno::Reference<beans::XPropertySet> ruleProperties2(rule2, uno::UNO_QUERY);
148 2 : uno::Reference<beans::XPropertySet> ruleProperties3(rule3, uno::UNO_QUERY);
149 2 : uno::Reference<beans::XPropertySet> ruleProperties4(rule4, uno::UNO_QUERY);
150 1 : awt::Rectangle boundRect1, boundRect2, boundRect3, boundRect4;
151 1 : ruleProperties1->getPropertyValue( "BoundRect" ) >>= boundRect1;
152 1 : ruleProperties2->getPropertyValue( "BoundRect" ) >>= boundRect2;
153 1 : ruleProperties3->getPropertyValue( "BoundRect" ) >>= boundRect3;
154 1 : ruleProperties4->getPropertyValue( "BoundRect" ) >>= boundRect4;
155 : // compare, allow for < 5 differences because of rounding errors
156 1 : CPPUNIT_ASSERT( abs( boundRect1.Width - boundRect3.Width ) < 5 );
157 2 : CPPUNIT_ASSERT( abs( boundRect2.Width - boundRect4.Width ) < 5 );
158 1 : }
159 :
160 9 : DECLARE_WW8IMPORT_TEST(testN757905, "n757905.doc")
161 : {
162 : // The problem was that the paragraph had only a single fly
163 : // (as-character-anchored), and the height of that was smallar than the
164 : // paragraph height. When in Word-compat mode, we should take the max of
165 : // the two, not just the height of the fly.
166 :
167 1 : OUString aHeight = parseDump("/root/page/body/txt/infos/bounds", "height");
168 1 : CPPUNIT_ASSERT(sal_Int32(31) < aHeight.toInt32());
169 1 : }
170 :
171 9 : DECLARE_WW8IMPORT_TEST(testAllGapsWord, "all_gaps_word.doc")
172 : {
173 1 : BorderTest borderTest;
174 1 : borderTest.testTheBorders(mxComponent);
175 1 : }
176 :
177 9 : DECLARE_WW8IMPORT_TEST(testI120158, "i120158.doc")
178 : {
179 : // See https://issues.apache.org/ooo/show_bug.cgi?id=120158
180 1 : uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
181 2 : uno::Reference<container::XEnumerationAccess> paraEnumAccess(textDocument->getText(), uno::UNO_QUERY);
182 : // list of paragraphs
183 2 : uno::Reference<container::XEnumeration> paraEnum = paraEnumAccess->createEnumeration();
184 : // get contents of 1st paragraph as text
185 2 : uno::Reference<uno::XInterface> paragraph0(paraEnum->nextElement(), uno::UNO_QUERY);
186 2 : uno::Reference<text::XTextRange> text0(paragraph0, uno::UNO_QUERY);
187 2 : OUString sFieldResult = text0->getString();
188 2 : CPPUNIT_ASSERT(sFieldResult.endsWith("AM") || sFieldResult.endsWith("PM"));
189 1 : }
190 :
191 9 : DECLARE_WW8IMPORT_TEST(testN816603, "n816603.doc")
192 : {
193 : // Bugdoc was 5 pages in Word, 1 in Writer due to pointlessly wrapping the
194 : // table in a frame. Exact layout may depend on fonts available, etc. --
195 : // but at least make sure that our table spans over multiple pages now.
196 1 : CPPUNIT_ASSERT(getPages() > 1);
197 1 : }
198 :
199 9 : DECLARE_WW8IMPORT_TEST(testN816593, "n816593.doc")
200 : {
201 1 : uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
202 2 : uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
203 : // Make sure that even if we import the two tables as non-floating, we
204 : // still consider them different, and not merge them.
205 2 : CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
206 1 : }
207 :
208 9 : DECLARE_WW8IMPORT_TEST(testPageBorder, "page-border.doc")
209 : {
210 : // Page border was missing (LineWidth was 0), due to wrong interpretation of pgbApplyTo.
211 1 : table::BorderLine2 aBorder = getProperty<table::BorderLine2>(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "TopBorder");
212 1 : CPPUNIT_ASSERT_EQUAL(sal_uInt32(TWIP_TO_MM100(6 * 20)), aBorder.LineWidth);
213 1 : }
214 :
215 9 : DECLARE_WW8IMPORT_TEST(testN823651, "n823651.doc")
216 : {
217 : // Character height was 10pt instead of 7.5pt in the header.
218 1 : uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
219 2 : uno::Reference<text::XText> xText = getProperty< uno::Reference<text::XTextRange> >(xStyle, "HeaderTextFirst")->getText();
220 2 : CPPUNIT_ASSERT_EQUAL(7.5f, getProperty<float>(getParagraphOfText(1, xText), "CharHeight"));
221 1 : }
222 :
223 9 : DECLARE_WW8IMPORT_TEST(testFdo36868, "fdo36868.doc")
224 : {
225 1 : OUString aText = parseDump("/root/page/body/txt[3]/Special[@nType='POR_NUMBER']", "rText");
226 : // This was 1.1.
227 1 : CPPUNIT_ASSERT_EQUAL(OUString("2.1"), aText);
228 1 : }
229 :
230 9 : DECLARE_WW8IMPORT_TEST(testListNolevel, "list-nolevel.doc")
231 : {
232 : // Similar to fdo#36868, numbering portions had wrong values.
233 1 : OUString aText = parseDump("/root/page/body/txt[1]/Special[@nType='POR_NUMBER']", "rText");
234 : // POR_NUMBER was completely missing.
235 1 : CPPUNIT_ASSERT_EQUAL(OUString("1."), aText);
236 1 : }
237 :
238 9 : DECLARE_WW8IMPORT_TEST(testBnc821208, "bnc821208.doc")
239 : {
240 : // WW8Num1z0 earned a Symbol font, turning numbers into rectangles.
241 1 : uno::Reference<beans::XPropertyState> xPropertyState(getStyles("CharacterStyles")->getByName("WW8Num1z0"), uno::UNO_QUERY);
242 1 : beans::PropertyState ePropertyState = xPropertyState->getPropertyState("CharFontName");
243 : // This was beans::PropertyState_DIRECT_VALUE.
244 1 : CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DEFAULT_VALUE, ePropertyState);
245 :
246 : // Background of the numbering itself should have been the default, was yellow (0xffff00).
247 1 : CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xPropertyState, "CharBackColor"));
248 1 : }
249 :
250 9 : DECLARE_WW8IMPORT_TEST(testCp1000044, "cp1000044.doc")
251 : {
252 1 : uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
253 : // It wasn't possible to fill out this form.
254 1 : CPPUNIT_ASSERT_EQUAL(false, bool(xStorable->isReadonly()));
255 1 : }
256 :
257 9 : DECLARE_WW8IMPORT_TEST(testCp1000039, "cp1000039.doc")
258 : {
259 : // This was RTL_TEXTENCODING_SYMBOL, causing "1" rendered as a placeholder rectangle.
260 1 : CPPUNIT_ASSERT_EQUAL(sal_Int16(RTL_TEXTENCODING_DONTKNOW), getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharFontCharSet"));
261 1 : }
262 :
263 9 : DECLARE_WW8IMPORT_TEST(testBorderColours, "bordercolours.doc")
264 : {
265 : // The following 6 colours can only be represented with WW9 (Word 2000)
266 : // BRC (BoRder Control) structures. We can tell that they have been
267 : // exported/imported using a WW8 (Word '97) BRC if they instead come
268 : // through as one of the 16 colours listed at this link:
269 : // http://msdn.microsoft.com/en-us/library/dd773060.aspx
270 1 : table::BorderLine2 expectedTop(0xFA670C, 0, 53, 0, 1, 53);
271 1 : table::BorderLine2 expectedLeft(0xD99594, 0, 79, 0, 0, 79);
272 1 : table::BorderLine2 expectedRight(0xB2A1C7, 53, 53, 53, 3, 159);
273 1 : table::BorderLine2 expectedBottom(0xB6DDE8, 0, 106, 0, 14, 106);
274 1 : table::BorderLine2 expectedDashedRed(0xFA670C, 0, 53, 0, 2, 53);
275 1 : table::BorderLine2 expectedDoubleGreen(0xC2D69B, 26, 106, 26, 4, 159);
276 :
277 : // Paragraph border
278 : uno::Reference<text::XBookmarksSupplier> bookmarksSupplier(mxComponent,
279 1 : uno::UNO_QUERY);
280 : uno::Reference<container::XNameAccess> bookmarks(
281 2 : bookmarksSupplier->getBookmarks(), uno::UNO_QUERY);
282 : uno::Reference<text::XTextContent> bookmark(
283 2 : bookmarks->getByName("ParagraphBorder"), uno::UNO_QUERY);
284 2 : uno::Reference<text::XTextRange> anchor(bookmark->getAnchor());
285 1 : table::BorderLine2 border;
286 1 : border = getProperty<table::BorderLine2>(anchor, "TopBorder");
287 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedTop, border);
288 1 : border = getProperty<table::BorderLine2>(anchor, "LeftBorder");
289 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedLeft, border);
290 1 : border = getProperty<table::BorderLine2>(anchor, "RightBorder");
291 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedRight, border);
292 1 : border = getProperty<table::BorderLine2>(anchor, "BottomBorder");
293 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedBottom, border);
294 :
295 : // Page border
296 2 : OUString pageStyleName = getProperty<OUString>(anchor, "PageStyleName");
297 : uno::Reference<style::XStyle> pageStyle(
298 2 : getStyles("PageStyles")->getByName(pageStyleName), uno::UNO_QUERY);
299 1 : border = getProperty<table::BorderLine2>(pageStyle, "TopBorder");
300 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedTop, border);
301 1 : border = getProperty<table::BorderLine2>(pageStyle, "LeftBorder");
302 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedLeft, border);
303 1 : border = getProperty<table::BorderLine2>(pageStyle, "RightBorder");
304 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedRight, border);
305 1 : border = getProperty<table::BorderLine2>(pageStyle, "BottomBorder");
306 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedBottom, border);
307 :
308 : // Character border
309 1 : bookmark.set(bookmarks->getByName("CharBorder"), uno::UNO_QUERY);
310 1 : anchor = bookmark->getAnchor();
311 1 : border = getProperty<table::BorderLine2>(anchor, "CharTopBorder");
312 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedTop, border);
313 1 : border = getProperty<table::BorderLine2>(anchor, "CharLeftBorder");
314 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedTop, border);
315 1 : border = getProperty<table::BorderLine2>(anchor, "CharRightBorder");
316 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedTop, border);
317 1 : border = getProperty<table::BorderLine2>(anchor, "CharBottomBorder");
318 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedTop, border);
319 :
320 : // Table border
321 : uno::Reference<text::XTextTablesSupplier> tablesSupplier(mxComponent,
322 2 : uno::UNO_QUERY);
323 : uno::Reference<container::XNameAccess> tables(
324 2 : tablesSupplier->getTextTables(), uno::UNO_QUERY);
325 : uno::Reference<text::XTextTable> table(
326 2 : tables->getByName("Table1"), uno::UNO_QUERY);
327 : table::TableBorder2 tableBorder = getProperty<table::TableBorder2>(
328 1 : table, "TableBorder2");
329 1 : CPPUNIT_ASSERT_EQUAL(expectedTop.Color, tableBorder.TopLine.Color);
330 1 : CPPUNIT_ASSERT_EQUAL(expectedLeft.Color, tableBorder.LeftLine.Color);
331 1 : CPPUNIT_ASSERT_EQUAL(expectedRight.Color, tableBorder.RightLine.Color);
332 1 : CPPUNIT_ASSERT_EQUAL(expectedBottom.Color, tableBorder.BottomLine.Color);
333 :
334 : // Table cells
335 : uno::Reference<table::XCell> cell(
336 2 : table->getCellByName("A2"), uno::UNO_QUERY);
337 1 : border = getProperty<table::BorderLine2>(cell, "TopBorder");
338 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedTop, border);
339 1 : border = getProperty<table::BorderLine2>(cell, "LeftBorder");
340 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedLeft, border);
341 1 : border = getProperty<table::BorderLine2>(cell, "BottomBorder");
342 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedBottom, border);
343 :
344 1 : cell.set(table->getCellByName("B2"), uno::UNO_QUERY);
345 1 : border = getProperty<table::BorderLine2>(cell, "TopBorder");
346 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedDoubleGreen, border);
347 1 : border = getProperty<table::BorderLine2>(cell, "LeftBorder");
348 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedRight, border);
349 1 : border = getProperty<table::BorderLine2>(cell, "BottomBorder");
350 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedDoubleGreen, border);
351 :
352 1 : cell.set(table->getCellByName("C2"), uno::UNO_QUERY);
353 1 : border = getProperty<table::BorderLine2>(cell, "TopBorder");
354 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedDoubleGreen, border);
355 1 : border = getProperty<table::BorderLine2>(cell, "LeftBorder");
356 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedDashedRed, border);
357 1 : border = getProperty<table::BorderLine2>(cell, "RightBorder");
358 1 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedRight, border);
359 1 : border = getProperty<table::BorderLine2>(cell, "BottomBorder");
360 2 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedDoubleGreen, border);
361 :
362 : // Picture border
363 : // (#if'd out as they are not yet imported with correct colours)
364 : #if 0
365 : bookmark.set(bookmarks->getByName("PictureBorder"),uno::UNO_QUERY);
366 : anchor = bookmark->getAnchor();
367 : border = getProperty<table::BorderLine2>(anchor, "TopBorder");
368 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedTop, border);
369 : border = getProperty<table::BorderLine2>(anchor, "LeftBorder");
370 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedLeft, border);
371 : border = getProperty<table::BorderLine2>(anchor, "RightBorder");
372 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedRight, border);
373 : border = getProperty<table::BorderLine2>(anchor, "BottomBorder");
374 : CPPUNIT_ASSERT_BORDER_EQUAL(expectedBottom, border);
375 : #endif
376 1 : }
377 :
378 : #endif
379 :
380 4 : CPPUNIT_PLUGIN_IMPLEMENT();
381 :
382 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|