1b164ae3eSLei De Bin /************************************************************** 2b164ae3eSLei De Bin * 3b164ae3eSLei De Bin * Licensed to the Apache Software Foundation (ASF) under one 4b164ae3eSLei De Bin * or more contributor license agreements. See the NOTICE file 5b164ae3eSLei De Bin * distributed with this work for additional information 6b164ae3eSLei De Bin * regarding copyright ownership. The ASF licenses this file 7b164ae3eSLei De Bin * to you under the Apache License, Version 2.0 (the 8b164ae3eSLei De Bin * "License"); you may not use this file except in compliance 9b164ae3eSLei De Bin * with the License. You may obtain a copy of the License at 10b164ae3eSLei De Bin * 11b164ae3eSLei De Bin * http://www.apache.org/licenses/LICENSE-2.0 12b164ae3eSLei De Bin * 13b164ae3eSLei De Bin * Unless required by applicable law or agreed to in writing, 14b164ae3eSLei De Bin * software distributed under the License is distributed on an 15b164ae3eSLei De Bin * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16b164ae3eSLei De Bin * KIND, either express or implied. See the License for the 17b164ae3eSLei De Bin * specific language governing permissions and limitations 18b164ae3eSLei De Bin * under the License. 19b164ae3eSLei De Bin * 20b164ae3eSLei De Bin *************************************************************/ 21b164ae3eSLei De Bin 2295269d92SLiu Zhe package testlib.gui; 23faa4b864SLei De Bin 2422a14f28SLiu Zhe import static testlib.gui.UIMap.*; 2522a14f28SLiu Zhe 26faa4b864SLei De Bin import org.openoffice.test.vcl.widgets.VclWindow; 27faa4b864SLei De Bin 28*b4d2d410SLiu Zhe public class SDTool { 2922a14f28SLiu Zhe getActiveView()30*b4d2d410SLiu Zhe public static VclWindow getActiveView() { 31*b4d2d410SLiu Zhe VclWindow[] views = new VclWindow[] { impress, impressOutline, impressSlideSorter, impressHandout }; 3222a14f28SLiu Zhe for (VclWindow w : views) { 33faa4b864SLei De Bin if (w.exists()) { 34faa4b864SLei De Bin return w; 35faa4b864SLei De Bin } 36faa4b864SLei De Bin } 3722a14f28SLiu Zhe 38faa4b864SLei De Bin return null; 39faa4b864SLei De Bin } 40faa4b864SLei De Bin } 41