20 #ifndef INCLUDED_OOX_OLE_VBAPROJECT_HXX
21 #define INCLUDED_OOX_OLE_VBAPROJECT_HXX
25 #include <string_view>
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 );
105 virtual void attachMacro(
const OUString& rScriptUrl ) = 0;
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);
144 void registerMacroAttacher(
const VbaMacroAttacherRef& rxAttacher );
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 >
RefVector< VbaMacroAttacherBase > MacroAttacherVector
Provides helper functions for colors, device measurement conversion, graphics, and graphic objects ha...
::std::map< OUString, sal_Int32 > DummyModuleMap
bool isImportVba() const
Returns true, if the VBA source code and forms should be imported.
OUString maPrjName
Name of the VBA project.
Base class for objects that attach a macro to a specific action.
VbaFilterConfig(const css::uno::Reference< css::uno::XComponentContext > &rxContext, std::u16string_view rConfigCompName)
bool isImportVbaExecutable() const
Returns true, if the VBA source code should be imported executable.
VbaModuleMap maModulesByStrm
exports com.sun.star. container
bool isExportVba() const
Returns true, if the VBA source code and forms should be exported.
exports com.sun.star. frame
void setOleOverridesSink(css::uno::Reference< css::container::XNameContainer > const &rxOleOverridesSink)
css::uno::Reference< css::uno::XInterface > mxConfigAccess
Base class for storage access implementations.
css::uno::Reference< css::container::XNameContainer > mxOleOverridesSink
DummyModuleMap maDummyModules
Additional empty modules created on import.
css::uno::Reference< css::frame::XModel > mxDocModel
Document model used to import/export the VBA project.
std::shared_ptr< VbaMacroAttacherBase > VbaMacroAttacherRef
RefMap< OUString, VbaModule > VbaModuleMap
css::uno::Reference< css::container::XNameContainer > mxBasicLib
The Basic library of the document used for import.
css::uno::Reference< css::uno::XComponentContext > mxContext
Component context with service manager.
MacroAttacherVector maMacroAttachers
Objects that want to attach a VBA macro to an action.
css::uno::Reference< css::container::XNameContainer > mxDialogLib
The dialog library of the document used for import.