Commit c33f261427964d0c96ee1336a24deba5940b16c8

Authored by perry.werneck@gmail.com
1 parent a66d8d94

Work in progress

src/oxt/Makefile.in
... ... @@ -26,6 +26,8 @@
26 26  
27 27 SOURCES=info.cc
28 28  
  29 +UNO_CLASSES=XWeak RuntimeException
  30 +
29 31 #---[ LibreOffice SDK ]--------------------------------------------------------
30 32  
31 33 OO_SDK_HOME=@OO_SDK_HOME@
... ... @@ -91,7 +93,9 @@ OO_LDFLAGS=-L$(OO_SDK_HOME)/lib -L$(OO_SDK_URE_HOME)/lib \
91 93 @$(MKDIR) `dirname $@`
92 94 @$(REGMERGE) $@ /UCR $<
93 95  
94   -$(OBJDBG)/%.o: %.cc include/pw3270/lib3270.hpp include/com/sun/star/uno/XWeak.hpp *.hpp Makefile
  96 +$(OBJDBG)/%.o: %.cc include/pw3270/lib3270.hpp \
  97 + $(foreach CLS, $(basename $(UNO_CLASSES)), include/com/sun/star/uno/$(CLS).hpp) \
  98 + *.hpp Makefile
95 99 @echo $< ...
96 100 @mkdir -p `dirname $@`
97 101 $(CXX) -DDEBUG=1 $(CXXFLAGS) -o $@ -c $<
... ...
src/oxt/globals.hpp
... ... @@ -47,11 +47,12 @@
47 47 #endif
48 48  
49 49  
50   - #include <cppuhelper/implbase2.hxx> // "3" implementing three interfaces
  50 + #include <cppuhelper/implbase3.hxx> // "3" implementing three interfaces
51 51 #include <cppuhelper/factory.hxx>
  52 + #include <com/sun/star/lang/XInitialization.hpp>
52 53 // #include <cppuhelper/implementationentry.hxx>
53 54 #include <com/sun/star/lang/XServiceInfo.hpp>
54   -// #include <com/sun/star/lang/IllegalArgumentException.hpp>
  55 + #include <com/sun/star/uno/RuntimeException.hpp>
55 56  
56 57 #include <pw3270/lib3270.hpp>
57 58  
... ... @@ -64,8 +65,11 @@
64 65 namespace pw3270_impl
65 66 {
66 67 // https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Class_Definition_with_Helper_Template_Classes
67   - class session_impl : public ::cppu::WeakImplHelper2< ::pw3270::lib3270, lang::XServiceInfo >
  68 + class session_impl : public ::cppu::WeakImplHelper3< ::pw3270::lib3270, lang::XServiceInfo, lang::XInitialization >
68 69 {
  70 + public:
  71 + OUString getImplementationName() throw (RuntimeException);
  72 +
69 73 };
70 74  
71 75 /*
... ...
src/oxt/info.cc
... ... @@ -38,7 +38,6 @@
38 38  
39 39 using namespace pw3270_impl;
40 40  
41   -/*
42 41 // XServiceInfo implementation
43 42 OUString session_impl::getImplementationName() throw (RuntimeException)
44 43 {
... ... @@ -46,6 +45,7 @@ OUString session_impl::getImplementationName() throw (RuntimeException)
46 45 return OUString( RTL_CONSTASCII_USTRINGPARAM("pw3270.pw3270_impl.session") );
47 46 }
48 47  
  48 +/*
49 49  
50 50 sal_Bool session_impl::supportsService( OUString const & serviceName ) throw (RuntimeException)
51 51 {
... ...
src/oxt/pw3270.idl
... ... @@ -33,7 +33,7 @@
33 33 */
34 34  
35 35 #include <com/sun/star/uno/XInterface.idl>
36   -#include <com/sun/star/lang/XTypeProvider.idl>
  36 +#include <com/sun/star/lang/XInitialization.idl>
37 37  
38 38 module pw3270
39 39 {
... ... @@ -48,6 +48,7 @@ module pw3270
48 48 service session
49 49 {
50 50 interface lib3270;
  51 + interface com::sun::star::lang::XInitialization;
51 52 };
52 53 };
53 54  
... ...