1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cfgitems.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
33 #include <tools/color.hxx>
34 #include <svtools/poolitem.hxx>
36 #include <printdata.hxx>
45 class SwAddPrinterTabPage
;
49 class SwContentOptPage
;
50 class SwShdwCrsrOptionsTabPage
;
51 class SwDocEditDialog
;
53 SfxPrinter
* GetPrt( ViewShell
* );
54 void SetPrt( SfxPrinter
* );
57 /*--------OS 12.01.95 -----------------------------------
58 Item fuer Einstellungsdialog - Dokumentanzeige
59 --------------------------------------------------------- */
60 class SW_DLLPUBLIC SwDocDisplayItem
: public SfxPoolItem
62 friend class SwWriterApp
;
63 friend class SwShdwCrsrOptionsTabPage
;
64 friend class SwModule
;
66 BOOL bParagraphEnd
:1;
69 BOOL bNonbreakingSpace
:1;
71 BOOL bCharHiddenText
:1;
72 BOOL bFldHiddenText
:1;
74 BOOL bShowHiddenPara
:1;
76 Color aIndexBackgrndCol
;
81 SwDocDisplayItem( USHORT nWhich
= FN_PARAM_DOCDISP
);
83 const SwDocDisplayItem
& rSwDocDisplayItem
);
84 SwDocDisplayItem( const SwViewOption
& rVOpt
,
88 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
89 virtual int operator==( const SfxPoolItem
& ) const;
90 void operator=( const SwDocDisplayItem
& );
91 void FillViewOptions( SwViewOption
& rVOpt
) const;
93 /*--------OS 12.01.95 -----------------------------------
94 Item fuer Einstellungsdialog, Elementeseite
95 --------------------------------------------------------- */
96 class SW_DLLPUBLIC SwElemItem
: public SfxPoolItem
99 BOOL bHorzScrollbar
:1;
100 BOOL bVertScrollbar
:1;
104 BOOL bVertRulerRight
:1;
105 BOOL bSmoothScroll
:1;
117 friend class SwContentOptPage
;
121 SwElemItem( USHORT nWhich
= FN_PARAM_ELEM
);
122 SwElemItem(const SwElemItem
& rElemItem
);
123 SwElemItem(const SwViewOption
& rVOpt
, USHORT nWhich
);
126 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
127 virtual int operator==( const SfxPoolItem
& ) const;
128 void operator=( const SwElemItem
& );
130 void FillViewOptions( SwViewOption
& rVOpt
) const;
133 /*--------OS 12.01.95 -----------------------------------
134 Item fuer Einstellungsdialog - Drucker/Zusaetze
135 --------------------------------------------------------- */
137 class SW_DLLPUBLIC SwAddPrinterItem
: public SfxPoolItem
, public SwPrintData
139 friend class SwAddPrinterTabPage
;
141 using SwPrintData::operator ==;
145 SwAddPrinterItem( USHORT nWhich
= FN_PARAM_ADDPRINTER
);
146 SwAddPrinterItem( USHORT nWhich
, const SwPrintData
& rPrtData
);
147 SwAddPrinterItem( const SwAddPrinterItem
& rAddPrinterItem
);
149 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
151 virtual int operator==( const SfxPoolItem
& ) const;
153 const rtl::OUString
&GetFax() const { return sFaxName
; }
154 void SetFax( const String
& rFax
) { sFaxName
= rFax
; }
157 BOOL
IsPrintProspect() const { return bPrintProspect
; }
158 BOOL
IsPrintProspect_RTL() const { return bPrintProspect_RTL
; }
159 void SetPrintProspect(BOOL bFlag
){ bPrintProspect
= bFlag
; }
160 void SetPrintProspect_RTL(BOOL bFlag
){ bPrintProspect_RTL
= bFlag
; }
161 BOOL
IsPrintGraphic () const { return bPrintGraphic
; }
162 BOOL
IsPrintTable () const { return bPrintTable
; }
163 BOOL
IsPrintDraw () const { return bPrintDraw
; }
164 BOOL
IsPrintControl () const { return bPrintControl
; }
165 BOOL
IsPrintLeftPage () const { return bPrintLeftPage
; }
166 BOOL
IsPrintRightPage() const { return bPrintRightPage
; }
167 BOOL
IsPrintReverse () const { return bPrintReverse
; }
168 BOOL
IsPaperFromSetup() const { return bPaperFromSetup
; }
169 BOOL
IsPrintEmptyPages() const { return bPrintEmptyPages
; }
170 BOOL
IsPrintPageBackground() const { return bPrintPageBackground
; }
171 BOOL
IsPrintBlackFont() const { return bPrintBlackFont
; }
172 //#i81434# - printing of hidden text
173 sal_Bool
IsPrintHiddenText() const { return bPrintHiddenText
; }
174 sal_Bool
IsPrintTextPlaceholder() const { return bPrintTextPlaceholder
; }
176 BOOL
IsPrintSingleJobs() const { return bPrintSingleJobs
; }
177 ULONG
GetPrintPostIts () const { return nPrintPostIts
; }
182 /*--------OS 12.01.95 -----------------------------------
183 Item fuer Einstellungsdialog, ShadowCursorSeite
184 --------------------------------------------------------- */
186 class SW_DLLPUBLIC SwShadowCursorItem
: public SfxPoolItem
192 SwShadowCursorItem( USHORT nWhich
= FN_PARAM_SHADOWCURSOR
);
193 SwShadowCursorItem( const SwShadowCursorItem
& rElemItem
);
194 SwShadowCursorItem( const SwViewOption
& rVOpt
, USHORT nWhich
);
197 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
198 virtual int operator==( const SfxPoolItem
& ) const;
199 void operator=( const SwShadowCursorItem
& );
201 void FillViewOptions( SwViewOption
& rVOpt
) const;
203 BYTE
GetMode() const { return eMode
; }
204 BOOL
IsOn() const { return bOn
; }
206 void SetMode( BYTE eM
) { eMode
= eM
; }
207 void SetOn( BOOL bFlag
) { bOn
= bFlag
; }
211 /*--------OS 12.01.95 -----------------------------------
212 Item fuer Einstellungsdialog - Testeinstellungen
213 --------------------------------------------------------- */
214 class SW_DLLPUBLIC SwTestItem
: public SfxPoolItem
216 friend class SwModule
;
217 friend class SwWriterApp
;
218 friend class SwTestTabPage
;
219 friend class SwDocEditDialog
;
233 SwTestItem( USHORT _nWhich
):
234 SfxPoolItem(_nWhich
){};
235 SwTestItem( const SwTestItem
& pTestItem
);
237 virtual SfxPoolItem
* Clone( SfxItemPool
*pPool
= 0 ) const;
238 virtual int operator==( const SfxPoolItem
& ) const;