20#ifndef INCLUDED_OOX_OLE_VBAMODULE_HXX
21#define INCLUDED_OOX_OLE_VBAMODULE_HXX
23#include <com/sun/star/uno/Reference.hxx>
24#include <rtl/textenc.h>
25#include <rtl/ustring.hxx>
30 namespace container {
class XNameAccess; }
31 namespace container {
class XNameContainer; }
32 namespace frame {
class XModel; }
33 namespace uno {
class XComponentContext; }
37 class BinaryInputStream;
58 const css::uno::Reference< css::uno::XComponentContext >& rxContext,
59 const css::uno::Reference< css::frame::XModel >& rxDocModel,
61 rtl_TextEncoding eTextEnc,
80 const css::uno::Reference< css::container::XNameContainer >& rxBasicLib,
81 const css::uno::Reference< css::container::XNameAccess >& rxDocObjectNA );
84 const css::uno::Reference< css::container::XNameContainer >& rxBasicLib,
85 const css::uno::Reference< css::container::XNameAccess >& rxDocObjectNA )
const;
95 std::u16string_view rVBASourceCode,
96 const css::uno::Reference< css::container::XNameContainer >& rxBasicLib,
97 const css::uno::Reference< css::container::XNameAccess >& rxDocObjectNA )
const;
100 css::uno::Reference< css::uno::XComponentContext >
102 css::uno::Reference< css::frame::XModel >
Base class for storage access implementations.
css::uno::Reference< css::frame::XModel > mxDocModel
Document model used to import/export the VBA project.
void createAndImportModule(StorageBase &rVbaStrg, const css::uno::Reference< css::container::XNameContainer > &rxBasicLib, const css::uno::Reference< css::container::XNameAccess > &rxDocObjectNA)
Imports the VBA source code into the passed Basic library.
const OUString & getName() const
Returns the name of the module.
sal_Int32 getType() const
Returns the module type (com.sun.star.script.ModuleType constant).
const OUString & getStreamName() const
Returns the stream name of the module.
css::uno::Reference< css::uno::XComponentContext > mxContext
Component context with service manager.
rtl_TextEncoding meTextEnc
std::vector< VbaMacroKeyAndMethodBinding > maKeyBindings
Keys and VBA macro method bindings.
void setType(sal_Int32 nType)
Sets the passed module type.
void registerShortcutKeys()
void createModule(std::u16string_view rVBASourceCode, const css::uno::Reference< css::container::XNameContainer > &rxBasicLib, const css::uno::Reference< css::container::XNameAccess > &rxDocObjectNA) const
Creates a new Basic module and inserts it into the passed Basic library.
void importDirRecords(BinaryInputStream &rDirStrm)
Imports all records for this module until the MODULEEND record.
VbaModule(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::frame::XModel > &rxDocModel, OUString aName, rtl_TextEncoding eTextEnc, bool bExecutable)
void createEmptyModule(const css::uno::Reference< css::container::XNameContainer > &rxBasicLib, const css::uno::Reference< css::container::XNameAccess > &rxDocObjectNA) const
Creates an empty Basic module in the passed Basic library.
OUString readSourceCode(StorageBase &rVbaStrg)
Reads and returns the VBA source code from the passed storage.
Stores, which key shortcut maps to which VBA macro method.