*/
public class IPageStylePropertiesTest extends TestCase {
public void testGetIsLandscape() {
try {
LocalOfficeApplication localOfficeApplication = new LocalOfficeApplication(
null);
LocalOfficeApplicationConfiguration configuration = new LocalOfficeApplicationConfiguration();
configuration
.setApplicationHomePath("c:\\Programme\\OpenOffice.org1.1.3");
localOfficeApplication.setConfiguration(configuration);
localOfficeApplication.activate();
ITextDocument textDocument = (ITextDocument) localOfficeApplication
.getDocumentService().constructNewDocument(
IDocument.WRITER, new DocumentDescriptor());
IPageService pageService = textDocument.getPageService();
IPage page = pageService.getPage(0);
IPageStyle pageStyle = page.getPageStyle();
IPageStyleProperties pageStyleProperties = pageStyle
.getProperties();
boolean value = pageStyleProperties.getIsLandscape();
Assert.assertEquals(false, value);
ITextTable textTable = textDocument.getTextTableService()
.constructTextTable(5, 15);
textDocument.getTextService().getTextContentService()
.insertTextContent(textTable);
page = pageService.getPage(0);
pageStyle = page.getPageStyle();
pageStyleProperties = pageStyle.getProperties();
value = pageStyleProperties.getIsLandscape();
Assert.assertEquals(false, value);
localOfficeApplication.deactivate();
} catch (Exception exception) {
exception.printStackTrace();
Assert.fail();
}
}