xref: /aoo41x/main/sw/source/ui/inc/cfgitems.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _CFGITEMS_HXX
24 #define _CFGITEMS_HXX
25 
26 #include <tools/color.hxx>
27 #include <svl/poolitem.hxx>
28 #include "swdllapi.h"
29 #include <printdata.hxx>
30 
31 #include <cmdid.h>
32 
33 class SwWriterApp;
34 class SwModule;
35 #ifdef DBG_UTIL
36 class SwTestTabPage;
37 #endif
38 class SwAddPrinterTabPage;
39 class SfxPrinter;
40 class ViewShell;
41 class SwViewOption;
42 class SwContentOptPage;
43 class SwShdwCrsrOptionsTabPage;
44 class SwDocEditDialog;
45 
46 SfxPrinter* GetPrt( ViewShell* );
47 void 		SetPrt( SfxPrinter* );
48 
49 
50 /*--------OS 12.01.95 -----------------------------------
51 Item fuer Einstellungsdialog - Dokumentanzeige
52 --------------------------------------------------------- */
53 class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem
54 {
55 	friend class SwWriterApp;
56     friend class SwShdwCrsrOptionsTabPage;
57     friend class SwModule;
58 
59     sal_Bool bParagraphEnd      :1;
60     sal_Bool bTab               :1;
61     sal_Bool bSpace             :1;
62     sal_Bool bNonbreakingSpace  :1;
63     sal_Bool bSoftHyphen        :1;
64     sal_Bool bCharHiddenText    :1;
65     sal_Bool bFldHiddenText     :1;
66     sal_Bool bManualBreak       :1;
67     sal_Bool bShowHiddenPara    :1;
68 
69 	Color aIndexBackgrndCol;
70 
71 
72 public:
73 								TYPEINFO();
74 								SwDocDisplayItem( sal_uInt16 nWhich = FN_PARAM_DOCDISP );
75 								SwDocDisplayItem(
76 									const SwDocDisplayItem& rSwDocDisplayItem );
77 								SwDocDisplayItem( const SwViewOption& rVOpt,
78 																sal_uInt16 nWhich );
79 
80 
81 	virtual SfxPoolItem*    	Clone( SfxItemPool *pPool = 0 ) const;
82 	virtual int             	operator==( const SfxPoolItem& ) const;
83 	void             			operator=( const SwDocDisplayItem& );
84 	void 						FillViewOptions( SwViewOption& rVOpt) const;
85 };
86 /*--------OS 12.01.95 -----------------------------------
87 Item fuer Einstellungsdialog, Elementeseite
88 --------------------------------------------------------- */
89 class SW_DLLPUBLIC SwElemItem : public SfxPoolItem
90 {
91     //view
92     sal_Bool bHorzScrollbar :1;
93 	sal_Bool bVertScrollbar	:1;
94     sal_Bool bAnyRuler : 1;
95     sal_Bool bHorzRuler     :1;
96 	sal_Bool bVertRuler		:1;
97     sal_Bool bVertRulerRight:1;
98     sal_Bool bSmoothScroll  :1;
99     //visual aids
100 	sal_Bool bCrosshair		:1;
101 	sal_Bool bHandles		:1;
102 	sal_Bool bBigHandles	:1;
103     //display
104     sal_Bool bTable             :1;
105 	sal_Bool bGraphic 			:1;
106 	sal_Bool bDrawing 			:1;
107 	sal_Bool bFieldName			:1;
108 	sal_Bool bNotes				:1;
109 
110     friend class SwContentOptPage;
111 
112 public:
113 							TYPEINFO();
114 							SwElemItem( sal_uInt16 nWhich = FN_PARAM_ELEM );
115 							SwElemItem(const SwElemItem& rElemItem);
116 							SwElemItem(const SwViewOption& rVOpt, sal_uInt16 nWhich);
117 
118 
119 	virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
120 	virtual int             operator==( const SfxPoolItem& ) const;
121 	void             		operator=( const SwElemItem& );
122 
123 	void 					FillViewOptions( SwViewOption& rVOpt) const;
124 
125 };
126 /*--------OS 12.01.95 -----------------------------------
127 Item fuer Einstellungsdialog - Drucker/Zusaetze
128 --------------------------------------------------------- */
129 
130 class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData
131 {
132 	friend class SwAddPrinterTabPage;
133 
134     using  SwPrintData::operator ==;
135 
136 public:
137 	TYPEINFO();
138 	SwAddPrinterItem( sal_uInt16 nWhich = FN_PARAM_ADDPRINTER );
139     SwAddPrinterItem( sal_uInt16 nWhich, const SwPrintData& rPrtData );
140 	SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem);
141 
142 	virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
143 
144 	virtual int          operator==( const SfxPoolItem& ) const;
145 
GetFax() const146     const rtl::OUString &GetFax() const              { return sFaxName; }
SetFax(const String & rFax)147 	void		  SetFax( const String& rFax) { sFaxName = rFax; }
148 
149 
IsPrintProspect() const150 	sal_Bool   IsPrintProspect() const      { return bPrintProspect; }
IsPrintProspectRTL() const151     sal_Bool   IsPrintProspectRTL() const      { return bPrintProspectRTL; }
SetPrintProspect(sal_Bool bFlag)152 	void   SetPrintProspect(sal_Bool bFlag ){ bPrintProspect = bFlag; }
SetPrintProspectRTL(sal_Bool bFlag)153     void   SetPrintProspectRTL(sal_Bool bFlag ){ bPrintProspectRTL = bFlag; }
IsPrintGraphic() const154 	sal_Bool IsPrintGraphic () const { return bPrintGraphic; }
IsPrintTable() const155 	sal_Bool IsPrintTable () const { return bPrintTable; }
IsPrintDraw() const156     sal_Bool IsPrintDraw () const { return bPrintDraw; }
IsPrintControl() const157 	sal_Bool IsPrintControl	() const { return bPrintControl; }
IsPrintLeftPage() const158     sal_Bool IsPrintLeftPage () const { return bPrintLeftPages; }
IsPrintRightPage() const159     sal_Bool IsPrintRightPage() const { return bPrintRightPages; }
IsPrintReverse() const160 	sal_Bool IsPrintReverse  () const { return bPrintReverse; }
IsPaperFromSetup() const161 	sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
IsPrintEmptyPages() const162     sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; }
IsPrintPageBackground() const163     sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
IsPrintBlackFont() const164 	sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; }
165     //#i81434# - printing of hidden text
IsPrintHiddenText() const166     sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; }
IsPrintTextPlaceholder() const167     sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; }
168 
IsPrintSingleJobs() const169 	sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; }
GetPrintPostIts() const170     sal_uLong GetPrintPostIts () const { return nPrintPostIts; }
171 
172 };
173 
174 
175 /*--------OS 12.01.95 -----------------------------------
176 Item fuer Einstellungsdialog, ShadowCursorSeite
177 --------------------------------------------------------- */
178 
179 class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem
180 {
181 	sal_uInt8 eMode;
182 	sal_Bool bOn;
183 public:
184 	TYPEINFO();
185 	SwShadowCursorItem( sal_uInt16 nWhich = FN_PARAM_SHADOWCURSOR );
186 	SwShadowCursorItem( const SwShadowCursorItem& rElemItem );
187 	SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 nWhich );
188 
189 
190 	virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
191 	virtual int             operator==( const SfxPoolItem& ) const;
192 	void             		operator=( const SwShadowCursorItem& );
193 
194 	void FillViewOptions( SwViewOption& rVOpt) const;
195 
GetMode() const196 	sal_uInt8 GetMode() const				{ return eMode; }
IsOn() const197 	sal_Bool IsOn() const					{ return bOn; }
198 
SetMode(sal_uInt8 eM)199 	void SetMode( sal_uInt8 eM ) 			{ eMode = eM; }
SetOn(sal_Bool bFlag)200 	void SetOn( sal_Bool bFlag ) 			{ bOn = bFlag; }
201 };
202 
203 #ifdef DBG_UTIL
204 /*--------OS 12.01.95 -----------------------------------
205 Item fuer Einstellungsdialog - Testeinstellungen
206 --------------------------------------------------------- */
207 class SW_DLLPUBLIC SwTestItem : public SfxPoolItem
208 {
209 	friend class SwModule;
210 	friend class SwWriterApp;
211 	friend class SwTestTabPage;
212 	friend class SwDocEditDialog;
213 
214 	sal_Bool	bTest1:1;
215 	sal_Bool	bTest2:1;
216 	sal_Bool	bTest3:1;
217 	sal_Bool	bTest4:1;
218 	sal_Bool	bTest5:1;
219 	sal_Bool	bTest6:1;
220 	sal_Bool	bTest7:1;
221 	sal_Bool	bTest8:1;
222 	sal_Bool    bTest9:1;
223 	sal_Bool    bTest10:1;
224 
225 public:
SwTestItem(sal_uInt16 _nWhich)226                             SwTestItem( sal_uInt16 _nWhich):
227                                             SfxPoolItem(_nWhich){};
228 							SwTestItem( const SwTestItem& pTestItem);
229 
230 	virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
231 	virtual int             operator==( const SfxPoolItem& ) const;
232 
233 };
234 #endif
235 
236 #endif
237 
238 
239