summaryrefslogtreecommitdiff
path: root/basic/inc
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2011-04-01 09:34:55 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2011-04-01 09:34:55 +0200
commit5524a24f2116fb7f54ce35384dfeb7ea916af32e (patch)
tree8898e0c98fdcc581fb965742ef070be28dfd32d6 /basic/inc
parenteda802c3e0f832480d5c56a7ec79a5c00e46f912 (diff)
parent5a21dc127aba1a95b40a28e73c08220f80476541 (diff)
CWS-TOOLING: integrate CWS calcvba
Diffstat (limited to 'basic/inc')
-rw-r--r--basic/inc/basic/sbxdef.hxx3
-rw-r--r--[-rwxr-xr-x]basic/inc/basic/vbahelper.hxx49
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..100644
--- 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