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