LibreOffice Module toolkit (master) 1
vclxpointer.cxx
Go to the documentation of this file.
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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <com/sun/star/uno/XComponentContext.hpp>
21#include <awt/vclxpointer.hxx>
23
25{
26}
27
29{
30}
31
32void VCLXPointer::setType( sal_Int32 nType )
33{
34 std::scoped_lock aGuard( maMutex );
35
36 maPointer = static_cast<PointerStyle>(nType);
37}
38
40{
41 std::scoped_lock aGuard( maMutex );
42
43 return static_cast<sal_Int32>(maPointer);
44}
45
47{
48 return "stardiv.Toolkit.VCLXPointer";
49}
50
51sal_Bool VCLXPointer::supportsService(OUString const & ServiceName)
52{
54}
55
56css::uno::Sequence<OUString> VCLXPointer::getSupportedServiceNames()
57{
58 return css::uno::Sequence<OUString>{
59 "com.sun.star.awt.Pointer", "stardiv.vcl.Pointer"};
60}
61
62extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
64 css::uno::XComponentContext *,
65 css::uno::Sequence<css::uno::Any> const &)
66{
67 return cppu::acquire(new VCLXPointer());
68}
69
70/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~VCLXPointer() override
Definition: vclxpointer.cxx:28
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: vclxpointer.cxx:56
sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
Definition: vclxpointer.cxx:51
std::mutex maMutex
Definition: vclxpointer.hxx:37
OUString SAL_CALL getImplementationName() override
Definition: vclxpointer.cxx:46
sal_Int32 SAL_CALL getType() override
Definition: vclxpointer.cxx:39
void SAL_CALL setType(sal_Int32 nType) override
Definition: vclxpointer.cxx:32
PointerStyle maPointer
Definition: vclxpointer.hxx:38
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
PointerStyle
QPRO_FUNC_TYPE nType
unsigned char sal_Bool
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * stardiv_Toolkit_VCLXPointer_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: vclxpointer.cxx:63