summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java')
-rw-r--r--qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java55
1 files changed, 15 insertions, 40 deletions
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java
index d48ea8c730b8..2e6e52d9efdf 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java
@@ -71,7 +71,7 @@ public class SwAccessibleFooterView extends TestCase {
*/
@Override
protected TestEnvironment createTestEnvironment(
- TestParameters Param, PrintWriter log) {
+ TestParameters Param, PrintWriter log) throws Exception {
XInterface oObj = null;
XNameAccess PageStyles = null;
@@ -81,49 +81,24 @@ public class SwAccessibleFooterView extends TestCase {
XNameAccess StyleFamNames = StyleFam.getStyleFamilies();
// obtains style 'Standard' from style family 'PageStyles'
- try {
- PageStyles = (XNameAccess) AnyConverter.toObject(
- new Type(XNameAccess.class),StyleFamNames.getByName("PageStyles"));
- StdStyle = (XStyle) AnyConverter.toObject(
- new Type(XStyle.class),PageStyles.getByName("Standard"));
- } catch ( com.sun.star.lang.WrappedTargetException e ) {
- e.printStackTrace(log);
- throw new StatusException("Error getting style by name!", e);
- } catch ( com.sun.star.container.NoSuchElementException e ) {
- e.printStackTrace(log);
- throw new StatusException("Error, no such style name! ", e);
- } catch ( com.sun.star.lang.IllegalArgumentException e ) {
- e.printStackTrace(log);
- throw new StatusException("Error getting style by name!", e);
- }
+ PageStyles = (XNameAccess) AnyConverter.toObject(
+ new Type(XNameAccess.class),StyleFamNames.getByName("PageStyles"));
+ StdStyle = (XStyle) AnyConverter.toObject(
+ new Type(XStyle.class),PageStyles.getByName("Standard"));
final XPropertySet PropSet = UnoRuntime.queryInterface( XPropertySet.class, StdStyle);
// changing/getting some properties
- try {
- log.println( "Switching on footer" );
- PropSet.setPropertyValue("FooterIsOn", Boolean.TRUE);
-
- //change zoom value to 10%
- //footer should be in the vissible area of the document
- XController xController = xTextDoc.getCurrentController();
- XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class,
- xController);
- XPropertySet xPropSet = xViewSetSup.getViewSettings();
- xPropSet.setPropertyValue("ZoomValue", Short.valueOf("20"));
- } catch ( com.sun.star.lang.WrappedTargetException e ) {
- e.printStackTrace(log);
- throw new StatusException("Couldn't set propertyValue...", e);
- } catch ( com.sun.star.lang.IllegalArgumentException e ) {
- e.printStackTrace(log);
- throw new StatusException("Couldn't set propertyValue...", e);
- } catch ( com.sun.star.beans.PropertyVetoException e ) {
- e.printStackTrace(log);
- throw new StatusException("Couldn't set propertyValue...", e);
- } catch ( com.sun.star.beans.UnknownPropertyException e ) {
- e.printStackTrace(log);
- throw new StatusException("Couldn't set propertyValue...", e);
- }
+ log.println( "Switching on footer" );
+ PropSet.setPropertyValue("FooterIsOn", Boolean.TRUE);
+
+ //change zoom value to 10%
+ //footer should be in the vissible area of the document
+ XController xController = xTextDoc.getCurrentController();
+ XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class,
+ xController);
+ XPropertySet xPropSet = xViewSetSup.getViewSettings();
+ xPropSet.setPropertyValue("ZoomValue", Short.valueOf("20"));
XModel aModel = UnoRuntime.queryInterface(XModel.class, xTextDoc);