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 #include <headless/svpinst.hxx>
10 #include <headless/svpdummies.hxx>
11 #include <headless/svpdata.hxx>
14 class HeadlessSalInstance
: public SvpSalInstance
17 explicit HeadlessSalInstance(std::unique_ptr
<SalYieldMutex
> pMutex
);
19 virtual SalSystem
* CreateSalSystem() override
;
22 HeadlessSalInstance::HeadlessSalInstance(std::unique_ptr
<SalYieldMutex
> pMutex
)
23 : SvpSalInstance(std::move(pMutex
))
27 class HeadlessSalSystem
: public SvpSalSystem
{
29 HeadlessSalSystem() : SvpSalSystem() {}
30 virtual int ShowNativeDialog( const OUString
& rTitle
,
31 const OUString
& rMessage
,
32 const std::vector
< OUString
>& rButtons
) override
35 SAL_INFO("vcl.headless",
36 "LibreOffice - dialog '"
43 SalSystem
*HeadlessSalInstance::CreateSalSystem()
45 return new HeadlessSalSystem();
48 extern "C" SalInstance
*create_SalInstance()
50 HeadlessSalInstance
* pInstance
= new HeadlessSalInstance(std::make_unique
<SvpSalYieldMutex
>());
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */