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/.
10 #ifndef INCLUDED_COMPHELPER_DISPATCHCOMMAND_HXX
11 #define INCLUDED_COMPHELPER_DISPATCHCOMMAND_HXX
13 #include <comphelper/comphelperdllapi.h>
14 #include <rtl/ustring.hxx>
15 #include <com/sun/star/uno/Reference.hxx>
17 namespace com::sun::star::beans
{ struct PropertyValue
; }
18 namespace com::sun::star::frame
{ class XDispatchResultListener
; class XFrame
; }
19 namespace com::sun::star::uno
{ template <typename
> class Sequence
; }
24 /** Dispatch the given UNO command in the active frame.
26 @param rCommand the command to dispatch, like ".uno:Bold".
28 @return true on success.
30 COMPHELPER_DLLPUBLIC
bool dispatchCommand(const OUString
& rCommand
,
31 const css::uno::Sequence
<css::beans::PropertyValue
>& rArguments
,
32 const css::uno::Reference
<css::frame::XDispatchResultListener
>& rListener
= css::uno::Reference
<css::frame::XDispatchResultListener
>());
34 COMPHELPER_DLLPUBLIC
bool dispatchCommand(const OUString
& rCommand
,
35 const css::uno::Reference
<css::frame::XFrame
>& rFrame
,
36 const css::uno::Sequence
<css::beans::PropertyValue
>& rArguments
,
37 const css::uno::Reference
<css::frame::XDispatchResultListener
>& rListener
= css::uno::Reference
<css::frame::XDispatchResultListener
>());
41 #endif // INCLUDED_COMPHELPER_DISPATCHCOMMAND_HXX
43 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */