Commit 9260860879727178deedecefa6fb392a4eed95b2
1 parent
32b35feb
Exists in
master
and in
5 other branches
Work in progress
Showing
1 changed file
with
38 additions
and
11 deletions
Show diff stats
src/oxt/globals.hpp
| ... | ... | @@ -22,8 +22,13 @@ |
| 22 | 22 | * |
| 23 | 23 | * Contatos: |
| 24 | 24 | * |
| 25 | - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
| 26 | - * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) | |
| 25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
| 26 | + * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) | |
| 27 | + * | |
| 28 | + * Referências: | |
| 29 | + * | |
| 30 | + * https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/C%2B%2B_Component | |
| 31 | + * | |
| 27 | 32 | * |
| 28 | 33 | */ |
| 29 | 34 | |
| ... | ... | @@ -42,28 +47,50 @@ |
| 42 | 47 | #endif |
| 43 | 48 | |
| 44 | 49 | |
| 50 | + #include <cppuhelper/supportsservice.hxx> | |
| 51 | + | |
| 45 | 52 | #include <cppuhelper/implbase2.hxx> // "3" implementing three interfaces |
| 46 | - #include <cppuhelper/factory.hxx> | |
| 47 | - #include <cppuhelper/implementationentry.hxx> | |
| 53 | +// #include <cppuhelper/factory.hxx> | |
| 54 | +// #include <cppuhelper/implementationentry.hxx> | |
| 55 | +// #include <com/sun/star/lang/XServiceInfo.hpp> | |
| 56 | +// #include <com/sun/star/lang/IllegalArgumentException.hpp> | |
| 48 | 57 | |
| 49 | - #include <com/sun/star/lang/XServiceInfo.hpp> | |
| 50 | - #include <com/sun/star/lang/IllegalArgumentException.hpp> | |
| 51 | 58 | #include <pw3270/lib3270.hpp> |
| 52 | 59 | |
| 53 | 60 | |
| 54 | - using namespace ::rtl; // for OUString | |
| 55 | - using namespace ::com::sun::star; // for sdk interfaces | |
| 56 | - using namespace ::com::sun::star::uno; // for basic types | |
| 61 | + using namespace ::rtl; // for OUString | |
| 62 | + using namespace ::com::sun::star; // for sdk interfaces | |
| 63 | + using namespace ::com::sun::star::uno; // for basic types | |
| 57 | 64 | |
| 58 | 65 | |
| 59 | 66 | namespace pw3270_impl |
| 60 | 67 | { |
| 68 | + // https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Class_Definition_with_Helper_Template_Classes | |
| 69 | + class sessionImpl | |
| 70 | + // : public lang::XServiceInfo | |
| 71 | + // ::cppu::WeakImplHelper2< ::pw3270::lib3270, lang::XServiceInfo > | |
| 72 | + { | |
| 73 | + }; | |
| 61 | 74 | |
| 62 | - class sessionImpl : public ::cppu::WeakImplHelper2< ::pw3270::lib3270,lang::XServiceInfo > | |
| 75 | + /* | |
| 76 | + // https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/C%2B%2B/Implementing_without_Helpers | |
| 77 | + class sessionImpl | |
| 63 | 78 | { |
| 79 | + oslInterlockedCount m_refcount; | |
| 64 | 80 | |
| 81 | + public: | |
| 82 | + inline sessionImpl() throw () : m_refcount( 0 ) | |
| 83 | + { | |
| 84 | + } | |
| 85 | + | |
| 86 | + // XInterface | |
| 87 | + virtual Any SAL_CALL queryInterface( Type const & type ) throw (RuntimeException); | |
| 88 | + virtual void SAL_CALL acquire() throw (); | |
| 89 | + virtual void SAL_CALL release() throw (); | |
| 65 | 90 | }; |
| 66 | - } | |
| 91 | + */ | |
| 92 | + | |
| 93 | + }; | |
| 67 | 94 | |
| 68 | 95 | |
| 69 | 96 | #endif // PW3270_OXT_GLOBALS_HPP_INCLUDED | ... | ... |