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