Coverage Report

Created: 2025-12-31 10:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/svx/sdr/contact/displayinfo.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
#ifndef INCLUDED_SVX_SDR_CONTACT_DISPLAYINFO_HXX
21
#define INCLUDED_SVX_SDR_CONTACT_DISPLAYINFO_HXX
22
23
#include <svx/svdsob.hxx>
24
#include <vcl/region.hxx>
25
#include <svx/svxdllapi.h>
26
#include <basegfx/range/b2irectangle.hxx>
27
28
namespace sdr::contact
29
    {
30
        class SVXCORE_DLLPUBLIC DisplayInfo final
31
        {
32
            // The Layers which shall be processed (visible)
33
            SdrLayerIDSet                                       maProcessLayers;
34
35
            // The redraw area, in logical coordinates of OutputDevice. If Region
36
            // is empty, everything needs to be redrawn
37
            vcl::Region                                          maRedrawArea;
38
39
            /// only for Writer: current page being painted
40
            basegfx::B2IRectangle m_WriterPageFrame;
41
42
            // Internal flag to know when the control layer is painted. Default is
43
            // false. If set to true, painting of the page, page borders and
44
            // the rasters will be suppressed as if mbPageProcessingActive is set (see there).
45
            // This flag is set internally from the processing mechanism to avoid double page
46
            // painting when the control layer needs to be painted as last layer
47
            bool                                            mbControlLayerProcessingActive : 1;
48
49
            // Internal flag to remember if EnteredGroupDrawMode is active. Default is true
50
            // since this mode starts activated and gets switched off when reaching
51
            // the current group level. Should only be changed by instances which do
52
            // primitive processing
53
            bool                                            mbGhostedDrawModeActive : 1;
54
55
            // Internal flag to know if a MasterPage is processed as SubContent of another
56
            // page. Initialized to false, this should only be changed from the instance which
57
            // is processing the MasterPage asSubContent and knows what it does
58
            bool                                            mbSubContentActive : 1;
59
60
        public:
61
            // basic constructor.
62
            DisplayInfo();
63
64
            // access to ProcessLayers
65
            void SetProcessLayers(const SdrLayerIDSet& rSet);
66
328k
            const SdrLayerIDSet& GetProcessLayers() const { return maProcessLayers; }
67
68
            // access to RedrawArea
69
            void SetRedrawArea(const vcl::Region& rRegion);
70
754k
            const vcl::Region& GetRedrawArea() const { return maRedrawArea; }
71
72
            void SetWriterPageFrame(basegfx::B2IRectangle const& rPageFrame);
73
46.5k
            basegfx::B2IRectangle const& GetWriterPageFrame() const { return m_WriterPageFrame; }
74
75
            // Access to ControlLayerProcessingActive flag
76
            void SetControlLayerProcessingActive(bool bDoPaint);
77
18.9k
            bool GetControlLayerProcessingActive() const { return mbControlLayerProcessingActive; }
78
79
            // Save the original DrawMode from outdev
80
            void ClearGhostedDrawMode();
81
            void SetGhostedDrawMode();
82
807
            bool IsGhostedDrawModeActive() const { return mbGhostedDrawModeActive; }
83
84
            // access to master page painting flag
85
45.4k
            bool GetSubContentActive() const { return mbSubContentActive; }
86
            void SetSubContentActive(bool bNew);
87
        };
88
89
} // end of namespace sdr::contact
90
91
92
#endif // INCLUDED_SVX_SDR_CONTACT_DISPLAYINFO_HXX
93
94
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */