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