Line data Source code
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 _CFGITEMS_HXX
20 : #define _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
33 : class SwAddPrinterTabPage;
34 : class SfxPrinter;
35 : class ViewShell;
36 : class SwViewOption;
37 : class SwContentOptPage;
38 : class SwShdwCrsrOptionsTabPage;
39 :
40 : SfxPrinter* GetPrt( ViewShell* );
41 : void SetPrt( SfxPrinter* );
42 :
43 : /*--------OS 12.01.95 -----------------------------------
44 : Item for settings dialog - document view
45 : --------------------------------------------------------- */
46 0 : class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem
47 : {
48 : friend class SwShdwCrsrOptionsTabPage;
49 : friend class SwModule;
50 :
51 : sal_Bool bParagraphEnd :1;
52 : sal_Bool bTab :1;
53 : sal_Bool bSpace :1;
54 : sal_Bool bNonbreakingSpace :1;
55 : sal_Bool bSoftHyphen :1;
56 : sal_Bool bCharHiddenText :1;
57 : sal_Bool bFldHiddenText :1;
58 : sal_Bool bManualBreak :1;
59 : sal_Bool bShowHiddenPara :1;
60 :
61 : Color aIndexBackgrndCol;
62 :
63 :
64 : public:
65 : TYPEINFO();
66 : SwDocDisplayItem( sal_uInt16 nWhich = FN_PARAM_DOCDISP );
67 : SwDocDisplayItem(
68 : const SwDocDisplayItem& rSwDocDisplayItem );
69 : SwDocDisplayItem( const SwViewOption& rVOpt,
70 : sal_uInt16 nWhich );
71 :
72 :
73 : virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
74 : virtual int operator==( const SfxPoolItem& ) const;
75 : void operator=( const SwDocDisplayItem& );
76 : void FillViewOptions( SwViewOption& rVOpt) const;
77 : };
78 :
79 : /*--------OS 12.01.95 -----------------------------------
80 : Item for settings dialog, element page
81 : --------------------------------------------------------- */
82 0 : class SW_DLLPUBLIC SwElemItem : public SfxPoolItem
83 : {
84 : //view
85 : bool bHorzScrollbar :1;
86 : bool bVertScrollbar :1;
87 : bool bAnyRuler : 1;
88 : bool bHorzRuler :1;
89 : bool bVertRuler :1;
90 : bool bVertRulerRight:1;
91 : bool bSmoothScroll :1;
92 : //visual aids
93 : bool bCrosshair :1;
94 : bool bHandles :1;
95 : //display
96 : bool bTable :1;
97 : bool bGraphic :1;
98 : bool bDrawing :1;
99 : bool bFieldName :1;
100 : bool bNotes :1;
101 :
102 : friend class SwContentOptPage;
103 :
104 : public:
105 : TYPEINFO();
106 : SwElemItem( sal_uInt16 nWhich = FN_PARAM_ELEM );
107 : SwElemItem(const SwElemItem& rElemItem);
108 : SwElemItem(const SwViewOption& rVOpt, sal_uInt16 nWhich);
109 :
110 :
111 : virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
112 : virtual int operator==( const SfxPoolItem& ) const;
113 : void operator=( const SwElemItem& );
114 :
115 : void FillViewOptions( SwViewOption& rVOpt) const;
116 :
117 : };
118 :
119 : /*--------OS 12.01.95 -----------------------------------
120 : Item for settings dialog - printer/add ons
121 : --------------------------------------------------------- */
122 10 : class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData
123 : {
124 : friend class SwAddPrinterTabPage;
125 :
126 : using SwPrintData::operator ==;
127 :
128 : public:
129 : TYPEINFO();
130 : SwAddPrinterItem( sal_uInt16 nWhich = FN_PARAM_ADDPRINTER );
131 : SwAddPrinterItem( sal_uInt16 nWhich, const SwPrintData& rPrtData );
132 : SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem);
133 :
134 : virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
135 :
136 : virtual int operator==( const SfxPoolItem& ) const;
137 :
138 0 : const rtl::OUString &GetFax() const { return sFaxName; }
139 : void SetFax( const String& rFax) { sFaxName = rFax; }
140 :
141 :
142 : sal_Bool IsPrintProspect() const { return bPrintProspect; }
143 : sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; }
144 : void SetPrintProspect(sal_Bool bFlag ){ bPrintProspect = bFlag; }
145 : void SetPrintProspectRTL(sal_Bool bFlag ){ bPrintProspectRTL = bFlag; }
146 : sal_Bool IsPrintGraphic () const { return bPrintGraphic; }
147 : sal_Bool IsPrintTable () const { return bPrintTable; }
148 : sal_Bool IsPrintDraw () const { return bPrintDraw; }
149 : sal_Bool IsPrintControl () const { return bPrintControl; }
150 : sal_Bool IsPrintLeftPage () const { return bPrintLeftPages; }
151 : sal_Bool IsPrintRightPage() const { return bPrintRightPages; }
152 : sal_Bool IsPrintReverse () const { return bPrintReverse; }
153 : sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
154 : sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; }
155 : sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
156 : sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; }
157 : //#i81434# - printing of hidden text
158 : sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; }
159 : sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; }
160 :
161 : sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; }
162 : sal_uLong GetPrintPostIts () const { return nPrintPostIts; }
163 :
164 : };
165 :
166 : /*--------OS 12.01.95 -----------------------------------
167 : Item for settings dialog, ShadowCursorPage
168 : --------------------------------------------------------- */
169 0 : class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem
170 : {
171 : sal_uInt8 eMode;
172 : sal_Bool bOn;
173 : public:
174 : TYPEINFO();
175 : SwShadowCursorItem( sal_uInt16 nWhich = FN_PARAM_SHADOWCURSOR );
176 : SwShadowCursorItem( const SwShadowCursorItem& rElemItem );
177 : SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 nWhich );
178 :
179 :
180 : virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
181 : virtual int operator==( const SfxPoolItem& ) const;
182 : void operator=( const SwShadowCursorItem& );
183 :
184 : void FillViewOptions( SwViewOption& rVOpt) const;
185 :
186 0 : sal_uInt8 GetMode() const { return eMode; }
187 0 : sal_Bool IsOn() const { return bOn; }
188 :
189 0 : void SetMode( sal_uInt8 eM ) { eMode = eM; }
190 0 : void SetOn( sal_Bool bFlag ) { bOn = bFlag; }
191 : };
192 :
193 : #ifdef DBG_UTIL
194 :
195 : /*--------OS 12.01.95 -----------------------------------
196 : Item for settings dialog - test settings
197 : --------------------------------------------------------- */
198 : class SW_DLLPUBLIC SwTestItem : public SfxPoolItem
199 : {
200 : friend class SwModule;
201 : friend class SwTestTabPage;
202 :
203 : bool bTest1:1;
204 : bool bTest2:1;
205 : bool bTest3:1;
206 : bool bTest4:1;
207 : bool bTest5:1;
208 : bool bTest6:1;
209 : bool bTest7:1;
210 : bool bTest8:1;
211 : bool bTest9:1;
212 : bool bTest10:1;
213 :
214 : public:
215 : SwTestItem( sal_uInt16 _nWhich):
216 : SfxPoolItem(_nWhich){};
217 : SwTestItem( const SwTestItem& pTestItem);
218 :
219 : virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
220 : virtual int operator==( const SfxPoolItem& ) const;
221 :
222 : };
223 : #endif
224 :
225 : #endif
226 :
227 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|