/* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ package mod._fwk; import java.io.PrintWriter; import lib.TestCase; import lib.TestEnvironment; import lib.TestParameters; import util.SOfficeFactory; import com.sun.star.frame.XDesktop; import com.sun.star.text.XTextDocument; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; /** * Test for object which is represented by service * com.sun.star.frame.Desktop.

* Object implements the following interfaces : *

* @see com.sun.star.beans.XPropertySet * @see com.sun.star.frame.XComponentLoader * @see com.sun.star.frame.XDesktop * @see com.sun.star.frame.XDispatchProvider * @see com.sun.star.frame.XFrame * @see com.sun.star.frame.XFramesSupplier * @see com.sun.star.frame.XTasksSupplier * @see com.sun.star.lang.XComponent * @see com.sun.star.task.XStatusIndicatorFactory * @see ifc.beans._XPropertySet * @see ifc.frame._XComponentLoader * @see ifc.frame._XDesktop * @see ifc.frame._XDispatchProvider * @see ifc.frame._XFrame * @see ifc.frame._XFramesSupplier * @see ifc.frame._XTasksSupplier * @see ifc.lang._XComponent * @see ifc.task._XStatusIndicatorFactory */ public class Desktop extends TestCase { XTextDocument xTextDoc; /** * Disposes the document, if exists, created in * createTestEnvironment method. */ @Override protected void cleanup( TestParameters Param, PrintWriter log) { log.println("disposing xTextDoc"); if (xTextDoc != null) { try { xTextDoc.dispose(); } catch (com.sun.star.lang.DisposedException de) {} } } /** * Creating a TestEnvironment for the interfaces to be tested. * Creates service com.sun.star.frame.Desktop. */ @Override protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) throws Exception { // get a soffice factory object SOfficeFactory SOF = SOfficeFactory.getFactory( Param.getMSF()); log.println( "creating a text document" ); xTextDoc = SOF.createTextDoc(null); XInterface oObj = (XInterface)Param.getMSF().createInstance( "com.sun.star.comp.framework.Desktop"); TestEnvironment tEnv = new TestEnvironment( oObj ); tEnv.addObjRelation("XDispatchProvider.URL", ".uno:Open"); tEnv.addObjRelation("Desktop",UnoRuntime.queryInterface(XDesktop.class,oObj)); return tEnv; } // finish method getTestEnvironment } ora/cp-5.0 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff

path: root/vbahelper/source/vbahelper
AgeCommit message (Expand)Author
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-11-09new loplugin: oncevarNoel Grandin
2015-11-06coverity#1338249 Uncaught exceptionCaolán McNamara
2015-11-04yyyyyNoel Grandin
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
2015-10-06vba: convert to variadic InheritedHelperInterfaceImpl&WeakImpl etcDouglas Mencken
2015-09-16boost->stdCaolán McNamara
2015-09-10vbahelper: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
2015-08-27Clean up emptyStringStephan Bergmann
2015-08-03inline some use-once typedefsNoel Grandin
2015-07-28inline "old" SbERR constantsNoel Grandin
2015-07-21loplugin:unusedmethods vbahelperNoel Grandin
2015-07-04Fix typosAndrea Gelmini
2015-07-02coverity#1309054 Uncaught exceptionCaolán McNamara
2015-06-27coverity#1308448 Uncaught exceptionCaolán McNamara
2015-06-16Fix typosAndrea Gelmini
2015-05-25cppcheck: noExplicitConstructorCaolán McNamara
2015-05-22convert POINTER constants to scoped enumNoel Grandin
2015-05-05Use typed Timer::SetTimeoutHdl LinkStephan Bergmann
2015-05-05loplugin:staticmethodsNoel Grandin
2015-04-29convert STR_EVENT constants to scoped enumNoel Grandin
2015-04-23loplugin:staticmethodsNoel Grandin