Hi Mikhail, Thank you very much, I can almost confirm your view right after reading the comments of i69498. I have downloaded the OOo_2.2.1_src_*_.tar.bz2 files from ftp://ftp.proxad.net, a mirror site, and am building them now. I will try to avoid problems of this kind in the future.
To skip the waiting I downloaded the new astservice.cxx(as referred in a i69498 comment), from a CVS link in OOo website, built and delivered the idlc project. Then the building problem in offapi project is solved. Attachments are the generated header files, please see if they are all right. :-) I will try to finish the reimplementation asap. Thanks and Best Regards, Felix. Mikhail Voitenko 写道: > Hi Felix, > > Currently I can not reproduce the problem in my environment. The only > problem I had was a small typo that XOLESimpleStorage.idl includes > Xinterface.idl instead of XInterface.idl. > > It looks like the problem reported by the log was fixed for the issue > i69498. So it should be already in OOF680 branch. By the way, why don't > you use one of the latest SRC680 builds? Working on a very old version > is usually error-prone. > > Best Regards, > Mikhail. > > Zhang Xiaofei wrote: > >> Hi Mikhail, >> >> I'm sorry but I encountered a problem compiling the offapi project: the >> two ctors are regarded as having the "identical lists of parameter >> types". It looks as if XStream and XInputStream are regarded as the same >> type by the compiler. Could you please give me some hints here? >> >> By the way, are there any exceptions to be raised for the ctors? >> >> Thanks and Best Regards, >> Felix. >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
#ifndef _COM_SUN_STAR_EMBED_XOLESIMPLESTORAGE_HDL_ #define _COM_SUN_STAR_EMBED_XOLESIMPLESTORAGE_HDL_ #ifndef _SAL_CONFIG_H_ #include "sal/config.h" #endif #ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HDL_ #include "com/sun/star/container/XNameContainer.hdl" #endif #ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HDL_ #include "com/sun/star/lang/XComponent.hdl" #endif #ifndef _COM_SUN_STAR_EMBED_XCLASSIFIEDOBJECT_HDL_ #include "com/sun/star/embed/XClassifiedObject.hdl" #endif #ifndef _COM_SUN_STAR_EMBED_XTRANSACTEDOBJECT_HDL_ #include "com/sun/star/embed/XTransactedObject.hdl" #endif #ifndef _COM_SUN_STAR_UNO_REFERENCE_H_ #include "com/sun/star/uno/Reference.h" #endif #ifndef _CPPU_MACROS_HXX_ #include "cppu/macros.hxx" #endif namespace com { namespace sun { namespace star { namespace uno { class Type; } } } } namespace com { namespace sun { namespace star { namespace embed { class SAL_NO_VTABLE XOLESimpleStorage : public ::com::sun::star::container::XNameContainer, public ::com::sun::star::lang::XComponent, public ::com::sun::star::embed::XTransactedObject, public ::com::sun::star::embed::XClassifiedObject { public: static inline ::com::sun::star::uno::Type const & SAL_CALL static_type(void * = 0); }; } } } } inline const ::com::sun::star::uno::Type& SAL_CALL getCppuType( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XOLESimpleStorage >* ) SAL_THROW( () ); #endif // _COM_SUN_STAR_EMBED_XOLESIMPLESTORAGE_HDL_
#ifndef _COM_SUN_STAR_EMBED_XOLESIMPLESTORAGE_HPP_ #define _COM_SUN_STAR_EMBED_XOLESIMPLESTORAGE_HPP_ #ifndef _SAL_CONFIG_H_ #include "sal/config.h" #endif #ifndef _COM_SUN_STAR_EMBED_XOLESIMPLESTORAGE_HDL_ #include "com/sun/star/embed/XOLESimpleStorage.hdl" #endif #ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ #include "com/sun/star/container/XNameContainer.hpp" #endif #ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_ #include "com/sun/star/lang/XComponent.hpp" #endif #ifndef _COM_SUN_STAR_EMBED_XCLASSIFIEDOBJECT_HPP_ #include "com/sun/star/embed/XClassifiedObject.hpp" #endif #ifndef _COM_SUN_STAR_EMBED_XTRANSACTEDOBJECT_HPP_ #include "com/sun/star/embed/XTransactedObject.hpp" #endif #ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_ #include "com/sun/star/uno/Reference.hxx" #endif #ifndef _COM_SUN_STAR_UNO_TYPE_HXX_ #include "com/sun/star/uno/Type.hxx" #endif #ifndef INCLUDED_CPPU_UNOTYPE_HXX #include "cppu/unotype.hxx" #endif #ifndef _OSL_MUTEX_HXX_ #include "osl/mutex.hxx" #endif namespace com { namespace sun { namespace star { namespace embed { inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(::com::sun::star::embed::XOLESimpleStorage const *) { static typelib_TypeDescriptionReference * the_type = 0; if ( !the_type ) { typelib_static_type_init( &the_type, typelib_TypeClass_INTERFACE, "com.sun.star.embed.XOLESimpleStorage" ); } return * reinterpret_cast< ::com::sun::star::uno::Type * >( &the_type ); } } } } } inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(::com::sun::star::uno::Reference< ::com::sun::star::embed::XOLESimpleStorage > const *) SAL_THROW(()) { return ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::embed::XOLESimpleStorage > >::get(); } ::com::sun::star::uno::Type const & ::com::sun::star::embed::XOLESimpleStorage::static_type(void *) { return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::embed::XOLESimpleStorage > * >(0)); } #endif // _COM_SUN_STAR_EMBED_XOLESIMPLESTORAGE_HPP_
#ifndef _COM_SUN_STAR_EMBED_OLESIMPLESTORAGE_HPP_ #define _COM_SUN_STAR_EMBED_OLESIMPLESTORAGE_HPP_ #ifndef _SAL_CONFIG_H_ #include "sal/config.h" #endif #ifndef _COM_SUN_STAR_UNO_RUNTIMEEXCEPTION_HPP_ #include "com/sun/star/uno/RuntimeException.hpp" #endif #ifndef _COM_SUN_STAR_EMBED_XOLESIMPLESTORAGE_HPP_ #include "com/sun/star/embed/XOLESimpleStorage.hpp" #endif #ifndef _COM_SUN_STAR_LANG_XMULTICOMPONENTFACTORY_HPP_ #include "com/sun/star/lang/XMultiComponentFactory.hpp" #endif #ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ #include "com/sun/star/uno/XComponentContext.hpp" #endif #ifndef _COM_SUN_STAR_UNO_DEPLOYMENTEXCEPTION_HPP_ #include "com/sun/star/uno/DeploymentException.hpp" #endif #ifndef _COM_SUN_STAR_IO_XSTREAM_HPP_ #include "com/sun/star/io/XStream.hpp" #endif #ifndef _COM_SUN_STAR_UNO_EXCEPTION_HPP_ #include "com/sun/star/uno/Exception.hpp" #endif #ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_ #include "com/sun/star/io/XInputStream.hpp" #endif #ifndef _COM_SUN_STAR_UNO_ANY_HXX_ #include "com/sun/star/uno/Any.hxx" #endif #ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_ #include "com/sun/star/uno/Reference.hxx" #endif #ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ #include "com/sun/star/uno/Sequence.hxx" #endif #ifndef INCLUDED_CPPU_UNOTYPE_HXX #include "cppu/unotype.hxx" #endif #ifndef _RTL_USTRING_H_ #include "rtl/ustring.h" #endif #ifndef _RTL_USTRING_HXX_ #include "rtl/ustring.hxx" #endif #ifndef _SAL_TYPES_H_ #include "sal/types.h" #endif namespace com { namespace sun { namespace star { namespace embed { class OLESimpleStorage { public: static ::com::sun::star::uno::Reference< ::com::sun::star::embed::XOLESimpleStorage > createFromInputStream(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInputStream, ::sal_Bool createTempCopy) { ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiComponentFactory > the_factory(the_context->getServiceManager()); if (!the_factory.is()) { throw com::sun::star::uno::DeploymentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("component context fails to supply service manager")), the_context); } ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > the_arguments(2); the_arguments[0] <<= xInputStream; the_arguments[1] <<= createTempCopy; ::com::sun::star::uno::Reference< ::com::sun::star::embed::XOLESimpleStorage > the_instance; try { the_instance = ::com::sun::star::uno::Reference< ::com::sun::star::embed::XOLESimpleStorage >(the_factory->createInstanceWithArgumentsAndContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")), the_arguments, the_context), ::com::sun::star::uno::UNO_QUERY); } catch (::com::sun::star::uno::RuntimeException &) { throw; } catch (::com::sun::star::uno::Exception & the_exception) { throw ::com::sun::star::uno::DeploymentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("component context fails to supply service com.sun.star.embed.OLESimpleStorage of type com.sun.star.embed.XOLESimpleStorage: ")) + the_exception.Message, the_context); } if (!the_instance.is()) { throw ::com::sun::star::uno::DeploymentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("component context fails to supply service com.sun.star.embed.OLESimpleStorage of type com.sun.star.embed.XOLESimpleStorage")), the_context); } return the_instance; } static ::com::sun::star::uno::Reference< ::com::sun::star::embed::XOLESimpleStorage > createFromStream(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream, ::sal_Bool createTempCopy) { ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiComponentFactory > the_factory(the_context->getServiceManager()); if (!the_factory.is()) { throw com::sun::star::uno::DeploymentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("component context fails to supply service manager")), the_context); } ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > the_arguments(2); the_arguments[0] <<= xStream; the_arguments[1] <<= createTempCopy; ::com::sun::star::uno::Reference< ::com::sun::star::embed::XOLESimpleStorage > the_instance; try { the_instance = ::com::sun::star::uno::Reference< ::com::sun::star::embed::XOLESimpleStorage >(the_factory->createInstanceWithArgumentsAndContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")), the_arguments, the_context), ::com::sun::star::uno::UNO_QUERY); } catch (::com::sun::star::uno::RuntimeException &) { throw; } catch (::com::sun::star::uno::Exception & the_exception) { throw ::com::sun::star::uno::DeploymentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("component context fails to supply service com.sun.star.embed.OLESimpleStorage of type com.sun.star.embed.XOLESimpleStorage: ")) + the_exception.Message, the_context); } if (!the_instance.is()) { throw ::com::sun::star::uno::DeploymentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("component context fails to supply service com.sun.star.embed.OLESimpleStorage of type com.sun.star.embed.XOLESimpleStorage")), the_context); } return the_instance; } private: OLESimpleStorage(); // not implemented OLESimpleStorage(OLESimpleStorage &); // not implemented ~OLESimpleStorage(); // not implemented void operator =(OLESimpleStorage); // not implemented }; } } } } #endif // _COM_SUN_STAR_EMBED_OLESIMPLESTORAGE_HPP_
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]