tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / qadevOOo / tests / java / ifc / drawing / _AreaShapeDescriptor.java
blob1bee620985f3ae8c163a45406c7736d77a410bc1
1 /*
2 * This file is part of the LibreOffice project.
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/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 package ifc.drawing;
21 import lib.MultiPropertyTest;
23 public class _AreaShapeDescriptor extends MultiPropertyTest {
25 @Override
26 protected boolean compare(Object ob1, Object ob2) {
28 return super.compare(ob1, ob2);
32 protected PropertyTester URLTester = new PropertyTester() {
33 @Override
34 protected Object getNewValue(String propName, Object oldValue)
35 throws java.lang.IllegalArgumentException {
36 if (oldValue.equals(util.utils.getFullTestURL("space-metal.jpg")))
37 return util.utils.getFullTestURL("crazy-blue.jpg"); else
38 return util.utils.getFullTestURL("space-metal.jpg");
40 } ;
42 protected PropertyTester StringTester = new PropertyTester() {
43 @Override
44 protected Object getNewValue(String propName, Object oldValue)
45 throws java.lang.IllegalArgumentException {
46 if (oldValue.equals(str1))
47 return str2; else
48 return str1;
50 } ;
52 public void _FillBitmapURL() {
53 log.println("Testing with custom Property tester") ;
54 testProperty("FillBitmapURL", URLTester) ;
57 public String str1 = "";
58 public String str2 = "";
60 public void _FillGradientName() {
61 log.println("Testing with custom Property tester") ;
62 str1 = "Gradient 1";
63 str2 = "Gradient 3";
64 testProperty("FillGradientName", StringTester) ;
67 public void _FillBitmapName() {
68 log.println("Testing with custom Property tester") ;
69 str1 = "Sky";
70 str2 = "Blank";
71 testProperty("FillBitmapName", StringTester) ;
74 public void _FillTransparenceGradientName() {
75 log.println("Testing with custom Property tester") ;
76 str1 = "Standard 1";
77 str2 = "Standard 2";
78 testProperty("FillTransparenceGradientName", StringTester) ;
81 public void _FillHatchName() {
82 log.println("Testing with custom Property tester") ;
83 str1 = "Black 0 degrees";
84 str2 = "Black 45 degrees";
85 testProperty("FillHatchName", StringTester) ;
88 public void _FillBitmapMode() {
89 log.println("Testing with custom Property tester") ;
90 try {
91 Object getting = oObj.getPropertyValue("FillBitmapMode");
92 if (! (getting instanceof com.sun.star.drawing.BitmapMode)) {
93 log.println("getting the property 'FillBitmapMode'");
94 log.println("return "+ oObj.getClass().getName());
95 log.println("Expected was 'com.sun.star.drawing.BitmapMode'");
96 tRes.tested("FillBitmapMode",false);
97 } else testProperty("FillBitmapMode");
99 catch (Exception ex) {
100 log.println("Exception while checking 'FillBitmapMode'");
101 ex.printStackTrace(log);
102 tRes.tested("FillBitmapMode",false);