xref: /aoo41x/main/sd/source/ui/inc/optsitem.hxx (revision c45d927a)
1*c45d927aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c45d927aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c45d927aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c45d927aSAndrew Rist  * distributed with this work for additional information
6*c45d927aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c45d927aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c45d927aSAndrew Rist  * "License"); you may not use this file except in compliance
9*c45d927aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c45d927aSAndrew Rist  *
11*c45d927aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c45d927aSAndrew Rist  *
13*c45d927aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c45d927aSAndrew Rist  * software distributed under the License is distributed on an
15*c45d927aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c45d927aSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c45d927aSAndrew Rist  * specific language governing permissions and limitations
18*c45d927aSAndrew Rist  * under the License.
19*c45d927aSAndrew Rist  *
20*c45d927aSAndrew Rist  *************************************************************/
21*c45d927aSAndrew Rist 
22*c45d927aSAndrew 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;
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 
125cdf0e10cSrcweir 	const ::rtl::OUString&	GetSubTree() const { return maSubTree; }
126cdf0e10cSrcweir 	sal_uInt16					GetConfigId() const { return mnConfigId; }
127cdf0e10cSrcweir 
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 );
160cdf0e10cSrcweir 			virtual ~SdOptionsLayout() {}
161cdf0e10cSrcweir 
162cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsLayout& rOpt ) const;
163cdf0e10cSrcweir 
164cdf0e10cSrcweir 	sal_Bool	IsRulerVisible() const { Init(); return (sal_Bool) bRuler; }
165cdf0e10cSrcweir 	sal_Bool	IsMoveOutline() const { Init(); return (sal_Bool) bMoveOutline; }
166cdf0e10cSrcweir 	sal_Bool	IsDragStripes() const { Init(); return (sal_Bool) bDragStripes; }
167cdf0e10cSrcweir 	sal_Bool	IsHandlesBezier() const { Init(); return (sal_Bool) bHandlesBezier; }
168cdf0e10cSrcweir 	sal_Bool	IsHelplines() const { Init(); return (sal_Bool) bHelplines; }
169cdf0e10cSrcweir 	sal_uInt16  GetMetric() const { Init(); return( ( 0xffff == nMetric ) ? (sal_uInt16)SfxModule::GetCurrentFieldUnit() : nMetric ); }
170cdf0e10cSrcweir 	sal_uInt16	GetDefTab() const { Init(); return nDefTab; }
171cdf0e10cSrcweir 
172cdf0e10cSrcweir 	void	SetRulerVisible( sal_Bool bOn = sal_True ) { if( bRuler != bOn ) { OptionsChanged(); bRuler = bOn; } }
173cdf0e10cSrcweir 	void	SetMoveOutline( sal_Bool bOn = sal_True ) { if( bMoveOutline != bOn ) { OptionsChanged(); bMoveOutline = bOn; } }
174cdf0e10cSrcweir 	void	SetDragStripes( sal_Bool bOn = sal_True ) { if( bDragStripes != bOn ) { OptionsChanged(); bDragStripes = bOn; } }
175cdf0e10cSrcweir 	void	SetHandlesBezier( sal_Bool bOn = sal_True ) { if( bHandlesBezier != bOn ) { OptionsChanged(); bHandlesBezier = bOn; } }
176cdf0e10cSrcweir 	void	SetHelplines( sal_Bool bOn = sal_True ) { if( bHelplines != bOn ) { OptionsChanged(); bHelplines = bOn; } }
177cdf0e10cSrcweir 	void	SetMetric( sal_uInt16 nInMetric ) { if( nMetric != nInMetric ) { OptionsChanged(); nMetric = nInMetric; } }
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 
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 );
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 
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
263cdf0e10cSrcweir 	sal_Bool	bSolidDragging			: 1;	// Misc/ModifyWithAttributes
264cdf0e10cSrcweir 	sal_Bool	bSolidMarkHdl			: 1;	// /Misc/SimpleHandles
265cdf0e10cSrcweir 	sal_Bool	bSummationOfParagraphs	: 1;	// misc/SummationOfParagraphs
266cdf0e10cSrcweir 	// #90356#
267cdf0e10cSrcweir 	sal_Bool	bShowUndoDeleteWarning	: 1;	// Misc/ShowUndoDeleteWarning
268cdf0e10cSrcweir 	// #i75315#
269cdf0e10cSrcweir 	sal_Bool	bSlideshowRespectZOrder	: 1;	// Misc/SlideshowRespectZOrder
270cdf0e10cSrcweir     sal_Bool    bShowComments           : 1;    // Misc/ShowComments
271cdf0e10cSrcweir 
272cdf0e10cSrcweir 	sal_Bool	bPreviewNewEffects;
273cdf0e10cSrcweir 	sal_Bool	bPreviewChangedEffects;
274cdf0e10cSrcweir 	sal_Bool	bPreviewTransitions;
275cdf0e10cSrcweir 
276cdf0e10cSrcweir 	sal_Int32	mnDisplay;
277cdf0e10cSrcweir 
278cdf0e10cSrcweir 	sal_Int32 mnPenColor;
279cdf0e10cSrcweir 	double mnPenWidth;
280cdf0e10cSrcweir 
281cdf0e10cSrcweir     /** This value controls the device to use for formatting documents.
282cdf0e10cSrcweir         The currently supported values are 0 for the current printer or 1
283cdf0e10cSrcweir         for the printer independent virtual device the can be retrieved from
284cdf0e10cSrcweir         the modules.
285cdf0e10cSrcweir     */
286cdf0e10cSrcweir 	sal_uInt16	mnPrinterIndependentLayout;     // Misc/Compatibility/PrinterIndependentLayout
287cdf0e10cSrcweir // Misc
288cdf0e10cSrcweir 
289cdf0e10cSrcweir protected:
290cdf0e10cSrcweir 
291cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
292cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
293cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
294cdf0e10cSrcweir 
295cdf0e10cSrcweir public:
296cdf0e10cSrcweir 
297cdf0e10cSrcweir 			SdOptionsMisc( sal_uInt16 nConfigId, sal_Bool bUseConfig );
298cdf0e10cSrcweir 			virtual ~SdOptionsMisc() {}
299cdf0e10cSrcweir 
300cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsMisc& rOpt ) const;
301cdf0e10cSrcweir 
302cdf0e10cSrcweir 	sal_Bool	IsStartWithTemplate() const { Init(); return (sal_Bool) bStartWithTemplate; }
303cdf0e10cSrcweir 	sal_Bool	IsMarkedHitMovesAlways() const { Init(); return (sal_Bool) bMarkedHitMovesAlways; }
304cdf0e10cSrcweir 	sal_Bool	IsMoveOnlyDragging() const { Init(); return (sal_Bool) bMoveOnlyDragging; }
305cdf0e10cSrcweir 	sal_Bool	IsCrookNoContortion() const { Init(); return (sal_Bool) bCrookNoContortion; }
306cdf0e10cSrcweir 	sal_Bool	IsQuickEdit() const { Init(); return (sal_Bool) bQuickEdit; }
307cdf0e10cSrcweir 	sal_Bool	IsMasterPagePaintCaching() const { Init(); return (sal_Bool) bMasterPageCache; }
308cdf0e10cSrcweir 	sal_Bool	IsDragWithCopy() const { Init(); return (sal_Bool) bDragWithCopy; }
309cdf0e10cSrcweir 	sal_Bool	IsPickThrough() const { Init(); return (sal_Bool) bPickThrough; }
310cdf0e10cSrcweir 	sal_Bool	IsBigHandles() const { Init(); return (sal_Bool) bBigHandles; }
311cdf0e10cSrcweir 	sal_Bool	IsDoubleClickTextEdit() const { Init(); return (sal_Bool) bDoubleClickTextEdit; }
312cdf0e10cSrcweir 	sal_Bool	IsClickChangeRotation() const { Init(); return (sal_Bool) bClickChangeRotation; }
313cdf0e10cSrcweir 	sal_Bool	IsStartWithActualPage() const { Init(); return (sal_Bool) bStartWithActualPage; }
314cdf0e10cSrcweir 	sal_Bool	IsSolidDragging() const { Init(); return (sal_Bool) bSolidDragging; }
315cdf0e10cSrcweir 	sal_Bool	IsSolidMarkHdl() const { Init(); return (sal_Bool) bSolidMarkHdl; }
316cdf0e10cSrcweir 	sal_Bool	IsSummationOfParagraphs() const { Init(); return bSummationOfParagraphs != 0; };
317cdf0e10cSrcweir 
318cdf0e10cSrcweir     /** Return the currently selected printer independent layout mode.
319cdf0e10cSrcweir         @return
320cdf0e10cSrcweir             Returns 1 for printer independent layout enabled and 0 when it
321cdf0e10cSrcweir             is disabled.  Other values are reserved for future use.
322cdf0e10cSrcweir     */
323cdf0e10cSrcweir 	sal_uInt16	GetPrinterIndependentLayout() const { Init(); return mnPrinterIndependentLayout; };
324cdf0e10cSrcweir 	// #90356#
325cdf0e10cSrcweir 	sal_Bool	IsShowUndoDeleteWarning() const { Init(); return (sal_Bool) bShowUndoDeleteWarning; }
326cdf0e10cSrcweir 	sal_Bool	IsSlideshowRespectZOrder() const { Init(); return (sal_Bool) bSlideshowRespectZOrder; }
327cdf0e10cSrcweir 	// #97016#
328cdf0e10cSrcweir 	sal_uLong	GetDefaultObjectSizeWidth() const { Init(); return nDefaultObjectSizeWidth; }
329cdf0e10cSrcweir 	sal_uLong	GetDefaultObjectSizeHeight() const { Init(); return nDefaultObjectSizeHeight; }
330cdf0e10cSrcweir 
331cdf0e10cSrcweir 	sal_Bool	IsPreviewNewEffects() const { Init(); return bPreviewNewEffects; }
332cdf0e10cSrcweir 	sal_Bool	IsPreviewChangedEffects() const { Init(); return bPreviewChangedEffects; }
333cdf0e10cSrcweir 	sal_Bool	IsPreviewTransitions() const { Init(); return bPreviewTransitions; }
334cdf0e10cSrcweir 
335cdf0e10cSrcweir 	sal_Int32	GetDisplay() const { Init(); return mnDisplay; }
336cdf0e10cSrcweir 	void		SetDisplay( sal_Int32 nDisplay = 0 ) { if( mnDisplay != nDisplay ) { OptionsChanged(); mnDisplay = nDisplay; } }
337cdf0e10cSrcweir 
338cdf0e10cSrcweir 	sal_Int32 GetPresentationPenColor() const { Init(); return mnPenColor; }
339cdf0e10cSrcweir 	void	  SetPresentationPenColor( sal_Int32 nPenColor ) { if( mnPenColor != nPenColor ) { OptionsChanged(); mnPenColor = nPenColor; } }
340cdf0e10cSrcweir 
341cdf0e10cSrcweir 	double	  GetPresentationPenWidth() const { Init(); return mnPenWidth; }
342cdf0e10cSrcweir 	void	  SetPresentationPenWidth( double nPenWidth ) { if( mnPenWidth != nPenWidth ) { OptionsChanged(); mnPenWidth = nPenWidth; } }
343cdf0e10cSrcweir 
344cdf0e10cSrcweir 	void	SetStartWithTemplate( sal_Bool bOn = sal_True ) { if( bStartWithTemplate != bOn ) { OptionsChanged(); bStartWithTemplate = bOn; } }
345cdf0e10cSrcweir 	void	SetMarkedHitMovesAlways( sal_Bool bOn = sal_True ) { if( bMarkedHitMovesAlways != bOn ) { OptionsChanged(); bMarkedHitMovesAlways = bOn; } }
346cdf0e10cSrcweir 	void	SetMoveOnlyDragging( sal_Bool bOn = sal_True ) { if( bMoveOnlyDragging != bOn ) { OptionsChanged(); bMoveOnlyDragging = bOn; } }
347cdf0e10cSrcweir 	void	SetCrookNoContortion( sal_Bool bOn = sal_True ) { if( bCrookNoContortion != bOn ) { OptionsChanged(); bCrookNoContortion = bOn; } }
348cdf0e10cSrcweir 	void	SetQuickEdit( sal_Bool bOn = sal_True ) { if( bQuickEdit != bOn ) { OptionsChanged(); bQuickEdit = bOn; } }
349cdf0e10cSrcweir 	void	SetMasterPagePaintCaching( sal_Bool bOn = sal_True ) { if( bMasterPageCache != bOn ) { OptionsChanged(); bMasterPageCache = bOn; } }
350cdf0e10cSrcweir 	void	SetDragWithCopy( sal_Bool bOn = sal_True ) { if( bDragWithCopy != bOn ) { OptionsChanged(); bDragWithCopy = bOn; } }
351cdf0e10cSrcweir 	void	SetPickThrough( sal_Bool bOn = sal_True ) { if( bPickThrough != bOn ) { OptionsChanged(); bPickThrough = bOn; } }
352cdf0e10cSrcweir 	void	SetBigHandles( sal_Bool bOn = sal_True ) { if( bBigHandles != bOn ) { OptionsChanged(); bBigHandles = bOn; } }
353cdf0e10cSrcweir 	void	SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { if( bDoubleClickTextEdit != bOn ) { OptionsChanged(); bDoubleClickTextEdit = bOn; } }
354cdf0e10cSrcweir 	void	SetClickChangeRotation( sal_Bool bOn = sal_True ) { if( bClickChangeRotation != bOn ) { OptionsChanged(); bClickChangeRotation = bOn; } }
355cdf0e10cSrcweir 	void	SetStartWithActualPage( sal_Bool bOn = sal_True ) { if( bStartWithActualPage != bOn ) { OptionsChanged(); bStartWithActualPage = bOn; } }
356cdf0e10cSrcweir 	void	SetSummationOfParagraphs( sal_Bool bOn = sal_True ){ if ( bOn != bSummationOfParagraphs ) { OptionsChanged(); bSummationOfParagraphs = bOn; } }
357cdf0e10cSrcweir     /** Set the printer independent layout mode.
358cdf0e10cSrcweir         @param nOn
359cdf0e10cSrcweir             The default value is to switch printer independent layout on,
360cdf0e10cSrcweir             hence the parameters name.  Use 0 for turning it off.  Other
361cdf0e10cSrcweir             values are reserved for future use.
362cdf0e10cSrcweir     */
363cdf0e10cSrcweir 	void	SetPrinterIndependentLayout (sal_uInt16 nOn = 1 ){ if ( nOn != mnPrinterIndependentLayout ) { OptionsChanged(); mnPrinterIndependentLayout = nOn; } }
364cdf0e10cSrcweir 	void	SetSolidDragging( sal_Bool bOn = sal_True ) { if( bSolidDragging != bOn ) { OptionsChanged(); bSolidDragging = bOn; } }
365cdf0e10cSrcweir 	void	SetSolidMarkHdl( sal_Bool bOn = sal_True ) { if( bSolidMarkHdl != bOn ) { OptionsChanged(); bSolidMarkHdl = bOn; } }
366cdf0e10cSrcweir 	// #90356#
367cdf0e10cSrcweir 	void	SetShowUndoDeleteWarning( sal_Bool bOn = sal_True ) { if( bShowUndoDeleteWarning != bOn ) { OptionsChanged(); bShowUndoDeleteWarning = bOn; } }
368cdf0e10cSrcweir 	void	SetSlideshowRespectZOrder( sal_Bool bOn = sal_True ) { if( bSlideshowRespectZOrder != bOn ) { OptionsChanged(); bSlideshowRespectZOrder = bOn; } }
369cdf0e10cSrcweir 	// #97016#
370cdf0e10cSrcweir 	void	SetDefaultObjectSizeWidth( sal_uLong nWidth ) { if( nDefaultObjectSizeWidth != nWidth ) { OptionsChanged(); nDefaultObjectSizeWidth = nWidth; } }
371cdf0e10cSrcweir 	void	SetDefaultObjectSizeHeight( sal_uLong nHeight ) { if( nDefaultObjectSizeHeight != nHeight ) { OptionsChanged(); nDefaultObjectSizeHeight = nHeight; } }
372cdf0e10cSrcweir 
373cdf0e10cSrcweir 	void	SetPreviewNewEffects( sal_Bool bOn )  { if( bPreviewNewEffects != bOn ) { OptionsChanged(); bPreviewNewEffects = bOn; } }
374cdf0e10cSrcweir 	void	SetPreviewChangedEffects( sal_Bool bOn )  { if( bPreviewChangedEffects != bOn ) { OptionsChanged(); bPreviewChangedEffects = bOn; } }
375cdf0e10cSrcweir 	void	SetPreviewTransitions( sal_Bool bOn )  { if( bPreviewTransitions != bOn ) { OptionsChanged(); bPreviewTransitions = bOn; } }
376cdf0e10cSrcweir 
377cdf0e10cSrcweir 	sal_Bool    IsShowComments() const { Init(); return bShowComments; }
378cdf0e10cSrcweir     void    SetShowComments( sal_Bool bShow )  { if( bShowComments != bShow ) { OptionsChanged(); bShowComments = bShow; } }
379cdf0e10cSrcweir };
380cdf0e10cSrcweir 
381cdf0e10cSrcweir // -----------------------------------------------------------------------------
382cdf0e10cSrcweir 
383cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsMiscItem : public SfxPoolItem
384cdf0e10cSrcweir {
385cdf0e10cSrcweir public:
386cdf0e10cSrcweir 
387cdf0e10cSrcweir 							SdOptionsMiscItem( sal_uInt16 nWhich);
388cdf0e10cSrcweir 							SdOptionsMiscItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
389cdf0e10cSrcweir 
390cdf0e10cSrcweir 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
391cdf0e10cSrcweir 	virtual int 			operator==( const SfxPoolItem& ) const;
392cdf0e10cSrcweir 
393cdf0e10cSrcweir 	void					SetOptions( SdOptions* pOpts ) const;
394cdf0e10cSrcweir 
395cdf0e10cSrcweir 	SdOptionsMisc&			GetOptionsMisc() { return maOptionsMisc; }
396cdf0e10cSrcweir 	const SdOptionsMisc&	GetOptionsMisc() const { return maOptionsMisc; }
397cdf0e10cSrcweir private:
398cdf0e10cSrcweir 	SdOptionsMisc			maOptionsMisc;
399cdf0e10cSrcweir };
400cdf0e10cSrcweir 
401cdf0e10cSrcweir // -----------------
402cdf0e10cSrcweir // - SdOptionsSnap -
403cdf0e10cSrcweir // -----------------
404cdf0e10cSrcweir 
405cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsSnap : public SdOptionsGeneric
406cdf0e10cSrcweir {
407cdf0e10cSrcweir private:
408cdf0e10cSrcweir 
409cdf0e10cSrcweir 	sal_Bool	bSnapHelplines	: 1;	// Snap/Object/SnapLine
410cdf0e10cSrcweir 	sal_Bool	bSnapBorder 	: 1;	// Snap/Object/PageMargin
411cdf0e10cSrcweir 	sal_Bool	bSnapFrame		: 1;	// Snap/Object/ObjectFrame
412cdf0e10cSrcweir 	sal_Bool	bSnapPoints 	: 1;	// Snap/Object/ObjectPoint
413cdf0e10cSrcweir 	sal_Bool	bOrtho			: 1;	// Snap/Position/CreatingMoving
414cdf0e10cSrcweir 	sal_Bool	bBigOrtho		: 1;	// Snap/Position/ExtendEdges
415cdf0e10cSrcweir 	sal_Bool	bRotate 		: 1;	// Snap/Position/Rotating
416cdf0e10cSrcweir 	sal_Int16	nSnapArea;				// Snap/Object/Range
417cdf0e10cSrcweir 	sal_Int16	nAngle;					// Snap/Position/RotatingValue
418cdf0e10cSrcweir 	sal_Int16	nBezAngle;				// Snap/Position/PointReduction
419cdf0e10cSrcweir 
420cdf0e10cSrcweir protected:
421cdf0e10cSrcweir 
422cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
423cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
424cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
425cdf0e10cSrcweir 
426cdf0e10cSrcweir public:
427cdf0e10cSrcweir 
428cdf0e10cSrcweir 			SdOptionsSnap( sal_uInt16 nConfigId, sal_Bool bUseConfig );
429cdf0e10cSrcweir 			virtual ~SdOptionsSnap() {}
430cdf0e10cSrcweir 
431cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsSnap& rOpt ) const;
432cdf0e10cSrcweir 
433cdf0e10cSrcweir 	sal_Bool	IsSnapHelplines() const { Init(); return (sal_Bool) bSnapHelplines; }
434cdf0e10cSrcweir 	sal_Bool	IsSnapBorder() const { Init(); return (sal_Bool) bSnapBorder; }
435cdf0e10cSrcweir 	sal_Bool	IsSnapFrame() const { Init(); return (sal_Bool) bSnapFrame; }
436cdf0e10cSrcweir 	sal_Bool	IsSnapPoints() const { Init(); return (sal_Bool) bSnapPoints; }
437cdf0e10cSrcweir 	sal_Bool	IsOrtho() const { Init(); return (sal_Bool) bOrtho; }
438cdf0e10cSrcweir 	sal_Bool	IsBigOrtho() const { Init(); return (sal_Bool) bBigOrtho; }
439cdf0e10cSrcweir 	sal_Bool	IsRotate() const { Init(); return (sal_Bool) bRotate; }
440cdf0e10cSrcweir 	sal_Int16	GetSnapArea() const { Init(); return nSnapArea; }
441cdf0e10cSrcweir 	sal_Int16	GetAngle() const { Init(); return nAngle; }
442cdf0e10cSrcweir 	sal_Int16	GetEliminatePolyPointLimitAngle() const { Init(); return nBezAngle; }
443cdf0e10cSrcweir 
444cdf0e10cSrcweir 	void	SetSnapHelplines( sal_Bool bOn = sal_True ) { if( bSnapHelplines != bOn ) { OptionsChanged(); bSnapHelplines = bOn; } }
445cdf0e10cSrcweir 	void	SetSnapBorder( sal_Bool bOn = sal_True ) { if( bSnapBorder != bOn ) { OptionsChanged(); bSnapBorder = bOn; } }
446cdf0e10cSrcweir 	void	SetSnapFrame( sal_Bool bOn = sal_True ) { if( bSnapFrame != bOn ) { OptionsChanged(); bSnapFrame = bOn; } }
447cdf0e10cSrcweir 	void	SetSnapPoints( sal_Bool bOn = sal_True ) { if( bSnapPoints != bOn ) { OptionsChanged(); bSnapPoints = bOn; } }
448cdf0e10cSrcweir 	void	SetOrtho( sal_Bool bOn = sal_True ) { if( bOrtho != bOn ) { OptionsChanged(); bOrtho = bOn; } }
449cdf0e10cSrcweir 	void	SetBigOrtho( sal_Bool bOn = sal_True ) { if( bBigOrtho != bOn ) { OptionsChanged(); bBigOrtho = bOn; } }
450cdf0e10cSrcweir 	void	SetRotate( sal_Bool bOn = sal_True ) { if( bRotate != bOn ) { OptionsChanged(); bRotate = bOn; } }
451cdf0e10cSrcweir 	void	SetSnapArea( sal_Int16 nIn ) { if( nSnapArea != nIn ) { OptionsChanged(); nSnapArea = nIn; } }
452cdf0e10cSrcweir 	void	SetAngle( sal_Int16 nIn ) { if( nAngle != nIn ) { OptionsChanged(); nAngle = nIn; } }
453cdf0e10cSrcweir 	void	SetEliminatePolyPointLimitAngle( sal_Int16 nIn ) { if( nBezAngle != nIn ) { OptionsChanged(); nBezAngle = nIn; } }
454cdf0e10cSrcweir };
455cdf0e10cSrcweir 
456cdf0e10cSrcweir // -----------------------------------------------------------------------------
457cdf0e10cSrcweir 
458cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsSnapItem : public SfxPoolItem
459cdf0e10cSrcweir {
460cdf0e10cSrcweir public:
461cdf0e10cSrcweir 
462cdf0e10cSrcweir 							SdOptionsSnapItem( sal_uInt16 nWhich);
463cdf0e10cSrcweir 							SdOptionsSnapItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
464cdf0e10cSrcweir 
465cdf0e10cSrcweir 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
466cdf0e10cSrcweir 	virtual int 			operator==( const SfxPoolItem& ) const;
467cdf0e10cSrcweir 
468cdf0e10cSrcweir 	void					SetOptions( SdOptions* pOpts ) const;
469cdf0e10cSrcweir 
470cdf0e10cSrcweir 	SdOptionsSnap&			GetOptionsSnap() { return maOptionsSnap; }
471cdf0e10cSrcweir private:
472cdf0e10cSrcweir 	SdOptionsSnap			maOptionsSnap;
473cdf0e10cSrcweir };
474cdf0e10cSrcweir 
475cdf0e10cSrcweir // -----------------
476cdf0e10cSrcweir // - SdOptionsZoom -
477cdf0e10cSrcweir // -----------------
478cdf0e10cSrcweir 
479cdf0e10cSrcweir class SdOptionsZoom : public SdOptionsGeneric
480cdf0e10cSrcweir {
481cdf0e10cSrcweir private:
482cdf0e10cSrcweir 
483cdf0e10cSrcweir 	sal_Int32	nX;	// Zoom/ScaleX
484cdf0e10cSrcweir 	sal_Int32	nY;	// Zoom/ScaleY
485cdf0e10cSrcweir 
486cdf0e10cSrcweir protected:
487cdf0e10cSrcweir 
488cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
489cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
490cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
491cdf0e10cSrcweir 
492cdf0e10cSrcweir public:
493cdf0e10cSrcweir 
494cdf0e10cSrcweir 			SdOptionsZoom( sal_uInt16 nConfigId, sal_Bool bUseConfig );
495cdf0e10cSrcweir 			virtual ~SdOptionsZoom() {}
496cdf0e10cSrcweir 
497cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsZoom& rOpt ) const;
498cdf0e10cSrcweir 
499cdf0e10cSrcweir 	void	GetScale( sal_Int32& rX, sal_Int32& rY ) const { Init(); rX = nX; rY = nY; }
500cdf0e10cSrcweir 	void	SetScale( sal_Int32 nInX, sal_Int32 nInY ) { if( nX != nInX || nY != nInY ) { OptionsChanged(); nX = nInX; nY = nInY; } }
501cdf0e10cSrcweir };
502cdf0e10cSrcweir 
503cdf0e10cSrcweir // -----------------------------------------------------------------------------
504cdf0e10cSrcweir 
505cdf0e10cSrcweir // -----------------
506cdf0e10cSrcweir // - SdOptionsGrid -
507cdf0e10cSrcweir // -----------------
508cdf0e10cSrcweir 
509cdf0e10cSrcweir class SdOptionsGrid : public SdOptionsGeneric, public SvxOptionsGrid
510cdf0e10cSrcweir {
511cdf0e10cSrcweir protected:
512cdf0e10cSrcweir 
513cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
514cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
515cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
516cdf0e10cSrcweir 
517cdf0e10cSrcweir public:
518cdf0e10cSrcweir 
519cdf0e10cSrcweir 			SdOptionsGrid( sal_uInt16 nConfigId, sal_Bool bUseConfig );
520cdf0e10cSrcweir 			virtual ~SdOptionsGrid();
521cdf0e10cSrcweir 
522cdf0e10cSrcweir 	void	SetDefaults();
523cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsGrid& rOpt ) const;
524cdf0e10cSrcweir 
525cdf0e10cSrcweir 	sal_uInt32	GetFldDrawX() const { Init(); return SvxOptionsGrid::GetFldDrawX(); }
526cdf0e10cSrcweir 	sal_uInt32 	GetFldDivisionX() const { Init(); return SvxOptionsGrid::GetFldDivisionX(); }
527cdf0e10cSrcweir 	sal_uInt32	GetFldDrawY() const { Init(); return SvxOptionsGrid::GetFldDrawY(); }
528cdf0e10cSrcweir 	sal_uInt32 	GetFldDivisionY() const { Init(); return SvxOptionsGrid::GetFldDivisionY(); }
529cdf0e10cSrcweir 	sal_uInt32	GetFldSnapX() const { Init(); return SvxOptionsGrid::GetFldSnapX(); }
530cdf0e10cSrcweir 	sal_uInt32	GetFldSnapY() const { Init(); return SvxOptionsGrid::GetFldSnapY();	}
531cdf0e10cSrcweir 	sal_Bool	IsUseGridSnap() const { Init(); return SvxOptionsGrid::GetUseGridSnap(); }
532cdf0e10cSrcweir 	sal_Bool	IsSynchronize() const { Init(); return SvxOptionsGrid::GetSynchronize(); }
533cdf0e10cSrcweir 	sal_Bool	IsGridVisible() const { Init(); return SvxOptionsGrid::GetGridVisible(); }
534cdf0e10cSrcweir 	sal_Bool	IsEqualGrid() const { Init(); return SvxOptionsGrid::GetEqualGrid(); }
535cdf0e10cSrcweir 
536cdf0e10cSrcweir 	void 	SetFldDrawX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDrawX() ) { OptionsChanged(); SvxOptionsGrid::SetFldDrawX( nSet ); } }
537cdf0e10cSrcweir 	void 	SetFldDivisionX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDivisionX() ) { OptionsChanged(); SvxOptionsGrid::SetFldDivisionX( nSet ); } }
538cdf0e10cSrcweir 	void 	SetFldDrawY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDrawY() ) { OptionsChanged(); SvxOptionsGrid::SetFldDrawY( nSet ); } }
539cdf0e10cSrcweir 	void 	SetFldDivisionY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDivisionY() ) { OptionsChanged(); SvxOptionsGrid::SetFldDivisionY( nSet ); } }
540cdf0e10cSrcweir 	void 	SetFldSnapX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldSnapX() ) { OptionsChanged(); SvxOptionsGrid::SetFldSnapX( nSet ); } }
541cdf0e10cSrcweir 	void 	SetFldSnapY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldSnapY() ) { OptionsChanged(); SvxOptionsGrid::SetFldSnapY( nSet ); } }
542cdf0e10cSrcweir 	void 	SetUseGridSnap( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetUseGridSnap() ) { OptionsChanged(); SvxOptionsGrid::SetUseGridSnap( bSet ); } }
543cdf0e10cSrcweir 	void 	SetSynchronize( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetSynchronize() ) { OptionsChanged(); SvxOptionsGrid::SetSynchronize( bSet ); } }
544cdf0e10cSrcweir 	void 	SetGridVisible( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetGridVisible() ) { OptionsChanged(); SvxOptionsGrid::SetGridVisible( bSet ); } }
545cdf0e10cSrcweir 	void 	SetEqualGrid( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetEqualGrid() ) { OptionsChanged(); SvxOptionsGrid::SetEqualGrid( bSet ); } }
546cdf0e10cSrcweir };
547cdf0e10cSrcweir 
548cdf0e10cSrcweir // -----------------------------------------------
549cdf0e10cSrcweir 
550cdf0e10cSrcweir class SdOptionsGridItem : public SvxGridItem
551cdf0e10cSrcweir {
552cdf0e10cSrcweir 
553cdf0e10cSrcweir public:
554cdf0e10cSrcweir 							SdOptionsGridItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
555cdf0e10cSrcweir 
556cdf0e10cSrcweir 	void					SetOptions( SdOptions* pOpts ) const;
557cdf0e10cSrcweir };
558cdf0e10cSrcweir 
559cdf0e10cSrcweir // ------------------
560cdf0e10cSrcweir // - SdOptionsPrint -
561cdf0e10cSrcweir // ------------------
562cdf0e10cSrcweir 
563cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsPrint : public SdOptionsGeneric
564cdf0e10cSrcweir {
565cdf0e10cSrcweir private:
566cdf0e10cSrcweir 
567cdf0e10cSrcweir 	sal_Bool	bDraw				: 1;	// Print/Content/Drawing
568cdf0e10cSrcweir 	sal_Bool	bNotes 				: 1;	// Print/Content/Note
569cdf0e10cSrcweir 	sal_Bool	bHandout			: 1;	// Print/Content/Handout
570cdf0e10cSrcweir 	sal_Bool	bOutline			: 1;	// Print/Content/Outline
571cdf0e10cSrcweir 	sal_Bool	bDate				: 1;	// Print/Other/Date
572cdf0e10cSrcweir 	sal_Bool	bTime				: 1;	// Print/Other/Time
573cdf0e10cSrcweir 	sal_Bool	bPagename			: 1;	// Print/Other/PageName
574cdf0e10cSrcweir 	sal_Bool	bHiddenPages		: 1;	// Print/Other/HiddenPage
575cdf0e10cSrcweir 	sal_Bool	bPagesize			: 1;	// Print/Page/PageSize
576cdf0e10cSrcweir 	sal_Bool	bPagetile			: 1;	// Print/Page/PageTile
577cdf0e10cSrcweir 	sal_Bool	bWarningPrinter		: 1;	//  These flags you get
578cdf0e10cSrcweir 	sal_Bool	bWarningSize		: 1;	//  from the common options,
579cdf0e10cSrcweir 	sal_Bool	bWarningOrientation	: 1;	//  currently org.openoffice.Office.Common.xml (class OfaMiscCfg ; sfx2/misccfg.hxx )
580cdf0e10cSrcweir 	sal_Bool	bBooklet			: 1;	// Print/Page/Booklet
581cdf0e10cSrcweir 	sal_Bool	bFront 				: 1;	// Print/Page/BookletFront
582cdf0e10cSrcweir 	sal_Bool	bBack				: 1;	// Print/Page/BookletFront
583cdf0e10cSrcweir 	sal_Bool	bCutPage   			: 1;	// NOT persistent !!!
584cdf0e10cSrcweir 	sal_Bool	bPaperbin  			: 1;	// Print/Other/FromPrinterSetup
585cdf0e10cSrcweir 	sal_Bool	mbHandoutHorizontal	: 1;	// Order Page previews on Handout Pages horizontal
586cdf0e10cSrcweir 	sal_uInt16	mnHandoutPages;				// Number of page previews on handout page (only 1/2/4/6/9 are supported)
587cdf0e10cSrcweir 	sal_uInt16	nQuality;					// Print/Other/Quality
588cdf0e10cSrcweir 
589cdf0e10cSrcweir protected:
590cdf0e10cSrcweir 
591cdf0e10cSrcweir 	virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
592cdf0e10cSrcweir 	virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
593cdf0e10cSrcweir 	virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
594cdf0e10cSrcweir 
595cdf0e10cSrcweir public:
596cdf0e10cSrcweir 
597cdf0e10cSrcweir 			SdOptionsPrint( sal_uInt16 nConfigId, sal_Bool bUseConfig );
598cdf0e10cSrcweir 			virtual ~SdOptionsPrint() {}
599cdf0e10cSrcweir 
600cdf0e10cSrcweir 	sal_Bool	operator==( const SdOptionsPrint& rOpt ) const;
601cdf0e10cSrcweir 
602cdf0e10cSrcweir 	sal_Bool	IsDraw() const { Init(); return (sal_Bool) bDraw; }
603cdf0e10cSrcweir 	sal_Bool	IsNotes() const { Init(); return (sal_Bool) bNotes; }
604cdf0e10cSrcweir 	sal_Bool	IsHandout() const { Init(); return (sal_Bool) bHandout; }
605cdf0e10cSrcweir 	sal_Bool	IsOutline() const { Init(); return (sal_Bool) bOutline; }
606cdf0e10cSrcweir 	sal_Bool	IsDate() const { Init(); return (sal_Bool) bDate; }
607cdf0e10cSrcweir 	sal_Bool	IsTime() const { Init(); return (sal_Bool) bTime; }
608cdf0e10cSrcweir 	sal_Bool	IsPagename() const { Init(); return (sal_Bool) bPagename; }
609cdf0e10cSrcweir 	sal_Bool	IsHiddenPages() const { Init(); return (sal_Bool) bHiddenPages; }
610cdf0e10cSrcweir 	sal_Bool	IsPagesize() const { Init(); return (sal_Bool) bPagesize; }
611cdf0e10cSrcweir 	sal_Bool	IsPagetile() const { Init(); return (sal_Bool) bPagetile; }
612cdf0e10cSrcweir 	sal_Bool	IsWarningPrinter() const { Init(); return (sal_Bool) bWarningPrinter; }
613cdf0e10cSrcweir 	sal_Bool	IsWarningSize() const { Init(); return (sal_Bool) bWarningSize; }
614cdf0e10cSrcweir 	sal_Bool	IsWarningOrientation() const { Init(); return (sal_Bool) bWarningOrientation; }
615cdf0e10cSrcweir 	sal_Bool	IsBooklet() const { Init(); return (sal_Bool) bBooklet; }
616cdf0e10cSrcweir 	sal_Bool	IsFrontPage() const { Init(); return (sal_Bool) bFront; }
617cdf0e10cSrcweir 	sal_Bool	IsBackPage() const { Init(); return (sal_Bool) bBack; }
618cdf0e10cSrcweir 	sal_Bool	IsCutPage() const { Init(); return (sal_Bool) bCutPage; }
619cdf0e10cSrcweir 	sal_Bool	IsPaperbin() const { Init(); return (sal_Bool) bPaperbin; }
620cdf0e10cSrcweir 	sal_uInt16	GetOutputQuality() const { Init(); return nQuality; }
621cdf0e10cSrcweir 	sal_Bool	IsHandoutHorizontal() const { Init(); return mbHandoutHorizontal; }
622cdf0e10cSrcweir 	sal_uInt16	GetHandoutPages() const { Init(); return mnHandoutPages; }
623cdf0e10cSrcweir 
624cdf0e10cSrcweir 	void	SetDraw( sal_Bool bOn = sal_True ) { if( bDraw != bOn ) { OptionsChanged(); bDraw = bOn; } }
625cdf0e10cSrcweir 	void	SetNotes( sal_Bool bOn = sal_True ) { if( bNotes != bOn ) { OptionsChanged(); bNotes = bOn; } }
626cdf0e10cSrcweir 	void	SetHandout( sal_Bool bOn = sal_True ) { if( bHandout != bOn ) { OptionsChanged(); bHandout = bOn; } }
627cdf0e10cSrcweir 	void	SetOutline( sal_Bool bOn = sal_True ) { if( bOutline != bOn ) { OptionsChanged(); bOutline = bOn; } }
628cdf0e10cSrcweir 	void	SetDate( sal_Bool bOn = sal_True ) { if( bDate != bOn ) { OptionsChanged(); bDate = bOn; } }
629cdf0e10cSrcweir 	void	SetTime( sal_Bool bOn = sal_True ) { if( bTime != bOn ) { OptionsChanged(); bTime = bOn; } }
630cdf0e10cSrcweir 	void	SetPagename( sal_Bool bOn = sal_True ) { if( bPagename != bOn ) { OptionsChanged(); bPagename = bOn; } }
631cdf0e10cSrcweir 	void	SetHiddenPages( sal_Bool bOn = sal_True ) { if( bHiddenPages != bOn ) { OptionsChanged(); bHiddenPages = bOn; } }
632cdf0e10cSrcweir 	void	SetPagesize( sal_Bool bOn = sal_True ) { if( bPagesize != bOn ) { OptionsChanged(); bPagesize = bOn; } }
633cdf0e10cSrcweir 	void	SetPagetile( sal_Bool bOn = sal_True ) { if( bPagetile != bOn ) { OptionsChanged(); bPagetile = bOn; } }
634cdf0e10cSrcweir 	void	SetWarningPrinter( sal_Bool bOn = sal_True ) { if( bWarningPrinter != bOn ) { OptionsChanged(); bWarningPrinter = bOn; } }
635cdf0e10cSrcweir 	void	SetWarningSize( sal_Bool bOn = sal_True ) { if( bWarningSize != bOn ) { OptionsChanged(); bWarningSize = bOn; } }
636cdf0e10cSrcweir 	void	SetWarningOrientation( sal_Bool bOn = sal_True ) { if( bWarningOrientation != bOn ) { OptionsChanged(); bWarningOrientation = bOn; } }
637cdf0e10cSrcweir 	void	SetBooklet( sal_Bool bOn = sal_True ) { if( bBooklet != bOn ) { OptionsChanged(); bBooklet = bOn; } }
638cdf0e10cSrcweir 	void	SetFrontPage( sal_Bool bOn = sal_True ) { if( bFront != bOn ) { OptionsChanged(); bFront = bOn; } }
639cdf0e10cSrcweir 	void	SetBackPage( sal_Bool bOn = sal_True ) { if( bBack != bOn ) { OptionsChanged(); bBack = bOn; } }
640cdf0e10cSrcweir 	void	SetCutPage( sal_Bool bOn = sal_True ) { if( bCutPage != bOn ) { OptionsChanged(); bCutPage = bOn; } }
641cdf0e10cSrcweir 	void	SetPaperbin( sal_Bool bOn = sal_True ) { if( bPaperbin != bOn ) { OptionsChanged(); bPaperbin = bOn; } }
642cdf0e10cSrcweir 	void	SetOutputQuality( sal_uInt16 nInQuality ) { if( nQuality != nInQuality ) { OptionsChanged(); nQuality = nInQuality; } }
643cdf0e10cSrcweir 	void	SetHandoutHorizontal( sal_Bool bHandoutHorizontal ) { if( mbHandoutHorizontal != bHandoutHorizontal ) { OptionsChanged(); mbHandoutHorizontal = bHandoutHorizontal; } }
644cdf0e10cSrcweir 	void	SetHandoutPages( sal_uInt16 nHandoutPages ) { if( nHandoutPages != mnHandoutPages ) { OptionsChanged(); mnHandoutPages = nHandoutPages; } }
645cdf0e10cSrcweir };
646cdf0e10cSrcweir 
647cdf0e10cSrcweir // -----------------------------------------------------------------------------
648cdf0e10cSrcweir 
649cdf0e10cSrcweir class SD_DLLPUBLIC SdOptionsPrintItem : public SfxPoolItem
650cdf0e10cSrcweir {
651cdf0e10cSrcweir public:
652cdf0e10cSrcweir 
653cdf0e10cSrcweir 							SdOptionsPrintItem( sal_uInt16 nWhich);
654cdf0e10cSrcweir 							SdOptionsPrintItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
655cdf0e10cSrcweir 
656cdf0e10cSrcweir 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
657cdf0e10cSrcweir 	virtual int 			operator==( const SfxPoolItem& ) const;
658cdf0e10cSrcweir 
659cdf0e10cSrcweir 	void					SetOptions( SdOptions* pOpts ) const;
660cdf0e10cSrcweir 
661cdf0e10cSrcweir 	SdOptionsPrint&			GetOptionsPrint() { return maOptionsPrint; }
662cdf0e10cSrcweir 	const SdOptionsPrint&	GetOptionsPrint() const { return maOptionsPrint; }
663cdf0e10cSrcweir private:
664cdf0e10cSrcweir 	SdOptionsPrint	maOptionsPrint;
665cdf0e10cSrcweir };
666cdf0e10cSrcweir 
667cdf0e10cSrcweir // -------------
668cdf0e10cSrcweir // - SdOptions -
669cdf0e10cSrcweir // -------------
670cdf0e10cSrcweir 
671cdf0e10cSrcweir class SdOptions : public SdOptionsLayout, public SdOptionsContents,
672cdf0e10cSrcweir 				  public SdOptionsMisc, public SdOptionsSnap,
673cdf0e10cSrcweir 				  public SdOptionsZoom, public SdOptionsGrid,
674cdf0e10cSrcweir 				  public SdOptionsPrint
675cdf0e10cSrcweir {
676cdf0e10cSrcweir public:
677cdf0e10cSrcweir 
678cdf0e10cSrcweir 						SdOptions( sal_uInt16 nConfigId );
679cdf0e10cSrcweir 						virtual ~SdOptions();
680cdf0e10cSrcweir 
681cdf0e10cSrcweir 	void				StoreConfig( sal_uLong nOptionRange = SD_OPTIONS_ALL );
682cdf0e10cSrcweir };
683cdf0e10cSrcweir 
684cdf0e10cSrcweir #endif // _SD_OPTSITEM_HXX
685