1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 /* 3 * This file is part of the LibreOffice project. 4 * 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/. 8 */ 9 10 #ifndef INCLUDED_COMPHELPER_DISPATCHCOMMAND_HXX 11 #define INCLUDED_COMPHELPER_DISPATCHCOMMAND_HXX 12 13 #include <comphelper/comphelperdllapi.h> 14 #include <rtl/ustring.hxx> 15 #include <com/sun/star/uno/Reference.hxx> 16 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; } 20 21 namespace comphelper 22 { 23 24 /** Dispatch the given UNO command in the active frame. 25 26 @param rCommand the command to dispatch, like ".uno:Bold". 27 28 @return true on success. 29 */ 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>()); 33 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>()); 38 39 } 40 41 #endif // INCLUDED_COMPHELPER_DISPATCHCOMMAND_HXX 42 43 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 44