diff options
Diffstat (limited to 'stoc/test/tdmanager')
-rw-r--r-- | stoc/test/tdmanager/makefile.mk | 84 | ||||
-rw-r--r-- | stoc/test/tdmanager/readme.txt | 4 | ||||
-rw-r--r-- | stoc/test/tdmanager/testtdmanager.cxx | 377 | ||||
-rw-r--r-- | stoc/test/tdmanager/testtdmanager.gcc3.map | 42 | ||||
-rw-r--r-- | stoc/test/tdmanager/testtdmanager.map | 40 | ||||
-rw-r--r-- | stoc/test/tdmanager/types.idl | 48 | ||||
-rw-r--r-- | stoc/test/tdmanager/types2_incomp.idl | 41 | ||||
-rw-r--r-- | stoc/test/tdmanager/types3_incomp.idl | 36 | ||||
-rw-r--r-- | stoc/test/tdmanager/types4_incomp.idl | 45 | ||||
-rw-r--r-- | stoc/test/tdmanager/types5.idl | 48 | ||||
-rw-r--r-- | stoc/test/tdmanager/types5_incomp.idl | 46 | ||||
-rw-r--r-- | stoc/test/tdmanager/types6_incomp.idl | 46 |
12 files changed, 857 insertions, 0 deletions
diff --git a/stoc/test/tdmanager/makefile.mk b/stoc/test/tdmanager/makefile.mk new file mode 100644 index 000000000000..594cf1d94e51 --- /dev/null +++ b/stoc/test/tdmanager/makefile.mk @@ -0,0 +1,84 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.6 $ +# +# 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 +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ := ..$/.. +PRJNAME := stoc + +TARGET := test_tdmanager + +ENABLE_EXCEPTIONS := TRUE + +.INCLUDE: settings.mk + +DLLPRE = # no leading "lib" on .so files + +SLOFILES = $(SLO)$/testtdmanager.obj + +SHL1TARGET = testtdmanager.uno +SHL1OBJS = $(SLOFILES) +SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) +SHL1IMPLIB = itesttdmanager +DEF1NAME = $(SHL1TARGET) + +.IF "$(COMNAME)" == "gcc3" +SHL1VERSIONMAP = testtdmanager.gcc3.map +.ELSE +SHL1VERSIONMAP = testtdmanager.map +.ENDIF + +.INCLUDE: target.mk + +ALLTAR: test + +$(MISC)$/$(TARGET)$/%.rdb : %.idl + - rm $@ + - $(MKDIR) $(MISC)$/$(TARGET) + idlc -O$(MISC)$/$(TARGET) -I$(SOLARIDLDIR) -C -cid -we $< + regmerge $@ /UCR $(subst,.rdb,.urd $@) + +IDL_FILES = \ + types.idl \ + types2_incomp.idl \ + types3_incomp.idl \ + types4_incomp.idl \ + types5_incomp.idl \ + types5.idl \ + types6_incomp.idl + +RDB_FILES = $(foreach,i,$(subst,.idl,.rdb $(IDL_FILES)) $(MISC)$/$(TARGET)$/$i) + +$(SLOFILES): $(RDB_FILES) + +test .PHONY: $(SHL1TARGETN) $(RDB_FILES) + uno -c test.tdmanager.impl -l $(subst,$/,/ $(SHL1TARGETN)) \ + -ro $(subst,$/,/ $(SOLARBINDIR)$/udkapi_doc.rdb) \ + -- $(subst,$/,/ $(SOLARBINDIR)$/types_doc.rdb) \ + $(subst,$/,/ $(RDB_FILES)) diff --git a/stoc/test/tdmanager/readme.txt b/stoc/test/tdmanager/readme.txt new file mode 100644 index 000000000000..f4977204960f --- /dev/null +++ b/stoc/test/tdmanager/readme.txt @@ -0,0 +1,4 @@ +This test uses the delivered typemgr.uno dynamic library, not the local one. +(It might work to fix this, changing the test from a UNO component started from +the uno executable to a stand-alone application that bootstraps UNO in a special +way.) diff --git a/stoc/test/tdmanager/testtdmanager.cxx b/stoc/test/tdmanager/testtdmanager.cxx new file mode 100644 index 000000000000..66deeb294e07 --- /dev/null +++ b/stoc/test/tdmanager/testtdmanager.cxx @@ -0,0 +1,377 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: testtdmanager.cxx,v $ + * $Revision: 1.8 $ + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_stoc.hxx" + +#include "com/sun/star/container/XHierarchicalNameAccess.hpp" +#include "com/sun/star/container/XSet.hpp" +#include "com/sun/star/lang/XMain.hpp" +#include "com/sun/star/lang/XSingleComponentFactory.hpp" +#include "com/sun/star/lang/IllegalArgumentException.hpp" +#include "com/sun/star/reflection/XIndirectTypeDescription.hpp" +#include "com/sun/star/reflection/XInterfaceMethodTypeDescription.hpp" +#include "com/sun/star/reflection/XPublished.hpp" +#include "com/sun/star/reflection/XStructTypeDescription.hpp" +#include "com/sun/star/reflection/XTypeDescription.hpp" +#include "com/sun/star/registry/InvalidRegistryException.hpp" +#include "com/sun/star/registry/XRegistryKey.hpp" +#include "com/sun/star/registry/XSimpleRegistry.hpp" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/TypeClass.hpp" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "cppuhelper/factory.hxx" +#include "cppuhelper/implbase1.hxx" +#include "cppuhelper/weak.hxx" +#include "osl/file.h" +#include "osl/thread.h" +#include "rtl/textenc.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "uno/environment.h" +#include "uno/lbnames.h" + +#include /*MSVC trouble: <cstdlib>*/ <stdlib.h> +#include <iostream> +#include <ostream> + +namespace css = com::sun::star; + +namespace { + +class Service: public cppu::WeakImplHelper1< css::lang::XMain > { +public: + virtual sal_Int32 SAL_CALL + run(css::uno::Sequence< rtl::OUString > const & arguments) + throw (css::uno::RuntimeException); + + static rtl::OUString getImplementationName(); + + static css::uno::Sequence< rtl::OUString > getSupportedServiceNames(); + + static css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( + css::uno::Reference< css::uno::XComponentContext > const & context) + throw (css::uno::Exception); + +private: + explicit Service( + css::uno::Reference< css::uno::XComponentContext > const & context): + m_context(context) + {} + + css::uno::Reference< css::uno::XComponentContext > m_context; +}; + +} + +namespace { + +std::ostream & operator <<(std::ostream & out, rtl::OUString const & value) { + return out << rtl::OUStringToOString(value, RTL_TEXTENCODING_UTF8).getStr(); +} + +void assertTrue(bool argument) { + if (!argument) { + std::cerr + << "assertTrue(" << argument << ") failed" << std::endl; + /*MSVC trouble: std::*/abort(); + } +} + +void assertFalse(bool argument) { + if (argument) { + std::cerr + << "assertFalse(" << argument << ") failed" << std::endl; + /*MSVC trouble: std::*/abort(); + } +} + +template< typename T > void assertEqual(T const & value, T const & argument) { + if (argument != value) { + std::cerr + << "assertEqual(" << value << ", " << argument << ") failed" + << std::endl; + /*MSVC trouble: std::*/abort(); + } +} + +} + +sal_Int32 Service::run(css::uno::Sequence< rtl::OUString > const & arguments) + throw (css::uno::RuntimeException) +{ + css::uno::Reference< css::lang::XMultiComponentFactory > factory( + m_context->getServiceManager()); + assertTrue(factory.is()); + css::uno::Reference< css::container::XHierarchicalNameAccess > manager( + m_context->getValueByName( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "/singletons/" + "com.sun.star.reflection.theTypeDescriptionManager"))), + css::uno::UNO_QUERY_THROW); + + //////////////////////////////////////// + // test: add cmd line rdbs to manager + //////////////////////////////////////// + + OSL_ASSERT( arguments.getLength() > 0 ); + css::uno::Reference<css::container::XSet> xSet( + manager, css::uno::UNO_QUERY_THROW ); + for ( sal_Int32 argPos = 0; argPos < arguments.getLength(); ++argPos ) { + rtl::OUString url; + OSL_VERIFY( osl_File_E_None == osl_getFileURLFromSystemPath( + arguments[argPos].pData, &url.pData ) ); + bool supposedToBeCompatible = ! url.endsWithIgnoreAsciiCaseAsciiL( + RTL_CONSTASCII_STRINGPARAM("_incomp.rdb") ); + + css::uno::Reference<css::registry::XSimpleRegistry> xReg( + m_context->getServiceManager()->createInstanceWithContext( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.registry.SimpleRegistry") ), + m_context ), css::uno::UNO_QUERY_THROW ); + xReg->open( url, true /* read-only */, false /* ! create */ ); + css::uno::Any arg( css::uno::makeAny(xReg) ); + css::uno::Reference<css::container::XHierarchicalNameAccess> xTDprov( + m_context->getServiceManager()-> + createInstanceWithArgumentsAndContext( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.stoc." + "RegistryTypeDescriptionProvider") ), + css::uno::Sequence<css::uno::Any>( &arg, 1 ), m_context ), + css::uno::UNO_QUERY_THROW ); + try { + xSet->insert( css::uno::makeAny(xTDprov) ); + if (! supposedToBeCompatible) + std::cerr << "current rdb file: " << + rtl::OUStringToOString( + url, osl_getThreadTextEncoding()).getStr() << std::endl; + assertTrue(supposedToBeCompatible); + } catch (css::lang::IllegalArgumentException &) { + if (supposedToBeCompatible) + throw; + assertFalse(supposedToBeCompatible); + } + } + + /////// + + css::uno::Reference< css::reflection::XIndirectTypeDescription > sequence( + manager->getByHierarchicalName( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[][]boolean"))), + css::uno::UNO_QUERY_THROW); + assertEqual(css::uno::TypeClass_SEQUENCE, sequence->getTypeClass()); + assertEqual( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[][]boolean")), + sequence->getName()); + assertEqual( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[]boolean")), + sequence->getReferencedType()->getName()); + + css::uno::Reference< css::reflection::XStructTypeDescription > structure( + manager->getByHierarchicalName( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "test.tdmanager.Struct<boolean,test.tdmanager.Struct<" + "any,com.sun.star.uno.XInterface>>"))), + css::uno::UNO_QUERY_THROW); + assertEqual(css::uno::TypeClass_STRUCT, structure->getTypeClass()); + assertEqual( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "test.tdmanager.Struct<boolean,test.tdmanager.Struct<" + "any,com.sun.star.uno.XInterface>>")), + structure->getName()); + assertEqual< bool >(false, structure->getBaseType().is()); + assertEqual< sal_Int32 >(1, structure->getMemberTypes().getLength()); + assertEqual( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>")), + structure->getMemberTypes()[0]->getName()); + assertEqual< sal_Int32 >(1, structure->getMemberNames().getLength()); + assertEqual( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("s")), + structure->getMemberNames()[0]); + assertEqual< sal_Int32 >(0, structure->getTypeParameters().getLength()); + assertEqual< sal_Int32 >(2, structure->getTypeArguments().getLength()); + assertEqual( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("boolean")), + structure->getTypeArguments()[0]->getName()); + assertEqual( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>")), + structure->getTypeArguments()[1]->getName()); + + css::uno::Reference< css::reflection::XInterfaceMethodTypeDescription > + method( + manager->getByHierarchicalName( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.uno.XComponentContext::getValueByName"))), + css::uno::UNO_QUERY_THROW); + assertEqual(css::uno::TypeClass_INTERFACE_METHOD, method->getTypeClass()); + assertEqual( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.uno.XComponentContext::getValueByName")), + method->getName()); + assertEqual( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getValueByName")), + method->getMemberName()); + assertEqual< sal_Int32 >(3, method->getPosition()); + assertEqual( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("any")), + method->getReturnType()->getName()); + assertEqual< bool >(false, method->isOneway()); + assertEqual< sal_Int32 >(1, method->getParameters().getLength()); + assertEqual( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), + method->getParameters()[0]->getName()); + assertEqual( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("string")), + method->getParameters()[0]->getType()->getName()); + assertEqual< bool >(true, method->getParameters()[0]->isIn()); + assertEqual< bool >(false, method->getParameters()[0]->isOut()); + assertEqual< sal_Int32 >(0, method->getParameters()[0]->getPosition()); + assertEqual< sal_Int32 >(0, method->getExceptions().getLength()); + + assertFalse( + css::uno::Reference< css::reflection::XPublished >( + css::uno::Reference< css::reflection::XTypeDescription >( + manager->getByHierarchicalName( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[]boolean"))), + css::uno::UNO_QUERY_THROW), + css::uno::UNO_QUERY).is()); + assertFalse( + css::uno::Reference< css::reflection::XPublished >( + css::uno::Reference< css::reflection::XTypeDescription >( + manager->getByHierarchicalName( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.beans.XIntroTest::ObjectName"))), + css::uno::UNO_QUERY_THROW), + css::uno::UNO_QUERY).is()); + assertFalse( + css::uno::Reference< css::reflection::XPublished >( + css::uno::Reference< css::reflection::XTypeDescription >( + manager->getByHierarchicalName( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.beans.XIntroTest::writeln"))), + css::uno::UNO_QUERY_THROW), + css::uno::UNO_QUERY).is()); + //TODO: check that the reflection of a property of an accumulation-based + // service does not support XPublished + + return 0; +} + +rtl::OUString Service::getImplementationName() { + return rtl::OUString::createFromAscii("test.tdmanager.impl"); +} + +css::uno::Sequence< rtl::OUString > Service::getSupportedServiceNames() { + return css::uno::Sequence< rtl::OUString >(); +} + +css::uno::Reference< css::uno::XInterface > Service::createInstance( + css::uno::Reference< css::uno::XComponentContext > const & context) + throw (css::uno::Exception) +{ + return static_cast< cppu::OWeakObject * >(new Service(context)); +} + +extern "C" void SAL_CALL component_getImplementationEnvironment( + char const ** envTypeName, uno_Environment **) +{ + if (envTypeName != 0) { + *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; + } +} + +extern "C" void * SAL_CALL component_getFactory(char const * implName, + void * serviceManager, void *) { + void * p = 0; + if (serviceManager != 0) { + css::uno::Reference< css::lang::XSingleComponentFactory > f; + if (Service::getImplementationName().equalsAscii(implName)) { + f = cppu::createSingleComponentFactory( + &Service::createInstance, Service::getImplementationName(), + Service::getSupportedServiceNames()); + } + if (f.is()) { + f->acquire(); + p = f.get(); + } + } + return p; +} + +namespace { + +bool writeInfo(void * registryKey, rtl::OUString const & implementationName, + css::uno::Sequence< rtl::OUString > const & serviceNames) { + rtl::OUString keyName(rtl::OUString::createFromAscii("/")); + keyName += implementationName; + keyName += rtl::OUString::createFromAscii("/UNO/SERVICES"); + css::uno::Reference< css::registry::XRegistryKey > key; + try { + key = static_cast< css::registry::XRegistryKey * >(registryKey)-> + createKey(keyName); + } catch (css::registry::InvalidRegistryException &) {} + if (!key.is()) { + return false; + } + bool success = true; + for (sal_Int32 i = 0; i < serviceNames.getLength(); ++i) { + try { + key->createKey(serviceNames[i]); + } catch (css::registry::InvalidRegistryException &) { + success = false; + break; + } + } + return success; +} + +} + +extern "C" sal_Bool SAL_CALL component_writeInfo(void *, void * registryKey) { + return registryKey + && writeInfo(registryKey, Service::getImplementationName(), + Service::getSupportedServiceNames()); +} diff --git a/stoc/test/tdmanager/testtdmanager.gcc3.map b/stoc/test/tdmanager/testtdmanager.gcc3.map new file mode 100644 index 000000000000..21b96547e640 --- /dev/null +++ b/stoc/test/tdmanager/testtdmanager.gcc3.map @@ -0,0 +1,42 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: testtdmanager.gcc3.map,v $ +# +# $Revision: 1.3 $ +# +# 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 +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +UDK_3_0_0 { + global: + component_getFactory; + component_getImplementationEnvironment; + component_writeInfo; + + _ZN4_STL7num_put*; # STLport + + local: + *; +}; diff --git a/stoc/test/tdmanager/testtdmanager.map b/stoc/test/tdmanager/testtdmanager.map new file mode 100644 index 000000000000..ef5dfdf0e99d --- /dev/null +++ b/stoc/test/tdmanager/testtdmanager.map @@ -0,0 +1,40 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: testtdmanager.map,v $ +# +# $Revision: 1.4 $ +# +# 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 +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +UDK_3_0_0 { + global: + component_getFactory; + component_getImplementationEnvironment; + component_writeInfo; + + local: + *; +}; diff --git a/stoc/test/tdmanager/types.idl b/stoc/test/tdmanager/types.idl new file mode 100644 index 000000000000..a4e722302438 --- /dev/null +++ b/stoc/test/tdmanager/types.idl @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: types.idl,v $ + * $Revision: 1.5 $ + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <com/sun/star/uno/XInterface.idl> + +module test { module tdmanager { + +struct Struct<T, U> { U s; }; + +published interface XAnother { + void f(); +}; + +service MyService { + [optional] interface XAnother; + [property, optional] boolean b; +}; + +const long CCC = 5; + +}; }; diff --git a/stoc/test/tdmanager/types2_incomp.idl b/stoc/test/tdmanager/types2_incomp.idl new file mode 100644 index 000000000000..8c1251068e66 --- /dev/null +++ b/stoc/test/tdmanager/types2_incomp.idl @@ -0,0 +1,41 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: types2_incomp.idl,v $ + * $Revision: 1.4 $ + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +module com { module sun { module star { module text { + +typedef long XTextField; + +}; }; }; }; + +module test { module tdmanager { + +const long CCC = 6; + +}; }; diff --git a/stoc/test/tdmanager/types3_incomp.idl b/stoc/test/tdmanager/types3_incomp.idl new file mode 100644 index 000000000000..b51043f472bd --- /dev/null +++ b/stoc/test/tdmanager/types3_incomp.idl @@ -0,0 +1,36 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: types3_incomp.idl,v $ + * $Revision: 1.4 $ + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +module test { module tdmanager { + +// added member: +struct Struct<T, U> { U s; long n; }; + +}; }; diff --git a/stoc/test/tdmanager/types4_incomp.idl b/stoc/test/tdmanager/types4_incomp.idl new file mode 100644 index 000000000000..551f62199028 --- /dev/null +++ b/stoc/test/tdmanager/types4_incomp.idl @@ -0,0 +1,45 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: types4_incomp.idl,v $ + * $Revision: 1.4 $ + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <com/sun/star/uno/XInterface.idl> + +module test { module tdmanager { + +published interface XAnother { + // wrong name: + void f2(); +}; + +service MyService { + [optional] interface XAnother; + [property, optional] boolean b; +}; + +}; }; diff --git a/stoc/test/tdmanager/types5.idl b/stoc/test/tdmanager/types5.idl new file mode 100644 index 000000000000..7ffabb8d5037 --- /dev/null +++ b/stoc/test/tdmanager/types5.idl @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: types5.idl,v $ + * $Revision: 1.4 $ + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <com/sun/star/uno/XInterface.idl> + +module test { module tdmanager { + +published interface XAnother { + void f(); +}; + +service MyService { + [optional] interface XAnother; + // correct order: + [property, optional] boolean b; + [property, optional] boolean b2; +}; + +const long CCC = 5; + +}; }; diff --git a/stoc/test/tdmanager/types5_incomp.idl b/stoc/test/tdmanager/types5_incomp.idl new file mode 100644 index 000000000000..bc40876f58ab --- /dev/null +++ b/stoc/test/tdmanager/types5_incomp.idl @@ -0,0 +1,46 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: types5_incomp.idl,v $ + * $Revision: 1.4 $ + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <com/sun/star/uno/XInterface.idl> + +module test { module tdmanager { + +published interface XAnother { + void f(); +}; + +service MyService { + [optional] interface XAnother; + // wrong order: + [property, optional] boolean b2; + [property, optional] boolean b; +}; + +}; }; diff --git a/stoc/test/tdmanager/types6_incomp.idl b/stoc/test/tdmanager/types6_incomp.idl new file mode 100644 index 000000000000..852f62e4c227 --- /dev/null +++ b/stoc/test/tdmanager/types6_incomp.idl @@ -0,0 +1,46 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: types6_incomp.idl,v $ + * $Revision: 1.4 $ + * + * 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 + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <com/sun/star/uno/XInterface.idl> + +module test { module tdmanager { + +published interface XAnother { + void f(); +}; + +service MyService { + // made non-optional: + interface XAnother; + [property, optional] boolean b; + [property, optional] boolean b2; +}; + +}; }; |