Coverage Report

Created: 2026-02-14 09:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/canvas/inc/base/integerbitmapbase.hxx
Line
Count
Source
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
#pragma once
21
22
#include <com/sun/star/rendering/IntegerBitmapLayout.hpp>
23
#include <verifyinput.hxx>
24
25
26
namespace canvas
27
{
28
    /** Helper template to handle XIntegerBitmap method forwarding to
29
        BitmapCanvasHelper
30
31
        Use this helper to handle the XIntegerBitmap part of your
32
        implementation.
33
34
        @tpl Base
35
        Either BitmapCanvasBase (just XBitmap) or BitmapCanvasBase2 (XBitmap and
36
        XBitmapCanvas).
37
     */
38
    template< class Base > class IntegerBitmapBase :
39
        public Base
40
    {
41
    public:
42
        // XIntegerBitmap
43
        virtual css::uno::Sequence< sal_Int8 > SAL_CALL getData( css::rendering::IntegerBitmapLayout&     bitmapLayout,
44
                                                                              const css::geometry::IntegerRectangle2D& rect ) override
45
0
        {
46
0
            canvastools::verifyArgs(rect,
47
0
                              __func__,
48
0
                              static_cast< typename Base::UnambiguousBaseType* >(this));
49
0
            canvastools::verifyIndexRange(rect, Base::getSize() );
50
51
0
            typename Base::MutexType aGuard( Base::m_aMutex );
52
53
0
            return Base::maCanvasHelper.getData( bitmapLayout,
54
0
                                                     rect );
55
0
        }
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<canvas::GraphicDeviceBase<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper<com::sun::star::rendering::XBitmapCanvas, com::sun::star::rendering::XIntegerBitmap, com::sun::star::rendering::XGraphicDevice, com::sun::star::lang::XMultiServiceFactory, com::sun::star::util::XUpdatable, com::sun::star::beans::XPropertySet, com::sun::star::lang::XServiceName, com::sun::star::lang::XServiceInfo> >, vclcanvas::DeviceHelper, vclcanvastools::LocalGuard, cppu::OWeakObject>, vclcanvas::CanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getData(com::sun::star::rendering::IntegerBitmapLayout&, com::sun::star::geometry::IntegerRectangle2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase<vclcanvas::SpriteCanvasBaseSpriteSurface_Base, vclcanvas::SpriteCanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getData(com::sun::star::rendering::IntegerBitmapLayout&, com::sun::star::geometry::IntegerRectangle2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper<com::sun::star::rendering::XBitmapCanvas, com::sun::star::rendering::XIntegerBitmap, com::sun::star::lang::XServiceInfo, com::sun::star::beans::XFastPropertySet> >, vclcanvas::CanvasBitmapHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getData(com::sun::star::rendering::IntegerBitmapLayout&, com::sun::star::geometry::IntegerRectangle2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<vclcanvas::CanvasCustomSpriteSpriteBase_Base, vclcanvas::CanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getData(com::sun::star::rendering::IntegerBitmapLayout&, com::sun::star::geometry::IntegerRectangle2D const&)
56
57
        virtual void SAL_CALL setData( const css::uno::Sequence< sal_Int8 >&,
58
                                       const css::rendering::IntegerBitmapLayout& bitmapLayout,
59
                                       const css::geometry::IntegerRectangle2D&   rect ) override
60
0
        {
61
0
            canvastools::verifyArgs(bitmapLayout, rect,
62
0
                              __func__,
63
0
                              static_cast< typename Base::UnambiguousBaseType* >(this));
64
0
            canvastools::verifyIndexRange(rect, Base::getSize() );
65
66
0
            typename Base::MutexType aGuard( Base::m_aMutex );
67
68
0
            Base::mbSurfaceDirty = true;
69
0
        }
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<canvas::GraphicDeviceBase<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper<com::sun::star::rendering::XBitmapCanvas, com::sun::star::rendering::XIntegerBitmap, com::sun::star::rendering::XGraphicDevice, com::sun::star::lang::XMultiServiceFactory, com::sun::star::util::XUpdatable, com::sun::star::beans::XPropertySet, com::sun::star::lang::XServiceName, com::sun::star::lang::XServiceInfo> >, vclcanvas::DeviceHelper, vclcanvastools::LocalGuard, cppu::OWeakObject>, vclcanvas::CanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::setData(com::sun::star::uno::Sequence<signed char> const&, com::sun::star::rendering::IntegerBitmapLayout const&, com::sun::star::geometry::IntegerRectangle2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase<vclcanvas::SpriteCanvasBaseSpriteSurface_Base, vclcanvas::SpriteCanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::setData(com::sun::star::uno::Sequence<signed char> const&, com::sun::star::rendering::IntegerBitmapLayout const&, com::sun::star::geometry::IntegerRectangle2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper<com::sun::star::rendering::XBitmapCanvas, com::sun::star::rendering::XIntegerBitmap, com::sun::star::lang::XServiceInfo, com::sun::star::beans::XFastPropertySet> >, vclcanvas::CanvasBitmapHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::setData(com::sun::star::uno::Sequence<signed char> const&, com::sun::star::rendering::IntegerBitmapLayout const&, com::sun::star::geometry::IntegerRectangle2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<vclcanvas::CanvasCustomSpriteSpriteBase_Base, vclcanvas::CanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::setData(com::sun::star::uno::Sequence<signed char> const&, com::sun::star::rendering::IntegerBitmapLayout const&, com::sun::star::geometry::IntegerRectangle2D const&)
70
71
        virtual void SAL_CALL setPixel( const css::uno::Sequence< sal_Int8 >&,
72
                                        const css::rendering::IntegerBitmapLayout& bitmapLayout,
73
                                        const css::geometry::IntegerPoint2D&       pos ) override
74
0
        {
75
0
            canvastools::verifyArgs(bitmapLayout, pos,
76
0
                              __func__,
77
0
                              static_cast< typename Base::UnambiguousBaseType* >(this));
78
0
            canvastools::verifyIndexRange(pos, Base::getSize() );
79
80
0
            typename Base::MutexType aGuard( Base::m_aMutex );
81
82
0
            Base::mbSurfaceDirty = true;
83
0
        }
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<canvas::GraphicDeviceBase<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper<com::sun::star::rendering::XBitmapCanvas, com::sun::star::rendering::XIntegerBitmap, com::sun::star::rendering::XGraphicDevice, com::sun::star::lang::XMultiServiceFactory, com::sun::star::util::XUpdatable, com::sun::star::beans::XPropertySet, com::sun::star::lang::XServiceName, com::sun::star::lang::XServiceInfo> >, vclcanvas::DeviceHelper, vclcanvastools::LocalGuard, cppu::OWeakObject>, vclcanvas::CanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::setPixel(com::sun::star::uno::Sequence<signed char> const&, com::sun::star::rendering::IntegerBitmapLayout const&, com::sun::star::geometry::IntegerPoint2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase<vclcanvas::SpriteCanvasBaseSpriteSurface_Base, vclcanvas::SpriteCanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::setPixel(com::sun::star::uno::Sequence<signed char> const&, com::sun::star::rendering::IntegerBitmapLayout const&, com::sun::star::geometry::IntegerPoint2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper<com::sun::star::rendering::XBitmapCanvas, com::sun::star::rendering::XIntegerBitmap, com::sun::star::lang::XServiceInfo, com::sun::star::beans::XFastPropertySet> >, vclcanvas::CanvasBitmapHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::setPixel(com::sun::star::uno::Sequence<signed char> const&, com::sun::star::rendering::IntegerBitmapLayout const&, com::sun::star::geometry::IntegerPoint2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<vclcanvas::CanvasCustomSpriteSpriteBase_Base, vclcanvas::CanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::setPixel(com::sun::star::uno::Sequence<signed char> const&, com::sun::star::rendering::IntegerBitmapLayout const&, com::sun::star::geometry::IntegerPoint2D const&)
84
85
        virtual css::uno::Sequence< sal_Int8 > SAL_CALL getPixel( css::rendering::IntegerBitmapLayout& bitmapLayout,
86
                                                                  const css::geometry::IntegerPoint2D& pos ) override
87
0
        {
88
0
            canvastools::verifyArgs(pos,
89
0
                              __func__,
90
0
                              static_cast< typename Base::UnambiguousBaseType* >(this));
91
0
            canvastools::verifyIndexRange(pos, Base::getSize() );
92
93
0
            typename Base::MutexType aGuard( Base::m_aMutex );
94
95
0
            return Base::maCanvasHelper.getPixel( bitmapLayout,
96
0
                                                      pos );
97
0
        }
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<canvas::GraphicDeviceBase<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper<com::sun::star::rendering::XBitmapCanvas, com::sun::star::rendering::XIntegerBitmap, com::sun::star::rendering::XGraphicDevice, com::sun::star::lang::XMultiServiceFactory, com::sun::star::util::XUpdatable, com::sun::star::beans::XPropertySet, com::sun::star::lang::XServiceName, com::sun::star::lang::XServiceInfo> >, vclcanvas::DeviceHelper, vclcanvastools::LocalGuard, cppu::OWeakObject>, vclcanvas::CanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getPixel(com::sun::star::rendering::IntegerBitmapLayout&, com::sun::star::geometry::IntegerPoint2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase<vclcanvas::SpriteCanvasBaseSpriteSurface_Base, vclcanvas::SpriteCanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getPixel(com::sun::star::rendering::IntegerBitmapLayout&, com::sun::star::geometry::IntegerPoint2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper<com::sun::star::rendering::XBitmapCanvas, com::sun::star::rendering::XIntegerBitmap, com::sun::star::lang::XServiceInfo, com::sun::star::beans::XFastPropertySet> >, vclcanvas::CanvasBitmapHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getPixel(com::sun::star::rendering::IntegerBitmapLayout&, com::sun::star::geometry::IntegerPoint2D const&)
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<vclcanvas::CanvasCustomSpriteSpriteBase_Base, vclcanvas::CanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getPixel(com::sun::star::rendering::IntegerBitmapLayout&, com::sun::star::geometry::IntegerPoint2D const&)
98
99
        virtual css::rendering::IntegerBitmapLayout SAL_CALL getMemoryLayout(  ) override
100
0
        {
101
0
            typename Base::MutexType aGuard( Base::m_aMutex );
102
103
0
            return Base::maCanvasHelper.getMemoryLayout();
104
0
        }
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<canvas::GraphicDeviceBase<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper<com::sun::star::rendering::XBitmapCanvas, com::sun::star::rendering::XIntegerBitmap, com::sun::star::rendering::XGraphicDevice, com::sun::star::lang::XMultiServiceFactory, com::sun::star::util::XUpdatable, com::sun::star::beans::XPropertySet, com::sun::star::lang::XServiceName, com::sun::star::lang::XServiceInfo> >, vclcanvas::DeviceHelper, vclcanvastools::LocalGuard, cppu::OWeakObject>, vclcanvas::CanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getMemoryLayout()
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase<vclcanvas::SpriteCanvasBaseSpriteSurface_Base, vclcanvas::SpriteCanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getMemoryLayout()
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<canvas::BaseMutexHelper<cppu::WeakComponentImplHelper<com::sun::star::rendering::XBitmapCanvas, com::sun::star::rendering::XIntegerBitmap, com::sun::star::lang::XServiceInfo, com::sun::star::beans::XFastPropertySet> >, vclcanvas::CanvasBitmapHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getMemoryLayout()
Unexecuted instantiation: canvas::IntegerBitmapBase<canvas::BitmapCanvasBase2<vclcanvas::CanvasCustomSpriteSpriteBase_Base, vclcanvas::CanvasHelper, vclcanvastools::LocalGuard, cppu::OWeakObject> >::getMemoryLayout()
105
    };
106
}
107
108
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */