Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : : #ifndef _SB_OBJMOD_HXX
21 : : #define _SB_OBJMOD_HXX
22 : :
23 : : #include <rtl/ref.hxx>
24 : : #include <basic/sbmod.hxx>
25 : : #include <basic/sbstar.hxx>
26 : : #include <com/sun/star/script/ModuleInfo.hpp>
27 : : #include <com/sun/star/lang/XEventListener.hpp>
28 : : #include <com/sun/star/awt/XDialog.hpp>
29 : : #include <com/sun/star/frame/XModel.hpp>
30 : : #include "basicdllapi.h"
31 : :
32 : : namespace css = ::com::sun::star;
33 : :
34 : : // Basic-Module for excel object.
35 : :
36 : : class BASIC_DLLPUBLIC SbObjModule : public SbModule
37 : : {
38 : : protected:
39 : : virtual ~SbObjModule();
40 : :
41 : : public:
42 : : TYPEINFO();
43 : : SbObjModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible );
44 : : virtual SbxVariable* Find( const rtl::OUString& rName, SbxClassType t );
45 : :
46 : : virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
47 : : const SfxHint& rHint, const TypeId& rHintType );
48 : :
49 : : using SbxValue::GetObject;
50 : : SbxVariable* GetObject();
51 : : void SetUnoObject( const com::sun::star::uno::Any& aObj )throw ( com::sun::star::uno::RuntimeException ) ;
52 : : };
53 : :
54 : : class FormObjEventListenerImpl;
55 : :
56 : : class BASIC_DLLPUBLIC SbUserFormModule : public SbObjModule
57 : : {
58 : : com::sun::star::script::ModuleInfo m_mInfo;
59 : : ::rtl::Reference< FormObjEventListenerImpl > m_DialogListener;
60 : : css::uno::Reference<css::awt::XDialog> m_xDialog;
61 : : css::uno::Reference<css::frame::XModel> m_xModel;
62 : : String sFormName;
63 : : bool mbInit;
64 : :
65 : : //protected:
66 : : virtual void InitObject();
67 : : public:
68 : : TYPEINFO();
69 : : SbUserFormModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat );
70 : : virtual ~SbUserFormModule();
71 : : virtual SbxVariable* Find( const rtl::OUString& rName, SbxClassType t );
72 : : void ResetApiObj( bool bTriggerTerminateEvent = true );
73 : : void Unload();
74 : : void Load();
75 : : void triggerMethod( const String& );
76 : : void triggerMethod( const String&, css::uno::Sequence< css::uno::Any >& );
77 : : void triggerActivateEvent();
78 : : void triggerDeactivateEvent();
79 : : void triggerInitializeEvent();
80 : : void triggerTerminateEvent();
81 : : void triggerLayoutEvent();
82 : : void triggerResizeEvent();
83 : :
84 : 0 : bool getInitState( void )
85 : 0 : { return mbInit; }
86 : 0 : void setInitState( bool bInit )
87 : 0 : { mbInit = bInit; }
88 : :
89 : : class SbUserFormModuleInstance* CreateInstance();
90 : : };
91 : :
92 [ # # ][ # # ]: 0 : class BASIC_DLLPUBLIC SbUserFormModuleInstance : public SbUserFormModule
[ # # ][ # # ]
93 : : {
94 : : SbUserFormModule* m_pParentModule;
95 : :
96 : : public:
97 : : SbUserFormModuleInstance( SbUserFormModule* pParentModule, const rtl::OUString& rName,
98 : : const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat );
99 : :
100 : : virtual sal_Bool IsClass( const rtl::OUString& ) const;
101 : : virtual SbxVariable* Find( const rtl::OUString& rName, SbxClassType t );
102 : : };
103 : :
104 : :
105 : : #ifndef __SB_SBOBJMODULEREF_HXX
106 : : #define __SB_SBOBJMODULEREF_HXX
107 : :
108 : : SV_DECL_IMPL_REF(SbObjModule);
109 : :
110 : : #endif
111 : : #endif
112 : :
113 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|