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_SFX2_ASYNCFUNC_HXX 11 #define INCLUDED_SFX2_ASYNCFUNC_HXX 12 13 #include <functional> 14 15 #include <com/sun/star/lang/XUnoTunnel.hpp> 16 #include <comphelper/servicehelper.hxx> 17 #include <cppuhelper/implbase.hxx> 18 19 class AsyncFunc final : public cppu::WeakImplHelper<css::lang::XUnoTunnel> 20 { 21 private: 22 std::function<void()> const m_pAsyncFunc; 23 24 public: 25 AsyncFunc(const std::function<void()>&); 26 virtual ~AsyncFunc() override; 27 28 void Execute(); 29 30 //XUnoTunnel 31 UNO3_GETIMPLEMENTATION_DECL(AsyncFunc) 32 }; 33 34 #endif 35 36 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 37