/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ package com.sun.star.comp.helper; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.XComponentContext; import com.sun.star.lang.XComponent; import com.sun.star.lang.XMultiServiceFactory; public class Bootstrap_Test { static public boolean test( String ini_file, java.util.Hashtable bootstrap_parameters ) throws java.lang.Exception { boolean passed = false; System.err.println(); System.out.println("*******************************************************************"); System.err.println("Bootstrap - doing tests..."); System.err.println(); try { XComponentContext xContext = com.sun.star.comp.helper.Bootstrap.defaultBootstrap_InitialComponentContext( ini_file, bootstrap_parameters ); if (AnyConverter.isVoid( xContext.getValueByName( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) )) { throw new Exception( "no /singletons/com.sun.star.reflection.theTypeDescriptionManager!" ); } XMultiServiceFactory msf = UnoRuntime.queryInterface( XMultiServiceFactory.class, xContext.getServiceManager() ); String services[] = msf.getAvailableServiceNames(); System.out.println("Available services are:"); System.err.println(); if (services.length == 0) System.out.println("No services avialable!"); else for ( int i=0; idistro/collabora/lov-4.4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author