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