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 
39 // OS 12.01.95
40 // Item for settings dialog - document view
42 {
44  friend class SwModule;
45 
46  bool bParagraphEnd :1;
47  bool bTab :1;
48  bool bSpace :1;
49  bool bNonbreakingSpace :1;
50  bool bSoftHyphen :1;
51  bool bCharHiddenText :1;
52  bool bManualBreak :1;
53 
54 public:
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
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_bFieldHiddenText :1;
80  bool m_bShowHiddenPara :1;
81 
82  friend class SwContentOptPage;
83 
84 public:
85  SwElemItem();
86  SwElemItem(const SwViewOption& rVOpt);
87 
88  virtual SwElemItem* Clone( SfxItemPool *pPool = nullptr ) const override;
89  virtual bool operator==( const SfxPoolItem& ) const override;
90 
91  void FillViewOptions( SwViewOption& rVOpt) const;
92 
93 };
94 
95 // OS 12.01.95
96 // Item for settings dialog - printer/add-ons
98 {
99  using SwPrintData::operator ==;
100 
101 public:
103  SwAddPrinterItem( const SwPrintData& rPrtData );
104 
105  virtual SwAddPrinterItem* Clone( SfxItemPool *pPool = nullptr ) const override;
106 
107  virtual bool operator==( const SfxPoolItem& ) const override;
108 };
109 
110 // Item for settings dialog, ShadowCursorPage
112 {
114  bool bOn;
115 public:
117  SwShadowCursorItem( const SwViewOption& rVOpt );
118 
119  virtual SwShadowCursorItem* Clone( SfxItemPool *pPool = nullptr ) const override;
120  virtual bool operator==( const SfxPoolItem& ) const override;
121 
122  void FillViewOptions( SwViewOption& rVOpt) const;
123 
124  sal_uInt8 GetMode() const { return eMode; }
125  bool IsOn() const { return bOn; }
126 
127  void SetMode( sal_uInt8 eM ) { eMode = eM; }
128  void SetOn( bool bFlag ) { bOn = bFlag; }
129 };
130 
131 #ifdef DBG_UTIL
132 
133 // Item for settings dialog - test settings
135 {
136  friend class SwModule;
137  friend class SwTestTabPage;
138 
139  bool m_bTest1:1;
140  bool m_bTest2:1;
141  bool m_bTest3:1;
142  bool m_bTest4:1;
143  bool m_bTest5:1;
144  bool m_bTest6:1;
145  bool m_bTest7:1;
146  bool m_bTest8:1;
147  bool m_bTest9:1;
148  bool m_bTest10:1;
149 
150 public:
152 
153  virtual SwTestItem* Clone( SfxItemPool *pPool = nullptr ) const override;
154  virtual bool operator==( const SfxPoolItem& ) const override;
155 
156 };
157 #endif
158 
159 #endif
160 
161 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool operator==(const SfxPoolItem &) const =0
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
sal_uInt8 GetMode() const
Definition: cfgitems.hxx:124
void SetOn(bool bFlag)
Definition: cfgitems.hxx:128
SfxItemPool * pPool
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
unsigned char sal_uInt8
bool IsOn() const
Definition: cfgitems.hxx:125
#define FN_PARAM_SWTEST
Definition: cmdid.h:753
void SetMode(sal_uInt8 eM)
Definition: cfgitems.hxx:127