bump product version to 5.0.4.1
[LibreOffice.git] / basic / inc / sbobjmod.hxx
blobcd673bfd71bda62a2384425cfbb32f554b307d80
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_BASIC_INC_SBOBJMOD_HXX
21 #define INCLUDED_BASIC_INC_SBOBJMOD_HXX
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 <basic/basicdllapi.h>
32 // Basic-Module for excel object.
34 class BASIC_DLLPUBLIC SbObjModule : public SbModule
36 protected:
37 virtual ~SbObjModule();
39 public:
40 TYPEINFO_OVERRIDE();
41 SbObjModule( const OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible );
42 virtual SbxVariable* Find( const OUString& rName, SbxClassType t ) SAL_OVERRIDE;
44 virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
45 const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE;
47 using SbxValue::GetObject;
48 SbxVariable* GetObject();
49 void SetUnoObject( const com::sun::star::uno::Any& aObj )throw ( com::sun::star::uno::RuntimeException ) ;
52 class FormObjEventListenerImpl;
54 class BASIC_DLLPUBLIC SbUserFormModule : public SbObjModule
56 com::sun::star::script::ModuleInfo m_mInfo;
57 ::rtl::Reference< FormObjEventListenerImpl > m_DialogListener;
58 css::uno::Reference<css::awt::XDialog> m_xDialog;
59 css::uno::Reference<css::frame::XModel> m_xModel;
60 bool mbInit;
62 //protected:
63 void InitObject();
64 public:
65 TYPEINFO_OVERRIDE();
66 SbUserFormModule( const OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat );
67 virtual ~SbUserFormModule();
68 virtual SbxVariable* Find( const OUString& rName, SbxClassType t ) SAL_OVERRIDE;
69 void ResetApiObj( bool bTriggerTerminateEvent = true );
70 void Unload();
71 void Load();
72 void triggerMethod( const OUString& );
73 void triggerMethod( const OUString&, css::uno::Sequence< css::uno::Any >& );
74 void triggerActivateEvent();
75 void triggerDeactivateEvent();
76 void triggerInitializeEvent();
77 void triggerTerminateEvent();
78 void triggerLayoutEvent();
79 void triggerResizeEvent();
81 bool getInitState()
82 { return mbInit; }
83 void setInitState( bool bInit )
84 { mbInit = bInit; }
86 class SbUserFormModuleInstance* CreateInstance();
89 class BASIC_DLLPUBLIC SbUserFormModuleInstance : public SbUserFormModule
91 SbUserFormModule* m_pParentModule;
93 public:
94 SbUserFormModuleInstance( SbUserFormModule* pParentModule, const OUString& rName,
95 const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat );
97 virtual bool IsClass( const OUString& ) const SAL_OVERRIDE;
98 virtual SbxVariable* Find( const OUString& rName, SbxClassType t ) SAL_OVERRIDE;
101 #endif // INCLUDED_BASIC_INC_SBOBJMOD_HXX
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */