/** Returns true, if the VBA source code and forms should be imported. */ bool isImportVba() const; /** Returns true, if the VBA source code should be imported executable. */ bool isImportVbaExecutable() const; /** Returns true, if the VBA source code and forms should be exported. */ bool isExportVba() const;
/** Resolves the internal macro name to the related macro URL, and attaches
the macro to the object. */ void resolveAndAttachMacro( const css::uno::Reference< css::script::vba::XVBAMacroResolver >& rxResolver );
private: /** Called after the VBA project has been imported. Derived classes will
attach the passed script to the object represented by this instance. */ virtualvoid attachMacro( const OUString& rScriptUrl ) = 0;
/// Imports VBA data for a VBA project, e.g. word/vbaData.xml. void importVbaData(const css::uno::Reference<css::io::XInputStream>& xInputStream);
/** Reads vba module related information from the project streams */ void readVbaModules( StorageBase& rVbaPrjStrg ); /** Imports (and creates) vba modules and user forms from the vba project records previously read.
Note: ( expects that readVbaModules was already called ) */ void importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper ); /** Registers a macro attacher object. For details, see description of the
VbaMacroAttacherBase class. */ void registerMacroAttacher( const VbaMacroAttacherRef& rxAttacher );
/** Attaches VBA macros to objects registered via registerMacroAttacher(). */ void attachMacros();
protected: /** Registers a dummy module that will be created when the VBA project is
imported. */ void addDummyModule( const OUString& rName, sal_Int32 nType );
/** Called when the import process of the VBA project has been started. */ virtualvoid prepareImport();
/** Returns the Basic or dialog library container. */
css::uno::Reference< css::script::XLibraryContainer >
getLibraryContainer( sal_Int32 nPropId ); /** Opens a Basic or dialog library, creates missing if not found. */
css::uno::Reference< css::container::XNameContainer >
openLibrary( sal_Int32 nPropId ); /** Creates and returns the Basic library of the document used for import. */
css::uno::Reference< css::container::XNameContainer > const &
createBasicLibrary(); /** Creates and returns the dialog library of the document used for import. */
css::uno::Reference< css::container::XNameContainer > const &
createDialogLibrary();
/** Imports the VBA code modules and forms. */ void importVba(
StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper );
/** Copies the entire VBA project storage to the passed document model. */ void copyStorage( StorageBase& rVbaPrjStrg );
css::uno::Reference< css::uno::XComponentContext >
mxContext; ///< Component context with service manager.
css::uno::Reference< css::frame::XModel >
mxDocModel; ///< Document model used to import/export the VBA project.
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.
MacroAttacherVector maMacroAttachers; ///< Objects that want to attach a VBA macro to an action.
DummyModuleMap maDummyModules; ///< Additional empty modules created on import.
OUString maPrjName; ///< Name of the VBA project.
css::uno::Reference< css::container::XNameContainer >
mxOleOverridesSink; typedef RefMap< OUString, VbaModule > VbaModuleMap;
VbaModuleMap maModules;
VbaModuleMap maModulesByStrm;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.