Branch data Line data Source code
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 : : #include <svx/sdr/contact/displayinfo.hxx>
21 : : #include <vcl/outdev.hxx>
22 : : #include <vcl/svapp.hxx>
23 : : #include <svx/svdobj.hxx>
24 : : #include <vcl/gdimtf.hxx>
25 : : #include <svx/svdpagv.hxx>
26 : : #include <svx/svdview.hxx>
27 : :
28 : : //////////////////////////////////////////////////////////////////////////////
29 : :
30 : : namespace sdr
31 : : {
32 : : namespace contact
33 : : {
34 : 61235 : DisplayInfo::DisplayInfo()
35 : : : maProcessLayers(true), // init layer info with all bits set to draw everything on default
36 : : maRedrawArea(),
37 : : mbControlLayerProcessingActive(false),
38 : : mbPageProcessingActive(true),
39 : : mbGhostedDrawModeActive(false),
40 : 61235 : mbSubContentActive(false)
41 : : {
42 : 61235 : }
43 : :
44 : 61235 : DisplayInfo::~DisplayInfo()
45 : : {
46 [ - + ]: 61235 : }
47 : :
48 : : // Access to LayerInfos (which layers to proccess)
49 : 50698 : void DisplayInfo::SetProcessLayers(const SetOfByte& rSet)
50 : : {
51 : 50698 : maProcessLayers = rSet;
52 : 50698 : }
53 : :
54 : : // access to RedrawArea
55 : 45734 : void DisplayInfo::SetRedrawArea(const Region& rRegion)
56 : : {
57 : 45734 : maRedrawArea = rRegion;
58 : 45734 : }
59 : :
60 : 43512 : void DisplayInfo::SetControlLayerProcessingActive(bool bDoProcess)
61 : : {
62 [ + + ]: 43512 : if((bool)mbControlLayerProcessingActive != bDoProcess)
63 : : {
64 : 15999 : mbControlLayerProcessingActive = bDoProcess;
65 : : }
66 : 43512 : }
67 : :
68 : 45734 : void DisplayInfo::SetPageProcessingActive(bool bDoProcess)
69 : : {
70 [ + + ]: 45734 : if((bool)mbPageProcessingActive != bDoProcess)
71 : : {
72 : 43512 : mbPageProcessingActive = bDoProcess;
73 : : }
74 : 45734 : }
75 : :
76 : 97529 : void DisplayInfo::ClearGhostedDrawMode()
77 : : {
78 : 97529 : mbGhostedDrawModeActive = false;
79 : 97529 : }
80 : :
81 : 91468 : void DisplayInfo::SetGhostedDrawMode()
82 : : {
83 : 91468 : mbGhostedDrawModeActive = true;
84 : 91468 : }
85 : :
86 : 4964 : void DisplayInfo::SetSubContentActive(bool bNew)
87 : : {
88 [ + - ]: 4964 : if((bool)mbSubContentActive != bNew)
89 : : {
90 : 4964 : mbSubContentActive = bNew;
91 : : }
92 : 4964 : }
93 : :
94 : : } // end of namespace contact
95 : : } // end of namespace sdr
96 : :
97 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|