1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 _SB_OBJMOD_HXX
21 #define _SB_OBJMOD_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 "basicdllapi.h"
32 // Basic-Module for excel object.
34 class BASIC_DLLPUBLIC SbObjModule
: public SbModule
37 virtual ~SbObjModule();
41 SbObjModule( const OUString
& rName
, const com::sun::star::script::ModuleInfo
& mInfo
, bool bIsVbaCompatible
);
42 virtual SbxVariable
* Find( const OUString
& rName
, SbxClassType t
);
44 virtual void SFX_NOTIFY( SfxBroadcaster
& rBC
, const TypeId
& rBCType
,
45 const SfxHint
& rHint
, const TypeId
& rHintType
);
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
;
64 virtual void InitObject();
67 SbUserFormModule( const OUString
& rName
, const com::sun::star::script::ModuleInfo
& mInfo
, bool bIsVBACompat
);
68 virtual ~SbUserFormModule();
69 virtual SbxVariable
* Find( const OUString
& rName
, SbxClassType t
);
70 void ResetApiObj( bool bTriggerTerminateEvent
= true );
73 void triggerMethod( const OUString
& );
74 void triggerMethod( const OUString
&, css::uno::Sequence
< css::uno::Any
>& );
75 void triggerActivateEvent();
76 void triggerDeactivateEvent();
77 void triggerInitializeEvent();
78 void triggerTerminateEvent();
79 void triggerLayoutEvent();
80 void triggerResizeEvent();
82 bool getInitState( void )
84 void setInitState( bool bInit
)
87 class SbUserFormModuleInstance
* CreateInstance();
90 class BASIC_DLLPUBLIC SbUserFormModuleInstance
: public SbUserFormModule
92 SbUserFormModule
* m_pParentModule
;
95 SbUserFormModuleInstance( SbUserFormModule
* pParentModule
, const OUString
& rName
,
96 const com::sun::star::script::ModuleInfo
& mInfo
, bool bIsVBACompat
);
98 virtual sal_Bool
IsClass( const OUString
& ) const;
99 virtual SbxVariable
* Find( const OUString
& rName
, SbxClassType t
);
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */