LibreOffice Module sw (master)  1
cfgitems.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 #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 
28 class SwModule;
29 #ifdef DBG_UTIL
30 class SwTestTabPage;
31 #endif
33 class SfxPrinter;
34 class SwViewShell;
35 class SwViewOption;
36 class SwContentOptPage;
38 enum class SwFillMode;
39 
42 {
44  friend class SwModule;
45 
46  bool m_bParagraphEnd :1;
47  bool m_bTab :1;
48  bool m_bSpace :1;
49  bool m_bNonbreakingSpace :1;
50  bool m_bSoftHyphen :1;
51  bool m_bCharHiddenText :1;
52  bool m_bBookmarks :1;
53  bool m_bManualBreak :1;
54 
55 public:
57  SwDocDisplayItem( const SwViewOption& rVOpt );
58 
59  virtual SwDocDisplayItem* Clone( SfxItemPool *pPool = nullptr ) const override;
60  virtual bool operator==( const SfxPoolItem& ) const override;
61  void FillViewOptions( SwViewOption& rVOpt) const;
62 };
63 
64 // OS 12.01.95
65 // Item for settings dialog, element page
67 {
68  //view
69  bool m_bVertRuler :1;
70  bool m_bVertRulerRight:1;
71  bool m_bSmoothScroll :1;
72  //visual aids
73  bool m_bCrosshair :1;
74  //display
75  bool m_bTable :1;
76  bool m_bGraphic :1;
77  bool m_bDrawing :1;
78  bool m_bNotes :1;
79  bool m_bShowInlineTooltips :1;
80  bool m_bShowOutlineContentVisibilityButton :1;
81  bool m_bShowChangesInMargin :1;
82  bool m_bFieldHiddenText :1;
83  bool m_bShowHiddenPara :1;
84 
85  friend class SwContentOptPage;
86 
87 public:
88  SwElemItem();
89  SwElemItem(const SwViewOption& rVOpt);
90 
91  virtual SwElemItem* Clone( SfxItemPool *pPool = nullptr ) const override;
92  virtual bool operator==( const SfxPoolItem& ) const override;
93 
94  void FillViewOptions( SwViewOption& rVOpt) const;
95 
96 };
97 
98 // OS 12.01.95
99 // Item for settings dialog - printer/add-ons
101 {
102  using SwPrintData::operator ==;
103 
104 public:
106  SwAddPrinterItem( const SwPrintData& rPrtData );
107 
108  virtual SwAddPrinterItem* Clone( SfxItemPool *pPool = nullptr ) const override;
109 
110  virtual bool operator==( const SfxPoolItem& ) const override;
111 };
112 
115 {
117  bool m_bOn;
118 public:
120  SwShadowCursorItem( const SwViewOption& rVOpt );
121 
122  virtual SwShadowCursorItem* Clone( SfxItemPool *pPool = nullptr ) const override;
123  virtual bool operator==( const SfxPoolItem& ) const override;
124 
125  void FillViewOptions( SwViewOption& rVOpt) const;
126 
127  SwFillMode GetMode() const { return m_eMode; }
128  bool IsOn() const { return m_bOn; }
129 
130  void SetMode( SwFillMode eM ) { m_eMode = eM; }
131  void SetOn( bool bFlag ) { m_bOn = bFlag; }
132 };
133 
134 #ifdef DBG_UTIL
135 
136 // Item for settings dialog - test settings
138 {
139  friend class SwModule;
140  friend class SwTestTabPage;
141 
142  bool m_bTest1:1;
143  bool m_bTest2:1;
144  bool m_bTest3:1;
145  bool m_bTest4:1;
146  bool m_bTest5:1;
147  bool m_bTest6:1;
148  bool m_bTest7:1;
149  bool m_bTest8:1;
150  bool m_bTest9:1;
151  bool m_bTest10:1;
152 
153 public:
155 
156  virtual SwTestItem* Clone( SfxItemPool *pPool = nullptr ) const override;
157  virtual bool operator==( const SfxPoolItem& ) const override;
158 
159 };
160 #endif
161 
162 #endif
163 
164 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool operator==(const SfxPoolItem &) const =0
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
void SetOn(bool bFlag)
Definition: cfgitems.hxx:131
SfxItemPool * pPool
Item for settings dialog, ShadowCursorPage.
Definition: cfgitems.hxx:114
SwFillMode
Definition: crstate.hxx:28
SwFillMode GetMode() const
Definition: cfgitems.hxx:127
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
Item for settings dialog - document view.
Definition: cfgitems.hxx:41
bool IsOn() const
Definition: cfgitems.hxx:128
void SetMode(SwFillMode eM)
Definition: cfgitems.hxx:130
#define FN_PARAM_SWTEST
Definition: cmdid.h:766
SwFillMode m_eMode
Definition: cfgitems.hxx:116