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/awt/XBitmap.hpp>
25#include <com/sun/star/graphic/XGraphicTransformer.hpp>
26
28
29#include <vcl/graph.hxx>
30
31namespace unographic {
32
33class Graphic final : public css::graphic::XGraphic,
34 public css::awt::XBitmap,
35 public css::graphic::XGraphicTransformer,
37{
38public:
39 Graphic();
40 virtual ~Graphic() noexcept override;
41
42 using ::unographic::GraphicDescriptor::init;
43 void init(const ::Graphic& rGraphic);
44
45 const ::Graphic& GetGraphic() const { return maGraphic; }
46
47 // XInterface
48 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
49 virtual void SAL_CALL acquire() noexcept override;
50 virtual void SAL_CALL release() noexcept override;
51private:
52 // XServiceInfo
53 virtual OUString SAL_CALL getImplementationName() override;
54 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
55 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
56
57 // XTypeProvider
58 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
59 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
60
61 // XGraphic
62 virtual ::sal_Int8 SAL_CALL getType( ) override;
63
64 // XBitmap
65 virtual css::awt::Size SAL_CALL getSize( ) override;
66 virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getDIB( ) override;
67 virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getMaskDIB( ) override;
68
69 // XGraphicTransformer
70 virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL colorChange(
71 const css::uno::Reference< css::graphic::XGraphic >& rGraphic,
72 sal_Int32 nColorFrom, sal_Int8 nTolerance, sal_Int32 nColorTo, sal_Int8 nAlphaTo ) override;
73
74 virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL applyDuotone(
75 const css::uno::Reference< css::graphic::XGraphic >& rGraphic,
76 sal_Int32 nColorOne, sal_Int32 nColorTwo ) override;
77
78 virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL applyBrightnessContrast(
79 const css::uno::Reference< css::graphic::XGraphic >& rxGraphic,
80 sal_Int32 nBrightness, sal_Int32 nContrast, sal_Bool mso ) override;
81
83};
84
85}
86
87#endif
88
89/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL getImplementationName() override
Definition: UnoGraphic.cxx:79
virtual css::awt::Size SAL_CALL getSize() override
Definition: UnoGraphic.cxx:131
virtual void SAL_CALL acquire() noexcept override
Definition: UnoGraphic.cxx:68
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: UnoGraphic.cxx:89
virtual ::sal_Int8 SAL_CALL getType() override
Definition: UnoGraphic.cxx:116
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: UnoGraphic.cxx:53
const ::Graphic & GetGraphic() const
Definition: UnoGraphic.hxx:45
virtual ~Graphic() noexcept override
Definition: UnoGraphic.cxx:43
void init(const ::Graphic &rGraphic)
Definition: UnoGraphic.cxx:47
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: UnoGraphic.cxx:111
virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getMaskDIB() override
Definition: UnoGraphic.cxx:160
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: UnoGraphic.cxx:102
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:245
virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getDIB() override
Definition: UnoGraphic.cxx:143
virtual void SAL_CALL release() noexcept override
Definition: UnoGraphic.cxx:74
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:178
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: UnoGraphic.cxx:84
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:225
Type
unsigned char sal_Bool
signed char sal_Int8