LibreOffice Module extensions (master) 1
scanner.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 "scanner.hxx"
21
24#include <com/sun/star/uno/XComponentContext.hpp>
25
27{
28 return *( new ScannerManager() );
29}
30
31
33 mpData( nullptr )
34{
36}
37
38
40{
42}
43
44
46{
47 return Sequence< sal_Int8 >();
48}
49
50
52{
53 return "com.sun.star.scanner.ScannerManager";
54}
55
56
57sal_Bool ScannerManager::supportsService(OUString const & ServiceName)
58{
60}
61
62
63css::uno::Sequence<OUString> ScannerManager::getSupportedServiceNames()
64{
65 return { "com.sun.star.scanner.ScannerManager" };
66}
67
68
69sal_Bool SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext )
70{
71 return configureScannerAndScan( rContext, nullptr );
72}
73
74void SAL_CALL ScannerManager::initialize(const css::uno::Sequence<css::uno::Any>& rArguments)
75{
77 if (aProperties.has("ParentWindow"))
78 aProperties.get("ParentWindow") >>= mxDialogParent;
79}
80
81extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
83 css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
84{
85 return cppu::acquire(new ScannerManager());
86}
87
88
89/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
PropertiesInfo aProperties
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &rArguments) override
Definition: scanner.cxx:74
virtual Sequence< sal_Int8 > SAL_CALL getMaskDIB() override
Definition: scanner.cxx:45
sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
Definition: scanner.cxx:57
static void AcquireData()
Definition: scanunx.cxx:186
virtual ~ScannerManager() override
Definition: scanner.cxx:39
css::uno::Reference< css::awt::XWindow > mxDialogParent
Definition: scanner.hxx:44
void ReleaseData()
Definition: scanunx.cxx:193
virtual sal_Bool SAL_CALL configureScanner(ScannerContext &scanner_context) override
Definition: scanner.cxx:69
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: scanner.cxx:63
virtual sal_Bool SAL_CALL configureScannerAndScan(ScannerContext &scanner_context, const Reference< css::lang::XEventListener > &rxListener) override
Definition: scanunx.cxx:236
OUString SAL_CALL getImplementationName() override
Definition: scanner.cxx:51
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Reference< XInterface > ScannerManager_CreateInstance(const Reference< css::lang::XMultiServiceFactory > &)
Definition: scanner.cxx:26
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * extensions_ScannerManager_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: scanner.cxx:82
unsigned char sal_Bool