Coverage Report

Created: 2026-03-31 11:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sw/source/uibase/inc/cfgitems.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
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_CFGITEMS_HXX
20
#define INCLUDED_SW_SOURCE_UIBASE_INC_CFGITEMS_HXX
21
22
#include <svl/poolitem.hxx>
23
#include <swdllapi.h>
24
#include <printdata.hxx>
25
26
#include <cmdid.h>
27
#include <sfx2/zoomitem.hxx>
28
29
class SwViewOption;
30
enum class SwFillMode;
31
32
/// Item for settings dialog - document view
33
class SW_DLLPUBLIC SwDocDisplayItem final : public SfxPoolItem
34
{
35
    friend class SwShdwCursorOptionsTabPage;
36
    friend class SwModule;
37
38
    bool m_bParagraphEnd      :1;
39
    bool m_bTab               :1;
40
    bool m_bSpace             :1;
41
    bool m_bNonbreakingSpace  :1;
42
    bool m_bSoftHyphen        :1;
43
    bool m_bCharHiddenText    :1;
44
    bool m_bBookmarks         :1;
45
    bool m_bManualBreak       :1;
46
    bool m_bTextBoundariesFull :1;
47
    bool m_bTextBoundaries    :1;
48
    bool m_bSectionBoundaries :1;
49
    bool m_bTableBoundaries   :1;
50
51
    sal_Int32 m_xDefaultAnchor;
52
53
public:
54
                                DECLARE_ITEM_TYPE_FUNCTION(SwDocDisplayItem)
55
                                SwDocDisplayItem();
56
                                SwDocDisplayItem( const SwViewOption& rVOpt );
57
58
    virtual SwDocDisplayItem*   Clone( SfxItemPool *pPool = nullptr ) const override;
59
    virtual bool                operator==( const SfxPoolItem& ) const override;
60
    void                        FillViewOptions( SwViewOption& rVOpt) const;
61
};
62
63
// OS 12.01.95
64
// Item for settings dialog, element page
65
class SW_DLLPUBLIC SwElemItem final : public SfxPoolItem
66
{
67
    //view
68
    bool m_bVertRuler     :1;
69
    bool m_bVertRulerRight:1;
70
    bool m_bSmoothScroll  :1;
71
    //visual aids
72
    bool m_bCrosshair     :1;
73
    //display
74
    bool m_bTable             :1;
75
    bool m_bGraphic           :1;
76
    bool m_bDrawing           :1;
77
    bool m_bNotes             :1;
78
    bool m_bShowInlineTooltips :1;
79
    bool m_bShowOutlineContentVisibilityButton :1;
80
    bool m_bTreatSubOutlineLevelsAsContent :1;
81
    bool m_bShowChangesInMargin :1;
82
    bool m_bFieldHiddenText   :1;
83
    bool m_bShowHiddenPara    :1;
84
    bool m_bDefaultZoom       :1;
85
    SvxZoomType m_eDefaultZoomType;
86
    sal_uInt16  m_nDefaultZoomValue;
87
88
    friend class SwContentOptPage;
89
90
public:
91
                            DECLARE_ITEM_TYPE_FUNCTION(SwElemItem)
92
                            SwElemItem();
93
                            SwElemItem(const SwViewOption& rVOpt);
94
95
    virtual SwElemItem*     Clone( SfxItemPool *pPool = nullptr ) const override;
96
    virtual bool            operator==( const SfxPoolItem& ) const override;
97
98
    void                    FillViewOptions( SwViewOption& rVOpt) const;
99
100
0
    bool IsDefaultZoom() const {return m_bDefaultZoom; }
101
0
    void SetDefaultZoom(bool bSet) { m_bDefaultZoom = bSet; }
102
103
0
    SvxZoomType GetDefaultZoomType() const { return m_eDefaultZoomType; }
104
0
    void SetDefaultZoomType(SvxZoomType eType) { m_eDefaultZoomType = eType; }
105
106
0
    sal_uInt16  GetDefaultZoomValue() const { return m_nDefaultZoomValue;}
107
0
    void SetDefaultZoomValue(sal_Int16 nValue){ m_nDefaultZoomValue = nValue; }
108
109
};
110
111
// OS 12.01.95
112
// Item for settings dialog - printer/add-ons
113
class SW_DLLPUBLIC SwAddPrinterItem final : public SfxPoolItem, public SwPrintData
114
{
115
    using  SwPrintData::operator ==;
116
117
public:
118
    DECLARE_ITEM_TYPE_FUNCTION(SwAddPrinterItem)
119
    SwAddPrinterItem();
120
    SwAddPrinterItem( const SwPrintData& rPrtData );
121
122
    virtual SwAddPrinterItem* Clone( SfxItemPool *pPool = nullptr ) const override;
123
124
    virtual bool         operator==( const SfxPoolItem& ) const override;
125
};
126
127
/// Item for settings dialog, ShadowCursorPage
128
class SW_DLLPUBLIC SwShadowCursorItem final : public SfxPoolItem
129
{
130
    SwFillMode m_eMode;
131
    bool m_bOn;
132
public:
133
    DECLARE_ITEM_TYPE_FUNCTION(SwShadowCursorItem)
134
    SwShadowCursorItem();
135
    SwShadowCursorItem( const SwViewOption& rVOpt );
136
137
    virtual SwShadowCursorItem* Clone( SfxItemPool *pPool = nullptr ) const override;
138
    virtual bool            operator==( const SfxPoolItem& ) const override;
139
140
    void FillViewOptions( SwViewOption& rVOpt) const;
141
142
0
    SwFillMode GetMode() const          { return m_eMode; }
143
0
    bool IsOn() const                   { return m_bOn; }
144
145
0
    void SetMode( SwFillMode eM )       { m_eMode = eM; }
146
0
    void SetOn( bool bFlag )            { m_bOn = bFlag; }
147
};
148
149
class SW_DLLPUBLIC SwFmtAidsAutoComplItem final : public SfxPoolItem
150
{
151
    friend class SwShdwCursorOptionsTabPage;
152
    friend class SwModule;
153
154
    bool m_bEncloseWithCharactersOn;
155
156
public:
157
    DECLARE_ITEM_TYPE_FUNCTION(SwFmtAidsAutoComplItem)
158
    SwFmtAidsAutoComplItem();
159
    SwFmtAidsAutoComplItem(const SwViewOption& rVOpt);
160
161
    virtual SwFmtAidsAutoComplItem* Clone(SfxItemPool* pPool = nullptr) const override;
162
    virtual bool operator==(const SfxPoolItem&) const override;
163
164
0
    bool IsEncloseWithCharactersOn() const { return m_bEncloseWithCharactersOn; }
165
166
0
    void SetEncloseWithCharactersOn(bool bFlag) { m_bEncloseWithCharactersOn = bFlag; }
167
};
168
169
#ifdef DBG_UTIL
170
171
// Item for settings dialog - test settings
172
class SW_DLLPUBLIC SwTestItem final : public SfxPoolItem
173
{
174
    friend class SwModule;
175
    friend class SwTestTabPage;
176
177
    bool    m_bTest1:1;
178
    bool    m_bTest2:1;
179
    bool    m_bTest3:1;
180
    bool    m_bTest4:1;
181
    bool    m_bTest5:1;
182
    bool    m_bTest6:1;
183
    bool    m_bTest7:1;
184
    bool    m_bTest8:1;
185
    bool    m_bTest9:1;
186
    bool    m_bTest10:1;
187
188
public:
189
                            DECLARE_ITEM_TYPE_FUNCTION(SwTestItem)
190
                            SwTestItem() : SfxPoolItem(FN_PARAM_SWTEST) {};
191
192
    virtual SwTestItem*     Clone( SfxItemPool *pPool = nullptr ) const override;
193
    virtual bool            operator==( const SfxPoolItem& ) const override;
194
195
};
196
#endif
197
198
#endif
199
200
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */