Hello Pierre-André, > using namespace com::sun::star::uno;
side-note: using directives are bad in header files. Use fully qualified names. > class MyClass > { > > public: > connect(); > set_text(); > > private : > // OK > XInterface* rInstance2; > > // Not OK because needs to be a pointer or a reference. > Reference< XInterface > rInstance; > }; > This does not work. I would recommend that you "pimpl" your class, hiding implementation details in a separate class, e.g. hpp file: // no need not to include OOo header files #include <memory> ... class MyClass { ... private: class MyClassImpl; ::std::auto_ptr<MyClassImpl> const m_pImpl; }; ... cpp file: // using OOo headers, definitions of class MyClass::MyClassImpl ... class MyClass ... But if you only have to hold a single interface member, it is probably shorter to just use the plain "XInterface *", manually managing lifetime via acquire() / release(). HTH, -Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]