namespace com::sun::star { namespace container { class XNameAccess; } namespace container { class XNameContainer; } namespace frame { class XModel; } namespace uno { class XComponentContext; }
}
namespace oox { class BinaryInputStream; class StorageBase;
}
namespace oox::ole {
/** Stores, which key shortcut maps to which VBA macro method. */ struct VbaMacroKeyAndMethodBinding
{ // This describes a key combination in "raw" VBA Macro form, that // still needs translated to a key event that can be used in // LibreOffice.
OUString msApiKey; // The name of the macro method
OUString msMethodName;
};
/** Returns the name of the module. */ const OUString& getName() const { return maName; } /** Returns the stream name of the module. */ const OUString& getStreamName() const { return maStreamName; }
/** Imports all records for this module until the MODULEEND record. */ void importDirRecords( BinaryInputStream& rDirStrm );
/** Imports the VBA source code into the passed Basic library. */ void createAndImportModule(
StorageBase& rVbaStrg, const css::uno::Reference< css::container::XNameContainer >& rxBasicLib, const css::uno::Reference< css::container::XNameAccess >& rxDocObjectNA ); /** Creates an empty Basic module in the passed Basic library. */ void createEmptyModule( const css::uno::Reference< css::container::XNameContainer >& rxBasicLib, const css::uno::Reference< css::container::XNameAccess >& rxDocObjectNA ) const;
void registerShortcutKeys();
private: /** Reads and returns the VBA source code from the passed storage. */
OUString readSourceCode( StorageBase& rVbaStrg );
/** Creates a new Basic module and inserts it into the passed Basic library. */ void createModule(
std::u16string_view rVBASourceCode, const css::uno::Reference< css::container::XNameContainer >& rxBasicLib, const css::uno::Reference< css::container::XNameAccess >& rxDocObjectNA ) const;
private:
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.
OUString maName;
OUString maStreamName;
OUString maDocString;
rtl_TextEncoding meTextEnc;
sal_Int32 mnType;
sal_uInt32 mnOffset; bool mbReadOnly; bool mbPrivate; bool mbExecutable;
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.