/src/libreoffice/vcl/source/app/ClipboardBase.cxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ |
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 | | #include <ClipboardBase.hxx> |
11 | | |
12 | | #include <cppuhelper/supportsservice.hxx> |
13 | | |
14 | | ClipboardBase::ClipboardBase(ClipboardSelectionType eSelectionType) |
15 | 5 | : cppu::WeakComponentImplHelper<css::datatransfer::clipboard::XSystemClipboard, |
16 | 5 | css::lang::XServiceInfo>(m_aMutex) |
17 | 5 | , m_eSelectionType(eSelectionType) |
18 | 5 | { |
19 | 5 | } |
20 | | |
21 | 0 | ClipboardBase::~ClipboardBase() {} |
22 | | |
23 | | css::uno::Sequence<OUString> ClipboardBase::getSupportedServiceNames() |
24 | 0 | { |
25 | 0 | return { u"com.sun.star.datatransfer.clipboard.SystemClipboard"_ustr }; |
26 | 0 | } |
27 | | |
28 | | sal_Bool ClipboardBase::supportsService(const OUString& ServiceName) |
29 | 0 | { |
30 | 0 | return cppu::supportsService(this, ServiceName); |
31 | 0 | } |
32 | | |
33 | | OUString ClipboardBase::getName() |
34 | 0 | { |
35 | 0 | switch (m_eSelectionType) |
36 | 0 | { |
37 | 0 | case ClipboardSelectionType::Clipboard: |
38 | 0 | return u"CLIPBOARD"_ustr; |
39 | 0 | case ClipboardSelectionType::Primary: |
40 | 0 | return u"PRIMARY"_ustr; |
41 | 0 | default: |
42 | 0 | assert(false && "unhandled clipboard selection type"); |
43 | 0 | return OUString(); |
44 | 0 | } |
45 | 0 | } |
46 | | |
47 | 0 | sal_Int8 ClipboardBase::getRenderingCapabilities() { return 0; } |
48 | | |
49 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |