LibreOffice Module basic (master) 1
sbobjmod.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <rtl/ref.hxx>
23#include <basic/sbmod.hxx>
24#include <com/sun/star/script/ModuleInfo.hpp>
25#include <com/sun/star/awt/XDialog.hpp>
26#include <com/sun/star/frame/XModel.hpp>
27
28// Basic-Module for excel object.
29
30class SbObjModule : public SbModule
31{
32protected:
33 virtual ~SbObjModule() override;
34
35public:
36 SbObjModule( const OUString& rName, const css::script::ModuleInfo& mInfo, bool bIsVbaCompatible );
37 virtual SbxVariable* Find( const OUString& rName, SbxClassType t ) override;
38
39 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
40
44 void SetUnoObject( const css::uno::Any& aObj ) ;
45};
46
48
50{
51 css::script::ModuleInfo m_mInfo;
53 css::uno::Reference<css::awt::XDialog> m_xDialog;
54 css::uno::Reference<css::frame::XModel> m_xModel;
55 bool mbInit;
56
57//protected:
58 void InitObject();
59public:
60 SbUserFormModule( const OUString& rName, const css::script::ModuleInfo& mInfo, bool bIsVBACompat );
61 virtual ~SbUserFormModule() override;
62 virtual SbxVariable* Find( const OUString& rName, SbxClassType t ) override;
63 void ResetApiObj( bool bTriggerTerminateEvent = true );
64 void Unload();
65 void Load();
66 void triggerMethod( const OUString& );
67 void triggerMethod( const OUString&, css::uno::Sequence< css::uno::Any >& );
72 void triggerLayoutEvent();
73 void triggerResizeEvent();
74
75 bool getInitState() const
76 { return mbInit; }
77 void setInitState( bool bInit )
78 { mbInit = bInit; }
79
81};
82
84{
86
87public:
88 SbUserFormModuleInstance( SbUserFormModule* pParentModule, const OUString& rName,
89 const css::script::ModuleInfo& mInfo, bool bIsVBACompat );
90
91 virtual bool IsClass( const OUString& ) const override;
92 virtual SbxVariable* Find( const OUString& rName, SbxClassType t ) override;
93};
94
95/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AgileEncryptionInfo & mInfo
XPropertyListType t
SbObjModule(const OUString &rName, const css::script::ModuleInfo &mInfo, bool bIsVbaCompatible)
Definition: sbxmod.cxx:2143
virtual ~SbObjModule() override
Definition: sbxmod.cxx:2157
SbxVariable * GetObject()
Definition: sbxmod.cxx:2181
void SetUnoObject(const css::uno::Any &aObj)
Definition: sbxmod.cxx:2162
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: sbxmod.cxx:2196
virtual SbxVariable * Find(const OUString &rName, SbxClassType t) override
Definition: sbxmod.cxx:2186
virtual bool IsClass(const OUString &) const override
Definition: sbxmod.cxx:2527
SbUserFormModuleInstance(SbUserFormModule *pParentModule, const OUString &rName, const css::script::ModuleInfo &mInfo, bool bIsVBACompat)
Definition: sbxmod.cxx:2520
virtual SbxVariable * Find(const OUString &rName, SbxClassType t) override
Definition: sbxmod.cxx:2534
SbUserFormModule * m_pParentModule
Definition: sbobjmod.hxx:85
virtual SbxVariable * Find(const OUString &rName, SbxClassType t) override
Definition: sbxmod.cxx:2663
class SbUserFormModuleInstance * CreateInstance()
Definition: sbxmod.cxx:2514
void triggerTerminateEvent()
Definition: sbxmod.cxx:2498
void triggerDeactivateEvent()
Definition: sbxmod.cxx:2485
void InitObject()
Definition: sbxmod.cxx:2594
void triggerResizeEvent()
Definition: sbxmod.cxx:2509
void triggerMethod(const OUString &)
Definition: sbxmod.cxx:2432
virtual ~SbUserFormModule() override
Definition: sbxmod.cxx:2417
void triggerLayoutEvent()
Definition: sbxmod.cxx:2504
void triggerActivateEvent()
Definition: sbxmod.cxx:2480
void ResetApiObj(bool bTriggerTerminateEvent=true)
Definition: sbxmod.cxx:2421
::rtl::Reference< FormObjEventListenerImpl > m_DialogListener
Definition: sbobjmod.hxx:52
css::script::ModuleInfo m_mInfo
Definition: sbobjmod.hxx:51
css::uno::Reference< css::awt::XDialog > m_xDialog
Definition: sbobjmod.hxx:53
void triggerMethod(const OUString &, css::uno::Sequence< css::uno::Any > &)
void setInitState(bool bInit)
Definition: sbobjmod.hxx:77
void triggerInitializeEvent()
Definition: sbxmod.cxx:2490
css::uno::Reference< css::frame::XModel > m_xModel
Definition: sbobjmod.hxx:54
bool getInitState() const
Definition: sbobjmod.hxx:75
SbUserFormModule(const OUString &rName, const css::script::ModuleInfo &mInfo, bool bIsVBACompat)
Definition: sbxmod.cxx:2409
SbxBase * GetObject() const
Definition: sbxvar.hxx:157
SbxClassType
Definition: sbxdef.hxx:27