xref: /AOO41X/main/svtools/source/config/optionsdrawinglayer.cxx (revision 47148b3bc50811ceb41802e4cc50a5db21535900)
15900e8ecSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
35900e8ecSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
45900e8ecSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
55900e8ecSAndrew Rist  * distributed with this work for additional information
65900e8ecSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
75900e8ecSAndrew Rist  * to you under the Apache License, Version 2.0 (the
85900e8ecSAndrew Rist  * "License"); you may not use this file except in compliance
95900e8ecSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
115900e8ecSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
135900e8ecSAndrew Rist  * Unless required by applicable law or agreed to in writing,
145900e8ecSAndrew Rist  * software distributed under the License is distributed on an
155900e8ecSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
165900e8ecSAndrew Rist  * KIND, either express or implied.  See the License for the
175900e8ecSAndrew Rist  * specific language governing permissions and limitations
185900e8ecSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
205900e8ecSAndrew Rist  *************************************************************/
215900e8ecSAndrew Rist 
225900e8ecSAndrew Rist 
23cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
24cdf0e10cSrcweir #include "precompiled_svtools.hxx"
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #ifdef _MSC_VER
27cdf0e10cSrcweir #pragma hdrstop
28cdf0e10cSrcweir #endif
29cdf0e10cSrcweir 
30cdf0e10cSrcweir //_________________________________________________________________________________________________________________
31cdf0e10cSrcweir //	includes
32cdf0e10cSrcweir //_________________________________________________________________________________________________________________
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #include <svtools/optionsdrawinglayer.hxx>
35cdf0e10cSrcweir #include <unotools/configmgr.hxx>
36cdf0e10cSrcweir #include <unotools/configitem.hxx>
37cdf0e10cSrcweir #include <tools/debug.hxx>
38cdf0e10cSrcweir #include <com/sun/star/uno/Any.hxx>
39cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx>
40cdf0e10cSrcweir #include <vcl/svapp.hxx>
41cdf0e10cSrcweir #include <vcl/outdev.hxx>
42cdf0e10cSrcweir 
43cdf0e10cSrcweir //_________________________________________________________________________________________________________________
44cdf0e10cSrcweir //	namespaces
45cdf0e10cSrcweir //_________________________________________________________________________________________________________________
46cdf0e10cSrcweir 
47cdf0e10cSrcweir using namespace ::utl					;
48cdf0e10cSrcweir using namespace ::rtl					;
49cdf0e10cSrcweir using namespace ::osl					;
50cdf0e10cSrcweir using namespace ::com::sun::star::uno	;
51cdf0e10cSrcweir 
52cdf0e10cSrcweir //_________________________________________________________________________________________________________________
53cdf0e10cSrcweir //	const
54cdf0e10cSrcweir //_________________________________________________________________________________________________________________
55cdf0e10cSrcweir 
56cdf0e10cSrcweir #define	ROOTNODE_START			   		OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Drawinglayer"	))
57cdf0e10cSrcweir #define	DEFAULT_OVERLAYBUFFER			sal_True
58cdf0e10cSrcweir #define	DEFAULT_PAINTBUFFER				sal_True
59cdf0e10cSrcweir #define	DEFAULT_STRIPE_COLOR_A			0
60cdf0e10cSrcweir #define	DEFAULT_STRIPE_COLOR_B			16581375
61cdf0e10cSrcweir #define	DEFAULT_STRIPE_LENGTH			4
62cdf0e10cSrcweir 
63cdf0e10cSrcweir // #i73602#
64cdf0e10cSrcweir // #i74769#, #i75172# : Change default for Calc and Writer to True
65cdf0e10cSrcweir #define	DEFAULT_OVERLAYBUFFER_CALC			sal_True
66cdf0e10cSrcweir #define	DEFAULT_OVERLAYBUFFER_WRITER		sal_True
67cdf0e10cSrcweir #define	DEFAULT_OVERLAYBUFFER_DRAWIMPRESS	sal_True
68cdf0e10cSrcweir 
69cdf0e10cSrcweir // #i74769#, #i75172#
70cdf0e10cSrcweir #define	DEFAULT_PAINTBUFFER_CALC			sal_True
71cdf0e10cSrcweir #define	DEFAULT_PAINTBUFFER_WRITER			sal_True
72cdf0e10cSrcweir #define	DEFAULT_PAINTBUFFER_DRAWIMPRESS		sal_True
73cdf0e10cSrcweir 
74cdf0e10cSrcweir // #i4219#
75cdf0e10cSrcweir #define	DEFAULT_MAXIMUMPAPERWIDTH			300
76cdf0e10cSrcweir #define	DEFAULT_MAXIMUMPAPERHEIGHT			300
77cdf0e10cSrcweir #define	DEFAULT_MAXIMUMPAPERLEFTMARGIN		9999
78cdf0e10cSrcweir #define	DEFAULT_MAXIMUMPAPERRIGHTMARGIN		9999
79cdf0e10cSrcweir #define	DEFAULT_MAXIMUMPAPERTOPMARGIN		9999
80cdf0e10cSrcweir #define	DEFAULT_MAXIMUMPAPERBOTTOMMARGIN	9999
81cdf0e10cSrcweir 
82cdf0e10cSrcweir // primitives
83cdf0e10cSrcweir #define	DEFAULT_ANTIALIASING                        sal_True
84cdf0e10cSrcweir #define	DEFAULT_SNAPHORVERLINESTODISCRETE			sal_True
85cdf0e10cSrcweir #define	DEFAULT_SOLIDDRAGCREATE                     sal_True
86cdf0e10cSrcweir #define	DEFAULT_RENDERDECORATEDTEXTDIRECT           sal_True
87cdf0e10cSrcweir #define	DEFAULT_RENDERSIMPLETEXTDIRECT              sal_True
88cdf0e10cSrcweir #define	DEFAULT_QUADRATIC3DRENDERLIMIT              1000000
89cdf0e10cSrcweir #define	DEFAULT_QUADRATICFORMCONTROLRENDERLIMIT     45000
90cdf0e10cSrcweir 
91cdf0e10cSrcweir // #i97672# selection settings
92cdf0e10cSrcweir #define	DEFAULT_TRANSPARENTSELECTION                sal_True
93cdf0e10cSrcweir #define DEFAULT_TRANSPARENTSELECTIONPERCENT			75
94cdf0e10cSrcweir #define DEFAULT_SELECTIONMAXIMUMLUMINANCEPERCENT    70
95cdf0e10cSrcweir 
96cdf0e10cSrcweir #define	PROPERTYNAME_OVERLAYBUFFER		OUString(RTL_CONSTASCII_USTRINGPARAM("OverlayBuffer"	))
97cdf0e10cSrcweir #define	PROPERTYNAME_PAINTBUFFER		OUString(RTL_CONSTASCII_USTRINGPARAM("PaintBuffer"		))
98cdf0e10cSrcweir #define	PROPERTYNAME_STRIPE_COLOR_A		OUString(RTL_CONSTASCII_USTRINGPARAM("StripeColorA"		))
99cdf0e10cSrcweir #define	PROPERTYNAME_STRIPE_COLOR_B		OUString(RTL_CONSTASCII_USTRINGPARAM("StripeColorB"		))
100cdf0e10cSrcweir #define	PROPERTYNAME_STRIPE_LENGTH		OUString(RTL_CONSTASCII_USTRINGPARAM("StripeLength"		))
101cdf0e10cSrcweir 
102cdf0e10cSrcweir // #i73602#
103cdf0e10cSrcweir #define	PROPERTYNAME_OVERLAYBUFFER_CALC			OUString(RTL_CONSTASCII_USTRINGPARAM("OverlayBuffer_Calc"))
104cdf0e10cSrcweir #define	PROPERTYNAME_OVERLAYBUFFER_WRITER		OUString(RTL_CONSTASCII_USTRINGPARAM("OverlayBuffer_Writer"))
105cdf0e10cSrcweir #define	PROPERTYNAME_OVERLAYBUFFER_DRAWIMPRESS	OUString(RTL_CONSTASCII_USTRINGPARAM("OverlayBuffer_DrawImpress"))
106cdf0e10cSrcweir 
107cdf0e10cSrcweir // #i74769#, #i75172#
108cdf0e10cSrcweir #define	PROPERTYNAME_PAINTBUFFER_CALC			OUString(RTL_CONSTASCII_USTRINGPARAM("PaintBuffer_Calc"))
109cdf0e10cSrcweir #define	PROPERTYNAME_PAINTBUFFER_WRITER			OUString(RTL_CONSTASCII_USTRINGPARAM("PaintBuffer_Writer"))
110cdf0e10cSrcweir #define	PROPERTYNAME_PAINTBUFFER_DRAWIMPRESS	OUString(RTL_CONSTASCII_USTRINGPARAM("PaintBuffer_DrawImpress"))
111cdf0e10cSrcweir 
112cdf0e10cSrcweir // #i4219#
113cdf0e10cSrcweir #define	PROPERTYNAME_MAXIMUMPAPERWIDTH OUString(RTL_CONSTASCII_USTRINGPARAM("MaximumPaperWidth"))
114cdf0e10cSrcweir #define	PROPERTYNAME_MAXIMUMPAPERHEIGHT OUString(RTL_CONSTASCII_USTRINGPARAM("MaximumPaperHeight"))
115cdf0e10cSrcweir #define	PROPERTYNAME_MAXIMUMPAPERLEFTMARGIN OUString(RTL_CONSTASCII_USTRINGPARAM("MaximumPaperLeftMargin"))
116cdf0e10cSrcweir #define	PROPERTYNAME_MAXIMUMPAPERRIGHTMARGIN OUString(RTL_CONSTASCII_USTRINGPARAM("MaximumPaperRightMargin"))
117cdf0e10cSrcweir #define	PROPERTYNAME_MAXIMUMPAPERTOPMARGIN OUString(RTL_CONSTASCII_USTRINGPARAM("MaximumPaperTopMargin"))
118cdf0e10cSrcweir #define	PROPERTYNAME_MAXIMUMPAPERBOTTOMMARGIN OUString(RTL_CONSTASCII_USTRINGPARAM("MaximumPaperBottomMargin"))
119cdf0e10cSrcweir 
120cdf0e10cSrcweir // primitives
121cdf0e10cSrcweir #define	PROPERTYNAME_ANTIALIASING OUString(RTL_CONSTASCII_USTRINGPARAM("AntiAliasing"))
122cdf0e10cSrcweir #define	PROPERTYNAME_SNAPHORVERLINESTODISCRETE OUString(RTL_CONSTASCII_USTRINGPARAM("SnapHorVerLinesToDiscrete"))
123cdf0e10cSrcweir #define	PROPERTYNAME_SOLIDDRAGCREATE OUString(RTL_CONSTASCII_USTRINGPARAM("SolidDragCreate"))
124cdf0e10cSrcweir #define	PROPERTYNAME_RENDERDECORATEDTEXTDIRECT OUString(RTL_CONSTASCII_USTRINGPARAM("RenderDecoratedTextDirect"))
125cdf0e10cSrcweir #define	PROPERTYNAME_RENDERSIMPLETEXTDIRECT OUString(RTL_CONSTASCII_USTRINGPARAM("RenderSimpleTextDirect"))
126cdf0e10cSrcweir #define	PROPERTYNAME_QUADRATIC3DRENDERLIMIT OUString(RTL_CONSTASCII_USTRINGPARAM("Quadratic3DRenderLimit"))
127cdf0e10cSrcweir #define	PROPERTYNAME_QUADRATICFORMCONTROLRENDERLIMIT OUString(RTL_CONSTASCII_USTRINGPARAM("QuadraticFormControlRenderLimit"))
128cdf0e10cSrcweir 
129cdf0e10cSrcweir // #i97672# selection settings
130cdf0e10cSrcweir #define	PROPERTYNAME_TRANSPARENTSELECTION OUString(RTL_CONSTASCII_USTRINGPARAM("TransparentSelection"))
131cdf0e10cSrcweir #define	PROPERTYNAME_TRANSPARENTSELECTIONPERCENT OUString(RTL_CONSTASCII_USTRINGPARAM("TransparentSelectionPercent"))
132cdf0e10cSrcweir #define	PROPERTYNAME_SELECTIONMAXIMUMLUMINANCEPERCENT OUString(RTL_CONSTASCII_USTRINGPARAM("SelectionMaximumLuminancePercent"))
133cdf0e10cSrcweir 
134cdf0e10cSrcweir #define	PROPERTYHANDLE_OVERLAYBUFFER				0
135cdf0e10cSrcweir #define	PROPERTYHANDLE_PAINTBUFFER					1
136cdf0e10cSrcweir #define	PROPERTYHANDLE_STRIPE_COLOR_A				2
137cdf0e10cSrcweir #define	PROPERTYHANDLE_STRIPE_COLOR_B				3
138cdf0e10cSrcweir #define	PROPERTYHANDLE_STRIPE_LENGTH				4
139cdf0e10cSrcweir 
140cdf0e10cSrcweir // #i73602#
141cdf0e10cSrcweir #define	PROPERTYHANDLE_OVERLAYBUFFER_CALC			5
142cdf0e10cSrcweir #define	PROPERTYHANDLE_OVERLAYBUFFER_WRITER			6
143cdf0e10cSrcweir #define	PROPERTYHANDLE_OVERLAYBUFFER_DRAWIMPRESS	7
144cdf0e10cSrcweir 
145cdf0e10cSrcweir // #i74769#, #i75172#
146cdf0e10cSrcweir #define	PROPERTYHANDLE_PAINTBUFFER_CALC				8
147cdf0e10cSrcweir #define	PROPERTYHANDLE_PAINTBUFFER_WRITER			9
148cdf0e10cSrcweir #define	PROPERTYHANDLE_PAINTBUFFER_DRAWIMPRESS		10
149cdf0e10cSrcweir 
150cdf0e10cSrcweir // #i4219#
151cdf0e10cSrcweir #define	PROPERTYHANDLE_MAXIMUMPAPERWIDTH			11
152cdf0e10cSrcweir #define	PROPERTYHANDLE_MAXIMUMPAPERHEIGHT			12
153cdf0e10cSrcweir #define	PROPERTYHANDLE_MAXIMUMPAPERLEFTMARGIN		13
154cdf0e10cSrcweir #define	PROPERTYHANDLE_MAXIMUMPAPERRIGHTMARGIN		14
155cdf0e10cSrcweir #define	PROPERTYHANDLE_MAXIMUMPAPERTOPMARGIN		15
156cdf0e10cSrcweir #define	PROPERTYHANDLE_MAXIMUMPAPERBOTTOMMARGIN		16
157cdf0e10cSrcweir 
158cdf0e10cSrcweir // primitives
159cdf0e10cSrcweir #define	PROPERTYHANDLE_ANTIALIASING                     17
160cdf0e10cSrcweir #define	PROPERTYHANDLE_SNAPHORVERLINESTODISCRETE        18
161cdf0e10cSrcweir #define	PROPERTYHANDLE_SOLIDDRAGCREATE					19
162cdf0e10cSrcweir #define	PROPERTYHANDLE_RENDERDECORATEDTEXTDIRECT        20
163cdf0e10cSrcweir #define	PROPERTYHANDLE_RENDERSIMPLETEXTDIRECT           21
164cdf0e10cSrcweir #define	PROPERTYHANDLE_QUADRATIC3DRENDERLIMIT           22
165cdf0e10cSrcweir #define	PROPERTYHANDLE_QUADRATICFORMCONTROLRENDERLIMIT  23
166cdf0e10cSrcweir 
167cdf0e10cSrcweir // #i97672# selection settings
168cdf0e10cSrcweir #define	PROPERTYHANDLE_TRANSPARENTSELECTION             24
169cdf0e10cSrcweir #define	PROPERTYHANDLE_TRANSPARENTSELECTIONPERCENT      25
170cdf0e10cSrcweir #define	PROPERTYHANDLE_SELECTIONMAXIMUMLUMINANCEPERCENT 26
171cdf0e10cSrcweir 
172cdf0e10cSrcweir #define	PROPERTYCOUNT								27
173cdf0e10cSrcweir 
174cdf0e10cSrcweir class SvtOptionsDrawinglayer_Impl : public ConfigItem
175cdf0e10cSrcweir {
176cdf0e10cSrcweir public:
177cdf0e10cSrcweir 
178cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
179cdf0e10cSrcweir //	constructor / destructor
180cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
181cdf0e10cSrcweir 
182cdf0e10cSrcweir 	 SvtOptionsDrawinglayer_Impl();
183cdf0e10cSrcweir 	~SvtOptionsDrawinglayer_Impl();
184cdf0e10cSrcweir 
185cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
186cdf0e10cSrcweir //	overloaded methods of baseclass
187cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
188cdf0e10cSrcweir 
189cdf0e10cSrcweir 	virtual void Commit();
190cdf0e10cSrcweir     virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
191cdf0e10cSrcweir 
192cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
193cdf0e10cSrcweir //	public interface
194cdf0e10cSrcweir //---------------------------------------------------------------------------------------------------------
195cdf0e10cSrcweir 
196cdf0e10cSrcweir 	sal_Bool	IsOverlayBuffer() const;
197cdf0e10cSrcweir 	sal_Bool	IsPaintBuffer() const;
198cdf0e10cSrcweir 	Color		GetStripeColorA() const;
199cdf0e10cSrcweir 	Color		GetStripeColorB() const;
200cdf0e10cSrcweir 	sal_uInt16	GetStripeLength() const;
201cdf0e10cSrcweir 
202cdf0e10cSrcweir 	// #i73602#
203cdf0e10cSrcweir 	sal_Bool	IsOverlayBuffer_Calc() const;
204cdf0e10cSrcweir 	sal_Bool	IsOverlayBuffer_Writer() const;
205cdf0e10cSrcweir 	sal_Bool	IsOverlayBuffer_DrawImpress() const;
206cdf0e10cSrcweir 
207cdf0e10cSrcweir 	// #i74769#, #i75172#
208cdf0e10cSrcweir 	sal_Bool	IsPaintBuffer_Calc() const;
209cdf0e10cSrcweir 	sal_Bool	IsPaintBuffer_Writer() const;
210cdf0e10cSrcweir 	sal_Bool	IsPaintBuffer_DrawImpress() const;
211cdf0e10cSrcweir 
212cdf0e10cSrcweir 	void		SetOverlayBuffer( sal_Bool bState );
213cdf0e10cSrcweir 	void		SetPaintBuffer( sal_Bool bState );
214cdf0e10cSrcweir 	void		SetStripeColorA( Color aColor );
215cdf0e10cSrcweir 	void		SetStripeColorB( Color aColor );
216cdf0e10cSrcweir 	void		SetStripeLength( sal_uInt16 nLength );
217cdf0e10cSrcweir 
218cdf0e10cSrcweir 	// #i73602#
219cdf0e10cSrcweir 	void		SetOverlayBuffer_Calc( sal_Bool bState );
220cdf0e10cSrcweir 	void		SetOverlayBuffer_Writer( sal_Bool bState );
221cdf0e10cSrcweir 	void		SetOverlayBuffer_DrawImpress( sal_Bool bState );
222cdf0e10cSrcweir 
223cdf0e10cSrcweir 	// #i74769#, #i75172#
224cdf0e10cSrcweir 	void		SetPaintBuffer_Calc( sal_Bool bState );
225cdf0e10cSrcweir 	void		SetPaintBuffer_Writer( sal_Bool bState );
226cdf0e10cSrcweir 	void		SetPaintBuffer_DrawImpress( sal_Bool bState );
227cdf0e10cSrcweir 
228cdf0e10cSrcweir 	// #i4219#
229cdf0e10cSrcweir 	sal_uInt32 GetMaximumPaperWidth() const;
230cdf0e10cSrcweir 	sal_uInt32 GetMaximumPaperHeight() const;
231cdf0e10cSrcweir 	sal_uInt32 GetMaximumPaperLeftMargin() const;
232cdf0e10cSrcweir 	sal_uInt32 GetMaximumPaperRightMargin() const;
233cdf0e10cSrcweir 	sal_uInt32 GetMaximumPaperTopMargin() const;
234cdf0e10cSrcweir 	sal_uInt32 GetMaximumPaperBottomMargin() const;
235cdf0e10cSrcweir 
236cdf0e10cSrcweir 	void SetMaximumPaperWidth(sal_uInt32 nNew);
237cdf0e10cSrcweir 	void SetMaximumPaperHeight(sal_uInt32 nNew);
238cdf0e10cSrcweir 	void SetMaximumPaperLeftMargin(sal_uInt32 nNew);
239cdf0e10cSrcweir 	void SetMaximumPaperRightMargin(sal_uInt32 nNew);
240cdf0e10cSrcweir 	void SetMaximumPaperTopMargin(sal_uInt32 nNew);
241cdf0e10cSrcweir 	void SetMaximumPaperBottomMargin(sal_uInt32 nNew);
242cdf0e10cSrcweir 
243cdf0e10cSrcweir     // helper
244cdf0e10cSrcweir     sal_Bool IsAAPossibleOnThisSystem() const;
245cdf0e10cSrcweir 
246cdf0e10cSrcweir     // primitives
247cdf0e10cSrcweir 	sal_Bool	IsAntiAliasing() const;
248cdf0e10cSrcweir 	sal_Bool	IsSnapHorVerLinesToDiscrete() const;
249cdf0e10cSrcweir 	sal_Bool	IsSolidDragCreate() const;
250cdf0e10cSrcweir 	sal_Bool	IsRenderDecoratedTextDirect() const;
251cdf0e10cSrcweir 	sal_Bool	IsRenderSimpleTextDirect() const;
252cdf0e10cSrcweir 	sal_uInt32  GetQuadratic3DRenderLimit() const;
253cdf0e10cSrcweir 	sal_uInt32  GetQuadraticFormControlRenderLimit() const;
254cdf0e10cSrcweir 
255cdf0e10cSrcweir     void		SetAntiAliasing( sal_Bool bState );
256cdf0e10cSrcweir     void		SetSnapHorVerLinesToDiscrete( sal_Bool bState );
257cdf0e10cSrcweir 	void		SetSolidDragCreate( sal_Bool bState );
258cdf0e10cSrcweir 	void		SetRenderDecoratedTextDirect( sal_Bool bState );
259cdf0e10cSrcweir 	void		SetRenderSimpleTextDirect( sal_Bool bState );
260cdf0e10cSrcweir 	void        SetQuadratic3DRenderLimit(sal_uInt32 nNew);
261cdf0e10cSrcweir 	void        SetQuadraticFormControlRenderLimit(sal_uInt32 nNew);
262cdf0e10cSrcweir 
263cdf0e10cSrcweir 	// #i97672# selection settings
264cdf0e10cSrcweir 	sal_Bool	IsTransparentSelection() const;
265cdf0e10cSrcweir 	sal_uInt16	GetTransparentSelectionPercent() const;
266cdf0e10cSrcweir 	sal_uInt16	GetSelectionMaximumLuminancePercent() const;
267cdf0e10cSrcweir 
268cdf0e10cSrcweir 	void		SetTransparentSelection( sal_Bool bState );
269cdf0e10cSrcweir 	void		SetTransparentSelectionPercent( sal_uInt16 nPercent );
270cdf0e10cSrcweir 	void		SetSelectionMaximumLuminancePercent( sal_uInt16 nPercent );
271cdf0e10cSrcweir 
272cdf0e10cSrcweir //-------------------------------------------------------------------------------------------------------------
273cdf0e10cSrcweir //	private methods
274cdf0e10cSrcweir //-------------------------------------------------------------------------------------------------------------
275cdf0e10cSrcweir 
276cdf0e10cSrcweir private:
277cdf0e10cSrcweir 
278cdf0e10cSrcweir 	static Sequence< OUString > impl_GetPropertyNames();
279cdf0e10cSrcweir 
280cdf0e10cSrcweir //-------------------------------------------------------------------------------------------------------------
281cdf0e10cSrcweir //	private member
282cdf0e10cSrcweir //-------------------------------------------------------------------------------------------------------------
283cdf0e10cSrcweir 
284cdf0e10cSrcweir private:
285cdf0e10cSrcweir 
286cdf0e10cSrcweir 		sal_Bool	m_bOverlayBuffer;
287cdf0e10cSrcweir 		sal_Bool	m_bPaintBuffer;
288cdf0e10cSrcweir 		Color		m_bStripeColorA;
289cdf0e10cSrcweir 		Color		m_bStripeColorB;
290cdf0e10cSrcweir 		sal_uInt16	m_nStripeLength;
291cdf0e10cSrcweir 
292cdf0e10cSrcweir 		// #i73602#
293cdf0e10cSrcweir 		sal_Bool	m_bOverlayBuffer_Calc;
294cdf0e10cSrcweir 		sal_Bool	m_bOverlayBuffer_Writer;
295cdf0e10cSrcweir 		sal_Bool	m_bOverlayBuffer_DrawImpress;
296cdf0e10cSrcweir 
297cdf0e10cSrcweir 		// #i74769#, #i75172#
298cdf0e10cSrcweir 		sal_Bool	m_bPaintBuffer_Calc;
299cdf0e10cSrcweir 		sal_Bool	m_bPaintBuffer_Writer;
300cdf0e10cSrcweir 		sal_Bool	m_bPaintBuffer_DrawImpress;
301cdf0e10cSrcweir 
302cdf0e10cSrcweir 		// #i4219#
303cdf0e10cSrcweir 		sal_uInt32	m_nMaximumPaperWidth;
304cdf0e10cSrcweir 		sal_uInt32	m_nMaximumPaperHeight;
305cdf0e10cSrcweir 		sal_uInt32	m_nMaximumPaperLeftMargin;
306cdf0e10cSrcweir 		sal_uInt32	m_nMaximumPaperRightMargin;
307cdf0e10cSrcweir 		sal_uInt32	m_nMaximumPaperTopMargin;
308cdf0e10cSrcweir 		sal_uInt32	m_nMaximumPaperBottomMargin;
309cdf0e10cSrcweir 
310cdf0e10cSrcweir         // primitives
311cdf0e10cSrcweir 		sal_Bool	m_bAntiAliasing;
312cdf0e10cSrcweir 		sal_Bool	m_bSnapHorVerLinesToDiscrete;
313cdf0e10cSrcweir 		sal_Bool	m_bSolidDragCreate;
314cdf0e10cSrcweir 		sal_Bool	m_bRenderDecoratedTextDirect;
315cdf0e10cSrcweir 		sal_Bool	m_bRenderSimpleTextDirect;
316cdf0e10cSrcweir 		sal_uInt32	m_nQuadratic3DRenderLimit;
317cdf0e10cSrcweir 		sal_uInt32	m_nQuadraticFormControlRenderLimit;
318cdf0e10cSrcweir 
319cdf0e10cSrcweir 		// #i97672# selection settings
320cdf0e10cSrcweir 		sal_uInt16	m_nTransparentSelectionPercent;
321cdf0e10cSrcweir 		sal_uInt16	m_nSelectionMaximumLuminancePercent;
322cdf0e10cSrcweir 		sal_Bool	m_bTransparentSelection;
323cdf0e10cSrcweir 
324cdf0e10cSrcweir         // local values
325cdf0e10cSrcweir         bool        m_bAllowAA : 1;
326cdf0e10cSrcweir         bool        m_bAllowAAChecked : 1;
327cdf0e10cSrcweir };
328cdf0e10cSrcweir 
329cdf0e10cSrcweir //_________________________________________________________________________________________________________________
330cdf0e10cSrcweir //	definitions
331cdf0e10cSrcweir //_________________________________________________________________________________________________________________
332cdf0e10cSrcweir 
333cdf0e10cSrcweir //*****************************************************************************************************************
334cdf0e10cSrcweir //	constructor
335cdf0e10cSrcweir //*****************************************************************************************************************
SvtOptionsDrawinglayer_Impl()336cdf0e10cSrcweir SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl() :
337cdf0e10cSrcweir 	ConfigItem( ROOTNODE_START	),
338cdf0e10cSrcweir 	m_bOverlayBuffer( DEFAULT_OVERLAYBUFFER ),
339cdf0e10cSrcweir 	m_bPaintBuffer( DEFAULT_PAINTBUFFER ),
340cdf0e10cSrcweir 	m_bStripeColorA(Color(DEFAULT_STRIPE_COLOR_A)),
341cdf0e10cSrcweir 	m_bStripeColorB(Color(DEFAULT_STRIPE_COLOR_B)),
342cdf0e10cSrcweir 	m_nStripeLength(DEFAULT_STRIPE_LENGTH),
343cdf0e10cSrcweir 
344cdf0e10cSrcweir 	// #i73602#
345cdf0e10cSrcweir 	m_bOverlayBuffer_Calc( DEFAULT_OVERLAYBUFFER_CALC ),
346cdf0e10cSrcweir 	m_bOverlayBuffer_Writer( DEFAULT_OVERLAYBUFFER_WRITER ),
347cdf0e10cSrcweir 	m_bOverlayBuffer_DrawImpress( DEFAULT_OVERLAYBUFFER_DRAWIMPRESS ),
348cdf0e10cSrcweir 
349cdf0e10cSrcweir 	// #i74769#, #i75172#
350cdf0e10cSrcweir 	m_bPaintBuffer_Calc( DEFAULT_PAINTBUFFER_CALC ),
351cdf0e10cSrcweir 	m_bPaintBuffer_Writer( DEFAULT_PAINTBUFFER_WRITER ),
352cdf0e10cSrcweir 	m_bPaintBuffer_DrawImpress( DEFAULT_PAINTBUFFER_DRAWIMPRESS ),
353cdf0e10cSrcweir 
354cdf0e10cSrcweir 	// #i4219#
355cdf0e10cSrcweir 	m_nMaximumPaperWidth(DEFAULT_MAXIMUMPAPERWIDTH),
356cdf0e10cSrcweir 	m_nMaximumPaperHeight(DEFAULT_MAXIMUMPAPERHEIGHT),
357cdf0e10cSrcweir 	m_nMaximumPaperLeftMargin(DEFAULT_MAXIMUMPAPERLEFTMARGIN),
358cdf0e10cSrcweir 	m_nMaximumPaperRightMargin(DEFAULT_MAXIMUMPAPERRIGHTMARGIN),
359cdf0e10cSrcweir 	m_nMaximumPaperTopMargin(DEFAULT_MAXIMUMPAPERTOPMARGIN),
360cdf0e10cSrcweir 	m_nMaximumPaperBottomMargin(DEFAULT_MAXIMUMPAPERBOTTOMMARGIN),
361cdf0e10cSrcweir 
362cdf0e10cSrcweir     // primitives
363cdf0e10cSrcweir 	m_bAntiAliasing(DEFAULT_ANTIALIASING),
364cdf0e10cSrcweir 	m_bSnapHorVerLinesToDiscrete(DEFAULT_SNAPHORVERLINESTODISCRETE),
365cdf0e10cSrcweir 	m_bSolidDragCreate(DEFAULT_SOLIDDRAGCREATE),
366cdf0e10cSrcweir 	m_bRenderDecoratedTextDirect(DEFAULT_RENDERDECORATEDTEXTDIRECT),
367cdf0e10cSrcweir 	m_bRenderSimpleTextDirect(DEFAULT_RENDERSIMPLETEXTDIRECT),
368cdf0e10cSrcweir 	m_nQuadratic3DRenderLimit(DEFAULT_QUADRATIC3DRENDERLIMIT),
369cdf0e10cSrcweir 	m_nQuadraticFormControlRenderLimit(DEFAULT_QUADRATICFORMCONTROLRENDERLIMIT),
370cdf0e10cSrcweir 
371cdf0e10cSrcweir 	// #i97672# selection settings
372cdf0e10cSrcweir 	m_nTransparentSelectionPercent(DEFAULT_TRANSPARENTSELECTIONPERCENT),
373cdf0e10cSrcweir 	m_nSelectionMaximumLuminancePercent(DEFAULT_SELECTIONMAXIMUMLUMINANCEPERCENT),
374cdf0e10cSrcweir 	m_bTransparentSelection(DEFAULT_TRANSPARENTSELECTION),
375cdf0e10cSrcweir 
376cdf0e10cSrcweir     // local values
377cdf0e10cSrcweir     m_bAllowAA(true),
378cdf0e10cSrcweir     m_bAllowAAChecked(false)
379cdf0e10cSrcweir {
380cdf0e10cSrcweir 	Sequence< OUString >	seqNames( impl_GetPropertyNames() );
381cdf0e10cSrcweir 	Sequence< Any >			seqValues	= GetProperties( seqNames )	;
382cdf0e10cSrcweir 
383cdf0e10cSrcweir 	DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nI miss some values of configuration keys!\n" );
384cdf0e10cSrcweir 
385cdf0e10cSrcweir 	// Copy values from list in right order to ouer internal member.
386cdf0e10cSrcweir 	sal_Int32 nPropertyCount = seqValues.getLength();
387cdf0e10cSrcweir 	sal_Int32 nProperty	= 0;
388cdf0e10cSrcweir 
389cdf0e10cSrcweir 	for( nProperty=0; nProperty<nPropertyCount; ++nProperty )
390cdf0e10cSrcweir 	{
391cdf0e10cSrcweir 		DBG_ASSERT( !(seqValues[nProperty].hasValue()==sal_False), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nInvalid property value for property detected!\n" );
392cdf0e10cSrcweir 
393cdf0e10cSrcweir         switch( nProperty )
394cdf0e10cSrcweir         {
395cdf0e10cSrcweir             case PROPERTYHANDLE_OVERLAYBUFFER:
396cdf0e10cSrcweir 			{
397cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\OverlayBuffer\"?" );
398cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bOverlayBuffer;
399cdf0e10cSrcweir 			}
400cdf0e10cSrcweir 			break;
401cdf0e10cSrcweir 
402cdf0e10cSrcweir             case PROPERTYHANDLE_PAINTBUFFER:
403cdf0e10cSrcweir 			{
404cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\PaintBuffer\"?" );
405cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bPaintBuffer;
406cdf0e10cSrcweir 			}
407cdf0e10cSrcweir 			break;
408cdf0e10cSrcweir 
409cdf0e10cSrcweir 			case PROPERTYHANDLE_STRIPE_COLOR_A:
410cdf0e10cSrcweir 			{
411cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\StripeColorA\"?" );
412cdf0e10cSrcweir 				sal_Int32 nValue = 0;
413cdf0e10cSrcweir 				seqValues[nProperty] >>= nValue;
414cdf0e10cSrcweir 				m_bStripeColorA = nValue;
415cdf0e10cSrcweir 			}
416cdf0e10cSrcweir 			break;
417cdf0e10cSrcweir 
418cdf0e10cSrcweir 			case PROPERTYHANDLE_STRIPE_COLOR_B:
419cdf0e10cSrcweir 			{
420cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\StripeColorB\"?" );
421cdf0e10cSrcweir 				sal_Int32 nValue = 0;
422cdf0e10cSrcweir 				seqValues[nProperty] >>= nValue;
423cdf0e10cSrcweir 				m_bStripeColorB = nValue;
424cdf0e10cSrcweir 			}
425cdf0e10cSrcweir 			break;
426cdf0e10cSrcweir 
427cdf0e10cSrcweir 			case PROPERTYHANDLE_STRIPE_LENGTH:
428cdf0e10cSrcweir 			{
429cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_SHORT), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\StripeLength\"?" );
430cdf0e10cSrcweir 				seqValues[nProperty] >>= m_nStripeLength;
431cdf0e10cSrcweir 			}
432cdf0e10cSrcweir 			break;
433cdf0e10cSrcweir 
434cdf0e10cSrcweir 			// #i73602#
435cdf0e10cSrcweir             case PROPERTYHANDLE_OVERLAYBUFFER_CALC:
436cdf0e10cSrcweir 			{
437cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\OverlayBuffer_Calc\"?" );
438cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bOverlayBuffer_Calc;
439cdf0e10cSrcweir 			}
440cdf0e10cSrcweir 			break;
441cdf0e10cSrcweir 
442cdf0e10cSrcweir 			case PROPERTYHANDLE_OVERLAYBUFFER_WRITER:
443cdf0e10cSrcweir 			{
444cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\OverlayBuffer_Writer\"?" );
445cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bOverlayBuffer_Writer;
446cdf0e10cSrcweir 			}
447cdf0e10cSrcweir 			break;
448cdf0e10cSrcweir 
449cdf0e10cSrcweir 			case PROPERTYHANDLE_OVERLAYBUFFER_DRAWIMPRESS:
450cdf0e10cSrcweir 			{
451cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\OverlayBuffer_DrawImpress\"?" );
452cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bOverlayBuffer_DrawImpress;
453cdf0e10cSrcweir 			}
454cdf0e10cSrcweir 			break;
455cdf0e10cSrcweir 
456cdf0e10cSrcweir 			// #i74769#, #i75172#
457cdf0e10cSrcweir             case PROPERTYHANDLE_PAINTBUFFER_CALC:
458cdf0e10cSrcweir 			{
459cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\PaintBuffer_Calc\"?" );
460cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bPaintBuffer_Calc;
461cdf0e10cSrcweir 			}
462cdf0e10cSrcweir 			break;
463cdf0e10cSrcweir 
464cdf0e10cSrcweir 			case PROPERTYHANDLE_PAINTBUFFER_WRITER:
465cdf0e10cSrcweir 			{
466cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\PaintBuffer_Writer\"?" );
467cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bPaintBuffer_Writer;
468cdf0e10cSrcweir 			}
469cdf0e10cSrcweir 			break;
470cdf0e10cSrcweir 
471cdf0e10cSrcweir 			case PROPERTYHANDLE_PAINTBUFFER_DRAWIMPRESS:
472cdf0e10cSrcweir 			{
473cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\PaintBuffer_DrawImpress\"?" );
474cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bPaintBuffer_DrawImpress;
475cdf0e10cSrcweir 			}
476cdf0e10cSrcweir 			break;
477cdf0e10cSrcweir 
478cdf0e10cSrcweir 			// #i4219#
479cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERWIDTH:
480cdf0e10cSrcweir 			{
481cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\MaximumPaperWidth\"?" );
482cdf0e10cSrcweir 				seqValues[nProperty] >>= m_nMaximumPaperWidth;
483cdf0e10cSrcweir 			}
484cdf0e10cSrcweir 			break;
485cdf0e10cSrcweir 
486cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERHEIGHT:
487cdf0e10cSrcweir 			{
488cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\MaximumPaperHeight\"?" );
489cdf0e10cSrcweir 				seqValues[nProperty] >>= m_nMaximumPaperHeight;
490cdf0e10cSrcweir 			}
491cdf0e10cSrcweir 			break;
492cdf0e10cSrcweir 
493cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERLEFTMARGIN:
494cdf0e10cSrcweir 			{
495cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\MaximumPaperLeftMargin\"?" );
496cdf0e10cSrcweir 				seqValues[nProperty] >>= m_nMaximumPaperLeftMargin;
497cdf0e10cSrcweir 			}
498cdf0e10cSrcweir 			break;
499cdf0e10cSrcweir 
500cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERRIGHTMARGIN:
501cdf0e10cSrcweir 			{
502cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\MaximumPaperRightMargin\"?" );
503cdf0e10cSrcweir 				seqValues[nProperty] >>= m_nMaximumPaperRightMargin;
504cdf0e10cSrcweir 			}
505cdf0e10cSrcweir 			break;
506cdf0e10cSrcweir 
507cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERTOPMARGIN:
508cdf0e10cSrcweir 			{
509cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\MaximumPaperTopMargin\"?" );
510cdf0e10cSrcweir 				seqValues[nProperty] >>= m_nMaximumPaperTopMargin;
511cdf0e10cSrcweir 			}
512cdf0e10cSrcweir 			break;
513cdf0e10cSrcweir 
514cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERBOTTOMMARGIN:
515cdf0e10cSrcweir 			{
516cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\MaximumPaperBottomMargin\"?" );
517cdf0e10cSrcweir 				seqValues[nProperty] >>= m_nMaximumPaperBottomMargin;
518cdf0e10cSrcweir 			}
519cdf0e10cSrcweir 			break;
520cdf0e10cSrcweir 
521cdf0e10cSrcweir             // primitives
522cdf0e10cSrcweir             case PROPERTYHANDLE_ANTIALIASING:
523cdf0e10cSrcweir 			{
524cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\AntiAliasing\"?" );
525cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bAntiAliasing;
526cdf0e10cSrcweir 			}
527cdf0e10cSrcweir 			break;
528cdf0e10cSrcweir 
529cdf0e10cSrcweir             // primitives
530cdf0e10cSrcweir             case PROPERTYHANDLE_SNAPHORVERLINESTODISCRETE:
531cdf0e10cSrcweir 			{
532cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\SnapHorVerLinesToDiscrete\"?" );
533cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bSnapHorVerLinesToDiscrete;
534cdf0e10cSrcweir 			}
535cdf0e10cSrcweir 			break;
536cdf0e10cSrcweir 
537cdf0e10cSrcweir             case PROPERTYHANDLE_SOLIDDRAGCREATE:
538cdf0e10cSrcweir 			{
539cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\SolidDragCreate\"?" );
540cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bSolidDragCreate;
541cdf0e10cSrcweir 			}
542cdf0e10cSrcweir 			break;
543cdf0e10cSrcweir 
544cdf0e10cSrcweir             case PROPERTYHANDLE_RENDERDECORATEDTEXTDIRECT:
545cdf0e10cSrcweir 			{
546cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\RenderDecoratedTextDirect\"?" );
547cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bRenderDecoratedTextDirect;
548cdf0e10cSrcweir 			}
549cdf0e10cSrcweir 			break;
550cdf0e10cSrcweir 
551cdf0e10cSrcweir             case PROPERTYHANDLE_RENDERSIMPLETEXTDIRECT:
552cdf0e10cSrcweir 			{
553cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\RenderSimpleTextDirect\"?" );
554cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bRenderSimpleTextDirect;
555cdf0e10cSrcweir 			}
556cdf0e10cSrcweir 			break;
557cdf0e10cSrcweir 
558cdf0e10cSrcweir             case PROPERTYHANDLE_QUADRATIC3DRENDERLIMIT:
559cdf0e10cSrcweir 			{
560cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\Quadratic3DRenderLimit\"?" );
561cdf0e10cSrcweir 				seqValues[nProperty] >>= m_nQuadratic3DRenderLimit;
562cdf0e10cSrcweir 			}
563cdf0e10cSrcweir 			break;
564cdf0e10cSrcweir 
565cdf0e10cSrcweir             case PROPERTYHANDLE_QUADRATICFORMCONTROLRENDERLIMIT:
566cdf0e10cSrcweir 			{
567cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\QuadraticFormControlRenderLimit\"?" );
568cdf0e10cSrcweir 				seqValues[nProperty] >>= m_nQuadraticFormControlRenderLimit;
569cdf0e10cSrcweir 			}
570cdf0e10cSrcweir 			break;
571cdf0e10cSrcweir 
572cdf0e10cSrcweir 			// #i97672# selection settings
573cdf0e10cSrcweir             case PROPERTYHANDLE_TRANSPARENTSELECTION:
574cdf0e10cSrcweir 			{
575cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\TransparentSelection\"?" );
576cdf0e10cSrcweir 				seqValues[nProperty] >>= m_bTransparentSelection;
577cdf0e10cSrcweir 			}
578cdf0e10cSrcweir 			break;
579cdf0e10cSrcweir 
580cdf0e10cSrcweir 			case PROPERTYHANDLE_TRANSPARENTSELECTIONPERCENT:
581cdf0e10cSrcweir 			{
582cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_SHORT), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\TransparentSelectionPercent\"?" );
583cdf0e10cSrcweir 				seqValues[nProperty] >>= m_nTransparentSelectionPercent;
584cdf0e10cSrcweir 			}
585cdf0e10cSrcweir 
586cdf0e10cSrcweir 			case PROPERTYHANDLE_SELECTIONMAXIMUMLUMINANCEPERCENT:
587cdf0e10cSrcweir 			{
588cdf0e10cSrcweir 				DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_SHORT), "SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl()\nWho has changed the value type of \"Office.Common\\Drawinglayer\\SelectionMaximumLuminancePercent\"?" );
589cdf0e10cSrcweir 				seqValues[nProperty] >>= m_nSelectionMaximumLuminancePercent;
590cdf0e10cSrcweir 			}
591cdf0e10cSrcweir 			break;
592cdf0e10cSrcweir         }
593cdf0e10cSrcweir 	}
594cdf0e10cSrcweir }
595cdf0e10cSrcweir 
596cdf0e10cSrcweir //*****************************************************************************************************************
597cdf0e10cSrcweir //	destructor
598cdf0e10cSrcweir //*****************************************************************************************************************
~SvtOptionsDrawinglayer_Impl()599cdf0e10cSrcweir SvtOptionsDrawinglayer_Impl::~SvtOptionsDrawinglayer_Impl()
600cdf0e10cSrcweir {
601cdf0e10cSrcweir 	if( IsModified() )
602cdf0e10cSrcweir 		Commit();
603cdf0e10cSrcweir }
604cdf0e10cSrcweir 
605cdf0e10cSrcweir //*****************************************************************************************************************
606cdf0e10cSrcweir //	Commit
607cdf0e10cSrcweir //*****************************************************************************************************************
Commit()608cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::Commit()
609cdf0e10cSrcweir {
610cdf0e10cSrcweir 	Sequence< OUString >	aSeqNames( impl_GetPropertyNames() );
611cdf0e10cSrcweir 	Sequence< Any >			aSeqValues( aSeqNames.getLength() );
612cdf0e10cSrcweir 
613cdf0e10cSrcweir 	for( sal_Int32 nProperty = 0, nCount = aSeqNames.getLength(); nProperty < nCount; ++nProperty )
614cdf0e10cSrcweir 	{
615cdf0e10cSrcweir         switch( nProperty )
616cdf0e10cSrcweir         {
617cdf0e10cSrcweir             case PROPERTYHANDLE_OVERLAYBUFFER:
618cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bOverlayBuffer;
619cdf0e10cSrcweir 			break;
620cdf0e10cSrcweir 
621cdf0e10cSrcweir             case PROPERTYHANDLE_PAINTBUFFER:
622cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bPaintBuffer;
623cdf0e10cSrcweir 			break;
624cdf0e10cSrcweir 
625cdf0e10cSrcweir 			case PROPERTYHANDLE_STRIPE_COLOR_A:
626cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bStripeColorA.GetColor();
627cdf0e10cSrcweir 			break;
628cdf0e10cSrcweir 
629cdf0e10cSrcweir 			case PROPERTYHANDLE_STRIPE_COLOR_B:
630cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bStripeColorB.GetColor();
631cdf0e10cSrcweir 			break;
632cdf0e10cSrcweir 
633cdf0e10cSrcweir 			case PROPERTYHANDLE_STRIPE_LENGTH:
634cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_nStripeLength;
635cdf0e10cSrcweir 			break;
636cdf0e10cSrcweir 
637cdf0e10cSrcweir 			// #i73602#
638cdf0e10cSrcweir             case PROPERTYHANDLE_OVERLAYBUFFER_CALC:
639cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bOverlayBuffer_Calc;
640cdf0e10cSrcweir 			break;
641cdf0e10cSrcweir 
642cdf0e10cSrcweir 			case PROPERTYHANDLE_OVERLAYBUFFER_WRITER:
643cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bOverlayBuffer_Writer;
644cdf0e10cSrcweir 			break;
645cdf0e10cSrcweir 
646cdf0e10cSrcweir 			case PROPERTYHANDLE_OVERLAYBUFFER_DRAWIMPRESS:
647cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bOverlayBuffer_DrawImpress;
648cdf0e10cSrcweir 			break;
649cdf0e10cSrcweir 
650cdf0e10cSrcweir 			// #i74769#, #i75172#
651cdf0e10cSrcweir             case PROPERTYHANDLE_PAINTBUFFER_CALC:
652cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bPaintBuffer_Calc;
653cdf0e10cSrcweir 			break;
654cdf0e10cSrcweir 
655cdf0e10cSrcweir 			case PROPERTYHANDLE_PAINTBUFFER_WRITER:
656cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bPaintBuffer_Writer;
657cdf0e10cSrcweir 			break;
658cdf0e10cSrcweir 
659cdf0e10cSrcweir 			case PROPERTYHANDLE_PAINTBUFFER_DRAWIMPRESS:
660cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bPaintBuffer_DrawImpress;
661cdf0e10cSrcweir 			break;
662cdf0e10cSrcweir 
663cdf0e10cSrcweir 			// #i4219#
664cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERWIDTH:
665cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_nMaximumPaperWidth;
666cdf0e10cSrcweir 			break;
667cdf0e10cSrcweir 
668cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERHEIGHT:
669cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_nMaximumPaperHeight;
670cdf0e10cSrcweir 			break;
671cdf0e10cSrcweir 
672cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERLEFTMARGIN:
673cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_nMaximumPaperLeftMargin;
674cdf0e10cSrcweir 			break;
675cdf0e10cSrcweir 
676cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERRIGHTMARGIN:
677cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_nMaximumPaperRightMargin;
678cdf0e10cSrcweir 			break;
679cdf0e10cSrcweir 
680cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERTOPMARGIN:
681cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_nMaximumPaperTopMargin;
682cdf0e10cSrcweir 			break;
683cdf0e10cSrcweir 
684cdf0e10cSrcweir 			case PROPERTYHANDLE_MAXIMUMPAPERBOTTOMMARGIN:
685cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_nMaximumPaperBottomMargin;
686cdf0e10cSrcweir 			break;
687cdf0e10cSrcweir 
688cdf0e10cSrcweir             // primitives
689cdf0e10cSrcweir             case PROPERTYHANDLE_ANTIALIASING:
690cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bAntiAliasing;
691cdf0e10cSrcweir 			break;
692cdf0e10cSrcweir 
693cdf0e10cSrcweir             case PROPERTYHANDLE_SNAPHORVERLINESTODISCRETE:
694cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bSnapHorVerLinesToDiscrete;
695cdf0e10cSrcweir 			break;
696cdf0e10cSrcweir 
697cdf0e10cSrcweir             case PROPERTYHANDLE_SOLIDDRAGCREATE:
698cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bSolidDragCreate;
699cdf0e10cSrcweir 			break;
700cdf0e10cSrcweir 
701cdf0e10cSrcweir             case PROPERTYHANDLE_RENDERDECORATEDTEXTDIRECT:
702cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bRenderDecoratedTextDirect;
703cdf0e10cSrcweir 			break;
704cdf0e10cSrcweir 
705cdf0e10cSrcweir             case PROPERTYHANDLE_RENDERSIMPLETEXTDIRECT:
706cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bRenderSimpleTextDirect;
707cdf0e10cSrcweir 			break;
708cdf0e10cSrcweir 
709cdf0e10cSrcweir             case PROPERTYHANDLE_QUADRATIC3DRENDERLIMIT:
710cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_nQuadratic3DRenderLimit;
711cdf0e10cSrcweir 			break;
712cdf0e10cSrcweir 
713cdf0e10cSrcweir             case PROPERTYHANDLE_QUADRATICFORMCONTROLRENDERLIMIT:
714cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_nQuadraticFormControlRenderLimit;
715cdf0e10cSrcweir 			break;
716cdf0e10cSrcweir 
717cdf0e10cSrcweir 			// #i97672# selection settings
718cdf0e10cSrcweir             case PROPERTYHANDLE_TRANSPARENTSELECTION:
719cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_bTransparentSelection;
720cdf0e10cSrcweir 			break;
721cdf0e10cSrcweir 
722cdf0e10cSrcweir 			case PROPERTYHANDLE_TRANSPARENTSELECTIONPERCENT:
723cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_nTransparentSelectionPercent;
724cdf0e10cSrcweir 			break;
725cdf0e10cSrcweir 
726cdf0e10cSrcweir 			case PROPERTYHANDLE_SELECTIONMAXIMUMLUMINANCEPERCENT:
727cdf0e10cSrcweir 				aSeqValues[nProperty] <<= m_nSelectionMaximumLuminancePercent;
728cdf0e10cSrcweir 			break;
729cdf0e10cSrcweir         }
730cdf0e10cSrcweir 	}
731cdf0e10cSrcweir 
732cdf0e10cSrcweir 	PutProperties( aSeqNames, aSeqValues );
733cdf0e10cSrcweir }
734cdf0e10cSrcweir 
Notify(const com::sun::star::uno::Sequence<rtl::OUString> &)735cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::Notify( const com::sun::star::uno::Sequence<rtl::OUString>& )
736cdf0e10cSrcweir {
737cdf0e10cSrcweir }
738cdf0e10cSrcweir 
739cdf0e10cSrcweir //*****************************************************************************************************************
740cdf0e10cSrcweir //	public method
741cdf0e10cSrcweir //*****************************************************************************************************************
IsOverlayBuffer() const742cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsOverlayBuffer() const
743cdf0e10cSrcweir {
744cdf0e10cSrcweir 	return m_bOverlayBuffer;
745cdf0e10cSrcweir }
746cdf0e10cSrcweir 
747cdf0e10cSrcweir //*****************************************************************************************************************
748cdf0e10cSrcweir //	public method
749cdf0e10cSrcweir //*****************************************************************************************************************
IsPaintBuffer() const750cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsPaintBuffer() const
751cdf0e10cSrcweir {
752cdf0e10cSrcweir 	return m_bPaintBuffer;
753cdf0e10cSrcweir }
754cdf0e10cSrcweir 
755cdf0e10cSrcweir //*****************************************************************************************************************
756cdf0e10cSrcweir //	public method
757cdf0e10cSrcweir //*****************************************************************************************************************
GetStripeColorA() const758cdf0e10cSrcweir Color SvtOptionsDrawinglayer_Impl::GetStripeColorA() const
759cdf0e10cSrcweir {
760cdf0e10cSrcweir 	return m_bStripeColorA;
761cdf0e10cSrcweir }
762cdf0e10cSrcweir 
763cdf0e10cSrcweir //*****************************************************************************************************************
764cdf0e10cSrcweir //	public method
765cdf0e10cSrcweir //*****************************************************************************************************************
GetStripeColorB() const766cdf0e10cSrcweir Color SvtOptionsDrawinglayer_Impl::GetStripeColorB() const
767cdf0e10cSrcweir {
768cdf0e10cSrcweir 	return m_bStripeColorB;
769cdf0e10cSrcweir }
770cdf0e10cSrcweir 
771cdf0e10cSrcweir //*****************************************************************************************************************
772cdf0e10cSrcweir //	public method
773cdf0e10cSrcweir //*****************************************************************************************************************
GetStripeLength() const774cdf0e10cSrcweir sal_uInt16 SvtOptionsDrawinglayer_Impl::GetStripeLength() const
775cdf0e10cSrcweir {
776cdf0e10cSrcweir 	return m_nStripeLength;
777cdf0e10cSrcweir }
778cdf0e10cSrcweir 
779cdf0e10cSrcweir // #i73602#
IsOverlayBuffer_Calc() const780cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsOverlayBuffer_Calc() const
781cdf0e10cSrcweir {
782cdf0e10cSrcweir 	return m_bOverlayBuffer_Calc;
783cdf0e10cSrcweir }
784cdf0e10cSrcweir 
IsOverlayBuffer_Writer() const785cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsOverlayBuffer_Writer() const
786cdf0e10cSrcweir {
787cdf0e10cSrcweir 	return m_bOverlayBuffer_Writer;
788cdf0e10cSrcweir }
789cdf0e10cSrcweir 
IsOverlayBuffer_DrawImpress() const790cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsOverlayBuffer_DrawImpress() const
791cdf0e10cSrcweir {
792cdf0e10cSrcweir 	return m_bOverlayBuffer_DrawImpress;
793cdf0e10cSrcweir }
794cdf0e10cSrcweir 
795cdf0e10cSrcweir // #i74769#, #i75172#
IsPaintBuffer_Calc() const796cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsPaintBuffer_Calc() const
797cdf0e10cSrcweir {
798cdf0e10cSrcweir 	return m_bPaintBuffer_Calc;
799cdf0e10cSrcweir }
800cdf0e10cSrcweir 
IsPaintBuffer_Writer() const801cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsPaintBuffer_Writer() const
802cdf0e10cSrcweir {
803cdf0e10cSrcweir 	return m_bPaintBuffer_Writer;
804cdf0e10cSrcweir }
805cdf0e10cSrcweir 
IsPaintBuffer_DrawImpress() const806cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsPaintBuffer_DrawImpress() const
807cdf0e10cSrcweir {
808cdf0e10cSrcweir 	return m_bPaintBuffer_DrawImpress;
809cdf0e10cSrcweir }
810cdf0e10cSrcweir 
811cdf0e10cSrcweir // #i4219#
GetMaximumPaperWidth() const812cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer_Impl::GetMaximumPaperWidth() const
813cdf0e10cSrcweir {
814cdf0e10cSrcweir 	return m_nMaximumPaperWidth;
815cdf0e10cSrcweir }
816cdf0e10cSrcweir 
GetMaximumPaperHeight() const817cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer_Impl::GetMaximumPaperHeight() const
818cdf0e10cSrcweir {
819cdf0e10cSrcweir 	return m_nMaximumPaperHeight;
820cdf0e10cSrcweir }
821cdf0e10cSrcweir 
GetMaximumPaperLeftMargin() const822cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer_Impl::GetMaximumPaperLeftMargin() const
823cdf0e10cSrcweir {
824cdf0e10cSrcweir 	return m_nMaximumPaperLeftMargin;
825cdf0e10cSrcweir }
826cdf0e10cSrcweir 
GetMaximumPaperRightMargin() const827cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer_Impl::GetMaximumPaperRightMargin() const
828cdf0e10cSrcweir {
829cdf0e10cSrcweir 	return m_nMaximumPaperRightMargin;
830cdf0e10cSrcweir }
831cdf0e10cSrcweir 
GetMaximumPaperTopMargin() const832cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer_Impl::GetMaximumPaperTopMargin() const
833cdf0e10cSrcweir {
834cdf0e10cSrcweir 	return m_nMaximumPaperTopMargin;
835cdf0e10cSrcweir }
836cdf0e10cSrcweir 
GetMaximumPaperBottomMargin() const837cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer_Impl::GetMaximumPaperBottomMargin() const
838cdf0e10cSrcweir {
839cdf0e10cSrcweir 	return m_nMaximumPaperBottomMargin;
840cdf0e10cSrcweir }
841cdf0e10cSrcweir 
842cdf0e10cSrcweir //*****************************************************************************************************************
843cdf0e10cSrcweir //	public method
844cdf0e10cSrcweir //*****************************************************************************************************************
SetOverlayBuffer(sal_Bool bState)845cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetOverlayBuffer( sal_Bool bState )
846cdf0e10cSrcweir {
847cdf0e10cSrcweir 	if(m_bOverlayBuffer != bState)
848cdf0e10cSrcweir 	{
849cdf0e10cSrcweir 		m_bOverlayBuffer = bState;
850cdf0e10cSrcweir 		SetModified();
851cdf0e10cSrcweir 	}
852cdf0e10cSrcweir }
853cdf0e10cSrcweir 
854cdf0e10cSrcweir //*****************************************************************************************************************
855cdf0e10cSrcweir //	public method
856cdf0e10cSrcweir //*****************************************************************************************************************
SetPaintBuffer(sal_Bool bState)857cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetPaintBuffer( sal_Bool bState )
858cdf0e10cSrcweir {
859cdf0e10cSrcweir 	if(m_bPaintBuffer != bState)
860cdf0e10cSrcweir 	{
861cdf0e10cSrcweir 		m_bPaintBuffer = bState;
862cdf0e10cSrcweir 		SetModified();
863cdf0e10cSrcweir 	}
864cdf0e10cSrcweir }
865cdf0e10cSrcweir 
866cdf0e10cSrcweir //*****************************************************************************************************************
867cdf0e10cSrcweir //	public method
868cdf0e10cSrcweir //*****************************************************************************************************************
SetStripeColorA(Color aColor)869cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetStripeColorA( Color aColor )
870cdf0e10cSrcweir {
871cdf0e10cSrcweir 	if(m_bStripeColorA != aColor)
872cdf0e10cSrcweir 	{
873cdf0e10cSrcweir 		m_bStripeColorA = aColor;
874cdf0e10cSrcweir 		SetModified();
875cdf0e10cSrcweir 	}
876cdf0e10cSrcweir }
877cdf0e10cSrcweir 
878cdf0e10cSrcweir //*****************************************************************************************************************
879cdf0e10cSrcweir //	public method
880cdf0e10cSrcweir //*****************************************************************************************************************
SetStripeColorB(Color aColor)881cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetStripeColorB( Color aColor )
882cdf0e10cSrcweir {
883cdf0e10cSrcweir 	if(m_bStripeColorB != aColor)
884cdf0e10cSrcweir 	{
885cdf0e10cSrcweir 		m_bStripeColorB = aColor;
886cdf0e10cSrcweir 		SetModified();
887cdf0e10cSrcweir 	}
888cdf0e10cSrcweir }
889cdf0e10cSrcweir 
890cdf0e10cSrcweir //*****************************************************************************************************************
891cdf0e10cSrcweir //	public method
892cdf0e10cSrcweir //*****************************************************************************************************************
SetStripeLength(sal_uInt16 nLength)893cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetStripeLength( sal_uInt16 nLength )
894cdf0e10cSrcweir {
895cdf0e10cSrcweir 	if(m_nStripeLength != nLength)
896cdf0e10cSrcweir 	{
897cdf0e10cSrcweir 		m_nStripeLength = nLength;
898cdf0e10cSrcweir 		SetModified();
899cdf0e10cSrcweir 	}
900cdf0e10cSrcweir }
901cdf0e10cSrcweir 
902cdf0e10cSrcweir // #i73602#
SetOverlayBuffer_Calc(sal_Bool bState)903cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetOverlayBuffer_Calc( sal_Bool bState )
904cdf0e10cSrcweir {
905cdf0e10cSrcweir 	if(m_bOverlayBuffer_Calc != bState)
906cdf0e10cSrcweir 	{
907cdf0e10cSrcweir 		m_bOverlayBuffer_Calc = bState;
908cdf0e10cSrcweir 		SetModified();
909cdf0e10cSrcweir 	}
910cdf0e10cSrcweir }
911cdf0e10cSrcweir 
SetOverlayBuffer_Writer(sal_Bool bState)912cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetOverlayBuffer_Writer( sal_Bool bState )
913cdf0e10cSrcweir {
914cdf0e10cSrcweir 	if(m_bOverlayBuffer_Writer != bState)
915cdf0e10cSrcweir 	{
916cdf0e10cSrcweir 		m_bOverlayBuffer_Writer = bState;
917cdf0e10cSrcweir 		SetModified();
918cdf0e10cSrcweir 	}
919cdf0e10cSrcweir }
920cdf0e10cSrcweir 
SetOverlayBuffer_DrawImpress(sal_Bool bState)921cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetOverlayBuffer_DrawImpress( sal_Bool bState )
922cdf0e10cSrcweir {
923cdf0e10cSrcweir 	if(m_bOverlayBuffer_DrawImpress != bState)
924cdf0e10cSrcweir 	{
925cdf0e10cSrcweir 		m_bOverlayBuffer_DrawImpress = bState;
926cdf0e10cSrcweir 		SetModified();
927cdf0e10cSrcweir 	}
928cdf0e10cSrcweir }
929cdf0e10cSrcweir 
930cdf0e10cSrcweir // #i74769#, #i75172#
SetPaintBuffer_Calc(sal_Bool bState)931cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetPaintBuffer_Calc( sal_Bool bState )
932cdf0e10cSrcweir {
933cdf0e10cSrcweir 	if(m_bPaintBuffer_Calc != bState)
934cdf0e10cSrcweir 	{
935cdf0e10cSrcweir 		m_bPaintBuffer_Calc = bState;
936cdf0e10cSrcweir 		SetModified();
937cdf0e10cSrcweir 	}
938cdf0e10cSrcweir }
939cdf0e10cSrcweir 
SetPaintBuffer_Writer(sal_Bool bState)940cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetPaintBuffer_Writer( sal_Bool bState )
941cdf0e10cSrcweir {
942cdf0e10cSrcweir 	if(m_bPaintBuffer_Writer != bState)
943cdf0e10cSrcweir 	{
944cdf0e10cSrcweir 		m_bPaintBuffer_Writer = bState;
945cdf0e10cSrcweir 		SetModified();
946cdf0e10cSrcweir 	}
947cdf0e10cSrcweir }
948cdf0e10cSrcweir 
SetPaintBuffer_DrawImpress(sal_Bool bState)949cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetPaintBuffer_DrawImpress( sal_Bool bState )
950cdf0e10cSrcweir {
951cdf0e10cSrcweir 	if(m_bPaintBuffer_DrawImpress != bState)
952cdf0e10cSrcweir 	{
953cdf0e10cSrcweir 		m_bPaintBuffer_DrawImpress = bState;
954cdf0e10cSrcweir 		SetModified();
955cdf0e10cSrcweir 	}
956cdf0e10cSrcweir }
957cdf0e10cSrcweir 
958cdf0e10cSrcweir // #i4219#
SetMaximumPaperWidth(sal_uInt32 nNew)959cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetMaximumPaperWidth( sal_uInt32 nNew )
960cdf0e10cSrcweir {
961cdf0e10cSrcweir 	if(m_nMaximumPaperWidth != nNew)
962cdf0e10cSrcweir 	{
963cdf0e10cSrcweir 		m_nMaximumPaperWidth = nNew;
964cdf0e10cSrcweir 		SetModified();
965cdf0e10cSrcweir 	}
966cdf0e10cSrcweir }
967cdf0e10cSrcweir 
SetMaximumPaperHeight(sal_uInt32 nNew)968cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetMaximumPaperHeight( sal_uInt32 nNew )
969cdf0e10cSrcweir {
970cdf0e10cSrcweir 	if(m_nMaximumPaperHeight != nNew)
971cdf0e10cSrcweir 	{
972cdf0e10cSrcweir 		m_nMaximumPaperHeight = nNew;
973cdf0e10cSrcweir 		SetModified();
974cdf0e10cSrcweir 	}
975cdf0e10cSrcweir }
976cdf0e10cSrcweir 
SetMaximumPaperLeftMargin(sal_uInt32 nNew)977cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetMaximumPaperLeftMargin( sal_uInt32 nNew )
978cdf0e10cSrcweir {
979cdf0e10cSrcweir 	if(m_nMaximumPaperLeftMargin != nNew)
980cdf0e10cSrcweir 	{
981cdf0e10cSrcweir 		m_nMaximumPaperLeftMargin = nNew;
982cdf0e10cSrcweir 		SetModified();
983cdf0e10cSrcweir 	}
984cdf0e10cSrcweir }
985cdf0e10cSrcweir 
SetMaximumPaperRightMargin(sal_uInt32 nNew)986cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetMaximumPaperRightMargin( sal_uInt32 nNew )
987cdf0e10cSrcweir {
988cdf0e10cSrcweir 	if(m_nMaximumPaperRightMargin != nNew)
989cdf0e10cSrcweir 	{
990cdf0e10cSrcweir 		m_nMaximumPaperRightMargin = nNew;
991cdf0e10cSrcweir 		SetModified();
992cdf0e10cSrcweir 	}
993cdf0e10cSrcweir }
994cdf0e10cSrcweir 
SetMaximumPaperTopMargin(sal_uInt32 nNew)995cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetMaximumPaperTopMargin( sal_uInt32 nNew )
996cdf0e10cSrcweir {
997cdf0e10cSrcweir 	if(m_nMaximumPaperTopMargin != nNew)
998cdf0e10cSrcweir 	{
999cdf0e10cSrcweir 		m_nMaximumPaperTopMargin = nNew;
1000cdf0e10cSrcweir 		SetModified();
1001cdf0e10cSrcweir 	}
1002cdf0e10cSrcweir }
1003cdf0e10cSrcweir 
SetMaximumPaperBottomMargin(sal_uInt32 nNew)1004cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetMaximumPaperBottomMargin( sal_uInt32 nNew )
1005cdf0e10cSrcweir {
1006cdf0e10cSrcweir 	if(m_nMaximumPaperBottomMargin != nNew)
1007cdf0e10cSrcweir 	{
1008cdf0e10cSrcweir 		m_nMaximumPaperBottomMargin = nNew;
1009cdf0e10cSrcweir 		SetModified();
1010cdf0e10cSrcweir 	}
1011cdf0e10cSrcweir }
1012cdf0e10cSrcweir 
1013cdf0e10cSrcweir // helper
IsAAPossibleOnThisSystem() const1014cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsAAPossibleOnThisSystem() const
1015cdf0e10cSrcweir {
1016cdf0e10cSrcweir     if(!m_bAllowAAChecked)
1017cdf0e10cSrcweir     {
1018cdf0e10cSrcweir         SvtOptionsDrawinglayer_Impl* pThat = const_cast< SvtOptionsDrawinglayer_Impl* >(this);
1019cdf0e10cSrcweir         pThat->m_bAllowAAChecked = true;
1020cdf0e10cSrcweir 
1021cdf0e10cSrcweir #ifdef WIN32
1022cdf0e10cSrcweir         // WIN32 uses GDIPlus with VCL forthe first incarnation; this will be enhanced
1023cdf0e10cSrcweir         // in the future to use canvases and the canvas renderer, thus a AA-abled
1024cdf0e10cSrcweir         // canvas needs to be checked here in the future.
1025cdf0e10cSrcweir         // Currently, just allow AA for WIN32
1026cdf0e10cSrcweir #endif
1027cdf0e10cSrcweir 
1028cdf0e10cSrcweir 	    // check XRenderExtension
1029cdf0e10cSrcweir 	    if(m_bAllowAA && !Application::GetDefaultDevice()->supportsOperation( OutDevSupport_TransparentRect ))
1030cdf0e10cSrcweir 	    {
1031cdf0e10cSrcweir 		    pThat->m_bAllowAA = false;
1032cdf0e10cSrcweir 	    }
1033cdf0e10cSrcweir     }
1034cdf0e10cSrcweir 
1035cdf0e10cSrcweir     return m_bAllowAA;
1036cdf0e10cSrcweir }
1037cdf0e10cSrcweir 
1038cdf0e10cSrcweir // primitives
IsAntiAliasing() const1039cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsAntiAliasing() const
1040cdf0e10cSrcweir {
1041cdf0e10cSrcweir 	return m_bAntiAliasing;
1042cdf0e10cSrcweir }
1043cdf0e10cSrcweir 
IsSnapHorVerLinesToDiscrete() const1044cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsSnapHorVerLinesToDiscrete() const
1045cdf0e10cSrcweir {
1046cdf0e10cSrcweir 	return m_bSnapHorVerLinesToDiscrete;
1047cdf0e10cSrcweir }
1048cdf0e10cSrcweir 
IsSolidDragCreate() const1049cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsSolidDragCreate() const
1050cdf0e10cSrcweir {
1051cdf0e10cSrcweir 	return m_bSolidDragCreate;
1052cdf0e10cSrcweir }
1053cdf0e10cSrcweir 
IsRenderDecoratedTextDirect() const1054cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsRenderDecoratedTextDirect() const
1055cdf0e10cSrcweir {
1056cdf0e10cSrcweir 	return m_bRenderDecoratedTextDirect;
1057cdf0e10cSrcweir }
1058cdf0e10cSrcweir 
IsRenderSimpleTextDirect() const1059cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsRenderSimpleTextDirect() const
1060cdf0e10cSrcweir {
1061cdf0e10cSrcweir 	return m_bRenderSimpleTextDirect;
1062cdf0e10cSrcweir }
1063cdf0e10cSrcweir 
GetQuadratic3DRenderLimit() const1064cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer_Impl::GetQuadratic3DRenderLimit() const
1065cdf0e10cSrcweir {
1066cdf0e10cSrcweir 	return m_nQuadratic3DRenderLimit;
1067cdf0e10cSrcweir }
1068cdf0e10cSrcweir 
GetQuadraticFormControlRenderLimit() const1069cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer_Impl::GetQuadraticFormControlRenderLimit() const
1070cdf0e10cSrcweir {
1071cdf0e10cSrcweir 	return m_nQuadraticFormControlRenderLimit;
1072cdf0e10cSrcweir }
1073cdf0e10cSrcweir 
SetAntiAliasing(sal_Bool bState)1074cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetAntiAliasing( sal_Bool bState )
1075cdf0e10cSrcweir {
1076cdf0e10cSrcweir 	if(m_bAntiAliasing != bState)
1077cdf0e10cSrcweir 	{
1078cdf0e10cSrcweir 		m_bAntiAliasing = bState;
1079cdf0e10cSrcweir 		SetModified();
1080cdf0e10cSrcweir 	}
1081cdf0e10cSrcweir }
1082cdf0e10cSrcweir 
SetSnapHorVerLinesToDiscrete(sal_Bool bState)1083cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetSnapHorVerLinesToDiscrete( sal_Bool bState )
1084cdf0e10cSrcweir {
1085cdf0e10cSrcweir 	if(m_bSnapHorVerLinesToDiscrete != bState)
1086cdf0e10cSrcweir 	{
1087cdf0e10cSrcweir 		m_bSnapHorVerLinesToDiscrete = bState;
1088cdf0e10cSrcweir 		SetModified();
1089cdf0e10cSrcweir 	}
1090cdf0e10cSrcweir }
1091cdf0e10cSrcweir 
SetSolidDragCreate(sal_Bool bState)1092cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetSolidDragCreate( sal_Bool bState )
1093cdf0e10cSrcweir {
1094cdf0e10cSrcweir 	if(m_bSolidDragCreate != bState)
1095cdf0e10cSrcweir 	{
1096cdf0e10cSrcweir 		m_bSolidDragCreate = bState;
1097cdf0e10cSrcweir 		SetModified();
1098cdf0e10cSrcweir 	}
1099cdf0e10cSrcweir }
1100cdf0e10cSrcweir 
SetRenderDecoratedTextDirect(sal_Bool bState)1101cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetRenderDecoratedTextDirect( sal_Bool bState )
1102cdf0e10cSrcweir {
1103cdf0e10cSrcweir 	if(m_bRenderDecoratedTextDirect != bState)
1104cdf0e10cSrcweir 	{
1105cdf0e10cSrcweir 		m_bRenderDecoratedTextDirect = bState;
1106cdf0e10cSrcweir 		SetModified();
1107cdf0e10cSrcweir 	}
1108cdf0e10cSrcweir }
1109cdf0e10cSrcweir 
SetRenderSimpleTextDirect(sal_Bool bState)1110cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetRenderSimpleTextDirect( sal_Bool bState )
1111cdf0e10cSrcweir {
1112cdf0e10cSrcweir 	if(m_bRenderSimpleTextDirect != bState)
1113cdf0e10cSrcweir 	{
1114cdf0e10cSrcweir 		m_bRenderSimpleTextDirect = bState;
1115cdf0e10cSrcweir 		SetModified();
1116cdf0e10cSrcweir 	}
1117cdf0e10cSrcweir }
1118cdf0e10cSrcweir 
SetQuadratic3DRenderLimit(sal_uInt32 nNew)1119cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetQuadratic3DRenderLimit(sal_uInt32 nNew)
1120cdf0e10cSrcweir {
1121cdf0e10cSrcweir 	if(m_nQuadratic3DRenderLimit != nNew)
1122cdf0e10cSrcweir 	{
1123cdf0e10cSrcweir 		m_nQuadratic3DRenderLimit = nNew;
1124cdf0e10cSrcweir 		SetModified();
1125cdf0e10cSrcweir 	}
1126cdf0e10cSrcweir }
1127cdf0e10cSrcweir 
SetQuadraticFormControlRenderLimit(sal_uInt32 nNew)1128cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetQuadraticFormControlRenderLimit(sal_uInt32 nNew)
1129cdf0e10cSrcweir {
1130cdf0e10cSrcweir 	if(m_nQuadraticFormControlRenderLimit != nNew)
1131cdf0e10cSrcweir 	{
1132cdf0e10cSrcweir 		m_nQuadraticFormControlRenderLimit = nNew;
1133cdf0e10cSrcweir 		SetModified();
1134cdf0e10cSrcweir 	}
1135cdf0e10cSrcweir }
1136cdf0e10cSrcweir 
1137cdf0e10cSrcweir // #i97672# selection settings
IsTransparentSelection() const1138cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer_Impl::IsTransparentSelection() const
1139cdf0e10cSrcweir {
1140cdf0e10cSrcweir 	return m_bTransparentSelection;
1141cdf0e10cSrcweir }
1142cdf0e10cSrcweir 
SetTransparentSelection(sal_Bool bState)1143cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetTransparentSelection( sal_Bool bState )
1144cdf0e10cSrcweir {
1145cdf0e10cSrcweir 	if(m_bTransparentSelection != bState)
1146cdf0e10cSrcweir 	{
1147cdf0e10cSrcweir 		m_bTransparentSelection = bState;
1148cdf0e10cSrcweir 		SetModified();
1149cdf0e10cSrcweir 	}
1150cdf0e10cSrcweir }
1151cdf0e10cSrcweir 
SetTransparentSelectionPercent(sal_uInt16 nPercent)1152cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetTransparentSelectionPercent( sal_uInt16 nPercent )
1153cdf0e10cSrcweir {
1154cdf0e10cSrcweir 	if(m_nTransparentSelectionPercent != nPercent)
1155cdf0e10cSrcweir 	{
1156cdf0e10cSrcweir 		m_nTransparentSelectionPercent = nPercent;
1157cdf0e10cSrcweir 		SetModified();
1158cdf0e10cSrcweir 	}
1159cdf0e10cSrcweir }
1160cdf0e10cSrcweir 
GetTransparentSelectionPercent() const1161cdf0e10cSrcweir sal_uInt16 SvtOptionsDrawinglayer_Impl::GetTransparentSelectionPercent() const
1162cdf0e10cSrcweir {
1163cdf0e10cSrcweir 	return m_nTransparentSelectionPercent;
1164cdf0e10cSrcweir }
1165cdf0e10cSrcweir 
SetSelectionMaximumLuminancePercent(sal_uInt16 nPercent)1166cdf0e10cSrcweir void SvtOptionsDrawinglayer_Impl::SetSelectionMaximumLuminancePercent( sal_uInt16 nPercent )
1167cdf0e10cSrcweir {
1168cdf0e10cSrcweir 	if(m_nSelectionMaximumLuminancePercent != nPercent)
1169cdf0e10cSrcweir 	{
1170cdf0e10cSrcweir 		m_nSelectionMaximumLuminancePercent = nPercent;
1171cdf0e10cSrcweir 		SetModified();
1172cdf0e10cSrcweir 	}
1173cdf0e10cSrcweir }
1174cdf0e10cSrcweir 
GetSelectionMaximumLuminancePercent() const1175cdf0e10cSrcweir sal_uInt16 SvtOptionsDrawinglayer_Impl::GetSelectionMaximumLuminancePercent() const
1176cdf0e10cSrcweir {
1177cdf0e10cSrcweir 	return m_nSelectionMaximumLuminancePercent;
1178cdf0e10cSrcweir }
1179cdf0e10cSrcweir 
1180cdf0e10cSrcweir //*****************************************************************************************************************
1181cdf0e10cSrcweir //	private method
1182cdf0e10cSrcweir //*****************************************************************************************************************
impl_GetPropertyNames()1183cdf0e10cSrcweir Sequence< OUString > SvtOptionsDrawinglayer_Impl::impl_GetPropertyNames()
1184cdf0e10cSrcweir {
1185cdf0e10cSrcweir 	// Build static list of configuration key names.
1186cdf0e10cSrcweir 	static const OUString pProperties[] =
1187cdf0e10cSrcweir 	{
1188cdf0e10cSrcweir 		PROPERTYNAME_OVERLAYBUFFER		,
1189cdf0e10cSrcweir 		PROPERTYNAME_PAINTBUFFER		,
1190cdf0e10cSrcweir 		PROPERTYNAME_STRIPE_COLOR_A		,
1191cdf0e10cSrcweir 		PROPERTYNAME_STRIPE_COLOR_B		,
1192cdf0e10cSrcweir 		PROPERTYNAME_STRIPE_LENGTH		,
1193cdf0e10cSrcweir 
1194cdf0e10cSrcweir 		// #i73602#
1195cdf0e10cSrcweir 		PROPERTYNAME_OVERLAYBUFFER_CALC,
1196cdf0e10cSrcweir 		PROPERTYNAME_OVERLAYBUFFER_WRITER,
1197cdf0e10cSrcweir 		PROPERTYNAME_OVERLAYBUFFER_DRAWIMPRESS,
1198cdf0e10cSrcweir 
1199cdf0e10cSrcweir 		// #i74769#, #i75172#
1200cdf0e10cSrcweir 		PROPERTYNAME_PAINTBUFFER_CALC,
1201cdf0e10cSrcweir 		PROPERTYNAME_PAINTBUFFER_WRITER,
1202cdf0e10cSrcweir 		PROPERTYNAME_PAINTBUFFER_DRAWIMPRESS,
1203cdf0e10cSrcweir 
1204cdf0e10cSrcweir 		// #i4219#
1205cdf0e10cSrcweir 		PROPERTYNAME_MAXIMUMPAPERWIDTH,
1206cdf0e10cSrcweir 		PROPERTYNAME_MAXIMUMPAPERHEIGHT,
1207cdf0e10cSrcweir 		PROPERTYNAME_MAXIMUMPAPERLEFTMARGIN,
1208cdf0e10cSrcweir 		PROPERTYNAME_MAXIMUMPAPERRIGHTMARGIN,
1209cdf0e10cSrcweir 		PROPERTYNAME_MAXIMUMPAPERTOPMARGIN,
1210cdf0e10cSrcweir 		PROPERTYNAME_MAXIMUMPAPERBOTTOMMARGIN,
1211cdf0e10cSrcweir 
1212cdf0e10cSrcweir         // primitives
1213cdf0e10cSrcweir         PROPERTYNAME_ANTIALIASING,
1214cdf0e10cSrcweir 		PROPERTYNAME_SNAPHORVERLINESTODISCRETE,
1215cdf0e10cSrcweir         PROPERTYNAME_SOLIDDRAGCREATE,
1216cdf0e10cSrcweir         PROPERTYNAME_RENDERDECORATEDTEXTDIRECT,
1217cdf0e10cSrcweir         PROPERTYNAME_RENDERSIMPLETEXTDIRECT,
1218cdf0e10cSrcweir         PROPERTYNAME_QUADRATIC3DRENDERLIMIT,
1219cdf0e10cSrcweir         PROPERTYNAME_QUADRATICFORMCONTROLRENDERLIMIT,
1220cdf0e10cSrcweir 
1221cdf0e10cSrcweir 		// #i97672# selection settings
1222cdf0e10cSrcweir 		PROPERTYNAME_TRANSPARENTSELECTION,
1223cdf0e10cSrcweir 		PROPERTYNAME_TRANSPARENTSELECTIONPERCENT,
1224cdf0e10cSrcweir 		PROPERTYNAME_SELECTIONMAXIMUMLUMINANCEPERCENT
1225cdf0e10cSrcweir     };
1226cdf0e10cSrcweir 
1227cdf0e10cSrcweir 	// Initialize return sequence with these list ...
1228cdf0e10cSrcweir 	static const Sequence< OUString > seqPropertyNames( pProperties, PROPERTYCOUNT );
1229cdf0e10cSrcweir 	// ... and return it.
1230cdf0e10cSrcweir 	return seqPropertyNames;
1231cdf0e10cSrcweir }
1232cdf0e10cSrcweir 
1233cdf0e10cSrcweir //*****************************************************************************************************************
1234cdf0e10cSrcweir //	initialize static member
1235cdf0e10cSrcweir //	DON'T DO IT IN YOUR HEADER!
1236cdf0e10cSrcweir //	see definition for further informations
1237cdf0e10cSrcweir //*****************************************************************************************************************
1238cdf0e10cSrcweir SvtOptionsDrawinglayer_Impl* SvtOptionsDrawinglayer::m_pDataContainer = NULL;
1239cdf0e10cSrcweir sal_Int32 SvtOptionsDrawinglayer::m_nRefCount = 0;
1240cdf0e10cSrcweir 
1241cdf0e10cSrcweir //*****************************************************************************************************************
1242cdf0e10cSrcweir //	constructor
1243cdf0e10cSrcweir //*****************************************************************************************************************
SvtOptionsDrawinglayer()1244cdf0e10cSrcweir SvtOptionsDrawinglayer::SvtOptionsDrawinglayer()
1245cdf0e10cSrcweir {
1246cdf0e10cSrcweir     // Global access, must be guarded (multithreading!).
1247cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1248cdf0e10cSrcweir 	// Increase ouer refcount ...
1249cdf0e10cSrcweir 	++m_nRefCount;
1250cdf0e10cSrcweir 	// ... and initialize ouer data container only if it not already!
1251cdf0e10cSrcweir     if( m_pDataContainer == NULL )
1252cdf0e10cSrcweir 	{
1253cdf0e10cSrcweir         m_pDataContainer = new SvtOptionsDrawinglayer_Impl();
1254cdf0e10cSrcweir 	}
1255cdf0e10cSrcweir }
1256cdf0e10cSrcweir 
1257cdf0e10cSrcweir //*****************************************************************************************************************
1258cdf0e10cSrcweir //	destructor
1259cdf0e10cSrcweir //*****************************************************************************************************************
~SvtOptionsDrawinglayer()1260cdf0e10cSrcweir SvtOptionsDrawinglayer::~SvtOptionsDrawinglayer()
1261cdf0e10cSrcweir {
1262cdf0e10cSrcweir     // Global access, must be guarded (multithreading!)
1263cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1264cdf0e10cSrcweir 	// Decrease ouer refcount.
1265cdf0e10cSrcweir 	--m_nRefCount;
1266cdf0e10cSrcweir 	// If last instance was deleted ...
1267cdf0e10cSrcweir 	// we must destroy ouer static data container!
1268cdf0e10cSrcweir     if( m_nRefCount <= 0 )
1269cdf0e10cSrcweir 	{
1270cdf0e10cSrcweir 		delete m_pDataContainer;
1271cdf0e10cSrcweir 		m_pDataContainer = NULL;
1272cdf0e10cSrcweir 	}
1273cdf0e10cSrcweir }
1274cdf0e10cSrcweir 
1275cdf0e10cSrcweir //*****************************************************************************************************************
1276cdf0e10cSrcweir //	public method
1277cdf0e10cSrcweir //*****************************************************************************************************************
IsOverlayBuffer() const1278cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsOverlayBuffer() const
1279cdf0e10cSrcweir {
1280cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1281cdf0e10cSrcweir 	return m_pDataContainer->IsOverlayBuffer();
1282cdf0e10cSrcweir }
1283cdf0e10cSrcweir 
1284cdf0e10cSrcweir //*****************************************************************************************************************
1285cdf0e10cSrcweir //	public method
1286cdf0e10cSrcweir //*****************************************************************************************************************
IsPaintBuffer() const1287cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsPaintBuffer() const
1288cdf0e10cSrcweir {
1289cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1290cdf0e10cSrcweir 	return m_pDataContainer->IsPaintBuffer();
1291cdf0e10cSrcweir }
1292cdf0e10cSrcweir 
1293cdf0e10cSrcweir //*****************************************************************************************************************
1294cdf0e10cSrcweir //	public method
1295cdf0e10cSrcweir //*****************************************************************************************************************
GetStripeColorA() const1296cdf0e10cSrcweir Color SvtOptionsDrawinglayer::GetStripeColorA() const
1297cdf0e10cSrcweir {
1298cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1299cdf0e10cSrcweir 	return m_pDataContainer->GetStripeColorA();
1300cdf0e10cSrcweir }
1301cdf0e10cSrcweir 
1302cdf0e10cSrcweir //*****************************************************************************************************************
1303cdf0e10cSrcweir //	public method
1304cdf0e10cSrcweir //*****************************************************************************************************************
GetStripeColorB() const1305cdf0e10cSrcweir Color SvtOptionsDrawinglayer::GetStripeColorB() const
1306cdf0e10cSrcweir {
1307cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1308cdf0e10cSrcweir 	return m_pDataContainer->GetStripeColorB();
1309cdf0e10cSrcweir }
1310cdf0e10cSrcweir 
1311cdf0e10cSrcweir //*****************************************************************************************************************
1312cdf0e10cSrcweir //	public method
1313cdf0e10cSrcweir //*****************************************************************************************************************
GetStripeLength() const1314cdf0e10cSrcweir sal_uInt16 SvtOptionsDrawinglayer::GetStripeLength() const
1315cdf0e10cSrcweir {
1316cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1317cdf0e10cSrcweir 	return m_pDataContainer->GetStripeLength();
1318cdf0e10cSrcweir }
1319cdf0e10cSrcweir 
1320cdf0e10cSrcweir // #i73602#
IsOverlayBuffer_Calc() const1321cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsOverlayBuffer_Calc() const
1322cdf0e10cSrcweir {
1323cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1324cdf0e10cSrcweir 	return m_pDataContainer->IsOverlayBuffer_Calc();
1325cdf0e10cSrcweir }
1326cdf0e10cSrcweir 
IsOverlayBuffer_Writer() const1327cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsOverlayBuffer_Writer() const
1328cdf0e10cSrcweir {
1329cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1330cdf0e10cSrcweir 	return m_pDataContainer->IsOverlayBuffer_Writer();
1331cdf0e10cSrcweir }
1332cdf0e10cSrcweir 
IsOverlayBuffer_DrawImpress() const1333cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsOverlayBuffer_DrawImpress() const
1334cdf0e10cSrcweir {
1335cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1336cdf0e10cSrcweir 	return m_pDataContainer->IsOverlayBuffer_DrawImpress();
1337cdf0e10cSrcweir }
1338cdf0e10cSrcweir 
1339cdf0e10cSrcweir // #i74769#, #i75172#
IsPaintBuffer_Calc() const1340cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsPaintBuffer_Calc() const
1341cdf0e10cSrcweir {
1342cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1343cdf0e10cSrcweir 	return m_pDataContainer->IsPaintBuffer_Calc();
1344cdf0e10cSrcweir }
1345cdf0e10cSrcweir 
IsPaintBuffer_Writer() const1346cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsPaintBuffer_Writer() const
1347cdf0e10cSrcweir {
1348cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1349cdf0e10cSrcweir 	return m_pDataContainer->IsPaintBuffer_Writer();
1350cdf0e10cSrcweir }
1351cdf0e10cSrcweir 
IsPaintBuffer_DrawImpress() const1352cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsPaintBuffer_DrawImpress() const
1353cdf0e10cSrcweir {
1354cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1355cdf0e10cSrcweir 	return m_pDataContainer->IsPaintBuffer_DrawImpress();
1356cdf0e10cSrcweir }
1357cdf0e10cSrcweir 
1358cdf0e10cSrcweir // #i4219#
GetMaximumPaperWidth() const1359cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer::GetMaximumPaperWidth() const
1360cdf0e10cSrcweir {
1361cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1362cdf0e10cSrcweir 	return m_pDataContainer->GetMaximumPaperWidth();
1363cdf0e10cSrcweir }
1364cdf0e10cSrcweir 
GetMaximumPaperHeight() const1365cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer::GetMaximumPaperHeight() const
1366cdf0e10cSrcweir {
1367cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1368cdf0e10cSrcweir 	return m_pDataContainer->GetMaximumPaperHeight();
1369cdf0e10cSrcweir }
1370cdf0e10cSrcweir 
GetMaximumPaperLeftMargin() const1371cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer::GetMaximumPaperLeftMargin() const
1372cdf0e10cSrcweir {
1373cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1374cdf0e10cSrcweir 	return m_pDataContainer->GetMaximumPaperLeftMargin();
1375cdf0e10cSrcweir }
1376cdf0e10cSrcweir 
GetMaximumPaperRightMargin() const1377cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer::GetMaximumPaperRightMargin() const
1378cdf0e10cSrcweir {
1379cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1380cdf0e10cSrcweir 	return m_pDataContainer->GetMaximumPaperRightMargin();
1381cdf0e10cSrcweir }
1382cdf0e10cSrcweir 
GetMaximumPaperTopMargin() const1383cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer::GetMaximumPaperTopMargin() const
1384cdf0e10cSrcweir {
1385cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1386cdf0e10cSrcweir 	return m_pDataContainer->GetMaximumPaperTopMargin();
1387cdf0e10cSrcweir }
1388cdf0e10cSrcweir 
GetMaximumPaperBottomMargin() const1389cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer::GetMaximumPaperBottomMargin() const
1390cdf0e10cSrcweir {
1391cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1392cdf0e10cSrcweir 	return m_pDataContainer->GetMaximumPaperBottomMargin();
1393cdf0e10cSrcweir }
1394cdf0e10cSrcweir 
1395cdf0e10cSrcweir //*****************************************************************************************************************
1396cdf0e10cSrcweir //	public method
1397cdf0e10cSrcweir //*****************************************************************************************************************
SetOverlayBuffer(sal_Bool bState)1398cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetOverlayBuffer( sal_Bool bState )
1399cdf0e10cSrcweir {
1400cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1401cdf0e10cSrcweir 	m_pDataContainer->SetOverlayBuffer( bState );
1402cdf0e10cSrcweir }
1403cdf0e10cSrcweir 
1404cdf0e10cSrcweir //*****************************************************************************************************************
1405cdf0e10cSrcweir //	public method
1406cdf0e10cSrcweir //*****************************************************************************************************************
SetPaintBuffer(sal_Bool bState)1407cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetPaintBuffer( sal_Bool bState )
1408cdf0e10cSrcweir {
1409cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1410cdf0e10cSrcweir 	m_pDataContainer->SetPaintBuffer( bState );
1411cdf0e10cSrcweir }
1412cdf0e10cSrcweir 
1413cdf0e10cSrcweir //*****************************************************************************************************************
1414cdf0e10cSrcweir //	public method
1415cdf0e10cSrcweir //*****************************************************************************************************************
SetStripeColorA(Color aColor)1416cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetStripeColorA( Color aColor )
1417cdf0e10cSrcweir {
1418cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1419cdf0e10cSrcweir 	m_pDataContainer->SetStripeColorA( aColor );
1420cdf0e10cSrcweir }
1421cdf0e10cSrcweir 
1422cdf0e10cSrcweir //*****************************************************************************************************************
1423cdf0e10cSrcweir //	public method
1424cdf0e10cSrcweir //*****************************************************************************************************************
SetStripeColorB(Color aColor)1425cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetStripeColorB( Color aColor )
1426cdf0e10cSrcweir {
1427cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1428cdf0e10cSrcweir 	m_pDataContainer->SetStripeColorB( aColor );
1429cdf0e10cSrcweir }
1430cdf0e10cSrcweir 
1431cdf0e10cSrcweir //*****************************************************************************************************************
1432cdf0e10cSrcweir //	public method
1433cdf0e10cSrcweir //*****************************************************************************************************************
SetStripeLength(sal_uInt16 nLength)1434cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetStripeLength( sal_uInt16 nLength )
1435cdf0e10cSrcweir {
1436cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1437cdf0e10cSrcweir 	m_pDataContainer->SetStripeLength( nLength );
1438cdf0e10cSrcweir }
1439cdf0e10cSrcweir 
1440cdf0e10cSrcweir // #i73602#
SetOverlayBuffer_Calc(sal_Bool bState)1441cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetOverlayBuffer_Calc( sal_Bool bState )
1442cdf0e10cSrcweir {
1443cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1444cdf0e10cSrcweir 	m_pDataContainer->SetOverlayBuffer_Calc( bState );
1445cdf0e10cSrcweir }
1446cdf0e10cSrcweir 
SetOverlayBuffer_Writer(sal_Bool bState)1447cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetOverlayBuffer_Writer( sal_Bool bState )
1448cdf0e10cSrcweir {
1449cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1450cdf0e10cSrcweir 	m_pDataContainer->SetOverlayBuffer_Writer( bState );
1451cdf0e10cSrcweir }
1452cdf0e10cSrcweir 
SetOverlayBuffer_DrawImpress(sal_Bool bState)1453cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetOverlayBuffer_DrawImpress( sal_Bool bState )
1454cdf0e10cSrcweir {
1455cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1456cdf0e10cSrcweir 	m_pDataContainer->SetOverlayBuffer_DrawImpress( bState );
1457cdf0e10cSrcweir }
1458cdf0e10cSrcweir 
1459cdf0e10cSrcweir // #i74769#, #i75172#
SetPaintBuffer_Calc(sal_Bool bState)1460cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetPaintBuffer_Calc( sal_Bool bState )
1461cdf0e10cSrcweir {
1462cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1463cdf0e10cSrcweir 	m_pDataContainer->SetPaintBuffer_Calc( bState );
1464cdf0e10cSrcweir }
1465cdf0e10cSrcweir 
SetPaintBuffer_Writer(sal_Bool bState)1466cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetPaintBuffer_Writer( sal_Bool bState )
1467cdf0e10cSrcweir {
1468cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1469cdf0e10cSrcweir 	m_pDataContainer->SetPaintBuffer_Writer( bState );
1470cdf0e10cSrcweir }
1471cdf0e10cSrcweir 
SetPaintBuffer_DrawImpress(sal_Bool bState)1472cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetPaintBuffer_DrawImpress( sal_Bool bState )
1473cdf0e10cSrcweir {
1474cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1475cdf0e10cSrcweir 	m_pDataContainer->SetPaintBuffer_DrawImpress( bState );
1476cdf0e10cSrcweir }
1477cdf0e10cSrcweir 
1478cdf0e10cSrcweir // #i4219#
SetMaximumPaperWidth(sal_uInt32 nNew)1479cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetMaximumPaperWidth( sal_uInt32 nNew )
1480cdf0e10cSrcweir {
1481cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1482cdf0e10cSrcweir 	m_pDataContainer->SetMaximumPaperWidth( nNew );
1483cdf0e10cSrcweir }
1484cdf0e10cSrcweir 
SetMaximumPaperHeight(sal_uInt32 nNew)1485cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetMaximumPaperHeight( sal_uInt32 nNew )
1486cdf0e10cSrcweir {
1487cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1488cdf0e10cSrcweir 	m_pDataContainer->SetMaximumPaperHeight( nNew );
1489cdf0e10cSrcweir }
1490cdf0e10cSrcweir 
SetMaximumPaperLeftMargin(sal_uInt32 nNew)1491cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetMaximumPaperLeftMargin( sal_uInt32 nNew )
1492cdf0e10cSrcweir {
1493cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1494cdf0e10cSrcweir 	m_pDataContainer->SetMaximumPaperLeftMargin( nNew );
1495cdf0e10cSrcweir }
1496cdf0e10cSrcweir 
SetMaximumPaperRightMargin(sal_uInt32 nNew)1497cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetMaximumPaperRightMargin( sal_uInt32 nNew )
1498cdf0e10cSrcweir {
1499cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1500cdf0e10cSrcweir 	m_pDataContainer->SetMaximumPaperRightMargin( nNew );
1501cdf0e10cSrcweir }
1502cdf0e10cSrcweir 
SetMaximumPaperTopMargin(sal_uInt32 nNew)1503cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetMaximumPaperTopMargin( sal_uInt32 nNew )
1504cdf0e10cSrcweir {
1505cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1506cdf0e10cSrcweir 	m_pDataContainer->SetMaximumPaperTopMargin( nNew );
1507cdf0e10cSrcweir }
1508cdf0e10cSrcweir 
SetMaximumPaperBottomMargin(sal_uInt32 nNew)1509cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetMaximumPaperBottomMargin( sal_uInt32 nNew )
1510cdf0e10cSrcweir {
1511cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1512cdf0e10cSrcweir 	m_pDataContainer->SetMaximumPaperBottomMargin( nNew );
1513cdf0e10cSrcweir }
1514cdf0e10cSrcweir 
1515cdf0e10cSrcweir // helper
IsAAPossibleOnThisSystem() const1516cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsAAPossibleOnThisSystem() const
1517cdf0e10cSrcweir {
1518cdf0e10cSrcweir 	return m_pDataContainer->IsAAPossibleOnThisSystem();
1519cdf0e10cSrcweir }
1520cdf0e10cSrcweir 
1521cdf0e10cSrcweir // primitives
IsAntiAliasing() const1522cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsAntiAliasing() const
1523cdf0e10cSrcweir {
1524cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1525cdf0e10cSrcweir 	return m_pDataContainer->IsAntiAliasing() && IsAAPossibleOnThisSystem();
1526cdf0e10cSrcweir }
1527cdf0e10cSrcweir 
IsSnapHorVerLinesToDiscrete() const1528cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsSnapHorVerLinesToDiscrete() const
1529cdf0e10cSrcweir {
1530cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1531cdf0e10cSrcweir 	return m_pDataContainer->IsAntiAliasing() && m_pDataContainer->IsSnapHorVerLinesToDiscrete();
1532cdf0e10cSrcweir }
1533cdf0e10cSrcweir 
IsSolidDragCreate() const1534cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsSolidDragCreate() const
1535cdf0e10cSrcweir {
1536cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1537cdf0e10cSrcweir 	return m_pDataContainer->IsSolidDragCreate();
1538cdf0e10cSrcweir }
1539cdf0e10cSrcweir 
IsRenderDecoratedTextDirect() const1540cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsRenderDecoratedTextDirect() const
1541cdf0e10cSrcweir {
1542cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1543cdf0e10cSrcweir 	return m_pDataContainer->IsRenderDecoratedTextDirect();
1544cdf0e10cSrcweir }
1545cdf0e10cSrcweir 
IsRenderSimpleTextDirect() const1546cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsRenderSimpleTextDirect() const
1547cdf0e10cSrcweir {
1548cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1549cdf0e10cSrcweir 	return m_pDataContainer->IsRenderSimpleTextDirect();
1550cdf0e10cSrcweir }
1551cdf0e10cSrcweir 
GetQuadratic3DRenderLimit() const1552cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer::GetQuadratic3DRenderLimit() const
1553cdf0e10cSrcweir {
1554cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1555cdf0e10cSrcweir 	return m_pDataContainer->GetQuadratic3DRenderLimit();
1556cdf0e10cSrcweir }
1557cdf0e10cSrcweir 
GetQuadraticFormControlRenderLimit() const1558cdf0e10cSrcweir sal_uInt32 SvtOptionsDrawinglayer::GetQuadraticFormControlRenderLimit() const
1559cdf0e10cSrcweir {
1560cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1561cdf0e10cSrcweir 	return m_pDataContainer->GetQuadraticFormControlRenderLimit();
1562cdf0e10cSrcweir }
1563cdf0e10cSrcweir 
SetAntiAliasing(sal_Bool bState)1564cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetAntiAliasing( sal_Bool bState )
1565cdf0e10cSrcweir {
1566cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1567cdf0e10cSrcweir 	m_pDataContainer->SetAntiAliasing( bState );
1568cdf0e10cSrcweir }
1569cdf0e10cSrcweir 
SetSnapHorVerLinesToDiscrete(sal_Bool bState)1570cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetSnapHorVerLinesToDiscrete( sal_Bool bState )
1571cdf0e10cSrcweir {
1572cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1573cdf0e10cSrcweir 	m_pDataContainer->SetSnapHorVerLinesToDiscrete( bState );
1574cdf0e10cSrcweir }
1575cdf0e10cSrcweir 
SetSolidDragCreate(sal_Bool bState)1576cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetSolidDragCreate( sal_Bool bState )
1577cdf0e10cSrcweir {
1578cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1579cdf0e10cSrcweir 	m_pDataContainer->SetSolidDragCreate( bState );
1580cdf0e10cSrcweir }
1581cdf0e10cSrcweir 
SetRenderDecoratedTextDirect(sal_Bool bState)1582cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetRenderDecoratedTextDirect( sal_Bool bState )
1583cdf0e10cSrcweir {
1584cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1585cdf0e10cSrcweir 	m_pDataContainer->SetRenderDecoratedTextDirect( bState );
1586cdf0e10cSrcweir }
1587cdf0e10cSrcweir 
SetRenderSimpleTextDirect(sal_Bool bState)1588cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetRenderSimpleTextDirect( sal_Bool bState )
1589cdf0e10cSrcweir {
1590cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1591cdf0e10cSrcweir 	m_pDataContainer->SetRenderSimpleTextDirect( bState );
1592cdf0e10cSrcweir }
1593cdf0e10cSrcweir 
SetQuadratic3DRenderLimit(sal_uInt32 nNew)1594cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetQuadratic3DRenderLimit(sal_uInt32 nNew)
1595cdf0e10cSrcweir {
1596cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1597cdf0e10cSrcweir 	m_pDataContainer->SetQuadratic3DRenderLimit( nNew );
1598cdf0e10cSrcweir }
1599cdf0e10cSrcweir 
SetQuadraticFormControlRenderLimit(sal_uInt32 nNew)1600cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetQuadraticFormControlRenderLimit(sal_uInt32 nNew)
1601cdf0e10cSrcweir {
1602cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1603cdf0e10cSrcweir 	m_pDataContainer->SetQuadraticFormControlRenderLimit( nNew );
1604cdf0e10cSrcweir }
1605cdf0e10cSrcweir 
1606cdf0e10cSrcweir // #i97672# selection settings
IsTransparentSelection() const1607cdf0e10cSrcweir sal_Bool SvtOptionsDrawinglayer::IsTransparentSelection() const
1608cdf0e10cSrcweir {
1609cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1610cdf0e10cSrcweir 	return m_pDataContainer->IsTransparentSelection();
1611cdf0e10cSrcweir }
1612cdf0e10cSrcweir 
SetTransparentSelection(sal_Bool bState)1613cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetTransparentSelection( sal_Bool bState )
1614cdf0e10cSrcweir {
1615cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1616cdf0e10cSrcweir 	m_pDataContainer->SetTransparentSelection( bState );
1617cdf0e10cSrcweir }
1618cdf0e10cSrcweir 
GetTransparentSelectionPercent() const1619cdf0e10cSrcweir sal_uInt16 SvtOptionsDrawinglayer::GetTransparentSelectionPercent() const
1620cdf0e10cSrcweir {
1621cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1622cdf0e10cSrcweir 	sal_uInt16 aRetval(m_pDataContainer->GetTransparentSelectionPercent());
1623cdf0e10cSrcweir 
1624cdf0e10cSrcweir 	// crop to range [10% .. 90%]
1625cdf0e10cSrcweir 	if(aRetval < 10)
1626cdf0e10cSrcweir 	{
1627cdf0e10cSrcweir 		aRetval = 10;
1628cdf0e10cSrcweir 	}
1629cdf0e10cSrcweir 
1630cdf0e10cSrcweir 	if(aRetval > 90)
1631cdf0e10cSrcweir 	{
1632cdf0e10cSrcweir 		aRetval = 90;
1633cdf0e10cSrcweir 	}
1634cdf0e10cSrcweir 
1635cdf0e10cSrcweir 	return aRetval;
1636cdf0e10cSrcweir }
1637cdf0e10cSrcweir 
SetTransparentSelectionPercent(sal_uInt16 nPercent)1638cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetTransparentSelectionPercent( sal_uInt16 nPercent )
1639cdf0e10cSrcweir {
1640cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1641cdf0e10cSrcweir 
1642cdf0e10cSrcweir     // crop to range [10% .. 90%]
1643cdf0e10cSrcweir 	if(nPercent < 10)
1644cdf0e10cSrcweir 	{
1645cdf0e10cSrcweir 		nPercent = 10;
1646cdf0e10cSrcweir 	}
1647cdf0e10cSrcweir 
1648cdf0e10cSrcweir 	if(nPercent > 90)
1649cdf0e10cSrcweir 	{
1650cdf0e10cSrcweir 		nPercent = 90;
1651cdf0e10cSrcweir 	}
1652cdf0e10cSrcweir 
1653cdf0e10cSrcweir     m_pDataContainer->SetTransparentSelectionPercent( nPercent );
1654cdf0e10cSrcweir }
1655cdf0e10cSrcweir 
GetSelectionMaximumLuminancePercent() const1656cdf0e10cSrcweir sal_uInt16 SvtOptionsDrawinglayer::GetSelectionMaximumLuminancePercent() const
1657cdf0e10cSrcweir {
1658cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1659cdf0e10cSrcweir 	sal_uInt16 aRetval(m_pDataContainer->GetSelectionMaximumLuminancePercent());
1660cdf0e10cSrcweir 
1661cdf0e10cSrcweir 	// crop to range [0% .. 100%]
1662cdf0e10cSrcweir 	if(aRetval > 90)
1663cdf0e10cSrcweir 	{
1664cdf0e10cSrcweir 		aRetval = 90;
1665cdf0e10cSrcweir 	}
1666cdf0e10cSrcweir 
1667cdf0e10cSrcweir 	return aRetval;
1668cdf0e10cSrcweir }
1669cdf0e10cSrcweir 
getHilightColor() const1670*6043ac9bSArmin Le Grand Color SvtOptionsDrawinglayer::getHilightColor() const
1671*6043ac9bSArmin Le Grand {
1672*6043ac9bSArmin Le Grand     Color aRetval(Application::GetSettings().GetStyleSettings().GetHighlightColor());
1673*6043ac9bSArmin Le Grand     const basegfx::BColor aSelection(aRetval.getBColor());
1674*6043ac9bSArmin Le Grand     const double fLuminance(aSelection.luminance());
1675*6043ac9bSArmin Le Grand     const double fMaxLum(GetSelectionMaximumLuminancePercent() / 100.0);
1676*6043ac9bSArmin Le Grand 
1677*6043ac9bSArmin Le Grand     if(fLuminance > fMaxLum)
1678*6043ac9bSArmin Le Grand     {
1679*6043ac9bSArmin Le Grand         const double fFactor(fMaxLum / fLuminance);
1680*6043ac9bSArmin Le Grand         const basegfx::BColor aNewSelection(
1681*6043ac9bSArmin Le Grand             aSelection.getRed() * fFactor,
1682*6043ac9bSArmin Le Grand             aSelection.getGreen() * fFactor,
1683*6043ac9bSArmin Le Grand             aSelection.getBlue() * fFactor);
1684*6043ac9bSArmin Le Grand 
1685*6043ac9bSArmin Le Grand         aRetval = Color(aNewSelection);
1686*6043ac9bSArmin Le Grand     }
1687*6043ac9bSArmin Le Grand 
1688*6043ac9bSArmin Le Grand     return aRetval;
1689*6043ac9bSArmin Le Grand }
1690*6043ac9bSArmin Le Grand 
SetSelectionMaximumLuminancePercent(sal_uInt16 nPercent)1691cdf0e10cSrcweir void SvtOptionsDrawinglayer::SetSelectionMaximumLuminancePercent( sal_uInt16 nPercent )
1692cdf0e10cSrcweir {
1693cdf0e10cSrcweir     MutexGuard aGuard( GetOwnStaticMutex() );
1694cdf0e10cSrcweir 
1695cdf0e10cSrcweir     // crop to range [0% .. 100%]
1696cdf0e10cSrcweir 	if(nPercent > 90)
1697cdf0e10cSrcweir 	{
1698cdf0e10cSrcweir 		nPercent = 90;
1699cdf0e10cSrcweir 	}
1700cdf0e10cSrcweir 
1701cdf0e10cSrcweir     m_pDataContainer->SetSelectionMaximumLuminancePercent( nPercent );
1702cdf0e10cSrcweir }
1703cdf0e10cSrcweir 
1704cdf0e10cSrcweir //*****************************************************************************************************************
1705cdf0e10cSrcweir //	private method
1706cdf0e10cSrcweir //*****************************************************************************************************************
GetOwnStaticMutex()1707cdf0e10cSrcweir Mutex& SvtOptionsDrawinglayer::GetOwnStaticMutex()
1708cdf0e10cSrcweir {
1709cdf0e10cSrcweir 	// Initialize static mutex only for one time!
1710cdf0e10cSrcweir     static Mutex* pMutex = NULL;
1711cdf0e10cSrcweir 	// If these method first called (Mutex not already exist!) ...
1712cdf0e10cSrcweir     if( pMutex == NULL )
1713cdf0e10cSrcweir     {
1714cdf0e10cSrcweir 		// ... we must create a new one. Protect follow code with the global mutex -
1715cdf0e10cSrcweir 		// It must be - we create a static variable!
1716cdf0e10cSrcweir         MutexGuard aGuard( Mutex::getGlobalMutex() );
1717cdf0e10cSrcweir 		// We must check our pointer again - because it can be that another instance of ouer class will be fastr then these!
1718cdf0e10cSrcweir         if( pMutex == NULL )
1719cdf0e10cSrcweir         {
1720cdf0e10cSrcweir 			// Create the new mutex and set it for return on static variable.
1721cdf0e10cSrcweir             static Mutex aMutex;
1722cdf0e10cSrcweir             pMutex = &aMutex;
1723cdf0e10cSrcweir         }
1724cdf0e10cSrcweir     }
1725cdf0e10cSrcweir 	// Return new created or already existing mutex object.
1726cdf0e10cSrcweir     return *pMutex;
1727cdf0e10cSrcweir }
1728cdf0e10cSrcweir 
1729cdf0e10cSrcweir // eof
1730cdf0e10cSrcweir 
1731