LibreOffice Module vcl (master) 1
UnoGraphic.hxx
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#ifndef INCLUDED_VCL_SOURCE_GRAPHIC_GRAPHIC_HXX
21#define INCLUDED_VCL_SOURCE_GRAPHIC_GRAPHIC_HXX
22
23#include <com/sun/star/graphic/XGraphic.hpp>
24#include <com/sun/star/lang/XUnoTunnel.hpp>
25#include <com/sun/star/awt/XBitmap.hpp>
26#include <com/sun/star/graphic/XGraphicTransformer.hpp>
27
29
30#include <vcl/graph.hxx>
31
32namespace unographic {
33
34class Graphic final : public css::graphic::XGraphic,
35 public css::awt::XBitmap,
36 public css::lang::XUnoTunnel,
37 public css::graphic::XGraphicTransformer,
39{
40public:
41 Graphic();
42 virtual ~Graphic() noexcept override;
43
44 using ::unographic::GraphicDescriptor::init;
45 void init(const ::Graphic& rGraphic);
46
47 // XInterface
48 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) override;
49 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
50 virtual void SAL_CALL acquire() noexcept override;
51 virtual void SAL_CALL release() noexcept override;
52private:
53 // XServiceInfo
54 virtual OUString SAL_CALL getImplementationName() override;
55 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
56 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
57
58 // XTypeProvider
59 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
60 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
61
62 // XGraphic
63 virtual ::sal_Int8 SAL_CALL getType( ) override;
64
65 // XBitmap
66 virtual css::awt::Size SAL_CALL getSize( ) override;
67 virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getDIB( ) override;
68 virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getMaskDIB( ) override;
69
70 // XUnoTunnel
71 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override;
72
73 // XGraphicTransformer
74 virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL colorChange(
75 const css::uno::Reference< css::graphic::XGraphic >& rGraphic,
76 sal_Int32 nColorFrom, sal_Int8 nTolerance, sal_Int32 nColorTo, sal_Int8 nAlphaTo ) override;
77
78 virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL applyDuotone(
79 const css::uno::Reference< css::graphic::XGraphic >& rGraphic,
80 sal_Int32 nColorOne, sal_Int32 nColorTwo ) override;
81
82 virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL applyBrightnessContrast(
83 const css::uno::Reference< css::graphic::XGraphic >& rxGraphic,
84 sal_Int32 nBrightness, sal_Int32 nContrast, sal_Bool mso ) override;
85
87};
88
89}
90
91#endif
92
93/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL getImplementationName() override
Definition: UnoGraphic.cxx:87
virtual css::awt::Size SAL_CALL getSize() override
Definition: UnoGraphic.cxx:139
virtual void SAL_CALL acquire() noexcept override
Definition: UnoGraphic.cxx:76
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
Definition: UnoGraphic.cxx:53
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: UnoGraphic.cxx:97
virtual ::sal_Int8 SAL_CALL getType() override
Definition: UnoGraphic.cxx:124
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: UnoGraphic.cxx:68
virtual ~Graphic() noexcept override
Definition: UnoGraphic.cxx:43
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rId) override
Definition: UnoGraphic.cxx:185
void init(const ::Graphic &rGraphic)
Definition: UnoGraphic.cxx:47
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: UnoGraphic.cxx:119
virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getMaskDIB() override
Definition: UnoGraphic.cxx:168
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: UnoGraphic.cxx:110
virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL applyBrightnessContrast(const css::uno::Reference< css::graphic::XGraphic > &rxGraphic, sal_Int32 nBrightness, sal_Int32 nContrast, sal_Bool mso) override
Definition: UnoGraphic.cxx:260
virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getDIB() override
Definition: UnoGraphic.cxx:151
virtual void SAL_CALL release() noexcept override
Definition: UnoGraphic.cxx:82
virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL colorChange(const css::uno::Reference< css::graphic::XGraphic > &rGraphic, sal_Int32 nColorFrom, sal_Int8 nTolerance, sal_Int32 nColorTo, sal_Int8 nAlphaTo) override
Definition: UnoGraphic.cxx:192
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: UnoGraphic.cxx:92
virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL applyDuotone(const css::uno::Reference< css::graphic::XGraphic > &rGraphic, sal_Int32 nColorOne, sal_Int32 nColorTwo) override
Definition: UnoGraphic.cxx:240
unsigned char sal_Bool
signed char sal_Int8