xref: /aoo42x/main/sd/source/ui/inc/optsitem.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef _SD_OPTSITEM_HXX
29*cdf0e10cSrcweir #define _SD_OPTSITEM_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <unotools/configitem.hxx>
32*cdf0e10cSrcweir #include <sfx2/module.hxx>
33*cdf0e10cSrcweir #include <sfx2/app.hxx>
34*cdf0e10cSrcweir #include <sfx2/sfxsids.hrc>
35*cdf0e10cSrcweir #include <svx/optgrid.hxx>
36*cdf0e10cSrcweir #include <svx/dlgutil.hxx>
37*cdf0e10cSrcweir #include "sddllapi.h"
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir // -----------------
40*cdf0e10cSrcweir // - Option ranges -
41*cdf0e10cSrcweir // -----------------
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir #define SD_OPTIONS_NONE		0x00000000
44*cdf0e10cSrcweir #define SD_OPTIONS_ALL		0xffffffff
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir #define SD_OPTIONS_LAYOUT	0x00000001
47*cdf0e10cSrcweir #define SD_OPTIONS_CONTENTS 0x00000002
48*cdf0e10cSrcweir #define SD_OPTIONS_MISC		0x00000004
49*cdf0e10cSrcweir #define SD_OPTIONS_SNAP		0x00000008
50*cdf0e10cSrcweir #define SD_OPTIONS_ZOOM		0x00000010
51*cdf0e10cSrcweir #define SD_OPTIONS_GRID		0x00000020
52*cdf0e10cSrcweir #define SD_OPTIONS_PRINT	0x00000040
53*cdf0e10cSrcweir 
54*cdf0e10cSrcweir // ------------
55*cdf0e10cSrcweir // - Forwards -
56*cdf0e10cSrcweir // ------------
57*cdf0e10cSrcweir 
58*cdf0e10cSrcweir class SfxConfigItem;
59*cdf0e10cSrcweir class SdOptions;
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir namespace sd {
62*cdf0e10cSrcweir class FrameView;
63*cdf0e10cSrcweir }
64*cdf0e10cSrcweir 
65*cdf0e10cSrcweir // -----------------
66*cdf0e10cSrcweir // - SdOptionsItem -
67*cdf0e10cSrcweir // -----------------
68*cdf0e10cSrcweir 
69*cdf0e10cSrcweir class SdOptionsGeneric;
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsItem : public ::utl::ConfigItem
72*cdf0e10cSrcweir {
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir private:
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir 	const SdOptionsGeneric&	mrParent;
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir 
79*cdf0e10cSrcweir public:
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir 	SdOptionsItem( const SdOptionsGeneric& rParent, const ::rtl::OUString rSubTree );
82*cdf0e10cSrcweir 	virtual ~SdOptionsItem();
83*cdf0e10cSrcweir 
84*cdf0e10cSrcweir 	virtual void			Commit();
85*cdf0e10cSrcweir     virtual void            Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir 	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetProperties(
88*cdf0e10cSrcweir 								const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames );
89*cdf0e10cSrcweir 	sal_Bool                PutProperties( const com::sun::star::uno::Sequence< rtl::OUString >& rNames,
90*cdf0e10cSrcweir 										   const com::sun::star::uno::Sequence< com::sun::star::uno::Any>& rValues );
91*cdf0e10cSrcweir 	void					SetModified();
92*cdf0e10cSrcweir };
93*cdf0e10cSrcweir 
94*cdf0e10cSrcweir // --------------------
95*cdf0e10cSrcweir // - SdOptionsGeneric -
96*cdf0e10cSrcweir // --------------------
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsGeneric
99*cdf0e10cSrcweir {
100*cdf0e10cSrcweir friend class SdOptionsItem;
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir private:
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir 	::rtl::OUString			maSubTree;
105*cdf0e10cSrcweir 	SdOptionsItem*			mpCfgItem;
106*cdf0e10cSrcweir 	sal_uInt16 					mnConfigId;
107*cdf0e10cSrcweir 	sal_Bool					mbInit			: 1;
108*cdf0e10cSrcweir 	sal_Bool					mbEnableModify	: 1;
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir 	SD_DLLPRIVATE void Commit( SdOptionsItem& rCfgItem ) const;
111*cdf0e10cSrcweir 	SD_DLLPRIVATE ::com::sun::star::uno::Sequence< ::rtl::OUString > GetPropertyNames() const;
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir protected:
114*cdf0e10cSrcweir 
115*cdf0e10cSrcweir 	void					Init() const;
116*cdf0e10cSrcweir 	void					OptionsChanged() { if( mpCfgItem && mbEnableModify ) mpCfgItem->SetModified(); }
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir protected:
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir 	virtual void			GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const = 0;
121*cdf0e10cSrcweir 	virtual sal_Bool			ReadData( const ::com::sun::star::uno::Any* pValues ) = 0;
122*cdf0e10cSrcweir 	virtual sal_Bool			WriteData( ::com::sun::star::uno::Any* pValues ) const = 0;
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir public:
125*cdf0e10cSrcweir 
126*cdf0e10cSrcweir 							SdOptionsGeneric( sal_uInt16 nConfigId, const ::rtl::OUString& rSubTree );
127*cdf0e10cSrcweir 							virtual ~SdOptionsGeneric();
128*cdf0e10cSrcweir 
129*cdf0e10cSrcweir 	const ::rtl::OUString&	GetSubTree() const { return maSubTree; }
130*cdf0e10cSrcweir 	sal_uInt16					GetConfigId() const { return mnConfigId; }
131*cdf0e10cSrcweir 
132*cdf0e10cSrcweir 	void					EnableModify( sal_Bool bModify ) { mbEnableModify = bModify; }
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir 	void					Store();
135*cdf0e10cSrcweir 
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir 	static bool				isMetricSystem();
138*cdf0e10cSrcweir };
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir // -------------------
141*cdf0e10cSrcweir // - SdOptionsLayout -
142*cdf0e10cSrcweir // -------------------
143*cdf0e10cSrcweir 
144*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsLayout : public SdOptionsGeneric
145*cdf0e10cSrcweir {
146*cdf0e10cSrcweir private:
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir 	sal_Bool	bRuler				: 1;	// Layout/Display/Ruler
149*cdf0e10cSrcweir 	sal_Bool	bMoveOutline		: 1;	// Layout/Display/Contur
150*cdf0e10cSrcweir 	sal_Bool	bDragStripes		: 1;	// Layout/Display/Guide
151*cdf0e10cSrcweir 	sal_Bool	bHandlesBezier		: 1;	// Layout/Display/Bezier
152*cdf0e10cSrcweir 	sal_Bool	bHelplines			: 1;	// Layout/Display/Helpline
153*cdf0e10cSrcweir 	sal_uInt16	nMetric;					// Layout/Other/MeasureUnit
154*cdf0e10cSrcweir 	sal_uInt16	nDefTab;					// Layout/Other/TabStop
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir protected:
157*cdf0e10cSrcweir 
158*cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
159*cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
160*cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir public:
163*cdf0e10cSrcweir 			SdOptionsLayout( sal_uInt16 nConfigId, sal_Bool bUseConfig );
164*cdf0e10cSrcweir 			virtual ~SdOptionsLayout() {}
165*cdf0e10cSrcweir 
166*cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsLayout& rOpt ) const;
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir 	sal_Bool	IsRulerVisible() const { Init(); return (sal_Bool) bRuler; }
169*cdf0e10cSrcweir 	sal_Bool	IsMoveOutline() const { Init(); return (sal_Bool) bMoveOutline; }
170*cdf0e10cSrcweir 	sal_Bool	IsDragStripes() const { Init(); return (sal_Bool) bDragStripes; }
171*cdf0e10cSrcweir 	sal_Bool	IsHandlesBezier() const { Init(); return (sal_Bool) bHandlesBezier; }
172*cdf0e10cSrcweir 	sal_Bool	IsHelplines() const { Init(); return (sal_Bool) bHelplines; }
173*cdf0e10cSrcweir 	sal_uInt16  GetMetric() const { Init(); return( ( 0xffff == nMetric ) ? (sal_uInt16)SfxModule::GetCurrentFieldUnit() : nMetric ); }
174*cdf0e10cSrcweir 	sal_uInt16	GetDefTab() const { Init(); return nDefTab; }
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir 	void	SetRulerVisible( sal_Bool bOn = sal_True ) { if( bRuler != bOn ) { OptionsChanged(); bRuler = bOn; } }
177*cdf0e10cSrcweir 	void	SetMoveOutline( sal_Bool bOn = sal_True ) { if( bMoveOutline != bOn ) { OptionsChanged(); bMoveOutline = bOn; } }
178*cdf0e10cSrcweir 	void	SetDragStripes( sal_Bool bOn = sal_True ) { if( bDragStripes != bOn ) { OptionsChanged(); bDragStripes = bOn; } }
179*cdf0e10cSrcweir 	void	SetHandlesBezier( sal_Bool bOn = sal_True ) { if( bHandlesBezier != bOn ) { OptionsChanged(); bHandlesBezier = bOn; } }
180*cdf0e10cSrcweir 	void	SetHelplines( sal_Bool bOn = sal_True ) { if( bHelplines != bOn ) { OptionsChanged(); bHelplines = bOn; } }
181*cdf0e10cSrcweir 	void	SetMetric( sal_uInt16 nInMetric ) { if( nMetric != nInMetric ) { OptionsChanged(); nMetric = nInMetric; } }
182*cdf0e10cSrcweir 	void	SetDefTab( sal_uInt16 nTab ) { if( nDefTab != nTab ) { OptionsChanged(); nDefTab = nTab; } }
183*cdf0e10cSrcweir };
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir // -----------------------------------------------------------------------------
186*cdf0e10cSrcweir 
187*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsLayoutItem : public SfxPoolItem
188*cdf0e10cSrcweir {
189*cdf0e10cSrcweir public:
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir 							SdOptionsLayoutItem( sal_uInt16 nWhich);
192*cdf0e10cSrcweir 							SdOptionsLayoutItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
193*cdf0e10cSrcweir 
194*cdf0e10cSrcweir 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
195*cdf0e10cSrcweir 	virtual int 			operator==( const SfxPoolItem& ) const;
196*cdf0e10cSrcweir 
197*cdf0e10cSrcweir 	void					SetOptions( SdOptions* pOpts ) const;
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir 	SdOptionsLayout&		GetOptionsLayout() { return maOptionsLayout; }
200*cdf0e10cSrcweir private:
201*cdf0e10cSrcweir 	SdOptionsLayout maOptionsLayout;
202*cdf0e10cSrcweir };
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir // ---------------------
205*cdf0e10cSrcweir // - SdOptionsContents -
206*cdf0e10cSrcweir // ---------------------
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsContents : public SdOptionsGeneric
209*cdf0e10cSrcweir {
210*cdf0e10cSrcweir private:
211*cdf0e10cSrcweir protected:
212*cdf0e10cSrcweir 
213*cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
214*cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
215*cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
216*cdf0e10cSrcweir 
217*cdf0e10cSrcweir public:
218*cdf0e10cSrcweir 
219*cdf0e10cSrcweir 			SdOptionsContents( sal_uInt16 nConfigId, sal_Bool bUseConfig );
220*cdf0e10cSrcweir 			virtual ~SdOptionsContents() {}
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsContents& rOpt ) const;
223*cdf0e10cSrcweir };
224*cdf0e10cSrcweir 
225*cdf0e10cSrcweir // -----------------------------------------------------------------------------
226*cdf0e10cSrcweir 
227*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsContentsItem : public SfxPoolItem
228*cdf0e10cSrcweir {
229*cdf0e10cSrcweir public:
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir 							SdOptionsContentsItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
232*cdf0e10cSrcweir 
233*cdf0e10cSrcweir 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
234*cdf0e10cSrcweir 	virtual int 			operator==( const SfxPoolItem& ) const;
235*cdf0e10cSrcweir 
236*cdf0e10cSrcweir 	void					SetOptions( SdOptions* pOpts ) const;
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir 	SdOptionsContents&		GetOptionsContents() { return maOptionsContents; }
239*cdf0e10cSrcweir private:
240*cdf0e10cSrcweir 	SdOptionsContents		maOptionsContents;
241*cdf0e10cSrcweir };
242*cdf0e10cSrcweir 
243*cdf0e10cSrcweir // -----------------
244*cdf0e10cSrcweir // - SdOptionsMisc -
245*cdf0e10cSrcweir // -----------------
246*cdf0e10cSrcweir 
247*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsMisc : public SdOptionsGeneric
248*cdf0e10cSrcweir {
249*cdf0e10cSrcweir private:
250*cdf0e10cSrcweir 
251*cdf0e10cSrcweir 	// #97016#
252*cdf0e10cSrcweir 	sal_uLong	nDefaultObjectSizeWidth;
253*cdf0e10cSrcweir 	sal_uLong	nDefaultObjectSizeHeight;
254*cdf0e10cSrcweir 
255*cdf0e10cSrcweir 	sal_Bool	bStartWithTemplate		: 1;	// Misc/NewDoc/AutoPilot
256*cdf0e10cSrcweir 	sal_Bool	bMarkedHitMovesAlways	: 1;	// Misc/ObjectMoveable
257*cdf0e10cSrcweir 	sal_Bool	bMoveOnlyDragging		: 1;	// Currently, not in use !!!
258*cdf0e10cSrcweir 	sal_Bool	bCrookNoContortion		: 1;	// Misc/NoDistort
259*cdf0e10cSrcweir 	sal_Bool	bQuickEdit				: 1;	// Misc/TextObject/QuickEditing
260*cdf0e10cSrcweir 	sal_Bool	bMasterPageCache		: 1;	// Misc/BackgroundCache
261*cdf0e10cSrcweir 	sal_Bool	bDragWithCopy			: 1;	// Misc/CopyWhileMoving
262*cdf0e10cSrcweir 	sal_Bool	bPickThrough			: 1;	// Misc/TextObject/Selectable
263*cdf0e10cSrcweir 	sal_Bool	bBigHandles 			: 1;	// Misc/BigHandles
264*cdf0e10cSrcweir 	sal_Bool	bDoubleClickTextEdit	: 1;	// Misc/DclickTextedit
265*cdf0e10cSrcweir 	sal_Bool	bClickChangeRotation	: 1;	// Misc/RotateClick
266*cdf0e10cSrcweir 	sal_Bool	bStartWithActualPage	: 1;	// Misc/Start/CurrentPage
267*cdf0e10cSrcweir 	sal_Bool	bSolidDragging			: 1;	// Misc/ModifyWithAttributes
268*cdf0e10cSrcweir 	sal_Bool	bSolidMarkHdl			: 1;	// /Misc/SimpleHandles
269*cdf0e10cSrcweir 	sal_Bool	bSummationOfParagraphs	: 1;	// misc/SummationOfParagraphs
270*cdf0e10cSrcweir 	// #90356#
271*cdf0e10cSrcweir 	sal_Bool	bShowUndoDeleteWarning	: 1;	// Misc/ShowUndoDeleteWarning
272*cdf0e10cSrcweir 	// #i75315#
273*cdf0e10cSrcweir 	sal_Bool	bSlideshowRespectZOrder	: 1;	// Misc/SlideshowRespectZOrder
274*cdf0e10cSrcweir     sal_Bool    bShowComments           : 1;    // Misc/ShowComments
275*cdf0e10cSrcweir 
276*cdf0e10cSrcweir 	sal_Bool	bPreviewNewEffects;
277*cdf0e10cSrcweir 	sal_Bool	bPreviewChangedEffects;
278*cdf0e10cSrcweir 	sal_Bool	bPreviewTransitions;
279*cdf0e10cSrcweir 
280*cdf0e10cSrcweir 	sal_Int32	mnDisplay;
281*cdf0e10cSrcweir 
282*cdf0e10cSrcweir 	sal_Int32 mnPenColor;
283*cdf0e10cSrcweir 	double mnPenWidth;
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir     /** This value controls the device to use for formatting documents.
286*cdf0e10cSrcweir         The currently supported values are 0 for the current printer or 1
287*cdf0e10cSrcweir         for the printer independent virtual device the can be retrieved from
288*cdf0e10cSrcweir         the modules.
289*cdf0e10cSrcweir     */
290*cdf0e10cSrcweir 	sal_uInt16	mnPrinterIndependentLayout;     // Misc/Compatibility/PrinterIndependentLayout
291*cdf0e10cSrcweir // Misc
292*cdf0e10cSrcweir 
293*cdf0e10cSrcweir protected:
294*cdf0e10cSrcweir 
295*cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
296*cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
297*cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
298*cdf0e10cSrcweir 
299*cdf0e10cSrcweir public:
300*cdf0e10cSrcweir 
301*cdf0e10cSrcweir 			SdOptionsMisc( sal_uInt16 nConfigId, sal_Bool bUseConfig );
302*cdf0e10cSrcweir 			virtual ~SdOptionsMisc() {}
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsMisc& rOpt ) const;
305*cdf0e10cSrcweir 
306*cdf0e10cSrcweir 	sal_Bool	IsStartWithTemplate() const { Init(); return (sal_Bool) bStartWithTemplate; }
307*cdf0e10cSrcweir 	sal_Bool	IsMarkedHitMovesAlways() const { Init(); return (sal_Bool) bMarkedHitMovesAlways; }
308*cdf0e10cSrcweir 	sal_Bool	IsMoveOnlyDragging() const { Init(); return (sal_Bool) bMoveOnlyDragging; }
309*cdf0e10cSrcweir 	sal_Bool	IsCrookNoContortion() const { Init(); return (sal_Bool) bCrookNoContortion; }
310*cdf0e10cSrcweir 	sal_Bool	IsQuickEdit() const { Init(); return (sal_Bool) bQuickEdit; }
311*cdf0e10cSrcweir 	sal_Bool	IsMasterPagePaintCaching() const { Init(); return (sal_Bool) bMasterPageCache; }
312*cdf0e10cSrcweir 	sal_Bool	IsDragWithCopy() const { Init(); return (sal_Bool) bDragWithCopy; }
313*cdf0e10cSrcweir 	sal_Bool	IsPickThrough() const { Init(); return (sal_Bool) bPickThrough; }
314*cdf0e10cSrcweir 	sal_Bool	IsBigHandles() const { Init(); return (sal_Bool) bBigHandles; }
315*cdf0e10cSrcweir 	sal_Bool	IsDoubleClickTextEdit() const { Init(); return (sal_Bool) bDoubleClickTextEdit; }
316*cdf0e10cSrcweir 	sal_Bool	IsClickChangeRotation() const { Init(); return (sal_Bool) bClickChangeRotation; }
317*cdf0e10cSrcweir 	sal_Bool	IsStartWithActualPage() const { Init(); return (sal_Bool) bStartWithActualPage; }
318*cdf0e10cSrcweir 	sal_Bool	IsSolidDragging() const { Init(); return (sal_Bool) bSolidDragging; }
319*cdf0e10cSrcweir 	sal_Bool	IsSolidMarkHdl() const { Init(); return (sal_Bool) bSolidMarkHdl; }
320*cdf0e10cSrcweir 	sal_Bool	IsSummationOfParagraphs() const { Init(); return bSummationOfParagraphs != 0; };
321*cdf0e10cSrcweir 
322*cdf0e10cSrcweir     /** Return the currently selected printer independent layout mode.
323*cdf0e10cSrcweir         @return
324*cdf0e10cSrcweir             Returns 1 for printer independent layout enabled and 0 when it
325*cdf0e10cSrcweir             is disabled.  Other values are reserved for future use.
326*cdf0e10cSrcweir     */
327*cdf0e10cSrcweir 	sal_uInt16	GetPrinterIndependentLayout() const { Init(); return mnPrinterIndependentLayout; };
328*cdf0e10cSrcweir 	// #90356#
329*cdf0e10cSrcweir 	sal_Bool	IsShowUndoDeleteWarning() const { Init(); return (sal_Bool) bShowUndoDeleteWarning; }
330*cdf0e10cSrcweir 	sal_Bool	IsSlideshowRespectZOrder() const { Init(); return (sal_Bool) bSlideshowRespectZOrder; }
331*cdf0e10cSrcweir 	// #97016#
332*cdf0e10cSrcweir 	sal_uLong	GetDefaultObjectSizeWidth() const { Init(); return nDefaultObjectSizeWidth; }
333*cdf0e10cSrcweir 	sal_uLong	GetDefaultObjectSizeHeight() const { Init(); return nDefaultObjectSizeHeight; }
334*cdf0e10cSrcweir 
335*cdf0e10cSrcweir 	sal_Bool	IsPreviewNewEffects() const { Init(); return bPreviewNewEffects; }
336*cdf0e10cSrcweir 	sal_Bool	IsPreviewChangedEffects() const { Init(); return bPreviewChangedEffects; }
337*cdf0e10cSrcweir 	sal_Bool	IsPreviewTransitions() const { Init(); return bPreviewTransitions; }
338*cdf0e10cSrcweir 
339*cdf0e10cSrcweir 	sal_Int32	GetDisplay() const { Init(); return mnDisplay; }
340*cdf0e10cSrcweir 	void		SetDisplay( sal_Int32 nDisplay = 0 ) { if( mnDisplay != nDisplay ) { OptionsChanged(); mnDisplay = nDisplay; } }
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir 	sal_Int32 GetPresentationPenColor() const { Init(); return mnPenColor; }
343*cdf0e10cSrcweir 	void	  SetPresentationPenColor( sal_Int32 nPenColor ) { if( mnPenColor != nPenColor ) { OptionsChanged(); mnPenColor = nPenColor; } }
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir 	double	  GetPresentationPenWidth() const { Init(); return mnPenWidth; }
346*cdf0e10cSrcweir 	void	  SetPresentationPenWidth( double nPenWidth ) { if( mnPenWidth != nPenWidth ) { OptionsChanged(); mnPenWidth = nPenWidth; } }
347*cdf0e10cSrcweir 
348*cdf0e10cSrcweir 	void	SetStartWithTemplate( sal_Bool bOn = sal_True ) { if( bStartWithTemplate != bOn ) { OptionsChanged(); bStartWithTemplate = bOn; } }
349*cdf0e10cSrcweir 	void	SetMarkedHitMovesAlways( sal_Bool bOn = sal_True ) { if( bMarkedHitMovesAlways != bOn ) { OptionsChanged(); bMarkedHitMovesAlways = bOn; } }
350*cdf0e10cSrcweir 	void	SetMoveOnlyDragging( sal_Bool bOn = sal_True ) { if( bMoveOnlyDragging != bOn ) { OptionsChanged(); bMoveOnlyDragging = bOn; } }
351*cdf0e10cSrcweir 	void	SetCrookNoContortion( sal_Bool bOn = sal_True ) { if( bCrookNoContortion != bOn ) { OptionsChanged(); bCrookNoContortion = bOn; } }
352*cdf0e10cSrcweir 	void	SetQuickEdit( sal_Bool bOn = sal_True ) { if( bQuickEdit != bOn ) { OptionsChanged(); bQuickEdit = bOn; } }
353*cdf0e10cSrcweir 	void	SetMasterPagePaintCaching( sal_Bool bOn = sal_True ) { if( bMasterPageCache != bOn ) { OptionsChanged(); bMasterPageCache = bOn; } }
354*cdf0e10cSrcweir 	void	SetDragWithCopy( sal_Bool bOn = sal_True ) { if( bDragWithCopy != bOn ) { OptionsChanged(); bDragWithCopy = bOn; } }
355*cdf0e10cSrcweir 	void	SetPickThrough( sal_Bool bOn = sal_True ) { if( bPickThrough != bOn ) { OptionsChanged(); bPickThrough = bOn; } }
356*cdf0e10cSrcweir 	void	SetBigHandles( sal_Bool bOn = sal_True ) { if( bBigHandles != bOn ) { OptionsChanged(); bBigHandles = bOn; } }
357*cdf0e10cSrcweir 	void	SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { if( bDoubleClickTextEdit != bOn ) { OptionsChanged(); bDoubleClickTextEdit = bOn; } }
358*cdf0e10cSrcweir 	void	SetClickChangeRotation( sal_Bool bOn = sal_True ) { if( bClickChangeRotation != bOn ) { OptionsChanged(); bClickChangeRotation = bOn; } }
359*cdf0e10cSrcweir 	void	SetStartWithActualPage( sal_Bool bOn = sal_True ) { if( bStartWithActualPage != bOn ) { OptionsChanged(); bStartWithActualPage = bOn; } }
360*cdf0e10cSrcweir 	void	SetSummationOfParagraphs( sal_Bool bOn = sal_True ){ if ( bOn != bSummationOfParagraphs ) { OptionsChanged(); bSummationOfParagraphs = bOn; } }
361*cdf0e10cSrcweir     /** Set the printer independent layout mode.
362*cdf0e10cSrcweir         @param nOn
363*cdf0e10cSrcweir             The default value is to switch printer independent layout on,
364*cdf0e10cSrcweir             hence the parameters name.  Use 0 for turning it off.  Other
365*cdf0e10cSrcweir             values are reserved for future use.
366*cdf0e10cSrcweir     */
367*cdf0e10cSrcweir 	void	SetPrinterIndependentLayout (sal_uInt16 nOn = 1 ){ if ( nOn != mnPrinterIndependentLayout ) { OptionsChanged(); mnPrinterIndependentLayout = nOn; } }
368*cdf0e10cSrcweir 	void	SetSolidDragging( sal_Bool bOn = sal_True ) { if( bSolidDragging != bOn ) { OptionsChanged(); bSolidDragging = bOn; } }
369*cdf0e10cSrcweir 	void	SetSolidMarkHdl( sal_Bool bOn = sal_True ) { if( bSolidMarkHdl != bOn ) { OptionsChanged(); bSolidMarkHdl = bOn; } }
370*cdf0e10cSrcweir 	// #90356#
371*cdf0e10cSrcweir 	void	SetShowUndoDeleteWarning( sal_Bool bOn = sal_True ) { if( bShowUndoDeleteWarning != bOn ) { OptionsChanged(); bShowUndoDeleteWarning = bOn; } }
372*cdf0e10cSrcweir 	void	SetSlideshowRespectZOrder( sal_Bool bOn = sal_True ) { if( bSlideshowRespectZOrder != bOn ) { OptionsChanged(); bSlideshowRespectZOrder = bOn; } }
373*cdf0e10cSrcweir 	// #97016#
374*cdf0e10cSrcweir 	void	SetDefaultObjectSizeWidth( sal_uLong nWidth ) { if( nDefaultObjectSizeWidth != nWidth ) { OptionsChanged(); nDefaultObjectSizeWidth = nWidth; } }
375*cdf0e10cSrcweir 	void	SetDefaultObjectSizeHeight( sal_uLong nHeight ) { if( nDefaultObjectSizeHeight != nHeight ) { OptionsChanged(); nDefaultObjectSizeHeight = nHeight; } }
376*cdf0e10cSrcweir 
377*cdf0e10cSrcweir 	void	SetPreviewNewEffects( sal_Bool bOn )  { if( bPreviewNewEffects != bOn ) { OptionsChanged(); bPreviewNewEffects = bOn; } }
378*cdf0e10cSrcweir 	void	SetPreviewChangedEffects( sal_Bool bOn )  { if( bPreviewChangedEffects != bOn ) { OptionsChanged(); bPreviewChangedEffects = bOn; } }
379*cdf0e10cSrcweir 	void	SetPreviewTransitions( sal_Bool bOn )  { if( bPreviewTransitions != bOn ) { OptionsChanged(); bPreviewTransitions = bOn; } }
380*cdf0e10cSrcweir 
381*cdf0e10cSrcweir 	sal_Bool    IsShowComments() const { Init(); return bShowComments; }
382*cdf0e10cSrcweir     void    SetShowComments( sal_Bool bShow )  { if( bShowComments != bShow ) { OptionsChanged(); bShowComments = bShow; } }
383*cdf0e10cSrcweir };
384*cdf0e10cSrcweir 
385*cdf0e10cSrcweir // -----------------------------------------------------------------------------
386*cdf0e10cSrcweir 
387*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsMiscItem : public SfxPoolItem
388*cdf0e10cSrcweir {
389*cdf0e10cSrcweir public:
390*cdf0e10cSrcweir 
391*cdf0e10cSrcweir 							SdOptionsMiscItem( sal_uInt16 nWhich);
392*cdf0e10cSrcweir 							SdOptionsMiscItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
393*cdf0e10cSrcweir 
394*cdf0e10cSrcweir 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
395*cdf0e10cSrcweir 	virtual int 			operator==( const SfxPoolItem& ) const;
396*cdf0e10cSrcweir 
397*cdf0e10cSrcweir 	void					SetOptions( SdOptions* pOpts ) const;
398*cdf0e10cSrcweir 
399*cdf0e10cSrcweir 	SdOptionsMisc&			GetOptionsMisc() { return maOptionsMisc; }
400*cdf0e10cSrcweir 	const SdOptionsMisc&	GetOptionsMisc() const { return maOptionsMisc; }
401*cdf0e10cSrcweir private:
402*cdf0e10cSrcweir 	SdOptionsMisc			maOptionsMisc;
403*cdf0e10cSrcweir };
404*cdf0e10cSrcweir 
405*cdf0e10cSrcweir // -----------------
406*cdf0e10cSrcweir // - SdOptionsSnap -
407*cdf0e10cSrcweir // -----------------
408*cdf0e10cSrcweir 
409*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsSnap : public SdOptionsGeneric
410*cdf0e10cSrcweir {
411*cdf0e10cSrcweir private:
412*cdf0e10cSrcweir 
413*cdf0e10cSrcweir 	sal_Bool	bSnapHelplines	: 1;	// Snap/Object/SnapLine
414*cdf0e10cSrcweir 	sal_Bool	bSnapBorder 	: 1;	// Snap/Object/PageMargin
415*cdf0e10cSrcweir 	sal_Bool	bSnapFrame		: 1;	// Snap/Object/ObjectFrame
416*cdf0e10cSrcweir 	sal_Bool	bSnapPoints 	: 1;	// Snap/Object/ObjectPoint
417*cdf0e10cSrcweir 	sal_Bool	bOrtho			: 1;	// Snap/Position/CreatingMoving
418*cdf0e10cSrcweir 	sal_Bool	bBigOrtho		: 1;	// Snap/Position/ExtendEdges
419*cdf0e10cSrcweir 	sal_Bool	bRotate 		: 1;	// Snap/Position/Rotating
420*cdf0e10cSrcweir 	sal_Int16	nSnapArea;				// Snap/Object/Range
421*cdf0e10cSrcweir 	sal_Int16	nAngle;					// Snap/Position/RotatingValue
422*cdf0e10cSrcweir 	sal_Int16	nBezAngle;				// Snap/Position/PointReduction
423*cdf0e10cSrcweir 
424*cdf0e10cSrcweir protected:
425*cdf0e10cSrcweir 
426*cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
427*cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
428*cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
429*cdf0e10cSrcweir 
430*cdf0e10cSrcweir public:
431*cdf0e10cSrcweir 
432*cdf0e10cSrcweir 			SdOptionsSnap( sal_uInt16 nConfigId, sal_Bool bUseConfig );
433*cdf0e10cSrcweir 			virtual ~SdOptionsSnap() {}
434*cdf0e10cSrcweir 
435*cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsSnap& rOpt ) const;
436*cdf0e10cSrcweir 
437*cdf0e10cSrcweir 	sal_Bool	IsSnapHelplines() const { Init(); return (sal_Bool) bSnapHelplines; }
438*cdf0e10cSrcweir 	sal_Bool	IsSnapBorder() const { Init(); return (sal_Bool) bSnapBorder; }
439*cdf0e10cSrcweir 	sal_Bool	IsSnapFrame() const { Init(); return (sal_Bool) bSnapFrame; }
440*cdf0e10cSrcweir 	sal_Bool	IsSnapPoints() const { Init(); return (sal_Bool) bSnapPoints; }
441*cdf0e10cSrcweir 	sal_Bool	IsOrtho() const { Init(); return (sal_Bool) bOrtho; }
442*cdf0e10cSrcweir 	sal_Bool	IsBigOrtho() const { Init(); return (sal_Bool) bBigOrtho; }
443*cdf0e10cSrcweir 	sal_Bool	IsRotate() const { Init(); return (sal_Bool) bRotate; }
444*cdf0e10cSrcweir 	sal_Int16	GetSnapArea() const { Init(); return nSnapArea; }
445*cdf0e10cSrcweir 	sal_Int16	GetAngle() const { Init(); return nAngle; }
446*cdf0e10cSrcweir 	sal_Int16	GetEliminatePolyPointLimitAngle() const { Init(); return nBezAngle; }
447*cdf0e10cSrcweir 
448*cdf0e10cSrcweir 	void	SetSnapHelplines( sal_Bool bOn = sal_True ) { if( bSnapHelplines != bOn ) { OptionsChanged(); bSnapHelplines = bOn; } }
449*cdf0e10cSrcweir 	void	SetSnapBorder( sal_Bool bOn = sal_True ) { if( bSnapBorder != bOn ) { OptionsChanged(); bSnapBorder = bOn; } }
450*cdf0e10cSrcweir 	void	SetSnapFrame( sal_Bool bOn = sal_True ) { if( bSnapFrame != bOn ) { OptionsChanged(); bSnapFrame = bOn; } }
451*cdf0e10cSrcweir 	void	SetSnapPoints( sal_Bool bOn = sal_True ) { if( bSnapPoints != bOn ) { OptionsChanged(); bSnapPoints = bOn; } }
452*cdf0e10cSrcweir 	void	SetOrtho( sal_Bool bOn = sal_True ) { if( bOrtho != bOn ) { OptionsChanged(); bOrtho = bOn; } }
453*cdf0e10cSrcweir 	void	SetBigOrtho( sal_Bool bOn = sal_True ) { if( bBigOrtho != bOn ) { OptionsChanged(); bBigOrtho = bOn; } }
454*cdf0e10cSrcweir 	void	SetRotate( sal_Bool bOn = sal_True ) { if( bRotate != bOn ) { OptionsChanged(); bRotate = bOn; } }
455*cdf0e10cSrcweir 	void	SetSnapArea( sal_Int16 nIn ) { if( nSnapArea != nIn ) { OptionsChanged(); nSnapArea = nIn; } }
456*cdf0e10cSrcweir 	void	SetAngle( sal_Int16 nIn ) { if( nAngle != nIn ) { OptionsChanged(); nAngle = nIn; } }
457*cdf0e10cSrcweir 	void	SetEliminatePolyPointLimitAngle( sal_Int16 nIn ) { if( nBezAngle != nIn ) { OptionsChanged(); nBezAngle = nIn; } }
458*cdf0e10cSrcweir };
459*cdf0e10cSrcweir 
460*cdf0e10cSrcweir // -----------------------------------------------------------------------------
461*cdf0e10cSrcweir 
462*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsSnapItem : public SfxPoolItem
463*cdf0e10cSrcweir {
464*cdf0e10cSrcweir public:
465*cdf0e10cSrcweir 
466*cdf0e10cSrcweir 							SdOptionsSnapItem( sal_uInt16 nWhich);
467*cdf0e10cSrcweir 							SdOptionsSnapItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
468*cdf0e10cSrcweir 
469*cdf0e10cSrcweir 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
470*cdf0e10cSrcweir 	virtual int 			operator==( const SfxPoolItem& ) const;
471*cdf0e10cSrcweir 
472*cdf0e10cSrcweir 	void					SetOptions( SdOptions* pOpts ) const;
473*cdf0e10cSrcweir 
474*cdf0e10cSrcweir 	SdOptionsSnap&			GetOptionsSnap() { return maOptionsSnap; }
475*cdf0e10cSrcweir private:
476*cdf0e10cSrcweir 	SdOptionsSnap			maOptionsSnap;
477*cdf0e10cSrcweir };
478*cdf0e10cSrcweir 
479*cdf0e10cSrcweir // -----------------
480*cdf0e10cSrcweir // - SdOptionsZoom -
481*cdf0e10cSrcweir // -----------------
482*cdf0e10cSrcweir 
483*cdf0e10cSrcweir class SdOptionsZoom : public SdOptionsGeneric
484*cdf0e10cSrcweir {
485*cdf0e10cSrcweir private:
486*cdf0e10cSrcweir 
487*cdf0e10cSrcweir 	sal_Int32	nX;	// Zoom/ScaleX
488*cdf0e10cSrcweir 	sal_Int32	nY;	// Zoom/ScaleY
489*cdf0e10cSrcweir 
490*cdf0e10cSrcweir protected:
491*cdf0e10cSrcweir 
492*cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
493*cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
494*cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
495*cdf0e10cSrcweir 
496*cdf0e10cSrcweir public:
497*cdf0e10cSrcweir 
498*cdf0e10cSrcweir 			SdOptionsZoom( sal_uInt16 nConfigId, sal_Bool bUseConfig );
499*cdf0e10cSrcweir 			virtual ~SdOptionsZoom() {}
500*cdf0e10cSrcweir 
501*cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsZoom& rOpt ) const;
502*cdf0e10cSrcweir 
503*cdf0e10cSrcweir 	void	GetScale( sal_Int32& rX, sal_Int32& rY ) const { Init(); rX = nX; rY = nY; }
504*cdf0e10cSrcweir 	void	SetScale( sal_Int32 nInX, sal_Int32 nInY ) { if( nX != nInX || nY != nInY ) { OptionsChanged(); nX = nInX; nY = nInY; } }
505*cdf0e10cSrcweir };
506*cdf0e10cSrcweir 
507*cdf0e10cSrcweir // -----------------------------------------------------------------------------
508*cdf0e10cSrcweir 
509*cdf0e10cSrcweir // -----------------
510*cdf0e10cSrcweir // - SdOptionsGrid -
511*cdf0e10cSrcweir // -----------------
512*cdf0e10cSrcweir 
513*cdf0e10cSrcweir class SdOptionsGrid : public SdOptionsGeneric, public SvxOptionsGrid
514*cdf0e10cSrcweir {
515*cdf0e10cSrcweir protected:
516*cdf0e10cSrcweir 
517*cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
518*cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
519*cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
520*cdf0e10cSrcweir 
521*cdf0e10cSrcweir public:
522*cdf0e10cSrcweir 
523*cdf0e10cSrcweir 			SdOptionsGrid( sal_uInt16 nConfigId, sal_Bool bUseConfig );
524*cdf0e10cSrcweir 			virtual ~SdOptionsGrid();
525*cdf0e10cSrcweir 
526*cdf0e10cSrcweir 	void	SetDefaults();
527*cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsGrid& rOpt ) const;
528*cdf0e10cSrcweir 
529*cdf0e10cSrcweir 	sal_uInt32	GetFldDrawX() const { Init(); return SvxOptionsGrid::GetFldDrawX(); }
530*cdf0e10cSrcweir 	sal_uInt32 	GetFldDivisionX() const { Init(); return SvxOptionsGrid::GetFldDivisionX(); }
531*cdf0e10cSrcweir 	sal_uInt32	GetFldDrawY() const { Init(); return SvxOptionsGrid::GetFldDrawY(); }
532*cdf0e10cSrcweir 	sal_uInt32 	GetFldDivisionY() const { Init(); return SvxOptionsGrid::GetFldDivisionY(); }
533*cdf0e10cSrcweir 	sal_uInt32	GetFldSnapX() const { Init(); return SvxOptionsGrid::GetFldSnapX(); }
534*cdf0e10cSrcweir 	sal_uInt32	GetFldSnapY() const { Init(); return SvxOptionsGrid::GetFldSnapY();	}
535*cdf0e10cSrcweir 	sal_Bool	IsUseGridSnap() const { Init(); return SvxOptionsGrid::GetUseGridSnap(); }
536*cdf0e10cSrcweir 	sal_Bool	IsSynchronize() const { Init(); return SvxOptionsGrid::GetSynchronize(); }
537*cdf0e10cSrcweir 	sal_Bool	IsGridVisible() const { Init(); return SvxOptionsGrid::GetGridVisible(); }
538*cdf0e10cSrcweir 	sal_Bool	IsEqualGrid() const { Init(); return SvxOptionsGrid::GetEqualGrid(); }
539*cdf0e10cSrcweir 
540*cdf0e10cSrcweir 	void 	SetFldDrawX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDrawX() ) { OptionsChanged(); SvxOptionsGrid::SetFldDrawX( nSet ); } }
541*cdf0e10cSrcweir 	void 	SetFldDivisionX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDivisionX() ) { OptionsChanged(); SvxOptionsGrid::SetFldDivisionX( nSet ); } }
542*cdf0e10cSrcweir 	void 	SetFldDrawY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDrawY() ) { OptionsChanged(); SvxOptionsGrid::SetFldDrawY( nSet ); } }
543*cdf0e10cSrcweir 	void 	SetFldDivisionY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDivisionY() ) { OptionsChanged(); SvxOptionsGrid::SetFldDivisionY( nSet ); } }
544*cdf0e10cSrcweir 	void 	SetFldSnapX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldSnapX() ) { OptionsChanged(); SvxOptionsGrid::SetFldSnapX( nSet ); } }
545*cdf0e10cSrcweir 	void 	SetFldSnapY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldSnapY() ) { OptionsChanged(); SvxOptionsGrid::SetFldSnapY( nSet ); } }
546*cdf0e10cSrcweir 	void 	SetUseGridSnap( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetUseGridSnap() ) { OptionsChanged(); SvxOptionsGrid::SetUseGridSnap( bSet ); } }
547*cdf0e10cSrcweir 	void 	SetSynchronize( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetSynchronize() ) { OptionsChanged(); SvxOptionsGrid::SetSynchronize( bSet ); } }
548*cdf0e10cSrcweir 	void 	SetGridVisible( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetGridVisible() ) { OptionsChanged(); SvxOptionsGrid::SetGridVisible( bSet ); } }
549*cdf0e10cSrcweir 	void 	SetEqualGrid( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetEqualGrid() ) { OptionsChanged(); SvxOptionsGrid::SetEqualGrid( bSet ); } }
550*cdf0e10cSrcweir };
551*cdf0e10cSrcweir 
552*cdf0e10cSrcweir // -----------------------------------------------
553*cdf0e10cSrcweir 
554*cdf0e10cSrcweir class SdOptionsGridItem : public SvxGridItem
555*cdf0e10cSrcweir {
556*cdf0e10cSrcweir 
557*cdf0e10cSrcweir public:
558*cdf0e10cSrcweir 							SdOptionsGridItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
559*cdf0e10cSrcweir 
560*cdf0e10cSrcweir 	void					SetOptions( SdOptions* pOpts ) const;
561*cdf0e10cSrcweir };
562*cdf0e10cSrcweir 
563*cdf0e10cSrcweir // ------------------
564*cdf0e10cSrcweir // - SdOptionsPrint -
565*cdf0e10cSrcweir // ------------------
566*cdf0e10cSrcweir 
567*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsPrint : public SdOptionsGeneric
568*cdf0e10cSrcweir {
569*cdf0e10cSrcweir private:
570*cdf0e10cSrcweir 
571*cdf0e10cSrcweir 	sal_Bool	bDraw				: 1;	// Print/Content/Drawing
572*cdf0e10cSrcweir 	sal_Bool	bNotes 				: 1;	// Print/Content/Note
573*cdf0e10cSrcweir 	sal_Bool	bHandout			: 1;	// Print/Content/Handout
574*cdf0e10cSrcweir 	sal_Bool	bOutline			: 1;	// Print/Content/Outline
575*cdf0e10cSrcweir 	sal_Bool	bDate				: 1;	// Print/Other/Date
576*cdf0e10cSrcweir 	sal_Bool	bTime				: 1;	// Print/Other/Time
577*cdf0e10cSrcweir 	sal_Bool	bPagename			: 1;	// Print/Other/PageName
578*cdf0e10cSrcweir 	sal_Bool	bHiddenPages		: 1;	// Print/Other/HiddenPage
579*cdf0e10cSrcweir 	sal_Bool	bPagesize			: 1;	// Print/Page/PageSize
580*cdf0e10cSrcweir 	sal_Bool	bPagetile			: 1;	// Print/Page/PageTile
581*cdf0e10cSrcweir 	sal_Bool	bWarningPrinter		: 1;	//  These flags you get
582*cdf0e10cSrcweir 	sal_Bool	bWarningSize		: 1;	//  from the common options,
583*cdf0e10cSrcweir 	sal_Bool	bWarningOrientation	: 1;	//  currently org.openoffice.Office.Common.xml (class OfaMiscCfg ; sfx2/misccfg.hxx )
584*cdf0e10cSrcweir 	sal_Bool	bBooklet			: 1;	// Print/Page/Booklet
585*cdf0e10cSrcweir 	sal_Bool	bFront 				: 1;	// Print/Page/BookletFront
586*cdf0e10cSrcweir 	sal_Bool	bBack				: 1;	// Print/Page/BookletFront
587*cdf0e10cSrcweir 	sal_Bool	bCutPage   			: 1;	// NOT persistent !!!
588*cdf0e10cSrcweir 	sal_Bool	bPaperbin  			: 1;	// Print/Other/FromPrinterSetup
589*cdf0e10cSrcweir 	sal_Bool	mbHandoutHorizontal	: 1;	// Order Page previews on Handout Pages horizontal
590*cdf0e10cSrcweir 	sal_uInt16	mnHandoutPages;				// Number of page previews on handout page (only 1/2/4/6/9 are supported)
591*cdf0e10cSrcweir 	sal_uInt16	nQuality;					// Print/Other/Quality
592*cdf0e10cSrcweir 
593*cdf0e10cSrcweir protected:
594*cdf0e10cSrcweir 
595*cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
596*cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
597*cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
598*cdf0e10cSrcweir 
599*cdf0e10cSrcweir public:
600*cdf0e10cSrcweir 
601*cdf0e10cSrcweir 			SdOptionsPrint( sal_uInt16 nConfigId, sal_Bool bUseConfig );
602*cdf0e10cSrcweir 			virtual ~SdOptionsPrint() {}
603*cdf0e10cSrcweir 
604*cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsPrint& rOpt ) const;
605*cdf0e10cSrcweir 
606*cdf0e10cSrcweir 	sal_Bool	IsDraw() const { Init(); return (sal_Bool) bDraw; }
607*cdf0e10cSrcweir 	sal_Bool	IsNotes() const { Init(); return (sal_Bool) bNotes; }
608*cdf0e10cSrcweir 	sal_Bool	IsHandout() const { Init(); return (sal_Bool) bHandout; }
609*cdf0e10cSrcweir 	sal_Bool	IsOutline() const { Init(); return (sal_Bool) bOutline; }
610*cdf0e10cSrcweir 	sal_Bool	IsDate() const { Init(); return (sal_Bool) bDate; }
611*cdf0e10cSrcweir 	sal_Bool	IsTime() const { Init(); return (sal_Bool) bTime; }
612*cdf0e10cSrcweir 	sal_Bool	IsPagename() const { Init(); return (sal_Bool) bPagename; }
613*cdf0e10cSrcweir 	sal_Bool	IsHiddenPages() const { Init(); return (sal_Bool) bHiddenPages; }
614*cdf0e10cSrcweir 	sal_Bool	IsPagesize() const { Init(); return (sal_Bool) bPagesize; }
615*cdf0e10cSrcweir 	sal_Bool	IsPagetile() const { Init(); return (sal_Bool) bPagetile; }
616*cdf0e10cSrcweir 	sal_Bool	IsWarningPrinter() const { Init(); return (sal_Bool) bWarningPrinter; }
617*cdf0e10cSrcweir 	sal_Bool	IsWarningSize() const { Init(); return (sal_Bool) bWarningSize; }
618*cdf0e10cSrcweir 	sal_Bool	IsWarningOrientation() const { Init(); return (sal_Bool) bWarningOrientation; }
619*cdf0e10cSrcweir 	sal_Bool	IsBooklet() const { Init(); return (sal_Bool) bBooklet; }
620*cdf0e10cSrcweir 	sal_Bool	IsFrontPage() const { Init(); return (sal_Bool) bFront; }
621*cdf0e10cSrcweir 	sal_Bool	IsBackPage() const { Init(); return (sal_Bool) bBack; }
622*cdf0e10cSrcweir 	sal_Bool	IsCutPage() const { Init(); return (sal_Bool) bCutPage; }
623*cdf0e10cSrcweir 	sal_Bool	IsPaperbin() const { Init(); return (sal_Bool) bPaperbin; }
624*cdf0e10cSrcweir 	sal_uInt16	GetOutputQuality() const { Init(); return nQuality; }
625*cdf0e10cSrcweir 	sal_Bool	IsHandoutHorizontal() const { Init(); return mbHandoutHorizontal; }
626*cdf0e10cSrcweir 	sal_uInt16	GetHandoutPages() const { Init(); return mnHandoutPages; }
627*cdf0e10cSrcweir 
628*cdf0e10cSrcweir 	void	SetDraw( sal_Bool bOn = sal_True ) { if( bDraw != bOn ) { OptionsChanged(); bDraw = bOn; } }
629*cdf0e10cSrcweir 	void	SetNotes( sal_Bool bOn = sal_True ) { if( bNotes != bOn ) { OptionsChanged(); bNotes = bOn; } }
630*cdf0e10cSrcweir 	void	SetHandout( sal_Bool bOn = sal_True ) { if( bHandout != bOn ) { OptionsChanged(); bHandout = bOn; } }
631*cdf0e10cSrcweir 	void	SetOutline( sal_Bool bOn = sal_True ) { if( bOutline != bOn ) { OptionsChanged(); bOutline = bOn; } }
632*cdf0e10cSrcweir 	void	SetDate( sal_Bool bOn = sal_True ) { if( bDate != bOn ) { OptionsChanged(); bDate = bOn; } }
633*cdf0e10cSrcweir 	void	SetTime( sal_Bool bOn = sal_True ) { if( bTime != bOn ) { OptionsChanged(); bTime = bOn; } }
634*cdf0e10cSrcweir 	void	SetPagename( sal_Bool bOn = sal_True ) { if( bPagename != bOn ) { OptionsChanged(); bPagename = bOn; } }
635*cdf0e10cSrcweir 	void	SetHiddenPages( sal_Bool bOn = sal_True ) { if( bHiddenPages != bOn ) { OptionsChanged(); bHiddenPages = bOn; } }
636*cdf0e10cSrcweir 	void	SetPagesize( sal_Bool bOn = sal_True ) { if( bPagesize != bOn ) { OptionsChanged(); bPagesize = bOn; } }
637*cdf0e10cSrcweir 	void	SetPagetile( sal_Bool bOn = sal_True ) { if( bPagetile != bOn ) { OptionsChanged(); bPagetile = bOn; } }
638*cdf0e10cSrcweir 	void	SetWarningPrinter( sal_Bool bOn = sal_True ) { if( bWarningPrinter != bOn ) { OptionsChanged(); bWarningPrinter = bOn; } }
639*cdf0e10cSrcweir 	void	SetWarningSize( sal_Bool bOn = sal_True ) { if( bWarningSize != bOn ) { OptionsChanged(); bWarningSize = bOn; } }
640*cdf0e10cSrcweir 	void	SetWarningOrientation( sal_Bool bOn = sal_True ) { if( bWarningOrientation != bOn ) { OptionsChanged(); bWarningOrientation = bOn; } }
641*cdf0e10cSrcweir 	void	SetBooklet( sal_Bool bOn = sal_True ) { if( bBooklet != bOn ) { OptionsChanged(); bBooklet = bOn; } }
642*cdf0e10cSrcweir 	void	SetFrontPage( sal_Bool bOn = sal_True ) { if( bFront != bOn ) { OptionsChanged(); bFront = bOn; } }
643*cdf0e10cSrcweir 	void	SetBackPage( sal_Bool bOn = sal_True ) { if( bBack != bOn ) { OptionsChanged(); bBack = bOn; } }
644*cdf0e10cSrcweir 	void	SetCutPage( sal_Bool bOn = sal_True ) { if( bCutPage != bOn ) { OptionsChanged(); bCutPage = bOn; } }
645*cdf0e10cSrcweir 	void	SetPaperbin( sal_Bool bOn = sal_True ) { if( bPaperbin != bOn ) { OptionsChanged(); bPaperbin = bOn; } }
646*cdf0e10cSrcweir 	void	SetOutputQuality( sal_uInt16 nInQuality ) { if( nQuality != nInQuality ) { OptionsChanged(); nQuality = nInQuality; } }
647*cdf0e10cSrcweir 	void	SetHandoutHorizontal( sal_Bool bHandoutHorizontal ) { if( mbHandoutHorizontal != bHandoutHorizontal ) { OptionsChanged(); mbHandoutHorizontal = bHandoutHorizontal; } }
648*cdf0e10cSrcweir 	void	SetHandoutPages( sal_uInt16 nHandoutPages ) { if( nHandoutPages != mnHandoutPages ) { OptionsChanged(); mnHandoutPages = nHandoutPages; } }
649*cdf0e10cSrcweir };
650*cdf0e10cSrcweir 
651*cdf0e10cSrcweir // -----------------------------------------------------------------------------
652*cdf0e10cSrcweir 
653*cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsPrintItem : public SfxPoolItem
654*cdf0e10cSrcweir {
655*cdf0e10cSrcweir public:
656*cdf0e10cSrcweir 
657*cdf0e10cSrcweir 							SdOptionsPrintItem( sal_uInt16 nWhich);
658*cdf0e10cSrcweir 							SdOptionsPrintItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
659*cdf0e10cSrcweir 
660*cdf0e10cSrcweir 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
661*cdf0e10cSrcweir 	virtual int 			operator==( const SfxPoolItem& ) const;
662*cdf0e10cSrcweir 
663*cdf0e10cSrcweir 	void					SetOptions( SdOptions* pOpts ) const;
664*cdf0e10cSrcweir 
665*cdf0e10cSrcweir 	SdOptionsPrint&			GetOptionsPrint() { return maOptionsPrint; }
666*cdf0e10cSrcweir 	const SdOptionsPrint&	GetOptionsPrint() const { return maOptionsPrint; }
667*cdf0e10cSrcweir private:
668*cdf0e10cSrcweir 	SdOptionsPrint	maOptionsPrint;
669*cdf0e10cSrcweir };
670*cdf0e10cSrcweir 
671*cdf0e10cSrcweir // -------------
672*cdf0e10cSrcweir // - SdOptions -
673*cdf0e10cSrcweir // -------------
674*cdf0e10cSrcweir 
675*cdf0e10cSrcweir class SdOptions : public SdOptionsLayout, public SdOptionsContents,
676*cdf0e10cSrcweir 				  public SdOptionsMisc, public SdOptionsSnap,
677*cdf0e10cSrcweir 				  public SdOptionsZoom, public SdOptionsGrid,
678*cdf0e10cSrcweir 				  public SdOptionsPrint
679*cdf0e10cSrcweir {
680*cdf0e10cSrcweir public:
681*cdf0e10cSrcweir 
682*cdf0e10cSrcweir 						SdOptions( sal_uInt16 nConfigId );
683*cdf0e10cSrcweir 						virtual ~SdOptions();
684*cdf0e10cSrcweir 
685*cdf0e10cSrcweir 	void				StoreConfig( sal_uLong nOptionRange = SD_OPTIONS_ALL );
686*cdf0e10cSrcweir };
687*cdf0e10cSrcweir 
688*cdf0e10cSrcweir #endif // _SD_OPTSITEM_HXX
689