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 <tools/color.hxx>
23 #include <svl/poolitem.hxx>
24 #include <swdllapi.h>
25 #include <printdata.hxx>
26 
27 #include <cmdid.h>
28 
29 class SwModule;
30 #ifdef DBG_UTIL
31 class SwTestTabPage;
32 #endif
34 class SfxPrinter;
35 class SwViewShell;
36 class SwViewOption;
37 class SwContentOptPage;
39 
40 // OS 12.01.95
41 // Item for settings dialog - document view
43 {
45  friend class SwModule;
46 
47  bool bParagraphEnd :1;
48  bool bTab :1;
49  bool bSpace :1;
50  bool bNonbreakingSpace :1;
51  bool bSoftHyphen :1;
52  bool bCharHiddenText :1;
53  bool bManualBreak :1;
54 
55 public:
57  SwDocDisplayItem( const SwViewOption& rVOpt );
58 
59  virtual SfxPoolItem* 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 bVertRuler :1;
70  bool bVertRulerRight:1;
71  bool bSmoothScroll :1;
72  //visual aids
73  bool bCrosshair :1;
74  //display
75  bool bTable :1;
76  bool bGraphic :1;
77  bool bDrawing :1;
78  bool bFieldName :1;
79  bool bNotes :1;
80  bool bShowInlineTooltips :1;
81  bool bFieldHiddenText :1;
82  bool bShowHiddenPara :1;
83 
84  friend class SwContentOptPage;
85 
86 public:
87  SwElemItem();
88  SwElemItem(const SwViewOption& rVOpt);
89 
90  virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
91  virtual bool operator==( const SfxPoolItem& ) const override;
92 
93  void FillViewOptions( SwViewOption& rVOpt) const;
94 
95 };
96 
97 // OS 12.01.95
98 // Item for settings dialog - printer/add-ons
100 {
101  friend class SwAddPrinterTabPage;
102 
103  using SwPrintData::operator ==;
104 
105 public:
107  SwAddPrinterItem( const SwPrintData& rPrtData );
108 
109  virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
110 
111  virtual bool operator==( const SfxPoolItem& ) const override;
112 
113  const OUString &GetFax() const { return m_sFaxName; }
114 };
115 
116 // Item for settings dialog, ShadowCursorPage
118 {
120  bool bOn;
121 public:
123  SwShadowCursorItem( const SwViewOption& rVOpt );
124 
125  virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
126  virtual bool operator==( const SfxPoolItem& ) const override;
127 
128  void FillViewOptions( SwViewOption& rVOpt) const;
129 
130  sal_uInt8 GetMode() const { return eMode; }
131  bool IsOn() const { return bOn; }
132 
133  void SetMode( sal_uInt8 eM ) { eMode = eM; }
134  void SetOn( bool bFlag ) { bOn = bFlag; }
135 };
136 
137 #ifdef DBG_UTIL
138 
139 // OS 12.01.95
140 // Item for settings dialog - test settings
142 {
143  friend class SwModule;
144  friend class SwTestTabPage;
145 
146  bool bTest1:1;
147  bool bTest2:1;
148  bool bTest3:1;
149  bool bTest4:1;
150  bool bTest5:1;
151  bool bTest6:1;
152  bool bTest7:1;
153  bool bTest8:1;
154  bool bTest9:1;
155  bool bTest10:1;
156 
157 public:
159 
160  virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
161  virtual bool operator==( const SfxPoolItem& ) const override;
162 
163 };
164 #endif
165 
166 #endif
167 
168 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const OUString & GetFax() const
Definition: cfgitems.hxx:113
OUString m_sFaxName
Definition: printdata.hxx:69
virtual bool operator==(const SfxPoolItem &) const =0
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
sal_uInt8 GetMode() const
Definition: cfgitems.hxx:130
void SetOn(bool bFlag)
Definition: cfgitems.hxx:134
SfxItemPool * pPool
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
unsigned char sal_uInt8
bool IsOn() const
Definition: cfgitems.hxx:131
#define FN_PARAM_SWTEST
Definition: cmdid.h:736
void SetMode(sal_uInt8 eM)
Definition: cfgitems.hxx:133