diff options
Diffstat (limited to 'basic/inc/basic/vbahelper.hxx')
-rw-r--r--[-rwxr-xr-x] | basic/inc/basic/vbahelper.hxx | 49 |
1 files changed, 49 insertions, 0 deletions
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 |