xref: /trunk/main/sw/source/ui/inc/cfgitems.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _CFGITEMS_HXX
28 #define _CFGITEMS_HXX
29 
30 #include <tools/color.hxx>
31 #include <svl/poolitem.hxx>
32 #include "swdllapi.h"
33 #include <printdata.hxx>
34 
35 #include <cmdid.h>
36 
37 class SwWriterApp;
38 class SwModule;
39 #ifdef DBG_UTIL
40 class SwTestTabPage;
41 #endif
42 class SwAddPrinterTabPage;
43 class SfxPrinter;
44 class ViewShell;
45 class SwViewOption;
46 class SwContentOptPage;
47 class SwShdwCrsrOptionsTabPage;
48 class SwDocEditDialog;
49 
50 SfxPrinter* GetPrt( ViewShell* );
51 void        SetPrt( SfxPrinter* );
52 
53 
54 /*--------OS 12.01.95 -----------------------------------
55 Item fuer Einstellungsdialog - Dokumentanzeige
56 --------------------------------------------------------- */
57 class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem
58 {
59     friend class SwWriterApp;
60     friend class SwShdwCrsrOptionsTabPage;
61     friend class SwModule;
62 
63     sal_Bool bParagraphEnd      :1;
64     sal_Bool bTab               :1;
65     sal_Bool bSpace             :1;
66     sal_Bool bNonbreakingSpace  :1;
67     sal_Bool bSoftHyphen        :1;
68     sal_Bool bCharHiddenText    :1;
69     sal_Bool bFldHiddenText     :1;
70     sal_Bool bManualBreak       :1;
71     sal_Bool bShowHiddenPara    :1;
72 
73     Color aIndexBackgrndCol;
74 
75 
76 public:
77                                 TYPEINFO();
78                                 SwDocDisplayItem( sal_uInt16 nWhich = FN_PARAM_DOCDISP );
79                                 SwDocDisplayItem(
80                                     const SwDocDisplayItem& rSwDocDisplayItem );
81                                 SwDocDisplayItem( const SwViewOption& rVOpt,
82                                                                 sal_uInt16 nWhich );
83 
84 
85     virtual SfxPoolItem*        Clone( SfxItemPool *pPool = 0 ) const;
86     virtual int                 operator==( const SfxPoolItem& ) const;
87     void                        operator=( const SwDocDisplayItem& );
88     void                        FillViewOptions( SwViewOption& rVOpt) const;
89 };
90 /*--------OS 12.01.95 -----------------------------------
91 Item fuer Einstellungsdialog, Elementeseite
92 --------------------------------------------------------- */
93 class SW_DLLPUBLIC SwElemItem : public SfxPoolItem
94 {
95     //view
96     sal_Bool bHorzScrollbar :1;
97     sal_Bool bVertScrollbar :1;
98     sal_Bool bAnyRuler : 1;
99     sal_Bool bHorzRuler     :1;
100     sal_Bool bVertRuler     :1;
101     sal_Bool bVertRulerRight:1;
102     sal_Bool bSmoothScroll  :1;
103     //visual aids
104     sal_Bool bCrosshair     :1;
105     sal_Bool bHandles       :1;
106     sal_Bool bBigHandles    :1;
107     //display
108     sal_Bool bTable             :1;
109     sal_Bool bGraphic           :1;
110     sal_Bool bDrawing           :1;
111     sal_Bool bFieldName         :1;
112     sal_Bool bNotes             :1;
113 
114     friend class SwContentOptPage;
115 
116 public:
117                             TYPEINFO();
118                             SwElemItem( sal_uInt16 nWhich = FN_PARAM_ELEM );
119                             SwElemItem(const SwElemItem& rElemItem);
120                             SwElemItem(const SwViewOption& rVOpt, sal_uInt16 nWhich);
121 
122 
123     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
124     virtual int             operator==( const SfxPoolItem& ) const;
125     void                    operator=( const SwElemItem& );
126 
127     void                    FillViewOptions( SwViewOption& rVOpt) const;
128 
129 };
130 /*--------OS 12.01.95 -----------------------------------
131 Item fuer Einstellungsdialog - Drucker/Zusaetze
132 --------------------------------------------------------- */
133 
134 class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData
135 {
136     friend class SwAddPrinterTabPage;
137 
138     using  SwPrintData::operator ==;
139 
140 public:
141     TYPEINFO();
142     SwAddPrinterItem( sal_uInt16 nWhich = FN_PARAM_ADDPRINTER );
143     SwAddPrinterItem( sal_uInt16 nWhich, const SwPrintData& rPrtData );
144     SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem);
145 
146     virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
147 
148     virtual int          operator==( const SfxPoolItem& ) const;
149 
150     const rtl::OUString &GetFax() const              { return sFaxName; }
151     void          SetFax( const String& rFax) { sFaxName = rFax; }
152 
153 
154     sal_Bool   IsPrintProspect() const      { return bPrintProspect; }
155     sal_Bool   IsPrintProspectRTL() const      { return bPrintProspectRTL; }
156     void   SetPrintProspect(sal_Bool bFlag ){ bPrintProspect = bFlag; }
157     void   SetPrintProspectRTL(sal_Bool bFlag ){ bPrintProspectRTL = bFlag; }
158     sal_Bool IsPrintGraphic () const { return bPrintGraphic; }
159     sal_Bool IsPrintTable () const { return bPrintTable; }
160     sal_Bool IsPrintDraw () const { return bPrintDraw; }
161     sal_Bool IsPrintControl () const { return bPrintControl; }
162     sal_Bool IsPrintLeftPage () const { return bPrintLeftPages; }
163     sal_Bool IsPrintRightPage() const { return bPrintRightPages; }
164     sal_Bool IsPrintReverse  () const { return bPrintReverse; }
165     sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
166     sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; }
167     sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
168     sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; }
169     //#i81434# - printing of hidden text
170     sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; }
171     sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; }
172 
173     sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; }
174     sal_uLong GetPrintPostIts () const { return nPrintPostIts; }
175 
176 };
177 
178 
179 /*--------OS 12.01.95 -----------------------------------
180 Item fuer Einstellungsdialog, ShadowCursorSeite
181 --------------------------------------------------------- */
182 
183 class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem
184 {
185     sal_uInt8 eMode;
186     sal_Bool bOn;
187 public:
188     TYPEINFO();
189     SwShadowCursorItem( sal_uInt16 nWhich = FN_PARAM_SHADOWCURSOR );
190     SwShadowCursorItem( const SwShadowCursorItem& rElemItem );
191     SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 nWhich );
192 
193 
194     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
195     virtual int             operator==( const SfxPoolItem& ) const;
196     void                    operator=( const SwShadowCursorItem& );
197 
198     void FillViewOptions( SwViewOption& rVOpt) const;
199 
200     sal_uInt8 GetMode() const               { return eMode; }
201     sal_Bool IsOn() const                   { return bOn; }
202 
203     void SetMode( sal_uInt8 eM )            { eMode = eM; }
204     void SetOn( sal_Bool bFlag )            { bOn = bFlag; }
205 };
206 
207 #ifdef DBG_UTIL
208 /*--------OS 12.01.95 -----------------------------------
209 Item fuer Einstellungsdialog - Testeinstellungen
210 --------------------------------------------------------- */
211 class SW_DLLPUBLIC SwTestItem : public SfxPoolItem
212 {
213     friend class SwModule;
214     friend class SwWriterApp;
215     friend class SwTestTabPage;
216     friend class SwDocEditDialog;
217 
218     sal_Bool    bTest1:1;
219     sal_Bool    bTest2:1;
220     sal_Bool    bTest3:1;
221     sal_Bool    bTest4:1;
222     sal_Bool    bTest5:1;
223     sal_Bool    bTest6:1;
224     sal_Bool    bTest7:1;
225     sal_Bool    bTest8:1;
226     sal_Bool    bTest9:1;
227     sal_Bool    bTest10:1;
228 
229 public:
230                             SwTestItem( sal_uInt16 _nWhich):
231                                             SfxPoolItem(_nWhich){};
232                             SwTestItem( const SwTestItem& pTestItem);
233 
234     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
235     virtual int             operator==( const SfxPoolItem& ) const;
236 
237 };
238 #endif
239 
240 #endif
241 
242 
243