calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / testtools / source / servicetests / TestService.java
bloba825f0df1cd962107f53399d621fb42c8eb95a33
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 servicetests;
21 import com.sun.star.lang.NoSupportException;
22 import com.sun.star.lang.XServiceInfo;
23 import com.sun.star.lang.XSingleComponentFactory;
24 /*import com.sun.star.uno.OptionalPropertyException;*/
25 /*import com.sun.star.uno.VoidPropertyException;*/
26 import com.sun.star.uno.XComponentContext;
28 public final class TestService implements XServiceInfo, XSingleComponentFactory
30 public String getImplementationName() {
31 return getClass().getName();
34 public boolean supportsService(String serviceName) {
35 return serviceName.equals(SERVICE_NAME);
38 public String[] getSupportedServiceNames() {
39 return new String[] { SERVICE_NAME };
42 public Object createInstanceWithContext(XComponentContext context)
43 throws com.sun.star.uno.Exception
45 return new Service();
48 public Object createInstanceWithArgumentsAndContext(
49 Object[] arguments, XComponentContext context)
50 throws com.sun.star.uno.Exception
52 throw new NoSupportException(
53 "createInstanceWithArgumentsAndContext", this);
56 private static final class Service implements TestService2, XTestService3 {
57 public int fn1() {
58 return 1;
61 public int getProp1() {
62 return prop1;
65 public void setProp1(int value) {
66 prop1 = value;
69 public int getProp2() {
70 return 2;
73 public int getProp3Long(){
74 return 3;
76 public int getProp4Long(){
77 return 4;
80 public int getProp5Long()
82 return 5;
85 public int getProp6() {
86 return prop6.intValue();
89 public void setProp6(int value) {
90 prop6 = Integer.valueOf(value);
93 public int getProp7()
95 return prop7.intValue();
98 public void setProp7(int value) {
99 prop7 = Integer.valueOf(value);
102 public int getProp8Long() {
103 return prop8;
106 public void setProp8Long(int value)
108 prop8 = value;
111 public int fn2() {
112 return 2;
115 public int fn3() {
116 return 3;
119 private int prop1 = 1;
120 private Integer prop6 = Integer.valueOf(6);
121 private Integer prop7 = Integer.valueOf(7);
122 private int prop8 = 8;
125 private static final String SERVICE_NAME
126 = "testtools.servicetests.TestService2";