From c33f261427964d0c96ee1336a24deba5940b16c8 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Fri, 28 Mar 2014 15:00:19 +0000 Subject: [PATCH] Work in progress --- src/oxt/Makefile.in | 6 +++++- src/oxt/globals.hpp | 10 +++++++--- src/oxt/info.cc | 2 +- src/oxt/pw3270.idl | 3 ++- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/oxt/Makefile.in b/src/oxt/Makefile.in index f33175a..1b64d06 100644 --- a/src/oxt/Makefile.in +++ b/src/oxt/Makefile.in @@ -26,6 +26,8 @@ SOURCES=info.cc +UNO_CLASSES=XWeak RuntimeException + #---[ LibreOffice SDK ]-------------------------------------------------------- OO_SDK_HOME=@OO_SDK_HOME@ @@ -91,7 +93,9 @@ OO_LDFLAGS=-L$(OO_SDK_HOME)/lib -L$(OO_SDK_URE_HOME)/lib \ @$(MKDIR) `dirname $@` @$(REGMERGE) $@ /UCR $< -$(OBJDBG)/%.o: %.cc include/pw3270/lib3270.hpp include/com/sun/star/uno/XWeak.hpp *.hpp Makefile +$(OBJDBG)/%.o: %.cc include/pw3270/lib3270.hpp \ + $(foreach CLS, $(basename $(UNO_CLASSES)), include/com/sun/star/uno/$(CLS).hpp) \ + *.hpp Makefile @echo $< ... @mkdir -p `dirname $@` $(CXX) -DDEBUG=1 $(CXXFLAGS) -o $@ -c $< diff --git a/src/oxt/globals.hpp b/src/oxt/globals.hpp index dbcd7bd..33bb264 100644 --- a/src/oxt/globals.hpp +++ b/src/oxt/globals.hpp @@ -47,11 +47,12 @@ #endif - #include // "3" implementing three interfaces + #include // "3" implementing three interfaces #include + #include // #include #include -// #include + #include #include @@ -64,8 +65,11 @@ namespace pw3270_impl { // https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Class_Definition_with_Helper_Template_Classes - class session_impl : public ::cppu::WeakImplHelper2< ::pw3270::lib3270, lang::XServiceInfo > + class session_impl : public ::cppu::WeakImplHelper3< ::pw3270::lib3270, lang::XServiceInfo, lang::XInitialization > { + public: + OUString getImplementationName() throw (RuntimeException); + }; /* diff --git a/src/oxt/info.cc b/src/oxt/info.cc index de31a60..9a25506 100644 --- a/src/oxt/info.cc +++ b/src/oxt/info.cc @@ -38,7 +38,6 @@ using namespace pw3270_impl; -/* // XServiceInfo implementation OUString session_impl::getImplementationName() throw (RuntimeException) { @@ -46,6 +45,7 @@ OUString session_impl::getImplementationName() throw (RuntimeException) return OUString( RTL_CONSTASCII_USTRINGPARAM("pw3270.pw3270_impl.session") ); } +/* sal_Bool session_impl::supportsService( OUString const & serviceName ) throw (RuntimeException) { diff --git a/src/oxt/pw3270.idl b/src/oxt/pw3270.idl index 6477959..a8a084a 100644 --- a/src/oxt/pw3270.idl +++ b/src/oxt/pw3270.idl @@ -33,7 +33,7 @@ */ #include -#include +#include module pw3270 { @@ -48,6 +48,7 @@ module pw3270 service session { interface lib3270; + interface com::sun::star::lang::XInitialization; }; }; -- libgit2 0.21.2