1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef BASIC_VBAHELPR_HXX
21 #define BASIC_VBAHELPR_HXX
23 #include <com/sun/star/container/XEnumeration.hpp>
24 #include <com/sun/star/frame/XModel.hpp>
25 #include <rtl/ustring.hxx>
26 #include "basicdllapi.h"
31 /* This header contains public helper functions for VBA used from this module
32 and from other VBA implementation modules such as vbahelper.
35 // ============================================================================
37 /** Locks or unlocks the controllers of all documents that have the same type
38 as the specified document.
40 First, the global module manager (com.sun.star.frame.ModuleManager) is
41 asked for the type of the passed model, and all open documents with the
42 same type will be locked or unlocked.
45 A document model determining the type of the documents to be locked or
48 @param bLockControllers
49 Passing true will lock all controllers, passing false will unlock them.
51 BASIC_DLLPUBLIC
void lockControllersOfAllDocuments(
52 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& rxModel
,
53 sal_Bool bLockControllers
);
55 // ============================================================================
57 /** Enables or disables the container windows of all controllers of all
58 documents that have the same type as the specified document.
60 First, the global module manager (com.sun.star.frame.ModuleManager) is
61 asked for the type of the passed model, and the container windows of all
62 open documents with the same type will be enabled or disabled.
65 A document model determining the type of the documents to be enabled or
69 Passing true will enable all container windows of all controllers,
70 passing false will disable them.
72 BASIC_DLLPUBLIC
void enableContainerWindowsOfAllDocuments(
73 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& rxModel
,
74 sal_Bool bEnableWindows
);
76 // ============================================================================
78 /** Registers the passed path as working directory for the application the
79 passed document belongs to.
82 A document model determining the type of the application whose working
83 directory has been changed.
86 The new working directory.
88 BASIC_DLLPUBLIC
void registerCurrentDirectory(
89 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& rxModel
,
90 const OUString
& rPath
);
92 // ============================================================================
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */