20#ifndef INCLUDED_OOX_OLE_VBAPROJECT_HXX
21#define INCLUDED_OOX_OLE_VBAPROJECT_HXX
27#include <com/sun/star/uno/Reference.hxx>
31#include <rtl/ustring.hxx>
35 namespace container {
class XNameContainer; }
36 namespace frame {
class XModel; }
37 namespace script {
class XLibraryContainer; }
38 namespace script::vba {
class XVBAMacroResolver; }
39 namespace uno {
class XComponentContext; }
41 namespace io {
class XInputStream; }
57 const css::uno::Reference< css::uno::XComponentContext >& rxContext,
58 std::u16string_view rConfigCompName );
69 css::uno::Reference< css::uno::XInterface >
99 void resolveAndAttachMacro(
100 const css::uno::Reference< css::script::vba::XVBAMacroResolver >& rxResolver );
118 const css::uno::Reference< css::uno::XComponentContext >& rxContext,
119 const css::uno::Reference< css::frame::XModel >& rxDocModel,
120 std::u16string_view rConfigCompName );
127 void importVbaProject(
131 bool importVbaProject(
135 void importVbaData(
const css::uno::Reference<css::io::XInputStream>& xInputStream);
149 void setOleOverridesSink( css::uno::Reference< css::container::XNameContainer >
const & rxOleOverridesSink ){ mxOleOverridesSink = rxOleOverridesSink; }
154 void addDummyModule(
const OUString& rName, sal_Int32 nType );
157 virtual void prepareImport();
164 css::uno::Reference< css::script::XLibraryContainer >
165 getLibraryContainer( sal_Int32 nPropId );
167 css::uno::Reference< css::container::XNameContainer >
168 openLibrary( sal_Int32 nPropId );
170 css::uno::Reference< css::container::XNameContainer >
const &
171 createBasicLibrary();
173 css::uno::Reference< css::container::XNameContainer >
const &
174 createDialogLibrary();
188 css::uno::Reference< css::uno::XComponentContext >
190 css::uno::Reference< css::frame::XModel >
192 css::uno::Reference< css::container::XNameContainer >
194 css::uno::Reference< css::container::XNameContainer >
199 css::uno::Reference< css::container::XNameContainer >
Provides helper functions for colors, device measurement conversion, graphics, and graphic objects ha...
Base class for storage access implementations.
VbaFilterConfig(const css::uno::Reference< css::uno::XComponentContext > &rxContext, std::u16string_view rConfigCompName)
css::uno::Reference< css::uno::XInterface > mxConfigAccess
bool isExportVba() const
Returns true, if the VBA source code and forms should be exported.
bool isImportVba() const
Returns true, if the VBA source code and forms should be imported.
bool isImportVbaExecutable() const
Returns true, if the VBA source code should be imported executable.
Base class for objects that attach a macro to a specific action.
virtual void attachMacro(const OUString &rScriptUrl)=0
Called after the VBA project has been imported.
css::uno::Reference< css::uno::XComponentContext > mxContext
Component context with service manager.
VbaProject(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::frame::XModel > &rxDocModel, std::u16string_view rConfigCompName)
DummyModuleMap maDummyModules
Additional empty modules created on import.
OUString maPrjName
Name of the VBA project.
::std::map< OUString, sal_Int32 > DummyModuleMap
VbaProject(const VbaProject &)=delete
VbaProject & operator=(const VbaProject &)=delete
css::uno::Reference< css::container::XNameContainer > mxBasicLib
The Basic library of the document used for import.
css::uno::Reference< css::container::XNameContainer > mxDialogLib
The dialog library of the document used for import.
VbaModuleMap maModulesByStrm
css::uno::Reference< css::frame::XModel > mxDocModel
Document model used to import/export the VBA project.
MacroAttacherVector maMacroAttachers
Objects that want to attach a VBA macro to an action.
void setOleOverridesSink(css::uno::Reference< css::container::XNameContainer > const &rxOleOverridesSink)
RefVector< VbaMacroAttacherBase > MacroAttacherVector
css::uno::Reference< css::container::XNameContainer > mxOleOverridesSink
RefMap< OUString, VbaModule > VbaModuleMap
std::shared_ptr< VbaMacroAttacherBase > VbaMacroAttacherRef