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 
29 
30 #include <vcl/graph.hxx>
31 
32 namespace unographic {
33 
34 class Graphic final : public css::graphic::XGraphic,
35  public css::awt::XBitmap,
36  public css::lang::XUnoTunnel,
39 {
40 public:
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;
52 private:
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 
74 };
75 
76 }
77 
78 #endif
79 
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL getImplementationName() override
Definition: UnoGraphic.cxx:85
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: UnoGraphic.cxx:90
virtual void SAL_CALL acquire() noexcept override
Definition: UnoGraphic.cxx:74
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: UnoGraphic.cxx:95
virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getDIB() override
Definition: UnoGraphic.cxx:149
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rId) override
Definition: UnoGraphic.cxx:183
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: UnoGraphic.cxx:108
unsigned char sal_Bool
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: UnoGraphic.cxx:117
virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL getMaskDIB() override
Definition: UnoGraphic.cxx:166
virtual void SAL_CALL release() noexcept override
Definition: UnoGraphic.cxx:80
virtual ~Graphic() noexcept override
Definition: UnoGraphic.cxx:41
virtual css::awt::Size SAL_CALL getSize() override
Definition: UnoGraphic.cxx:137
void init(const ::Graphic &rGraphic)
Definition: UnoGraphic.cxx:45
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: UnoGraphic.cxx:66
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
Definition: UnoGraphic.cxx:51
virtual ::sal_Int8 SAL_CALL getType() override
Definition: UnoGraphic.cxx:122