/* * 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._smgr; import java.io.PrintWriter; import lib.StatusException; import lib.TestCase; import lib.TestEnvironment; import lib.TestParameters; import com.sun.star.beans.XPropertySet; import com.sun.star.container.XEnumeration; import com.sun.star.container.XSet; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Type; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XComponentContext; import com.sun.star.uno.XInterface; /** * Test for object which is represented by service * com.sun.star.comp.stoc.OServiceManager.

* * Object implements the following interfaces : *

* * This object test is NOT designed to be run in several * threads concurently. * * @see com.sun.star.lang.XMultiServiceFactory * @see com.sun.star.container.XContentEnumerationAccess * @see com.sun.star.container.XSet * @see com.sun.star.lang.XMultiComponentFactory * @see com.sun.star.lang.XServiceInfo * @see com.sun.star.container.XElementAccess * @see com.sun.star.container.XEnumerationAccess * @see com.sun.star.lang.XComponent * @see ifc.lang._XMultiServiceFactory * @see ifc.container._XContentEnumerationAccess * @see ifc.container._XSet * @see ifc.lang._XMultiComponentFactory * @see ifc.lang._XServiceInfo * @see ifc.container._XElementAccess * @see ifc.container._XEnumerationAccess * @see ifc.lang._XComponent */ public class OServiceManager extends TestCase { /** * Creating a Testenvironment for the interfaces to be tested. * Creates an instance of the service * com.sun.star.comp.stoc.OServiceManager. * Object relations created : *

*/ protected TestEnvironment createTestEnvironment (TestParameters Param, PrintWriter log) { XInterface oObj = null; Object oInterface = null; try { XMultiServiceFactory xMSF = Param.getMSF(); oInterface = xMSF.createInstance ( "com.sun.star.comp.stoc.OServiceManager" ); } catch( com.sun.star.uno.Exception e ) { log.println("ServiceManager service not available" ); } // adding a service to the manager Object newElement = null ; XMultiServiceFactory srvMan = null; XComponentContext xContext = null; try { srvMan = com.sun.star.comp.helper.Bootstrap.createSimpleServiceManager(); } catch ( java.lang.Exception ex) { log.println("Error creating SimpleServiceManager :"); ex.printStackTrace(log); } try { XSet set = UnoRuntime.queryInterface (XSet.class, oInterface) ; XSet set1 = UnoRuntime.queryInterface (XSet.class, srvMan) ; XEnumeration oEnum = set1.createEnumeration(); Object srv = oEnum.nextElement(); set.insert(srv) ; newElement = oEnum.nextElement(); XPropertySet xProp = UnoRuntime.queryInterface( XPropertySet.class, oInterface); if (xProp != null) { xContext = (XComponentContext) AnyConverter.toObject( new Type(XComponentContext.class), xProp.getPropertyValue("DefaultContext")); } } catch (com.sun.star.uno.Exception e) { log.println("Can't insert a service to the ServiceManager") ; throw new StatusException("Can't create object environment", e) ; } oObj = (XInterface) oInterface; log.println( " creating a new environment for object" ); TestEnvironment tEnv = new TestEnvironment( oObj ); // adding relation for XSet interface tEnv.addObjRelation("NewElement", newElement) ; // adding relation for XPropertySet tEnv.addObjRelation("PTT",new String[]{"DefaultContext","none","none"}); //adding relation for XMultiComponentFactory if (xContext != null) { tEnv.addObjRelation("DC", xContext); } return tEnv; } // finish method getTestEnvironment } // finish class OServiceManager tion> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/external/firebird
AgeCommit message (Expand)Author
2016-03-09external: add some READMEsMichael Stahl
2016-02-28make firebird build on gcc 6 againCaolán McNamara
2016-02-04firebird: avoid using ignored -m option to makeLionel Elie Mamane
2016-02-04apparently breaks Win-x86@42 tinderbox... disable on Windows.Lionel Elie Mamane
2016-02-03better integrate parallelisation of firebird buildsLionel Elie Mamane
2016-01-30fix internal firebird with --no-parallelismLionel Elie Mamane
2016-01-30new upstream version Firebird 2.5.5Lionel Elie Mamane
2016-01-29Revert "new upstream version Firebird 2.5.5"Lionel Elie Mamane
2016-01-29enable parallelisation of firebird buildsLionel Elie Mamane
2016-01-29new upstream version Firebird 2.5.5Lionel Elie Mamane
2016-01-20external/firebird: Adapt to GCC 6Stephan Bergmann
2015-10-02Allow external/firebird to be built with a custom SHELL under Mac OS X 10.11Stephan Bergmann
2015-10-02Make external/firebird work with C++14 sized deallocationStephan Bergmann
2015-07-30fix firebird build on Win64Christian Lohmaier
2015-07-27firebird: --enable-debug breaks the build with MSVCMichael Stahl
2015-07-24Revert "Revert "Update firebird to version 2.5.4""Caolán McNamara
2015-07-12Revert "Update firebird to version 2.5.4"Caolán McNamara
2015-07-11Update firebird to version 2.5.4Popa Adrian Marius
2015-06-10Fix Firebird build against OS X SDK 10.11Tor Lillqvist
2015-06-05use $(DISABLE_DYNLOADING)David Tardon
2015-01-24Resolves fdo#72543: ib_util not found when creating or accessing new firebirdJulien Nabet
2014-11-13More passing of MAKE into external configureStephan Bergmann
2014-09-26Fix firebird without cygwin gccPeter Foley
2014-08-29Simplify some $ENABLE_DEBUG expressionsStephan Bergmann
2014-07-07Adapt for VS 2013Tor Lillqvist
2014-07-03Revert "firebird: enable-debug cause trouble due to a lifecycle management is...Norbert Thiebaud
2014-07-03firebird: backport upstream patch to avoid life cycle issuesNorbert Thiebaud
2014-06-28firebird: enable-debug cause trouble due to a lifecycle management issueNorbert Thiebaud
2014-02-27normalize values of CROSS_COMPILINGMichael Stahl
2014-02-12normalize values of SYSTEM_NPAPI_HEADERS, SYSTEM_ICUMichael Stahl
2014-02-12normalize values of SYSTEM_BOOSTMichael Stahl
2014-02-12normalize values of SYSTEM_LIBATOMIC_OPS, SYSTEM_FIREBIRDMichael Stahl
2014-02-10Seems that -fno-weak is unknown in upcoming Clang on OS XTor Lillqvist
2014-01-27fdo#72804 Add firebird.msg to install.Andrzej Hunt
2014-01-02enable firebird --enable-debugCaolán McNamara
2013-11-07Make libatomic_ops buildable and enable on non-X86.Andrzej J.R. Hunt
2013-11-06Revert "Make libatomic_ops buildable and enable on non-X86."Andrzej J.R. Hunt
2013-11-06Make libatomic_ops buildable and enable on non-X86.Andrzej J.R. Hunt
2013-11-02remove SOLARENV variableMichael Stahl
2013-10-30C++11: new/delete replacement functions cannot be inlineStephan Bergmann
2013-10-28gbuild: set Package default target to INSTDIRMichael Stahl
2013-10-27gbuild: remove gb_ExternalPackage_add_library_for_installMichael Stahl
2013-10-26firebird: find ICU libraries when running build toolsMichael Stahl
2013-10-23icu: use libraries from WORKDIRMichael Stahl
2013-10-22firebird: use libraries from WORKDIRMichael Stahl
2013-10-22firebird: fix typo in b0f00d38254eca70e196e1580faac4a215bc2b12Michael Stahl
2013-10-22Copy fbembed library to instdirStephan Bergmann
2013-10-18Fix building from inside modules moved to externalKhaled Hosny
2013-10-18fdo#70393: move firebird to a subdir of externalKhaled Hosny