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 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_sw.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir #include <tools/stream.hxx> 33*cdf0e10cSrcweir #include <unotools/syslocale.hxx> 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir #include "swtypes.hxx" 36*cdf0e10cSrcweir #include "hintids.hxx" 37*cdf0e10cSrcweir #include "uitool.hxx" 38*cdf0e10cSrcweir #include "usrpref.hxx" 39*cdf0e10cSrcweir #include "crstate.hxx" 40*cdf0e10cSrcweir #include <linguistic/lngprops.hxx> 41*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 42*cdf0e10cSrcweir #include <com/sun/star/uno/Any.hxx> 43*cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx> 44*cdf0e10cSrcweir #include <unotools/localedatawrapper.hxx> 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir #include <unomid.h> 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir using namespace utl; 49*cdf0e10cSrcweir using namespace rtl; 50*cdf0e10cSrcweir using namespace ::com::sun::star; 51*cdf0e10cSrcweir using namespace ::com::sun::star::uno; 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir void SwMasterUsrPref::SetUsrPref(const SwViewOption &rCopy) 55*cdf0e10cSrcweir { 56*cdf0e10cSrcweir *((SwViewOption*)this) = rCopy; 57*cdf0e10cSrcweir } 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir SwMasterUsrPref::SwMasterUsrPref(sal_Bool bWeb) : 60*cdf0e10cSrcweir eFldUpdateFlags(AUTOUPD_OFF), 61*cdf0e10cSrcweir nLinkUpdateMode(0), 62*cdf0e10cSrcweir bIsHScrollMetricSet(sal_False), 63*cdf0e10cSrcweir bIsVScrollMetricSet(sal_False), 64*cdf0e10cSrcweir nDefTab( MM50 * 4 ), 65*cdf0e10cSrcweir bIsSquaredPageMode(sal_False), 66*cdf0e10cSrcweir aContentConfig(bWeb, *this), 67*cdf0e10cSrcweir aLayoutConfig(bWeb, *this), 68*cdf0e10cSrcweir aGridConfig(bWeb, *this), 69*cdf0e10cSrcweir aCursorConfig(*this), 70*cdf0e10cSrcweir pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : 0) 71*cdf0e10cSrcweir { 72*cdf0e10cSrcweir MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); 73*cdf0e10cSrcweir eUserMetric = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH; 74*cdf0e10cSrcweir eHScrollMetric = eUserMetric; 75*cdf0e10cSrcweir eVScrollMetric = eUserMetric; 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir aContentConfig.Load(); 78*cdf0e10cSrcweir aLayoutConfig.Load(); 79*cdf0e10cSrcweir aGridConfig.Load(); 80*cdf0e10cSrcweir aCursorConfig.Load(); 81*cdf0e10cSrcweir if(pWebColorConfig) 82*cdf0e10cSrcweir pWebColorConfig->Load(); 83*cdf0e10cSrcweir } 84*cdf0e10cSrcweir /* -----------------------------13.02.01 09:48-------------------------------- 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 87*cdf0e10cSrcweir SwMasterUsrPref::~SwMasterUsrPref() 88*cdf0e10cSrcweir { 89*cdf0e10cSrcweir delete pWebColorConfig; 90*cdf0e10cSrcweir } 91*cdf0e10cSrcweir /*-- 28.09.00 09:55:32--------------------------------------------------- 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 94*cdf0e10cSrcweir Sequence<OUString> SwContentViewConfig::GetPropertyNames() 95*cdf0e10cSrcweir { 96*cdf0e10cSrcweir static const char* aPropNames[] = 97*cdf0e10cSrcweir { 98*cdf0e10cSrcweir "Display/GraphicObject", // 0 99*cdf0e10cSrcweir "Display/Table", // 1 100*cdf0e10cSrcweir "Display/DrawingControl", // 2 101*cdf0e10cSrcweir "Display/FieldCode", // 3 102*cdf0e10cSrcweir "Display/Note", // 4 103*cdf0e10cSrcweir "Display/PreventTips", // 5 104*cdf0e10cSrcweir "NonprintingCharacter/MetaCharacters", // 6 105*cdf0e10cSrcweir "NonprintingCharacter/ParagraphEnd", // 7 106*cdf0e10cSrcweir "NonprintingCharacter/OptionalHyphen", // 8 107*cdf0e10cSrcweir "NonprintingCharacter/Space", // 9 108*cdf0e10cSrcweir "NonprintingCharacter/Break", // 10 109*cdf0e10cSrcweir "NonprintingCharacter/ProtectedSpace", // 11 110*cdf0e10cSrcweir "NonprintingCharacter/Tab", // 12 //not in Writer/Web 111*cdf0e10cSrcweir "NonprintingCharacter/HiddenText", // 13 112*cdf0e10cSrcweir "NonprintingCharacter/HiddenParagraph", // 14 113*cdf0e10cSrcweir "NonprintingCharacter/HiddenCharacter", // 15 114*cdf0e10cSrcweir "Update/Link", // 16 115*cdf0e10cSrcweir "Update/Field", // 17 116*cdf0e10cSrcweir "Update/Chart" // 18 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir }; 120*cdf0e10cSrcweir const int nCount = bWeb ? 12 : 19; 121*cdf0e10cSrcweir Sequence<OUString> aNames(nCount); 122*cdf0e10cSrcweir OUString* pNames = aNames.getArray(); 123*cdf0e10cSrcweir for(int i = 0; i < nCount; i++) 124*cdf0e10cSrcweir { 125*cdf0e10cSrcweir pNames[i] = OUString::createFromAscii(aPropNames[i]); 126*cdf0e10cSrcweir } 127*cdf0e10cSrcweir return aNames; 128*cdf0e10cSrcweir } 129*cdf0e10cSrcweir /*-- 28.09.00 09:55:33--------------------------------------------------- 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 132*cdf0e10cSrcweir SwContentViewConfig::SwContentViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : 133*cdf0e10cSrcweir ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Content") : C2U("Office.Writer/Content")), 134*cdf0e10cSrcweir rParent(rPar), 135*cdf0e10cSrcweir bWeb(bIsWeb) 136*cdf0e10cSrcweir { 137*cdf0e10cSrcweir Load(); 138*cdf0e10cSrcweir EnableNotification( GetPropertyNames() ); 139*cdf0e10cSrcweir } 140*cdf0e10cSrcweir /*-- 28.09.00 09:55:33--------------------------------------------------- 141*cdf0e10cSrcweir 142*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 143*cdf0e10cSrcweir SwContentViewConfig::~SwContentViewConfig() 144*cdf0e10cSrcweir { 145*cdf0e10cSrcweir } 146*cdf0e10cSrcweir /*-- 09.02.07 09:55:33--------------------------------------------------- 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 149*cdf0e10cSrcweir void SwContentViewConfig::Notify( const Sequence< OUString > & /*rPropertyNames*/ ) 150*cdf0e10cSrcweir { 151*cdf0e10cSrcweir Load(); 152*cdf0e10cSrcweir } 153*cdf0e10cSrcweir /*-- 28.09.00 09:55:33--------------------------------------------------- 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 156*cdf0e10cSrcweir void SwContentViewConfig::Commit() 157*cdf0e10cSrcweir { 158*cdf0e10cSrcweir Sequence<OUString> aNames = GetPropertyNames(); 159*cdf0e10cSrcweir 160*cdf0e10cSrcweir Sequence<Any> aValues(aNames.getLength()); 161*cdf0e10cSrcweir Any* pValues = aValues.getArray(); 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir for(int nProp = 0; nProp < aNames.getLength(); nProp++) 164*cdf0e10cSrcweir { 165*cdf0e10cSrcweir sal_Bool bVal = sal_False; 166*cdf0e10cSrcweir switch(nProp) 167*cdf0e10cSrcweir { 168*cdf0e10cSrcweir case 0: bVal = rParent.IsGraphic(); break;// "Display/GraphicObject", 169*cdf0e10cSrcweir case 1: bVal = rParent.IsTable(); break;// "Display/Table", 170*cdf0e10cSrcweir case 2: bVal = rParent.IsDraw(); break;// "Display/DrawingControl", 171*cdf0e10cSrcweir case 3: bVal = rParent.IsFldName(); break;// "Display/FieldCode", 172*cdf0e10cSrcweir case 4: bVal = rParent.IsPostIts(); break;// "Display/Note", 173*cdf0e10cSrcweir case 5: bVal = rParent.IsPreventTips(); break; // "Display/PreventTips" 174*cdf0e10cSrcweir case 6: bVal = rParent.IsViewMetaChars(); break; //"NonprintingCharacter/MetaCharacters" 175*cdf0e10cSrcweir case 7: bVal = rParent.IsParagraph(sal_True); break;// "NonprintingCharacter/ParagraphEnd", 176*cdf0e10cSrcweir case 8: bVal = rParent.IsSoftHyph(); break;// "NonprintingCharacter/OptionalHyphen", 177*cdf0e10cSrcweir case 9: bVal = rParent.IsBlank(sal_True); break;// "NonprintingCharacter/Space", 178*cdf0e10cSrcweir case 10: bVal = rParent.IsLineBreak(sal_True);break;// "NonprintingCharacter/Break", 179*cdf0e10cSrcweir case 11: bVal = rParent.IsHardBlank(); break;// "NonprintingCharacter/ProtectedSpace", 180*cdf0e10cSrcweir case 12: bVal = rParent.IsTab(sal_True); break;// "NonprintingCharacter/Tab", 181*cdf0e10cSrcweir case 13: bVal = rParent.IsShowHiddenField(); break;// "NonprintingCharacter/Fields: HiddenText", 182*cdf0e10cSrcweir case 14: bVal = rParent.IsShowHiddenPara(); break;// "NonprintingCharacter/Fields: HiddenParagraph", 183*cdf0e10cSrcweir case 15: bVal = rParent.IsShowHiddenChar(sal_True); break;// "NonprintingCharacter/HiddenCharacter", 184*cdf0e10cSrcweir case 16: pValues[nProp] <<= rParent.GetUpdateLinkMode(); break;// "Update/Link", 185*cdf0e10cSrcweir case 17: bVal = rParent.IsUpdateFields(); break;// "Update/Field", 186*cdf0e10cSrcweir case 18: bVal = rParent.IsUpdateCharts(); break;// "Update/Chart" 187*cdf0e10cSrcweir } 188*cdf0e10cSrcweir if(nProp != 16) 189*cdf0e10cSrcweir pValues[nProp].setValue(&bVal, ::getBooleanCppuType()); 190*cdf0e10cSrcweir } 191*cdf0e10cSrcweir PutProperties(aNames, aValues); 192*cdf0e10cSrcweir } 193*cdf0e10cSrcweir /*-- 28.09.00 09:55:34--------------------------------------------------- 194*cdf0e10cSrcweir 195*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 196*cdf0e10cSrcweir void SwContentViewConfig::Load() 197*cdf0e10cSrcweir { 198*cdf0e10cSrcweir Sequence<OUString> aNames = GetPropertyNames(); 199*cdf0e10cSrcweir Sequence<Any> aValues = GetProperties(aNames); 200*cdf0e10cSrcweir const Any* pValues = aValues.getConstArray(); 201*cdf0e10cSrcweir DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed"); 202*cdf0e10cSrcweir if(aValues.getLength() == aNames.getLength()) 203*cdf0e10cSrcweir { 204*cdf0e10cSrcweir for(int nProp = 0; nProp < aNames.getLength(); nProp++) 205*cdf0e10cSrcweir { 206*cdf0e10cSrcweir if(pValues[nProp].hasValue()) 207*cdf0e10cSrcweir { 208*cdf0e10cSrcweir sal_Bool bSet = nProp != 16 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False; 209*cdf0e10cSrcweir switch(nProp) 210*cdf0e10cSrcweir { 211*cdf0e10cSrcweir case 0: rParent.SetGraphic(bSet); break;// "Display/GraphicObject", 212*cdf0e10cSrcweir case 1: rParent.SetTable(bSet); break;// "Display/Table", 213*cdf0e10cSrcweir case 2: rParent.SetDraw(bSet); break;// "Display/DrawingControl", 214*cdf0e10cSrcweir case 3: rParent.SetFldName(bSet); break;// "Display/FieldCode", 215*cdf0e10cSrcweir case 4: rParent.SetPostIts(bSet); break;// "Display/Note", 216*cdf0e10cSrcweir case 5: rParent.SetPreventTips(bSet); break;// "Display/PreventTips", 217*cdf0e10cSrcweir case 6: rParent.SetViewMetaChars(bSet); break; //"NonprintingCharacter/MetaCharacters" 218*cdf0e10cSrcweir case 7: rParent.SetParagraph(bSet); break;// "NonprintingCharacter/ParagraphEnd", 219*cdf0e10cSrcweir case 8: rParent.SetSoftHyph(bSet); break;// "NonprintingCharacter/OptionalHyphen", 220*cdf0e10cSrcweir case 9: rParent.SetBlank(bSet); break;// "NonprintingCharacter/Space", 221*cdf0e10cSrcweir case 10: rParent.SetLineBreak(bSet);break;// "NonprintingCharacter/Break", 222*cdf0e10cSrcweir case 11: rParent.SetHardBlank(bSet); break;// "NonprintingCharacter/ProtectedSpace", 223*cdf0e10cSrcweir case 12: rParent.SetTab(bSet); break;// "NonprintingCharacter/Tab", 224*cdf0e10cSrcweir case 13: rParent.SetShowHiddenField(bSet); break;// "NonprintingCharacter/Fields: HiddenText", 225*cdf0e10cSrcweir case 14: rParent.SetShowHiddenPara(bSet); break;// "NonprintingCharacter/Fields: HiddenParagraph", 226*cdf0e10cSrcweir case 15: rParent.SetShowHiddenChar(bSet); break;// "NonprintingCharacter/HiddenCharacter", 227*cdf0e10cSrcweir case 16: 228*cdf0e10cSrcweir { 229*cdf0e10cSrcweir sal_Int32 nSet = 0; 230*cdf0e10cSrcweir pValues[nProp] >>= nSet; 231*cdf0e10cSrcweir rParent.SetUpdateLinkMode(nSet, sal_True); 232*cdf0e10cSrcweir } 233*cdf0e10cSrcweir break;// "Update/Link", 234*cdf0e10cSrcweir case 17: rParent.SetUpdateFields(bSet, sal_True); break;// "Update/Field", 235*cdf0e10cSrcweir case 18: rParent.SetUpdateCharts(bSet, sal_True); break;// "Update/Chart" 236*cdf0e10cSrcweir } 237*cdf0e10cSrcweir } 238*cdf0e10cSrcweir } 239*cdf0e10cSrcweir } 240*cdf0e10cSrcweir } 241*cdf0e10cSrcweir /*-- 28.09.00 09:55:34--------------------------------------------------- 242*cdf0e10cSrcweir 243*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 244*cdf0e10cSrcweir Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() 245*cdf0e10cSrcweir { 246*cdf0e10cSrcweir static const char* aPropNames[] = 247*cdf0e10cSrcweir { 248*cdf0e10cSrcweir "Line/Guide", // 0 249*cdf0e10cSrcweir "Line/SimpleControlPoint", // 1 250*cdf0e10cSrcweir "Line/LargeControlPoint", // 2 251*cdf0e10cSrcweir "Window/HorizontalScroll", // 3 252*cdf0e10cSrcweir "Window/VerticalScroll", // 4 253*cdf0e10cSrcweir "Window/ShowRulers", // 5 254*cdf0e10cSrcweir "Window/HorizontalRuler", // 6 255*cdf0e10cSrcweir "Window/VerticalRuler", // 7 256*cdf0e10cSrcweir "Window/HorizontalRulerUnit", // 8 257*cdf0e10cSrcweir "Window/VerticalRulerUnit", // 9 258*cdf0e10cSrcweir "Window/SmoothScroll", //10 259*cdf0e10cSrcweir "Zoom/Value", //11 260*cdf0e10cSrcweir "Zoom/Type", //12 261*cdf0e10cSrcweir "Other/IsAlignMathObjectsToBaseline", //13 262*cdf0e10cSrcweir "Other/MeasureUnit", //14 263*cdf0e10cSrcweir // below properties are not available in WriterWeb 264*cdf0e10cSrcweir "Other/TabStop", //15 265*cdf0e10cSrcweir "Window/IsVerticalRulerRight", //16 266*cdf0e10cSrcweir "ViewLayout/Columns", //17 267*cdf0e10cSrcweir "ViewLayout/BookMode", //18 268*cdf0e10cSrcweir "Other/IsSquaredPageMode" //19 269*cdf0e10cSrcweir }; 270*cdf0e10cSrcweir const int nCount = bWeb ? 15 : 20; 271*cdf0e10cSrcweir Sequence<OUString> aNames(nCount); 272*cdf0e10cSrcweir OUString* pNames = aNames.getArray(); 273*cdf0e10cSrcweir for(int i = 0; i < nCount; i++) 274*cdf0e10cSrcweir { 275*cdf0e10cSrcweir pNames[i] = OUString::createFromAscii(aPropNames[i]); 276*cdf0e10cSrcweir } 277*cdf0e10cSrcweir return aNames; 278*cdf0e10cSrcweir } 279*cdf0e10cSrcweir /*-- 28.09.00 09:55:34--------------------------------------------------- 280*cdf0e10cSrcweir 281*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 282*cdf0e10cSrcweir SwLayoutViewConfig::SwLayoutViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : 283*cdf0e10cSrcweir ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Layout") : C2U("Office.Writer/Layout"), 284*cdf0e10cSrcweir CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), 285*cdf0e10cSrcweir rParent(rPar), 286*cdf0e10cSrcweir bWeb(bIsWeb) 287*cdf0e10cSrcweir { 288*cdf0e10cSrcweir } 289*cdf0e10cSrcweir /*-- 28.09.00 09:55:35--------------------------------------------------- 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 292*cdf0e10cSrcweir SwLayoutViewConfig::~SwLayoutViewConfig() 293*cdf0e10cSrcweir { 294*cdf0e10cSrcweir } 295*cdf0e10cSrcweir /*-- 28.09.00 09:55:36--------------------------------------------------- 296*cdf0e10cSrcweir 297*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 298*cdf0e10cSrcweir void SwLayoutViewConfig::Commit() 299*cdf0e10cSrcweir { 300*cdf0e10cSrcweir Sequence<OUString> aNames = GetPropertyNames(); 301*cdf0e10cSrcweir 302*cdf0e10cSrcweir Sequence<Any> aValues(aNames.getLength()); 303*cdf0e10cSrcweir Any* pValues = aValues.getArray(); 304*cdf0e10cSrcweir 305*cdf0e10cSrcweir for(int nProp = 0; nProp < aNames.getLength(); nProp++) 306*cdf0e10cSrcweir { 307*cdf0e10cSrcweir Any &rVal = pValues[nProp]; 308*cdf0e10cSrcweir switch(nProp) 309*cdf0e10cSrcweir { 310*cdf0e10cSrcweir case 0: rVal <<= (sal_Bool) rParent.IsCrossHair(); break; // "Line/Guide", 311*cdf0e10cSrcweir case 1: rVal <<= (sal_Bool) rParent.IsSolidMarkHdl(); break; // "Line/SimpleControlPoint", 312*cdf0e10cSrcweir case 2: rVal <<= (sal_Bool) rParent.IsBigMarkHdl(); break; // "Line/LargeControlPoint", 313*cdf0e10cSrcweir case 3: rVal <<= (sal_Bool) rParent.IsViewHScrollBar(); break; // "Window/HorizontalScroll", 314*cdf0e10cSrcweir case 4: rVal <<= (sal_Bool) rParent.IsViewVScrollBar(); break; // "Window/VerticalScroll", 315*cdf0e10cSrcweir case 5: rVal <<= (sal_Bool) rParent.IsViewAnyRuler(); break; // "Window/ShowRulers" 316*cdf0e10cSrcweir // #i14593# use IsView*Ruler(sal_True) instead of IsView*Ruler() 317*cdf0e10cSrcweir // this preserves the single ruler states even if "Window/ShowRulers" is off 318*cdf0e10cSrcweir case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(sal_True); break; // "Window/HorizontalRuler", 319*cdf0e10cSrcweir case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(sal_True); break; // "Window/VerticalRuler", 320*cdf0e10cSrcweir case 8: 321*cdf0e10cSrcweir if(rParent.bIsHScrollMetricSet) 322*cdf0e10cSrcweir rVal <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" 323*cdf0e10cSrcweir break; 324*cdf0e10cSrcweir case 9: 325*cdf0e10cSrcweir if(rParent.bIsVScrollMetricSet) 326*cdf0e10cSrcweir rVal <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" 327*cdf0e10cSrcweir break; 328*cdf0e10cSrcweir case 10: rVal <<= (sal_Bool) rParent.IsSmoothScroll(); break; // "Window/SmoothScroll", 329*cdf0e10cSrcweir case 11: rVal <<= (sal_Int32)rParent.GetZoom(); break; // "Zoom/Value", 330*cdf0e10cSrcweir case 12: rVal <<= (sal_Int32)rParent.GetZoomType(); break; // "Zoom/Type", 331*cdf0e10cSrcweir case 13: rVal <<= (sal_Bool) rParent.IsAlignMathObjectsToBaseline(); break; // "Other/IsAlignMathObjectsToBaseline" 332*cdf0e10cSrcweir case 14: rVal <<= (sal_Int32)rParent.GetMetric(); break; // "Other/MeasureUnit", 333*cdf0e10cSrcweir case 15: rVal <<= static_cast<sal_Int32>(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop", 334*cdf0e10cSrcweir case 16: rVal <<= (sal_Bool) rParent.IsVRulerRight(); break; // "Window/IsVerticalRulerRight", 335*cdf0e10cSrcweir case 17: rVal <<= (sal_Int32)rParent.GetViewLayoutColumns(); break; // "ViewLayout/Columns", 336*cdf0e10cSrcweir case 18: rVal <<= (sal_Bool) rParent.IsViewLayoutBookMode(); break; // "ViewLayout/BookMode", 337*cdf0e10cSrcweir case 19: rVal <<= (sal_Bool) rParent.IsSquaredPageMode(); break; // "Other/IsSquaredPageMode", 338*cdf0e10cSrcweir } 339*cdf0e10cSrcweir } 340*cdf0e10cSrcweir PutProperties(aNames, aValues); 341*cdf0e10cSrcweir } 342*cdf0e10cSrcweir /*-- 28.09.00 09:55:36--------------------------------------------------- 343*cdf0e10cSrcweir 344*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 345*cdf0e10cSrcweir void SwLayoutViewConfig::Load() 346*cdf0e10cSrcweir { 347*cdf0e10cSrcweir Sequence<OUString> aNames = GetPropertyNames(); 348*cdf0e10cSrcweir Sequence<Any> aValues = GetProperties(aNames); 349*cdf0e10cSrcweir const Any* pValues = aValues.getConstArray(); 350*cdf0e10cSrcweir DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed"); 351*cdf0e10cSrcweir if(aValues.getLength() == aNames.getLength()) 352*cdf0e10cSrcweir { 353*cdf0e10cSrcweir for(int nProp = 0; nProp < aNames.getLength(); nProp++) 354*cdf0e10cSrcweir { 355*cdf0e10cSrcweir if(pValues[nProp].hasValue()) 356*cdf0e10cSrcweir { 357*cdf0e10cSrcweir sal_Int32 nInt32Val = 0; 358*cdf0e10cSrcweir sal_Bool bSet = sal_False; 359*cdf0e10cSrcweir pValues[nProp] >>= nInt32Val; 360*cdf0e10cSrcweir pValues[nProp] >>= bSet; 361*cdf0e10cSrcweir 362*cdf0e10cSrcweir switch(nProp) 363*cdf0e10cSrcweir { 364*cdf0e10cSrcweir case 0: rParent.SetCrossHair(bSet); break;// "Line/Guide", 365*cdf0e10cSrcweir case 1: rParent.SetSolidMarkHdl(bSet); break;// "Line/SimpleControlPoint", 366*cdf0e10cSrcweir case 2: rParent.SetBigMarkHdl(bSet); break;// "Line/LargeControlPoint", 367*cdf0e10cSrcweir case 3: rParent.SetViewHScrollBar(bSet); break;// "Window/HorizontalScroll", 368*cdf0e10cSrcweir case 4: rParent.SetViewVScrollBar(bSet); break;// "Window/VerticalScroll", 369*cdf0e10cSrcweir case 5: rParent.SetViewAnyRuler(bSet);break; // "Window/ShowRulers" 370*cdf0e10cSrcweir case 6: rParent.SetViewHRuler(bSet); break;// "Window/HorizontalRuler", 371*cdf0e10cSrcweir case 7: rParent.SetViewVRuler(bSet); break;// "Window/VerticalRuler", 372*cdf0e10cSrcweir case 8: 373*cdf0e10cSrcweir { 374*cdf0e10cSrcweir rParent.bIsHScrollMetricSet = sal_True; 375*cdf0e10cSrcweir rParent.eHScrollMetric = ((FieldUnit)nInt32Val); // "Window/HorizontalRulerUnit" 376*cdf0e10cSrcweir } 377*cdf0e10cSrcweir break; 378*cdf0e10cSrcweir case 9: 379*cdf0e10cSrcweir { 380*cdf0e10cSrcweir rParent.bIsVScrollMetricSet = sal_True; 381*cdf0e10cSrcweir rParent.eVScrollMetric = ((FieldUnit)nInt32Val); // "Window/VerticalRulerUnit" 382*cdf0e10cSrcweir } 383*cdf0e10cSrcweir break; 384*cdf0e10cSrcweir case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll", 385*cdf0e10cSrcweir case 11: rParent.SetZoom( static_cast< sal_uInt16 >(nInt32Val) ); break;// "Zoom/Value", 386*cdf0e10cSrcweir case 12: rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type", 387*cdf0e10cSrcweir case 13: rParent.SetAlignMathObjectsToBaseline(bSet); break;// "Other/IsAlignMathObjectsToBaseline" 388*cdf0e10cSrcweir case 14: rParent.SetMetric((FieldUnit)nInt32Val, sal_True); break;// "Other/MeasureUnit", 389*cdf0e10cSrcweir case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), sal_True); break;// "Other/TabStop", 390*cdf0e10cSrcweir case 16: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", 391*cdf0e10cSrcweir case 17: rParent.SetViewLayoutColumns( static_cast<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns", 392*cdf0e10cSrcweir case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode", 393*cdf0e10cSrcweir case 19: rParent.SetDefaultPageMode(bSet,sal_True); break;// "Other/IsSquaredPageMode", 394*cdf0e10cSrcweir } 395*cdf0e10cSrcweir } 396*cdf0e10cSrcweir } 397*cdf0e10cSrcweir } 398*cdf0e10cSrcweir } 399*cdf0e10cSrcweir 400*cdf0e10cSrcweir void SwLayoutViewConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {} 401*cdf0e10cSrcweir 402*cdf0e10cSrcweir /* -----------------------------19.01.01 13:07-------------------------------- 403*cdf0e10cSrcweir 404*cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 405*cdf0e10cSrcweir Sequence<OUString> SwGridConfig::GetPropertyNames() 406*cdf0e10cSrcweir { 407*cdf0e10cSrcweir static const char* aPropNames[] = 408*cdf0e10cSrcweir { 409*cdf0e10cSrcweir "Option/SnapToGrid", // 0 410*cdf0e10cSrcweir "Option/VisibleGrid", // 1 411*cdf0e10cSrcweir "Option/Synchronize", // 2 412*cdf0e10cSrcweir "Resolution/XAxis", // 3 413*cdf0e10cSrcweir "Resolution/YAxis", // 4 414*cdf0e10cSrcweir "Subdivision/XAxis", // 5 415*cdf0e10cSrcweir "Subdivision/YAxis" // 6 416*cdf0e10cSrcweir }; 417*cdf0e10cSrcweir const int nCount = 7; 418*cdf0e10cSrcweir Sequence<OUString> aNames(nCount); 419*cdf0e10cSrcweir OUString* pNames = aNames.getArray(); 420*cdf0e10cSrcweir for(int i = 0; i < nCount; i++) 421*cdf0e10cSrcweir { 422*cdf0e10cSrcweir pNames[i] = OUString::createFromAscii(aPropNames[i]); 423*cdf0e10cSrcweir } 424*cdf0e10cSrcweir return aNames; 425*cdf0e10cSrcweir } 426*cdf0e10cSrcweir /* -----------------------------19.01.01 13:07-------------------------------- 427*cdf0e10cSrcweir 428*cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 429*cdf0e10cSrcweir SwGridConfig::SwGridConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) : 430*cdf0e10cSrcweir ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Grid") : C2U("Office.Writer/Grid"), 431*cdf0e10cSrcweir CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), 432*cdf0e10cSrcweir rParent(rPar), 433*cdf0e10cSrcweir bWeb(bIsWeb) 434*cdf0e10cSrcweir { 435*cdf0e10cSrcweir } 436*cdf0e10cSrcweir /* -----------------------------19.01.01 13:07-------------------------------- 437*cdf0e10cSrcweir 438*cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 439*cdf0e10cSrcweir SwGridConfig::~SwGridConfig() 440*cdf0e10cSrcweir { 441*cdf0e10cSrcweir } 442*cdf0e10cSrcweir /* -----------------------------19.01.01 13:07-------------------------------- 443*cdf0e10cSrcweir 444*cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 445*cdf0e10cSrcweir void SwGridConfig::Commit() 446*cdf0e10cSrcweir { 447*cdf0e10cSrcweir Sequence<OUString> aNames = GetPropertyNames(); 448*cdf0e10cSrcweir 449*cdf0e10cSrcweir Sequence<Any> aValues(aNames.getLength()); 450*cdf0e10cSrcweir Any* pValues = aValues.getArray(); 451*cdf0e10cSrcweir 452*cdf0e10cSrcweir for(int nProp = 0; nProp < aNames.getLength(); nProp++) 453*cdf0e10cSrcweir { 454*cdf0e10cSrcweir sal_Bool bSet; 455*cdf0e10cSrcweir switch(nProp) 456*cdf0e10cSrcweir { 457*cdf0e10cSrcweir case 0: bSet = rParent.IsSnap(); break;// "Option/SnapToGrid", 458*cdf0e10cSrcweir case 1: bSet = rParent.IsGridVisible(); break;//"Option/VisibleGrid", 459*cdf0e10cSrcweir case 2: bSet = rParent.IsSynchronize(); break;// "Option/Synchronize", 460*cdf0e10cSrcweir case 3: pValues[nProp] <<= (sal_Int32)TWIP_TO_MM100(rParent.GetSnapSize().Width()); break;// "Resolution/XAxis", 461*cdf0e10cSrcweir case 4: pValues[nProp] <<= (sal_Int32)TWIP_TO_MM100(rParent.GetSnapSize().Height()); break;// "Resolution/YAxis", 462*cdf0e10cSrcweir case 5: pValues[nProp] <<= (sal_Int16)rParent.GetDivisionX(); break;// "Subdivision/XAxis", 463*cdf0e10cSrcweir case 6: pValues[nProp] <<= (sal_Int16)rParent.GetDivisionY(); break;// "Subdivision/YAxis" 464*cdf0e10cSrcweir } 465*cdf0e10cSrcweir if(nProp < 3) 466*cdf0e10cSrcweir pValues[nProp].setValue(&bSet, ::getBooleanCppuType()); 467*cdf0e10cSrcweir } 468*cdf0e10cSrcweir PutProperties(aNames, aValues); 469*cdf0e10cSrcweir } 470*cdf0e10cSrcweir /* -----------------------------19.01.01 13:07-------------------------------- 471*cdf0e10cSrcweir 472*cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 473*cdf0e10cSrcweir void SwGridConfig::Load() 474*cdf0e10cSrcweir { 475*cdf0e10cSrcweir Sequence<OUString> aNames = GetPropertyNames(); 476*cdf0e10cSrcweir Sequence<Any> aValues = GetProperties(aNames); 477*cdf0e10cSrcweir const Any* pValues = aValues.getConstArray(); 478*cdf0e10cSrcweir DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed"); 479*cdf0e10cSrcweir if(aValues.getLength() == aNames.getLength()) 480*cdf0e10cSrcweir { 481*cdf0e10cSrcweir Size aSnap(rParent.GetSnapSize()); 482*cdf0e10cSrcweir for(int nProp = 0; nProp < aNames.getLength(); nProp++) 483*cdf0e10cSrcweir { 484*cdf0e10cSrcweir if(pValues[nProp].hasValue()) 485*cdf0e10cSrcweir { 486*cdf0e10cSrcweir sal_Bool bSet = nProp < 3 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False; 487*cdf0e10cSrcweir sal_Int32 nSet = 0; 488*cdf0e10cSrcweir if(nProp >= 3) 489*cdf0e10cSrcweir pValues[nProp] >>= nSet; 490*cdf0e10cSrcweir switch(nProp) 491*cdf0e10cSrcweir { 492*cdf0e10cSrcweir case 0: rParent.SetSnap(bSet); break;// "Option/SnapToGrid", 493*cdf0e10cSrcweir case 1: rParent.SetGridVisible(bSet); break;//"Option/VisibleGrid", 494*cdf0e10cSrcweir case 2: rParent.SetSynchronize(bSet); break;// "Option/Synchronize", 495*cdf0e10cSrcweir case 3: aSnap.Width() = MM100_TO_TWIP(nSet); break;// "Resolution/XAxis", 496*cdf0e10cSrcweir case 4: aSnap.Height() = MM100_TO_TWIP(nSet); break;// "Resolution/YAxis", 497*cdf0e10cSrcweir case 5: rParent.SetDivisionX((short)nSet); break;// "Subdivision/XAxis", 498*cdf0e10cSrcweir case 6: rParent.SetDivisionY((short)nSet); break;// "Subdivision/YAxis" 499*cdf0e10cSrcweir } 500*cdf0e10cSrcweir } 501*cdf0e10cSrcweir } 502*cdf0e10cSrcweir rParent.SetSnapSize(aSnap); 503*cdf0e10cSrcweir } 504*cdf0e10cSrcweir } 505*cdf0e10cSrcweir 506*cdf0e10cSrcweir void SwGridConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {} 507*cdf0e10cSrcweir 508*cdf0e10cSrcweir /* -----------------------------19.01.01 13:07-------------------------------- 509*cdf0e10cSrcweir 510*cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 511*cdf0e10cSrcweir Sequence<OUString> SwCursorConfig::GetPropertyNames() 512*cdf0e10cSrcweir { 513*cdf0e10cSrcweir static const char* aPropNames[] = 514*cdf0e10cSrcweir { 515*cdf0e10cSrcweir "DirectCursor/UseDirectCursor", // 0 516*cdf0e10cSrcweir "DirectCursor/Insert", // 1 517*cdf0e10cSrcweir "Option/ProtectedArea" // 2 518*cdf0e10cSrcweir }; 519*cdf0e10cSrcweir const int nCount = 3; 520*cdf0e10cSrcweir Sequence<OUString> aNames(nCount); 521*cdf0e10cSrcweir OUString* pNames = aNames.getArray(); 522*cdf0e10cSrcweir for(int i = 0; i < nCount; i++) 523*cdf0e10cSrcweir pNames[i] = C2U(aPropNames[i]); 524*cdf0e10cSrcweir return aNames; 525*cdf0e10cSrcweir } 526*cdf0e10cSrcweir /* -----------------------------19.01.01 13:07-------------------------------- 527*cdf0e10cSrcweir 528*cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 529*cdf0e10cSrcweir SwCursorConfig::SwCursorConfig(SwMasterUsrPref& rPar) : 530*cdf0e10cSrcweir ConfigItem(C2U("Office.Writer/Cursor"), 531*cdf0e10cSrcweir CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), 532*cdf0e10cSrcweir rParent(rPar) 533*cdf0e10cSrcweir { 534*cdf0e10cSrcweir } 535*cdf0e10cSrcweir /* -----------------------------19.01.01 13:07-------------------------------- 536*cdf0e10cSrcweir 537*cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 538*cdf0e10cSrcweir SwCursorConfig::~SwCursorConfig() 539*cdf0e10cSrcweir { 540*cdf0e10cSrcweir } 541*cdf0e10cSrcweir /* -----------------------------19.01.01 13:07-------------------------------- 542*cdf0e10cSrcweir 543*cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 544*cdf0e10cSrcweir void SwCursorConfig::Commit() 545*cdf0e10cSrcweir { 546*cdf0e10cSrcweir Sequence<OUString> aNames = GetPropertyNames(); 547*cdf0e10cSrcweir 548*cdf0e10cSrcweir Sequence<Any> aValues(aNames.getLength()); 549*cdf0e10cSrcweir Any* pValues = aValues.getArray(); 550*cdf0e10cSrcweir 551*cdf0e10cSrcweir for(int nProp = 0; nProp < aNames.getLength(); nProp++) 552*cdf0e10cSrcweir { 553*cdf0e10cSrcweir sal_Bool bSet; 554*cdf0e10cSrcweir switch(nProp) 555*cdf0e10cSrcweir { 556*cdf0e10cSrcweir case 0: bSet = rParent.IsShadowCursor(); break;// "DirectCursor/UseDirectCursor", 557*cdf0e10cSrcweir case 1: pValues[nProp] <<= (sal_Int32)rParent.GetShdwCrsrFillMode(); break;// "DirectCursor/Insert", 558*cdf0e10cSrcweir case 2: bSet = rParent.IsCursorInProtectedArea(); break;// "Option/ProtectedArea" 559*cdf0e10cSrcweir } 560*cdf0e10cSrcweir if(nProp != 1 ) 561*cdf0e10cSrcweir pValues[nProp].setValue(&bSet, ::getBooleanCppuType()); 562*cdf0e10cSrcweir } 563*cdf0e10cSrcweir PutProperties(aNames, aValues); 564*cdf0e10cSrcweir } 565*cdf0e10cSrcweir /* -----------------------------19.01.01 13:07-------------------------------- 566*cdf0e10cSrcweir 567*cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 568*cdf0e10cSrcweir void SwCursorConfig::Load() 569*cdf0e10cSrcweir { 570*cdf0e10cSrcweir Sequence<OUString> aNames = GetPropertyNames(); 571*cdf0e10cSrcweir Sequence<Any> aValues = GetProperties(aNames); 572*cdf0e10cSrcweir const Any* pValues = aValues.getConstArray(); 573*cdf0e10cSrcweir DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed"); 574*cdf0e10cSrcweir if(aValues.getLength() == aNames.getLength()) 575*cdf0e10cSrcweir { 576*cdf0e10cSrcweir 577*cdf0e10cSrcweir for(int nProp = 0; nProp < aNames.getLength(); nProp++) 578*cdf0e10cSrcweir { 579*cdf0e10cSrcweir if(pValues[nProp].hasValue()) 580*cdf0e10cSrcweir { 581*cdf0e10cSrcweir sal_Bool bSet = sal_False; 582*cdf0e10cSrcweir sal_Int32 nSet = 0; 583*cdf0e10cSrcweir if(nProp != 1 ) 584*cdf0e10cSrcweir bSet = *(sal_Bool*)pValues[nProp].getValue(); 585*cdf0e10cSrcweir else 586*cdf0e10cSrcweir pValues[nProp] >>= nSet; 587*cdf0e10cSrcweir switch(nProp) 588*cdf0e10cSrcweir { 589*cdf0e10cSrcweir case 0: rParent.SetShadowCursor(bSet); break;// "DirectCursor/UseDirectCursor", 590*cdf0e10cSrcweir case 1: rParent.SetShdwCrsrFillMode((sal_uInt8)nSet); break;// "DirectCursor/Insert", 591*cdf0e10cSrcweir case 2: rParent.SetCursorInProtectedArea(bSet); break;// "Option/ProtectedArea" 592*cdf0e10cSrcweir } 593*cdf0e10cSrcweir } 594*cdf0e10cSrcweir } 595*cdf0e10cSrcweir 596*cdf0e10cSrcweir } 597*cdf0e10cSrcweir } 598*cdf0e10cSrcweir 599*cdf0e10cSrcweir void SwCursorConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {} 600*cdf0e10cSrcweir 601*cdf0e10cSrcweir /*-- 28.09.00 09:55:33--------------------------------------------------- 602*cdf0e10cSrcweir 603*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 604*cdf0e10cSrcweir SwWebColorConfig::SwWebColorConfig(SwMasterUsrPref& rPar) : 605*cdf0e10cSrcweir ConfigItem(C2U("Office.WriterWeb/Background"), 606*cdf0e10cSrcweir CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE), 607*cdf0e10cSrcweir rParent(rPar), 608*cdf0e10cSrcweir aPropNames(1) 609*cdf0e10cSrcweir { 610*cdf0e10cSrcweir aPropNames.getArray()[0] = C2U("Color"); 611*cdf0e10cSrcweir } 612*cdf0e10cSrcweir /*-- 28.09.00 09:55:33--------------------------------------------------- 613*cdf0e10cSrcweir 614*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 615*cdf0e10cSrcweir SwWebColorConfig::~SwWebColorConfig() 616*cdf0e10cSrcweir { 617*cdf0e10cSrcweir } 618*cdf0e10cSrcweir /*-- 28.09.00 09:55:33--------------------------------------------------- 619*cdf0e10cSrcweir 620*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 621*cdf0e10cSrcweir void SwWebColorConfig::Commit() 622*cdf0e10cSrcweir { 623*cdf0e10cSrcweir Sequence<Any> aValues(aPropNames.getLength()); 624*cdf0e10cSrcweir Any* pValues = aValues.getArray(); 625*cdf0e10cSrcweir for(int nProp = 0; nProp < aPropNames.getLength(); nProp++) 626*cdf0e10cSrcweir { 627*cdf0e10cSrcweir switch(nProp) 628*cdf0e10cSrcweir { 629*cdf0e10cSrcweir case 0: pValues[nProp] <<= (sal_Int32)rParent.GetRetoucheColor().GetColor(); break;// "Color", 630*cdf0e10cSrcweir } 631*cdf0e10cSrcweir } 632*cdf0e10cSrcweir PutProperties(aPropNames, aValues); 633*cdf0e10cSrcweir } 634*cdf0e10cSrcweir 635*cdf0e10cSrcweir void SwWebColorConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {} 636*cdf0e10cSrcweir 637*cdf0e10cSrcweir /*-- 28.09.00 09:55:34--------------------------------------------------- 638*cdf0e10cSrcweir 639*cdf0e10cSrcweir -----------------------------------------------------------------------*/ 640*cdf0e10cSrcweir void SwWebColorConfig::Load() 641*cdf0e10cSrcweir { 642*cdf0e10cSrcweir Sequence<Any> aValues = GetProperties(aPropNames); 643*cdf0e10cSrcweir const Any* pValues = aValues.getConstArray(); 644*cdf0e10cSrcweir DBG_ASSERT(aValues.getLength() == aPropNames.getLength(), "GetProperties failed"); 645*cdf0e10cSrcweir if(aValues.getLength() == aPropNames.getLength()) 646*cdf0e10cSrcweir { 647*cdf0e10cSrcweir for(int nProp = 0; nProp < aPropNames.getLength(); nProp++) 648*cdf0e10cSrcweir { 649*cdf0e10cSrcweir if(pValues[nProp].hasValue()) 650*cdf0e10cSrcweir { 651*cdf0e10cSrcweir switch(nProp) 652*cdf0e10cSrcweir { 653*cdf0e10cSrcweir case 0: 654*cdf0e10cSrcweir sal_Int32 nSet = 0; 655*cdf0e10cSrcweir pValues[nProp] >>= nSet; rParent.SetRetoucheColor(nSet); 656*cdf0e10cSrcweir break;// "Color", 657*cdf0e10cSrcweir } 658*cdf0e10cSrcweir } 659*cdf0e10cSrcweir } 660*cdf0e10cSrcweir } 661*cdf0e10cSrcweir } 662*cdf0e10cSrcweir 663*cdf0e10cSrcweir 664