ParagraphBackGraphic.java (07d7dbdc) | ParagraphBackGraphic.java (06fb39a1) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 84 unchanged lines hidden (view full) --- 93 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 94 app.closeDocument(xTextDocument); 95 96 //reopen the document 97 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 98 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 99 //verify paragraph background graphic 100 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_BOTTOM,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 84 unchanged lines hidden (view full) --- 93 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 94 app.closeDocument(xTextDocument); 95 96 //reopen the document 97 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 98 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 99 //verify paragraph background graphic 100 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_BOTTOM,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); |
101 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); | 101 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); |
102 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 103 104 //reopen the document 105 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 106 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 107 //verify paragraph background graphic 108 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_BOTTOM,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); | 102 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 103 104 //reopen the document 105 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 106 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 107 //verify paragraph background graphic 108 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_BOTTOM,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); |
109 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); | 109 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); |
110 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 111 } 112 /* 113 * test paragraph background graphic 114 * 1.new a text document 115 * 2.insert some text 116 * 3.set paragraph background with graphic and graphic location is left middle 117 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 153 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 154 app.closeDocument(xTextDocument); 155 156 //reopen the document 157 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 158 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 159 //verify paragraph background graphic 160 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_MIDDLE,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); | 110 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 111 } 112 /* 113 * test paragraph background graphic 114 * 1.new a text document 115 * 2.insert some text 116 * 3.set paragraph background with graphic and graphic location is left middle 117 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 153 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 154 app.closeDocument(xTextDocument); 155 156 //reopen the document 157 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 158 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 159 //verify paragraph background graphic 160 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_MIDDLE,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); |
161 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); | 161 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); |
162 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 163 164 //reopen the document 165 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 166 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 167 //verify paragraph background graphic 168 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_MIDDLE,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); | 162 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 163 164 //reopen the document 165 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 166 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 167 //verify paragraph background graphic 168 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_MIDDLE,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); |
169 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); | 169 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); |
170 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 171 } 172 /* 173 * test paragraph background graphic 174 * 1.new a text document 175 * 2.insert some text 176 * 3.set paragraph background with graphic and graphic location is left top 177 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 213 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 214 app.closeDocument(xTextDocument); 215 216 //reopen the document 217 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 218 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 219 //verify paragraph background graphic 220 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_TOP,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); | 170 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 171 } 172 /* 173 * test paragraph background graphic 174 * 1.new a text document 175 * 2.insert some text 176 * 3.set paragraph background with graphic and graphic location is left top 177 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 213 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 214 app.closeDocument(xTextDocument); 215 216 //reopen the document 217 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 218 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 219 //verify paragraph background graphic 220 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_TOP,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); |
221 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); | 221 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); |
222 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 223 224 //reopen the document 225 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 226 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 227 //verify paragraph background graphic 228 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_TOP,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); | 222 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 223 224 //reopen the document 225 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 226 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 227 //verify paragraph background graphic 228 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.LEFT_TOP,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); |
229 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); | 229 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); |
230 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 231 } 232 /* 233 * test paragraph background graphic 234 * 1.new a text document 235 * 2.insert some text 236 * 3.set paragraph background with graphic and graphic location is middle bottom 237 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 273 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 274 app.closeDocument(xTextDocument); 275 276 //reopen the document 277 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 278 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 279 //verify paragraph background graphic 280 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_BOTTOM,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); | 230 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 231 } 232 /* 233 * test paragraph background graphic 234 * 1.new a text document 235 * 2.insert some text 236 * 3.set paragraph background with graphic and graphic location is middle bottom 237 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 273 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 274 app.closeDocument(xTextDocument); 275 276 //reopen the document 277 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 278 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 279 //verify paragraph background graphic 280 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_BOTTOM,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); |
281 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); | 281 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); |
282 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 283 284 //reopen the document 285 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 286 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 287 //verify paragraph background graphic 288 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_BOTTOM,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); | 282 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 283 284 //reopen the document 285 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 286 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 287 //verify paragraph background graphic 288 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_BOTTOM,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); |
289 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); | 289 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); |
290 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 291 } 292 /* 293 * test paragraph background graphic 294 * 1.new a text document 295 * 2.insert some text 296 * 3.set paragraph background with graphic and graphic location is middle middle 297 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 333 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 334 app.closeDocument(xTextDocument); 335 336 //reopen the document 337 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 338 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 339 //verify paragraph background graphic 340 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_MIDDLE,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); | 290 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 291 } 292 /* 293 * test paragraph background graphic 294 * 1.new a text document 295 * 2.insert some text 296 * 3.set paragraph background with graphic and graphic location is middle middle 297 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 333 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 334 app.closeDocument(xTextDocument); 335 336 //reopen the document 337 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 338 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 339 //verify paragraph background graphic 340 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_MIDDLE,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); |
341 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); | 341 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); |
342 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 343 344 //reopen the document 345 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 346 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 347 //verify paragraph background graphic 348 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_MIDDLE,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); | 342 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 343 344 //reopen the document 345 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 346 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 347 //verify paragraph background graphic 348 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_MIDDLE,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); |
349 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); | 349 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); |
350 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 351 } 352 /* 353 * test paragraph background graphic 354 * 1.new a text document 355 * 2.insert some text 356 * 3.set paragraph background with graphic and graphic location is middle top 357 * 4.save and close the document --- 36 unchanged lines hidden (view full) --- 394 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 395 app.closeDocument(xTextDocument); 396 397 //reopen the document 398 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 399 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 400 //verify paragraph background graphic 401 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_TOP,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); | 350 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 351 } 352 /* 353 * test paragraph background graphic 354 * 1.new a text document 355 * 2.insert some text 356 * 3.set paragraph background with graphic and graphic location is middle top 357 * 4.save and close the document --- 36 unchanged lines hidden (view full) --- 394 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 395 app.closeDocument(xTextDocument); 396 397 //reopen the document 398 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 399 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 400 //verify paragraph background graphic 401 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_TOP,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); |
402 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); | 402 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); |
403 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 404 405 //reopen the document 406 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 407 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 408 //verify paragraph background graphic 409 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_TOP,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); | 403 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 404 405 //reopen the document 406 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 407 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 408 //verify paragraph background graphic 409 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.MIDDLE_TOP,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); |
410 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); | 410 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); |
411 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 412 } 413 /* 414 * test paragraph background graphic 415 * 1.new a text document 416 * 2.insert some text 417 * 3.set paragraph background with graphic and graphic location is right bottom 418 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 454 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 455 app.closeDocument(xTextDocument); 456 457 //reopen the document 458 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 459 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 460 //verify paragraph background graphic 461 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_BOTTOM,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); | 411 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 412 } 413 /* 414 * test paragraph background graphic 415 * 1.new a text document 416 * 2.insert some text 417 * 3.set paragraph background with graphic and graphic location is right bottom 418 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 454 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 455 app.closeDocument(xTextDocument); 456 457 //reopen the document 458 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 459 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 460 //verify paragraph background graphic 461 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_BOTTOM,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); |
462 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); | 462 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); |
463 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 464 465 //reopen the document 466 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 467 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 468 //verify paragraph background graphic 469 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_BOTTOM,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); | 463 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 464 465 //reopen the document 466 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 467 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 468 //verify paragraph background graphic 469 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_BOTTOM,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); |
470 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); | 470 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); |
471 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 472 } 473 /* 474 * test paragraph background graphic 475 * 1.new a text document 476 * 2.insert some text 477 * 3.set paragraph background with graphic and graphic location is right middle 478 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 514 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 515 app.closeDocument(xTextDocument); 516 517 //reopen the document 518 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 519 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 520 //verify paragraph background graphic 521 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_MIDDLE,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); | 471 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 472 } 473 /* 474 * test paragraph background graphic 475 * 1.new a text document 476 * 2.insert some text 477 * 3.set paragraph background with graphic and graphic location is right middle 478 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 514 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 515 app.closeDocument(xTextDocument); 516 517 //reopen the document 518 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 519 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 520 //verify paragraph background graphic 521 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_MIDDLE,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); |
522 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); | 522 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); |
523 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 524 525 //reopen the document 526 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 527 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 528 //verify paragraph background graphic 529 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_MIDDLE,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); | 523 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 524 525 //reopen the document 526 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 527 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 528 //verify paragraph background graphic 529 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_MIDDLE,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); |
530 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); | 530 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); |
531 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 532 } 533 /* 534 * test paragraph background graphic 535 * 1.new a text document 536 * 2.insert some text 537 * 3.set paragraph background with graphic and graphic location is right top 538 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 574 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 575 app.closeDocument(xTextDocument); 576 577 //reopen the document 578 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 579 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 580 //verify paragraph background graphic 581 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_TOP,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); | 531 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 532 } 533 /* 534 * test paragraph background graphic 535 * 1.new a text document 536 * 2.insert some text 537 * 3.set paragraph background with graphic and graphic location is right top 538 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 574 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 575 app.closeDocument(xTextDocument); 576 577 //reopen the document 578 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 579 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 580 //verify paragraph background graphic 581 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_TOP,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); |
582 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); | 582 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); |
583 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 584 585 //reopen the document 586 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 587 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 588 //verify paragraph background graphic 589 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_TOP,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); | 583 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 584 585 //reopen the document 586 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 587 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 588 //verify paragraph background graphic 589 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.RIGHT_TOP,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); |
590 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); | 590 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); |
591 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 592 } 593 /* 594 * test paragraph background graphic 595 * 1.new a text document 596 * 2.insert some text 597 * 3.set paragraph background with graphic and graphic location is area 598 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 634 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 635 app.closeDocument(xTextDocument); 636 637 //reopen the document 638 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 639 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 640 //verify paragraph background graphic 641 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.AREA,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); | 591 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 592 } 593 /* 594 * test paragraph background graphic 595 * 1.new a text document 596 * 2.insert some text 597 * 3.set paragraph background with graphic and graphic location is area 598 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 634 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 635 app.closeDocument(xTextDocument); 636 637 //reopen the document 638 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 639 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 640 //verify paragraph background graphic 641 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.AREA,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); |
642 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); | 642 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); |
643 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 644 645 //reopen the document 646 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 647 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 648 //verify paragraph background graphic 649 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.AREA,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); | 643 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 644 645 //reopen the document 646 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 647 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 648 //verify paragraph background graphic 649 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.AREA,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); |
650 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); | 650 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); |
651 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 652 } 653 /* 654 * test paragraph background graphic 655 * 1.new a text document 656 * 2.insert some text 657 * 3.set paragraph background with graphic and graphic location is titled 658 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 694 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 695 app.closeDocument(xTextDocument); 696 697 //reopen the document 698 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 699 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 700 //verify paragraph background graphic 701 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.TILED,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); | 651 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 652 } 653 /* 654 * test paragraph background graphic 655 * 1.new a text document 656 * 2.insert some text 657 * 3.set paragraph background with graphic and graphic location is titled 658 * 4.save and close the document --- 35 unchanged lines hidden (view full) --- 694 xStorable_doc.storeToURL(FileUtil.getUrl(Testspace.getPath("output/test.doc")), aStoreProperties_doc); 695 app.closeDocument(xTextDocument); 696 697 //reopen the document 698 XTextDocument assertDocument_odt=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.odt"))); 699 XPropertySet xCursorProps_Assert_odt = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_odt.getText().createTextCursor()); 700 //verify paragraph background graphic 701 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.TILED,xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicLocation")); |
702 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); | 702 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicFilter")); |
703 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/sw/paragraphtable/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 704 705 //reopen the document 706 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 707 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 708 //verify paragraph background graphic 709 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.TILED,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); | 703 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/sw/paragraphtable/Desert.jpg")),xCursorProps_Assert_odt.getPropertyValue("ParaBackGraphicURL")); 704 705 //reopen the document 706 XTextDocument assertDocument_doc=(XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, app.loadDocument(Testspace.getPath("output/test.doc"))); 707 XPropertySet xCursorProps_Assert_doc = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, assertDocument_doc.getText().createTextCursor()); 708 //verify paragraph background graphic 709 assertEquals("verify paragraph backgraphic location",com.sun.star.style.GraphicLocation.TILED,xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicLocation")); |
710 assertEquals("verify paragraph backgraphic fileter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); | 710 assertEquals("verify paragraph backgraphic filter","draw_jpg_Export",xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicFilter")); |
711 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 712 } 713 /* 714 * test paragraph background graphic 715 * 1.new a text document 716 * 2.insert some text 717 * 3.set paragraph background with graphic and graphic location is none 718 * 4.save and close the document --- 50 unchanged lines hidden --- | 711 assertEquals("verify paragraph backgraphic URL",FileUtil.getUrl(Testspace.prepareData("uno/Desert.jpg")),xCursorProps_Assert_doc.getPropertyValue("ParaBackGraphicURL")); 712 } 713 /* 714 * test paragraph background graphic 715 * 1.new a text document 716 * 2.insert some text 717 * 3.set paragraph background with graphic and graphic location is none 718 * 4.save and close the document --- 50 unchanged lines hidden --- |