diff options
author | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2011-03-25 10:40:25 +0100 |
---|---|---|
committer | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2011-03-25 10:40:25 +0100 |
commit | b46dab973c91c3a94bcda188a9888fef3fd16426 (patch) | |
tree | ecf2283bed35cbd42e3fb5fb541194d70179e51d /basic/inc | |
parent | 61879c218dd0e6e94884e7c6e06e3c5c18540b4a (diff) |
calcvba: #164410# improve VBA compatibility implementation in various areas: Excel symbols, MSForms symbols, document and forms event handling
Diffstat (limited to 'basic/inc')
-rw-r--r-- | basic/inc/basic/sbxdef.hxx | 3 | ||||
-rwxr-xr-x | basic/inc/basic/vbahelper.hxx | 49 |
2 files changed, 52 insertions, 0 deletions
diff --git a/basic/inc/basic/sbxdef.hxx b/basic/inc/basic/sbxdef.hxx index 6dc9fe1d8d66..cc669fd03649 100644 --- a/basic/inc/basic/sbxdef.hxx +++ b/basic/inc/basic/sbxdef.hxx @@ -108,6 +108,7 @@ enum SbxDataType { const sal_uInt32 SBX_TYPE_WITH_EVENTS_FLAG = 0x10000; const sal_uInt32 SBX_TYPE_DIM_AS_NEW_FLAG = 0x20000; const sal_uInt32 SBX_FIXED_LEN_STRING_FLAG = 0x10000; // same value as above as no conflict possible +const sal_uInt32 SBX_TYPE_VAR_TO_DIM_FLAG = 0x40000; #endif @@ -320,6 +321,8 @@ enum SbxError { // Ergebnis einer Rechenoperation/Konversion #define SBX_WITH_EVENTS 0x0080 // Same value as unused SBX_HIDDEN #define SBX_DIM_AS_NEW 0x0800 // Same value as SBX_GBLSEARCH, cannot conflict as one // is used for objects, the other for variables only +#define SBX_VAR_TO_DIM 0x2000 // Same value as SBX_NO_BROADCAST, cannot conflict as + // used for variables without broadcaster only // Broadcaster-IDs: #define SBX_HINT_DYING SFX_HINT_DYING diff --git a/basic/inc/basic/vbahelper.hxx b/basic/inc/basic/vbahelper.hxx index 0d99387965fe..f83548f7e02c 100755 --- a/basic/inc/basic/vbahelper.hxx +++ b/basic/inc/basic/vbahelper.hxx @@ -28,7 +28,9 @@ #ifndef BASIC_VBAHELPR_HXX #define BASIC_VBAHELPR_HXX +#include <com/sun/star/container/XEnumeration.hpp> #include <com/sun/star/frame/XModel.hpp> +#include <rtl/ustring.hxx> namespace basic { namespace vba { @@ -39,6 +41,21 @@ namespace vba { // ============================================================================ +/** Creates and returns an enumeration of all open documents of the same type + as the specified document. + + First, the global module manager (com.sun.star.frame.ModuleManager) is + asked for the type of the passed model, and all open documents with the + same type will be stored in an enumeration object. + + @param rxModel + A document model determining the type of the documents. + */ +::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > createDocumentsEnumeration( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel ); + +// ============================================================================ + /** Locks or unlocks the controllers of all documents that have the same type as the specified document. @@ -80,6 +97,38 @@ void enableContainerWindowsOfAllDocuments( // ============================================================================ +/** Registers the passed path as working directory for the application the + passed document belongs to. + + @param rxModel + A document model determining the type of the application whose working + directory has been changed. + + @param rPath + The new working directory. + */ +void registerCurrentDirectory( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel, + const ::rtl::OUString& rPath ); + +// ============================================================================ + +/** Returns the working directory of the application the passed document + belongs to. + + @param rxModel + A document model determining the type of the application whose working + directory is querried. + + @return + The working directory of the specified application, or an empty string + on error (e.g. if the passed document reference is empty). + */ +::rtl::OUString getCurrentDirectory( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel ); + +// ============================================================================ + } // namespace vba } // namespace basic |