diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /stoc/test/tdmanager | |
parent | Initial commit. (diff) | |
download | libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.tar.xz libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'stoc/test/tdmanager')
-rw-r--r-- | stoc/test/tdmanager/makefile.mk | 66 | ||||
-rw-r--r-- | stoc/test/tdmanager/readme.txt | 4 | ||||
-rw-r--r-- | stoc/test/tdmanager/testtdmanager.cxx | 332 | ||||
-rw-r--r-- | stoc/test/tdmanager/types.idl | 39 | ||||
-rw-r--r-- | stoc/test/tdmanager/types2_incomp.idl | 32 | ||||
-rw-r--r-- | stoc/test/tdmanager/types3_incomp.idl | 27 | ||||
-rw-r--r-- | stoc/test/tdmanager/types4_incomp.idl | 36 | ||||
-rw-r--r-- | stoc/test/tdmanager/types5.idl | 39 | ||||
-rw-r--r-- | stoc/test/tdmanager/types5_incomp.idl | 37 | ||||
-rw-r--r-- | stoc/test/tdmanager/types6_incomp.idl | 37 |
10 files changed, 649 insertions, 0 deletions
diff --git a/stoc/test/tdmanager/makefile.mk b/stoc/test/tdmanager/makefile.mk new file mode 100644 index 000000000..47cc135ba --- /dev/null +++ b/stoc/test/tdmanager/makefile.mk @@ -0,0 +1,66 @@ +# +# 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 . +# + +PRJ := ..$/.. +PRJNAME := stoc + +TARGET := test_tdmanager + +ENABLE_EXCEPTIONS := TRUE + +.INCLUDE: settings.mk + +DLLPRE = # no leading "lib" on .so files + +SLOFILES = $(SLO)$/testtdmanager.obj + +SHL1TARGET = $(ENFORCEDSHLPREFIX)testtdmanager.uno +SHL1OBJS = $(SLOFILES) +SHL1VERSIONMAP = $(SOLARENV)/src/component.map +SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) +SHL1IMPLIB = itesttdmanager +DEF1NAME = $(SHL1TARGET) + +.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 000000000..f49772049 --- /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 000000000..e466904b4 --- /dev/null +++ b/stoc/test/tdmanager/testtdmanager.cxx @@ -0,0 +1,332 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + + +#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/implbase.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 /*MSVC trouble: <cstdlib>*/ <stdlib.h> +#include <iostream> +#include <ostream> + +namespace { + +class Service: public cppu::WeakImplHelper< css::lang::XMain > { +public: + virtual sal_Int32 SAL_CALL + run(css::uno::Sequence< OUString > const & arguments) + throw (css::uno::RuntimeException); + + static OUString getImplementationName(); + + static css::uno::Sequence< 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, OUString const & value) { + return out << 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< 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( + OUString( + "/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 ) { + OUString url; + OSL_VERIFY( osl_File_E_None == osl_getFileURLFromSystemPath( + arguments[argPos].pData, &url.pData ) ); + bool supposedToBeCompatible = ! url.endsWithIgnoreAsciiCase("_incomp.rdb"); + + css::uno::Reference<css::registry::XSimpleRegistry> xReg( + m_context->getServiceManager()->createInstanceWithContext( + "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( + "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: " << + 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( + OUString("[][]boolean")), + css::uno::UNO_QUERY_THROW); + assertEqual(css::uno::TypeClass_SEQUENCE, sequence->getTypeClass()); + assertEqual( + OUString("[][]boolean"), + sequence->getName()); + assertEqual( + OUString("[]boolean"), + sequence->getReferencedType()->getName()); + + css::uno::Reference< css::reflection::XStructTypeDescription > structure( + manager->getByHierarchicalName( + OUString( "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( + OUString( "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( + OUString( "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>"), + structure->getMemberTypes()[0]->getName()); + assertEqual< sal_Int32 >(1, structure->getMemberNames().getLength()); + assertEqual( + OUString("s"), + structure->getMemberNames()[0]); + assertEqual< sal_Int32 >(0, structure->getTypeParameters().getLength()); + assertEqual< sal_Int32 >(2, structure->getTypeArguments().getLength()); + assertEqual( + OUString("boolean"), + structure->getTypeArguments()[0]->getName()); + assertEqual( + OUString( "test.tdmanager.Struct<any,com.sun.star.uno.XInterface>"), + structure->getTypeArguments()[1]->getName()); + + css::uno::Reference< css::reflection::XInterfaceMethodTypeDescription > + method( + manager->getByHierarchicalName( + OUString( "com.sun.star.uno.XComponentContext::getValueByName")), + css::uno::UNO_QUERY_THROW); + assertEqual(css::uno::TypeClass_INTERFACE_METHOD, method->getTypeClass()); + assertEqual( + OUString( "com.sun.star.uno.XComponentContext::getValueByName"), + method->getName()); + assertEqual( + OUString("getValueByName"), + method->getMemberName()); + assertEqual< sal_Int32 >(3, method->getPosition()); + assertEqual( + OUString("any"), + method->getReturnType()->getName()); + assertEqual< bool >(false, method->isOneway()); + assertEqual< sal_Int32 >(1, method->getParameters().getLength()); + assertEqual( + OUString("Name"), + method->getParameters()[0]->getName()); + assertEqual( + OUString("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( + OUString("[]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( + OUString( "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( + OUString( "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; +} + +OUString Service::getImplementationName() { + return OUString("test.tdmanager.impl"); +} + +css::uno::Sequence< OUString > Service::getSupportedServiceNames() { + return css::uno::Sequence< 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" SAL_DLLPUBLIC_EXPORT 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, OUString const & implementationName, + css::uno::Sequence< OUString > const & serviceNames) { + OUString keyName = "/" + implementationName + "/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()); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/test/tdmanager/types.idl b/stoc/test/tdmanager/types.idl new file mode 100644 index 000000000..ecc0e9dde --- /dev/null +++ b/stoc/test/tdmanager/types.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + +#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; + +}; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/test/tdmanager/types2_incomp.idl b/stoc/test/tdmanager/types2_incomp.idl new file mode 100644 index 000000000..cb3b0e02c --- /dev/null +++ b/stoc/test/tdmanager/types2_incomp.idl @@ -0,0 +1,32 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + +module com { module sun { module star { module text { + +typedef long XTextField; + +}; }; }; }; + +module test { module tdmanager { + +const long CCC = 6; + +}; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/test/tdmanager/types3_incomp.idl b/stoc/test/tdmanager/types3_incomp.idl new file mode 100644 index 000000000..cb2603f6f --- /dev/null +++ b/stoc/test/tdmanager/types3_incomp.idl @@ -0,0 +1,27 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + +module test { module tdmanager { + +// added member: +struct Struct<T, U> { U s; long n; }; + +}; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/test/tdmanager/types4_incomp.idl b/stoc/test/tdmanager/types4_incomp.idl new file mode 100644 index 000000000..6a5b112a6 --- /dev/null +++ b/stoc/test/tdmanager/types4_incomp.idl @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + +#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; +}; + +}; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/test/tdmanager/types5.idl b/stoc/test/tdmanager/types5.idl new file mode 100644 index 000000000..0ab924692 --- /dev/null +++ b/stoc/test/tdmanager/types5.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + +#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; + +}; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/test/tdmanager/types5_incomp.idl b/stoc/test/tdmanager/types5_incomp.idl new file mode 100644 index 000000000..1b23db753 --- /dev/null +++ b/stoc/test/tdmanager/types5_incomp.idl @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + +#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; +}; + +}; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/test/tdmanager/types6_incomp.idl b/stoc/test/tdmanager/types6_incomp.idl new file mode 100644 index 000000000..eec313d7b --- /dev/null +++ b/stoc/test/tdmanager/types6_incomp.idl @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 . + */ + +#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; +}; + +}; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |