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 INCLUDED_BASIC_VBAHELPER_HXX
21 #define INCLUDED_BASIC_VBAHELPER_HXX
23 #include <rtl/ustring.hxx>
24 #include <basic/basicdllapi.h>
26 namespace com::sun::star::frame
{ class XModel
; }
27 namespace com::sun::star::uno
{ template <typename
> class Reference
; }
32 /* This header contains public helper functions for VBA used from this module
33 and from other VBA implementation modules such as vbahelper.
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 css::uno::Reference
< css::frame::XModel
>& rxModel
,
53 bool bLockControllers
);
56 /** Enables or disables the container windows of all controllers of all
57 documents that have the same type as the specified document.
59 First, the global module manager (com.sun.star.frame.ModuleManager) is
60 asked for the type of the passed model, and the container windows of all
61 open documents with the same type will be enabled or disabled.
64 A document model determining the type of the documents to be enabled or
68 Passing true will enable all container windows of all controllers,
69 passing false will disable them.
71 BASIC_DLLPUBLIC
void enableContainerWindowsOfAllDocuments(
72 const css::uno::Reference
< css::frame::XModel
>& rxModel
,
73 bool bEnableWindows
);
76 /** Registers the passed path as working directory for the application the
77 passed document belongs to.
80 A document model determining the type of the application whose working
81 directory has been changed.
84 The new working directory.
86 BASIC_DLLPUBLIC
void registerCurrentDirectory(
87 const css::uno::Reference
< css::frame::XModel
>& rxModel
,
88 const OUString
& rPath
);
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */