1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_cui.hxx" 30 31 // include --------------------------------------------------------------- 32 #include <svtools/colorcfg.hxx> 33 #include <svtools/extcolorcfg.hxx> 34 #include <svtools/headbar.hxx> 35 #include <svtools/ctrlbox.hxx> 36 #include <vcl/scrbar.hxx> 37 #include <svx/xtable.hxx> 38 #include <unotools/moduleoptions.hxx> 39 #include <unotools/pathoptions.hxx> 40 #include <vcl/msgbox.hxx> 41 #include <boost/shared_ptr.hpp> 42 #include <svx/svxdlg.hxx> 43 #include <helpid.hrc> 44 #include <dialmgr.hxx> 45 #include "optcolor.hxx" 46 #include <cuires.hrc> 47 #include "optcolor.hrc" 48 #include <svx/dlgutil.hxx> 49 50 using namespace ::com::sun::star; 51 using namespace ::svtools; 52 53 #define GROUP_COUNT 7 54 #define GROUP_UNKNOWN -1 55 #define GROUP_GENERAL 0 56 #define GROUP_WRITER 1 57 #define GROUP_HTML 2 58 #define GROUP_CALC 3 59 #define GROUP_DRAW 4 60 #define GROUP_BASIC 5 61 #define GROUP_SQL 6 62 63 const char* aColorLBHids[ColorConfigEntryCount] = 64 { 65 HID_COLORPAGE_DOCCOLOR_LB, 66 HID_COLORPAGE_DOCBOUNDARIES_LB, 67 HID_COLORPAGE_APPBACKGROUND_LB, 68 HID_COLORPAGE_OBJECTBOUNDARIES_LB, 69 HID_COLORPAGE_TABLEBOUNDARIES_LB, 70 HID_COLORPAGE_FONTCOLOR_LB, 71 HID_COLORPAGE_LINKS_LB, 72 HID_COLORPAGE_LINKSVISITED_LB, 73 HID_COLORPAGE_ANCHOR_LB, 74 HID_COLORPAGE_SPELL_LB, 75 HID_COLORPAGE_SMARTTAGS_LB, 76 HID_COLORPAGE_WRITERTEXTGRID_LB, 77 HID_COLORPAGE_WRITERFIELDSHADINGS_LB, 78 HID_COLORPAGE_WRITERIDXSHADINGS_LB, 79 HID_COLORPAGE_WRITERDIRECTCURSOR_LB, 80 HID_COLORPAGE_WRITERSCRIPTINDICATOR_LB, 81 HID_COLORPAGE_WRITERSECTIONBOUNDARIES_LB, 82 HID_COLORPAGE_WRITERPAGEBREAKS_LB, 83 HID_COLORPAGE_HTMLSGML_LB, 84 HID_COLORPAGE_HTMLCOMMENT_LB, 85 HID_COLORPAGE_HTMLKEYWORD_LB, 86 HID_COLORPAGE_HTMLUNKNOWN_LB, 87 HID_COLORPAGE_CALCGRID_LB, 88 HID_COLORPAGE_CALCPAGEBREAK_LB, 89 HID_COLORPAGE_CALCPAGEBREAKMANUAL_LB, 90 HID_COLORPAGE_CALCPAGEBREAKAUTOMATIC_LB, 91 HID_COLORPAGE_CALCDETECTIVE_LB, 92 HID_COLORPAGE_CALCDETECTIVEERROR_LB, 93 HID_COLORPAGE_CALCREFERENCE_LB, 94 HID_COLORPAGE_CALCNOTESBACKGROUND_LB, 95 HID_COLORPAGE_DRAWGRID_LB, 96 HID_COLORPAGE_DRAWDRAWING_LB, 97 HID_COLORPAGE_DRAWFILL_LB, 98 HID_COLORPAGE_BASICIDENTIFIER_LB, 99 HID_COLORPAGE_BASICCOMMENT_LB, 100 HID_COLORPAGE_BASICNUMBER_LB, 101 HID_COLORPAGE_BASICSTRING_LB, 102 HID_COLORPAGE_BASICOPERATOR_LB, 103 HID_COLORPAGE_BASICKEYWORD_LB, 104 HID_COLORPAGE_BASICERROR_LB 105 HID_COLORPAGE_SQLIDENTIFIER_LB, 106 HID_COLORPAGE_SQLNUMBER_LB, 107 HID_COLORPAGE_SQLSTRING_LB, 108 HID_COLORPAGE_SQLOPERATOR_LB, 109 HID_COLORPAGE_SQLKEYWORD_LB, 110 HID_COLORPAGE_SQLPARAMETER_LB, 111 HID_COLORPAGE_SQLCOMMENT_LB 112 }; 113 114 const char* aColorCBHids[ColorConfigEntryCount] = 115 { 116 HID_COLORPAGE_DOCCOLOR_CB, 117 HID_COLORPAGE_DOCBOUNDARIES_CB, 118 HID_COLORPAGE_APPBACKGROUND_CB, 119 HID_COLORPAGE_OBJECTBOUNDARIES_CB, 120 HID_COLORPAGE_TABLEBOUNDARIES_CB, 121 HID_COLORPAGE_FONTCOLOR_CB, 122 HID_COLORPAGE_LINKS_CB, 123 HID_COLORPAGE_LINKSVISITED_CB, 124 HID_COLORPAGE_ANCHOR_CB, 125 HID_COLORPAGE_SPELL_CB, 126 HID_COLORPAGE_SMARTTAGS_CB, 127 HID_COLORPAGE_WRITERTEXTGRID_CB, 128 HID_COLORPAGE_WRITERFIELDSHADINGS_CB, 129 HID_COLORPAGE_WRITERIDXSHADINGS_CB, 130 HID_COLORPAGE_WRITERDIRECTCURSOR_CB, 131 HID_COLORPAGE_WRITERSCRIPTINDICATOR_CB, 132 HID_COLORPAGE_WRITERSECTIONBOUNDARIES_CB, 133 HID_COLORPAGE_WRITERPAGEBREAKS_CB, 134 HID_COLORPAGE_HTMLSGML_CB, 135 HID_COLORPAGE_HTMLCOMMENT_CB, 136 HID_COLORPAGE_HTMLKEYWORD_CB, 137 HID_COLORPAGE_HTMLUNKNOWN_CB, 138 HID_COLORPAGE_CALCGRID_CB, 139 HID_COLORPAGE_CALCPAGEBREAK_CB, 140 HID_COLORPAGE_CALCPAGEBREAKMANUAL_CB, 141 HID_COLORPAGE_CALCPAGEBREAKAUTOMATIC_CB, 142 HID_COLORPAGE_CALCDETECTIVE_CB, 143 HID_COLORPAGE_CALCDETECTIVEERROR_CB, 144 HID_COLORPAGE_CALCREFERENCE_CB, 145 HID_COLORPAGE_CALCNOTESBACKGROUND_CB, 146 HID_COLORPAGE_DRAWGRID_CB, 147 HID_COLORPAGE_DRAWDRAWING_CB, 148 HID_COLORPAGE_DRAWFILL_CB, 149 HID_COLORPAGE_BASICIDENTIFIER_CB, 150 HID_COLORPAGE_BASICCOMMENT_CB, 151 HID_COLORPAGE_BASICNUMBER_CB, 152 HID_COLORPAGE_BASICSTRING_CB, 153 HID_COLORPAGE_BASICOPERATOR_CB, 154 HID_COLORPAGE_BASICKEYWORD_CB, 155 HID_COLORPAGE_BASICERROR_CB 156 HID_COLORPAGE_SQLIDENTIFIER_CB, 157 HID_COLORPAGE_SQLNUMBER_CB, 158 HID_COLORPAGE_SQLSTRING_CB, 159 HID_COLORPAGE_SQLOPERATOR_CB, 160 HID_COLORPAGE_SQLKEYWORD_CB, 161 HID_COLORPAGE_SQLPARAMETER_CB, 162 HID_COLORPAGE_SQLCOMMENT_CB 163 }; 164 165 /* -----------------------------2002/06/26 10:48------------------------------ 166 167 ---------------------------------------------------------------------------*/ 168 169 class SvxExtFixedText_Impl : public FixedText 170 { 171 private: 172 long m_nGroupHeight; 173 174 protected: 175 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 176 177 public: 178 SvxExtFixedText_Impl(Window* pParent, const ResId& rResId) : 179 FixedText(pParent, rResId), m_nGroupHeight(0) {} 180 181 inline long GetGroupHeight() { return m_nGroupHeight; } 182 inline void SetGroupHeight( long _nHeight ) { m_nGroupHeight = _nHeight; } 183 }; 184 185 /* -----------------------------25.03.2002 15:48------------------------------ 186 187 ---------------------------------------------------------------------------*/ 188 class ColorConfigCtrl_Impl; 189 class ColorConfigWindow_Impl : public Window 190 { 191 friend class ColorConfigCtrl_Impl; 192 Window aGeneralBackWN; 193 SvxExtFixedText_Impl aGeneralFT; 194 FixedText aDocColorFT; 195 ColorListBox aDocColorLB; 196 Window aDocColorWN; 197 CheckBox aDocBoundCB; 198 ColorListBox aDocBoundLB; 199 Window aDocBoundWN; 200 FixedText aAppBackFT; 201 ColorListBox aAppBackLB; 202 Window aAppBackWN; 203 CheckBox aObjBoundCB; 204 ColorListBox aObjBoundLB; 205 Window aObjBoundWN; 206 CheckBox aTableBoundCB; 207 ColorListBox aTableBoundLB; 208 Window aTableBoundWN; 209 FixedText aFontColorFT; 210 ColorListBox aFontColorLB; 211 Window aFontColorWN; 212 CheckBox aLinksCB; 213 ColorListBox aLinksLB; 214 Window aLinksWN; 215 CheckBox aLinksVisitedCB; 216 ColorListBox aLinksVisitedLB; 217 Window aLinksVisitedWN; 218 FixedText aSpellFT; 219 ColorListBox aSpellLB; 220 Window aSpellWN; 221 FixedText aSmarttagsFT; 222 ColorListBox aSmarttagsLB; 223 Window aSmarttagsWN; 224 Window aWriterBackWN; 225 SvxExtFixedText_Impl aWriterFT; 226 FixedText aWrtTextGridFT; 227 ColorListBox aWrtTextGridLB; 228 Window aWrtTextGridWN; 229 CheckBox aWrtFieldCB; 230 ColorListBox aWrtFieldLB; 231 Window aWrtFieldWN; 232 CheckBox aWrtIdxShadingBackCB; 233 ColorListBox aWrtIdxShadingBackLB; 234 Window aWrtIdxShadingBackWN; 235 FixedText aWrtScriptIndicatorFT; 236 ColorListBox aWrtScriptIndicatorLB; 237 Window aWrtScriptIndicatorWN; 238 CheckBox aWrtSectionBoundCB; 239 ColorListBox aWrtSectionBoundLB; 240 Window aWrtSectionBoundWN; 241 FixedText aWrtPageBreaksFT; 242 ColorListBox aWrtPageBreaksLB; 243 Window aWrtPageBreaksWN; 244 FixedText aWrtDirectCrsrFT; 245 ColorListBox aWrtDirectCrsrLB; 246 Window aWrtDirectCrsrWN; 247 Window aHTMLBackWN; 248 SvxExtFixedText_Impl aHTMLFT; 249 FixedText aHTMLSGMLFT; 250 ColorListBox aHTMLSGMLLB; 251 Window aHTMLSGMLWN; 252 FixedText aHTMLCommentFT; 253 ColorListBox aHTMLCommentLB; 254 Window aHTMLCommentWN; 255 FixedText aHTMLKeywdFT; 256 ColorListBox aHTMLKeywdLB; 257 Window aHTMLKeywdWN; 258 FixedText aHTMLUnknownFT; 259 ColorListBox aHTMLUnknownLB; 260 Window aHTMLUnknownWN; 261 Window aCalcBackWN; 262 SvxExtFixedText_Impl aCalcFT; 263 FixedText aCalcGridFT; 264 ColorListBox aCalcGridLB; 265 Window aCalcGridWN; 266 FixedText aCalcPageBreakFT; 267 ColorListBox aCalcPageBreakLB; 268 Window aCalcPageBreakWN; 269 FixedText aCalcPageBreakManualFT; 270 ColorListBox aCalcPageBreakManualLB; 271 Window aCalcPageBreakManualWN; 272 FixedText aCalcPageBreakAutoFT; 273 ColorListBox aCalcPageBreakAutoLB; 274 Window aCalcPageBreakAutoWN; 275 FixedText aCalcDetectiveFT; 276 ColorListBox aCalcDetectiveLB; 277 Window aCalcDetectiveWN; 278 FixedText aCalcDetectiveErrorFT; 279 ColorListBox aCalcDetectiveErrorLB; 280 Window aCalcDetectiveErrorWN; 281 FixedText aCalcReferenceFT; 282 ColorListBox aCalcReferenceLB; 283 Window aCalcReferenceWN; 284 FixedText aCalcNotesBackFT; 285 ColorListBox aCalcNotesBackLB; 286 Window aCalcNotesBackWN; 287 Window aDrawBackWN; 288 SvxExtFixedText_Impl aDrawFT; 289 FixedText aDrawGridFT; 290 ColorListBox aDrawGridLB; 291 Window aDrawGridWN; 292 Window aBasicBackWN; 293 SvxExtFixedText_Impl aBasicFT; 294 FixedText aBasicIdentifierFT; 295 ColorListBox aBasicIdentifierLB; 296 Window aBasicIdentifierWN; 297 FixedText aBasicCommentFT; 298 ColorListBox aBasicCommentLB; 299 Window aBasicCommentWN; 300 FixedText aBasicNumberFT; 301 ColorListBox aBasicNumberLB; 302 Window aBasicNumberWN; 303 FixedText aBasicStringFT; 304 ColorListBox aBasicStringLB; 305 Window aBasicStringWN; 306 FixedText aBasicOperatorFT; 307 ColorListBox aBasicOperatorLB; 308 Window aBasicOperatorWN; 309 FixedText aBasicKeywordFT; 310 ColorListBox aBasicKeywordLB; 311 Window aBasicKeywordWN; 312 FixedText aBasicErrorFT; 313 ColorListBox aBasicErrorLB; 314 Window aBasicErrorWN; 315 Window aSQLBackWN; 316 SvxExtFixedText_Impl aSQLFT; 317 FixedText aSQLIdentifierFT; 318 ColorListBox aSQLIdentifierLB; 319 Window aSQLIdentifierWN; 320 FixedText aSQLNumberFT; 321 ColorListBox aSQLNumberLB; 322 Window aSQLNumberWN; 323 FixedText aSQLStringFT; 324 ColorListBox aSQLStringLB; 325 Window aSQLStringWN; 326 FixedText aSQLOperatorFT; 327 ColorListBox aSQLOperatorLB; 328 Window aSQLOperatorWN; 329 FixedText aSQLKeywordFT; 330 ColorListBox aSQLKeywordLB; 331 Window aSQLKeywordWN; 332 FixedText aSQLParameterFT; 333 ColorListBox aSQLParameterLB; 334 Window aSQLParameterWN; 335 FixedText aSQLCommentFT; 336 ColorListBox aSQLCommentLB; 337 Window aSQLCommentWN; 338 339 ::std::vector< SvxExtFixedText_Impl*> aChapters; 340 ::std::vector< Window* > aChapterWins; 341 ::std::vector< FixedText* > aFixedTexts; 342 ::std::vector< CheckBox* > aCheckBoxes; 343 ::std::vector< ColorListBox* > aColorBoxes; 344 ::std::vector< Window* > aWindows; // [ColorConfigEntryCount] 345 ::std::vector< ::boost::shared_ptr<SvxExtFixedText_Impl> > m_aExtensionTitles; 346 347 SvtModuleOptions m_aModuleOptions; 348 349 void SetNewPosition( sal_Int32 _nFeature, Window* _pWin ); 350 351 virtual void Command( const CommandEvent& rCEvt ); 352 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 353 354 public: 355 ColorConfigWindow_Impl(Window* pParent, const ResId& rResId); 356 ~ColorConfigWindow_Impl(); 357 358 inline const SvtModuleOptions& GetModuleOptions() const { return m_aModuleOptions; } 359 }; 360 361 sal_Bool lcl_isGroupVisible( sal_Int32 _nGroup, const SvtModuleOptions& _rModOptions ) 362 { 363 sal_Bool bRet = sal_True; 364 365 switch ( _nGroup ) 366 { 367 case GROUP_WRITER : 368 case GROUP_HTML : 369 { 370 bRet = _rModOptions.IsModuleInstalled( SvtModuleOptions::E_SWRITER ); 371 break; 372 } 373 374 case GROUP_CALC : 375 { 376 bRet = _rModOptions.IsModuleInstalled( SvtModuleOptions::E_SCALC ); 377 break; 378 } 379 380 case GROUP_DRAW : 381 { 382 bRet = ( _rModOptions.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) || 383 _rModOptions.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) ); 384 break; 385 } 386 case GROUP_SQL : 387 { 388 bRet = _rModOptions.IsModuleInstalled( SvtModuleOptions::E_SDATABASE ); 389 break; 390 } 391 } 392 393 return bRet; 394 } 395 396 sal_Int16 lcl_getGroup( sal_Int32 _nFeature ) 397 { 398 if ( _nFeature >= ColorConfigEntryCount ) 399 return GROUP_COUNT; // feature of an extension 400 401 sal_Int16 nRet = GROUP_UNKNOWN; 402 403 switch ( _nFeature ) 404 { 405 case DOCCOLOR : 406 case DOCBOUNDARIES : 407 case APPBACKGROUND : 408 case OBJECTBOUNDARIES : 409 case TABLEBOUNDARIES : 410 case FONTCOLOR : 411 case LINKS : 412 case LINKSVISITED : 413 case ANCHOR : 414 case SPELL : 415 case SMARTTAGS : 416 { 417 nRet = GROUP_GENERAL; 418 break; 419 } 420 421 case WRITERTEXTGRID : 422 case WRITERFIELDSHADINGS : 423 case WRITERIDXSHADINGS : 424 case WRITERDIRECTCURSOR : 425 case WRITERSCRIPTINDICATOR : 426 case WRITERSECTIONBOUNDARIES : 427 case WRITERPAGEBREAKS : 428 { 429 nRet = GROUP_WRITER; 430 break; 431 } 432 433 case HTMLSGML : 434 case HTMLCOMMENT : 435 case HTMLKEYWORD : 436 case HTMLUNKNOWN : 437 { 438 nRet = GROUP_HTML; 439 break; 440 } 441 442 case CALCGRID : 443 case CALCPAGEBREAK : 444 case CALCPAGEBREAKMANUAL : 445 case CALCPAGEBREAKAUTOMATIC : 446 case CALCDETECTIVE : 447 case CALCDETECTIVEERROR : 448 case CALCREFERENCE : 449 case CALCNOTESBACKGROUND : 450 { 451 nRet = GROUP_CALC; 452 break; 453 } 454 455 case DRAWGRID : 456 case DRAWDRAWING : 457 case DRAWFILL : 458 { 459 nRet = GROUP_DRAW; 460 break; 461 } 462 463 case BASICIDENTIFIER : 464 case BASICCOMMENT : 465 case BASICNUMBER : 466 case BASICSTRING : 467 case BASICOPERATOR : 468 case BASICKEYWORD : 469 case BASICERROR : 470 { 471 nRet = GROUP_BASIC; 472 break; 473 } 474 case SQLIDENTIFIER : 475 case SQLNUMBER: 476 case SQLSTRING: 477 case SQLOPERATOR: 478 case SQLKEYWORD: 479 case SQLPARAMETER: 480 case SQLCOMMENT: 481 { 482 nRet = GROUP_SQL; 483 break; 484 } 485 } 486 return nRet; 487 } 488 489 /* -----------------------------25.03.2002 17:05------------------------------ 490 491 ---------------------------------------------------------------------------*/ 492 ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rResId) : 493 Window(pParent, rResId), 494 aGeneralBackWN(this), 495 aGeneralFT(&aGeneralBackWN, ResId( FT_GENERAL, *rResId.GetResMgr() )), 496 aDocColorFT(this, ResId( FT_DOCCOLOR, *rResId.GetResMgr())), 497 aDocColorLB(this, ResId( LB_DOCCOLOR, *rResId.GetResMgr())), 498 aDocColorWN(this, ResId( WN_DOCCOLOR, *rResId.GetResMgr())), 499 aDocBoundCB(this, ResId( CB_DOCBOUND, *rResId.GetResMgr())), 500 aDocBoundLB(this, ResId( LB_DOCBOUND, *rResId.GetResMgr())), 501 aDocBoundWN(this, ResId( WN_DOCBOUND, *rResId.GetResMgr())), 502 aAppBackFT(this, ResId( FT_APPBACKGROUND, *rResId.GetResMgr())), 503 aAppBackLB(this, ResId( LB_APPBACKGROUND, *rResId.GetResMgr())), 504 aAppBackWN(this, ResId( WN_APPBACKGROUND, *rResId.GetResMgr())), 505 aObjBoundCB(this, ResId( CB_OBJECTBOUNDARIES, *rResId.GetResMgr())), 506 aObjBoundLB(this, ResId( LB_OBJECTBOUNDARIES, *rResId.GetResMgr())), 507 aObjBoundWN(this, ResId( WN_OBJECTBOUNDARIES, *rResId.GetResMgr())), 508 aTableBoundCB(this, ResId( CB_TABLEBOUNDARIES, *rResId.GetResMgr())), 509 aTableBoundLB(this, ResId( LB_TABLEBOUNDARIES, *rResId.GetResMgr())), 510 aTableBoundWN(this, ResId( WN_TABLEBOUNDARIES, *rResId.GetResMgr())), 511 aFontColorFT(this, ResId( FT_FONTCOLOR, *rResId.GetResMgr())), 512 aFontColorLB(this, ResId( LB_FONTCOLOR, *rResId.GetResMgr())), 513 aFontColorWN(this, ResId( WN_FONTCOLOR, *rResId.GetResMgr())), 514 aLinksCB(this, ResId( CB_LINKS, *rResId.GetResMgr())), 515 aLinksLB(this, ResId( LB_LINKS, *rResId.GetResMgr())), 516 aLinksWN(this, ResId( WN_LINKS, *rResId.GetResMgr())), 517 aLinksVisitedCB(this, ResId( CB_LINKSVISITED, *rResId.GetResMgr())), 518 aLinksVisitedLB(this, ResId( LB_LINKSVISITED, *rResId.GetResMgr())), 519 aLinksVisitedWN(this, ResId( WN_LINKSVISITED, *rResId.GetResMgr())), 520 aSpellFT(this, ResId( FT_SPELL, *rResId.GetResMgr())), 521 aSpellLB(this, ResId( LB_SPELL, *rResId.GetResMgr())), 522 aSpellWN(this, ResId( WN_SPELL, *rResId.GetResMgr())), 523 aSmarttagsFT(this, ResId( FT_SMARTTAGS, *rResId.GetResMgr() )), 524 aSmarttagsLB(this, ResId( LB_SMARTTAGS, *rResId.GetResMgr() )), 525 aSmarttagsWN(this, ResId( WN_SMARTTAGS, *rResId.GetResMgr() )), 526 aWriterBackWN(this), 527 aWriterFT(this, ResId(FT_WRITER, *rResId.GetResMgr())), 528 aWrtTextGridFT(this, ResId( FT_WRITERTEXTGRID, *rResId.GetResMgr())), 529 aWrtTextGridLB(this, ResId( LB_WRITERTEXTGRID, *rResId.GetResMgr())), 530 aWrtTextGridWN(this, ResId( WN_WRITERTEXTGRID, *rResId.GetResMgr())), 531 aWrtFieldCB(this, ResId( CB_WRITERFIELDSHADINGS, *rResId.GetResMgr())), 532 aWrtFieldLB(this, ResId( LB_WRITERFIELDSHADINGS, *rResId.GetResMgr())), 533 aWrtFieldWN(this, ResId( WN_WRITERFIELDSHADINGS, *rResId.GetResMgr())), 534 aWrtIdxShadingBackCB(this, ResId( CB_WRITERIDXSHADINGS, *rResId.GetResMgr())), 535 aWrtIdxShadingBackLB(this, ResId( LB_WRITERIDXSHADINGS, *rResId.GetResMgr())), 536 aWrtIdxShadingBackWN(this, ResId( WN_WRITERIDXSHADINGS, *rResId.GetResMgr())), 537 aWrtScriptIndicatorFT(this, ResId( FT_WRITERSCRIPTINDICATOR, *rResId.GetResMgr())), 538 aWrtScriptIndicatorLB(this, ResId( LB_WRITERSCRIPTINDICATOR, *rResId.GetResMgr())), 539 aWrtScriptIndicatorWN(this, ResId( WN_WRITERSCRIPTINDICATOR, *rResId.GetResMgr())), 540 aWrtSectionBoundCB(this, ResId( CB_WRITERSECTIONBOUNDARIES, *rResId.GetResMgr())), 541 aWrtSectionBoundLB(this, ResId( LB_WRITERSECTIONBOUNDARIES, *rResId.GetResMgr())), 542 aWrtSectionBoundWN(this, ResId( WN_WRITERSECTIONBOUNDARIES, *rResId.GetResMgr())), 543 aWrtPageBreaksFT(this, ResId( FT_WRITERPAGEBREAKS, *rResId.GetResMgr())), 544 aWrtPageBreaksLB(this, ResId( LB_WRITERPAGEBREAKS, *rResId.GetResMgr())), 545 aWrtPageBreaksWN(this, ResId( WN_WRITERPAGEBREAKS, *rResId.GetResMgr())), 546 aWrtDirectCrsrFT(this, ResId( FT_WRITERDIRECTCURSOR, *rResId.GetResMgr())), 547 aWrtDirectCrsrLB(this, ResId( LB_WRITERDIRECTCURSOR, *rResId.GetResMgr())), 548 aWrtDirectCrsrWN(this, ResId( WN_WRITERDIRECTCURSOR, *rResId.GetResMgr())), 549 aHTMLBackWN(this), 550 aHTMLFT(this, ResId( FT_HTML, *rResId.GetResMgr())), 551 aHTMLSGMLFT(this, ResId( FT_HTMLSGML, *rResId.GetResMgr())), 552 aHTMLSGMLLB(this, ResId( LB_HTMLSGML, *rResId.GetResMgr())), 553 aHTMLSGMLWN(this, ResId( WN_HTMLSGML, *rResId.GetResMgr())), 554 aHTMLCommentFT(this, ResId( FT_HTMLCOMMENT, *rResId.GetResMgr())), 555 aHTMLCommentLB(this, ResId( LB_HTMLCOMMENT, *rResId.GetResMgr())), 556 aHTMLCommentWN(this, ResId( WN_HTMLCOMMENT, *rResId.GetResMgr())), 557 aHTMLKeywdFT(this, ResId( FT_HTMLKEYWORD, *rResId.GetResMgr())), 558 aHTMLKeywdLB(this, ResId( LB_HTMLKEYWORD, *rResId.GetResMgr())), 559 aHTMLKeywdWN(this, ResId( WN_HTMLKEYWORD, *rResId.GetResMgr())), 560 aHTMLUnknownFT(this, ResId( FT_HTMLUNKNOWN, *rResId.GetResMgr())), 561 aHTMLUnknownLB(this, ResId( LB_HTMLUNKNOWN, *rResId.GetResMgr())), 562 aHTMLUnknownWN(this, ResId( WN_HTMLUNKNOWN, *rResId.GetResMgr())), 563 aCalcBackWN(this), 564 aCalcFT(this, ResId( FT_CALC, *rResId.GetResMgr())), 565 aCalcGridFT(this, ResId( FT_CALCGRID, *rResId.GetResMgr())), 566 aCalcGridLB(this, ResId( LB_CALCGRID, *rResId.GetResMgr())), 567 aCalcGridWN(this, ResId( WN_CALCGRID, *rResId.GetResMgr())), 568 aCalcPageBreakFT(this, ResId( FT_CALCPAGEBREAK, *rResId.GetResMgr())), 569 aCalcPageBreakLB(this, ResId( LB_CALCPAGEBREAK, *rResId.GetResMgr())), 570 aCalcPageBreakWN(this, ResId( WN_CALCPAGEBREAK, *rResId.GetResMgr())), 571 aCalcPageBreakManualFT(this, ResId( FT_CALCPAGEBREAKMANUAL, *rResId.GetResMgr())), 572 aCalcPageBreakManualLB(this, ResId( LB_CALCPAGEBREAKMANUAL, *rResId.GetResMgr())), 573 aCalcPageBreakManualWN(this, ResId( WN_CALCPAGEBREAKMANUAL, *rResId.GetResMgr())), 574 aCalcPageBreakAutoFT(this, ResId( FT_CALCPAGEBREAKAUTO, *rResId.GetResMgr())), 575 aCalcPageBreakAutoLB(this, ResId( LB_CALCPAGEBREAKAUTO, *rResId.GetResMgr())), 576 aCalcPageBreakAutoWN(this, ResId( WN_CALCPAGEBREAKAUTO, *rResId.GetResMgr())), 577 aCalcDetectiveFT(this, ResId( FT_CALCDETECTIVE, *rResId.GetResMgr())), 578 aCalcDetectiveLB(this, ResId( LB_CALCDETECTIVE, *rResId.GetResMgr())), 579 aCalcDetectiveWN(this, ResId( WN_CALCDETECTIVE, *rResId.GetResMgr())), 580 aCalcDetectiveErrorFT(this, ResId( FT_CALCDETECTIVEERROR, *rResId.GetResMgr())), 581 aCalcDetectiveErrorLB(this, ResId( LB_CALCDETECTIVEERROR, *rResId.GetResMgr())), 582 aCalcDetectiveErrorWN(this, ResId( WN_CALCDETECTIVEERROR, *rResId.GetResMgr())), 583 aCalcReferenceFT(this, ResId( FT_CALCREFERENCE, *rResId.GetResMgr())), 584 aCalcReferenceLB(this, ResId( LB_CALCREFERENCE, *rResId.GetResMgr())), 585 aCalcReferenceWN(this, ResId( WN_CALCREFERENCE, *rResId.GetResMgr())), 586 aCalcNotesBackFT(this, ResId( FT_CALCNOTESBACKGROUND, *rResId.GetResMgr())), 587 aCalcNotesBackLB(this, ResId( LB_CALCNOTESBACKGROUND, *rResId.GetResMgr())), 588 aCalcNotesBackWN(this, ResId( WN_CALCNOTESBACKGROUND, *rResId.GetResMgr())), 589 aDrawBackWN(this), 590 aDrawFT(this, ResId( FT_DRAW, *rResId.GetResMgr())), 591 aDrawGridFT(this, ResId( FT_DRAWGRID, *rResId.GetResMgr())), 592 aDrawGridLB(this, ResId( LB_DRAWGRID, *rResId.GetResMgr())), 593 aDrawGridWN(this, ResId( WN_DRAWGRID, *rResId.GetResMgr())), 594 aBasicBackWN(this), 595 aBasicFT(this, ResId( FT_BASIC, *rResId.GetResMgr())), 596 aBasicIdentifierFT(this, ResId( FT_BASICIDENTIFIER, *rResId.GetResMgr())), 597 aBasicIdentifierLB(this, ResId( LB_BASICIDENTIFIER, *rResId.GetResMgr())), 598 aBasicIdentifierWN(this, ResId( WN_BASICIDENTIFIER, *rResId.GetResMgr())), 599 aBasicCommentFT(this, ResId( FT_BASICCOMMENT, *rResId.GetResMgr())), 600 aBasicCommentLB(this, ResId( LB_BASICCOMMENT, *rResId.GetResMgr())), 601 aBasicCommentWN(this, ResId( WN_BASICCOMMENT, *rResId.GetResMgr())), 602 aBasicNumberFT(this, ResId( FT_BASICNUMBER, *rResId.GetResMgr())), 603 aBasicNumberLB(this, ResId( LB_BASICNUMBER, *rResId.GetResMgr())), 604 aBasicNumberWN(this, ResId( WN_BASICNUMBER, *rResId.GetResMgr())), 605 aBasicStringFT(this, ResId( FT_BASICSTRING, *rResId.GetResMgr())), 606 aBasicStringLB(this, ResId( LB_BASICSTRING, *rResId.GetResMgr())), 607 aBasicStringWN(this, ResId( WN_BASICSTRING, *rResId.GetResMgr())), 608 aBasicOperatorFT(this, ResId( FT_BASICOPERATOR, *rResId.GetResMgr())), 609 aBasicOperatorLB(this, ResId( LB_BASICOPERATOR, *rResId.GetResMgr())), 610 aBasicOperatorWN(this, ResId( WN_BASICOPERATOR, *rResId.GetResMgr())), 611 aBasicKeywordFT(this, ResId( FT_BASICKEYWORD, *rResId.GetResMgr())), 612 aBasicKeywordLB(this, ResId( LB_BASICKEYWORD, *rResId.GetResMgr())), 613 aBasicKeywordWN(this, ResId( WN_BASICKEYWORD, *rResId.GetResMgr())), 614 aBasicErrorFT(this, ResId( FT_BASICERROR, *rResId.GetResMgr())), 615 aBasicErrorLB(this, ResId( LB_BASICERROR, *rResId.GetResMgr())), 616 aBasicErrorWN(this, ResId( WN_BASICERROR, *rResId.GetResMgr())), 617 618 aSQLBackWN(this), 619 aSQLFT(this, ResId( FT_SQL_COMMAND, *rResId.GetResMgr())), 620 aSQLIdentifierFT(this, ResId( FT_SQLIDENTIFIER, *rResId.GetResMgr())), 621 aSQLIdentifierLB(this, ResId( LB_SQLIDENTIFIER, *rResId.GetResMgr())), 622 aSQLIdentifierWN(this, ResId( WN_SQLIDENTIFIER, *rResId.GetResMgr())), 623 624 aSQLNumberFT(this, ResId( FT_SQLNUMBER, *rResId.GetResMgr())), 625 aSQLNumberLB(this, ResId( LB_SQLNUMBER, *rResId.GetResMgr())), 626 aSQLNumberWN(this, ResId( WN_SQLNUMBER, *rResId.GetResMgr())), 627 628 aSQLStringFT(this, ResId( FT_SQLSTRING, *rResId.GetResMgr())), 629 aSQLStringLB(this, ResId( LB_SQLSTRING, *rResId.GetResMgr())), 630 aSQLStringWN(this, ResId( WN_SQLSTRING, *rResId.GetResMgr())), 631 632 aSQLOperatorFT(this, ResId( FT_SQLOPERATOR, *rResId.GetResMgr())), 633 aSQLOperatorLB(this, ResId( LB_SQLOPERATOR, *rResId.GetResMgr())), 634 aSQLOperatorWN(this, ResId( WN_SQLOPERATOR, *rResId.GetResMgr())), 635 636 aSQLKeywordFT(this, ResId( FT_SQLKEYWORD, *rResId.GetResMgr())), 637 aSQLKeywordLB(this, ResId( LB_SQLKEYWORD, *rResId.GetResMgr())), 638 aSQLKeywordWN(this, ResId( WN_SQLKEYWORD, *rResId.GetResMgr())), 639 640 aSQLParameterFT(this, ResId( FT_SQLPARAMETER, *rResId.GetResMgr())), 641 aSQLParameterLB(this, ResId( LB_SQLPARAMETER, *rResId.GetResMgr())), 642 aSQLParameterWN(this, ResId( WN_SQLPARAMETER, *rResId.GetResMgr())), 643 644 aSQLCommentFT(this, ResId( FT_SQLCOMMENT, *rResId.GetResMgr())), 645 aSQLCommentLB(this, ResId( LB_SQLCOMMENT, *rResId.GetResMgr())), 646 aSQLCommentWN(this, ResId( WN_SQLCOMMENT, *rResId.GetResMgr())) 647 { 648 aFixedTexts.resize(ColorConfigEntryCount); 649 aCheckBoxes.resize(ColorConfigEntryCount); 650 aColorBoxes.resize(ColorConfigEntryCount); 651 aWindows.resize(ColorConfigEntryCount); 652 653 aFixedTexts[DOCCOLOR ] = &aDocColorFT; 654 aCheckBoxes[DOCBOUNDARIES ] = &aDocBoundCB ; 655 aFixedTexts[APPBACKGROUND ] = &aAppBackFT; 656 aCheckBoxes[OBJECTBOUNDARIES ] = &aObjBoundCB ; 657 aCheckBoxes[TABLEBOUNDARIES ] = &aTableBoundCB ; 658 aFixedTexts[FONTCOLOR ] = &aFontColorFT ; 659 aCheckBoxes[LINKS ] = &aLinksCB ; 660 aCheckBoxes[LINKSVISITED ] = &aLinksVisitedCB ; 661 aFixedTexts[SPELL ]=& aSpellFT; 662 aFixedTexts[SMARTTAGS ]=& aSmarttagsFT; 663 aFixedTexts[WRITERTEXTGRID ]=& aWrtTextGridFT; 664 aCheckBoxes[WRITERFIELDSHADINGS ] = &aWrtFieldCB ; 665 aCheckBoxes[WRITERIDXSHADINGS ] = &aWrtIdxShadingBackCB ; 666 aFixedTexts[WRITERDIRECTCURSOR ]=& aWrtDirectCrsrFT; 667 aFixedTexts[WRITERSCRIPTINDICATOR ]=& aWrtScriptIndicatorFT; 668 aCheckBoxes[WRITERSECTIONBOUNDARIES ]=& aWrtSectionBoundCB; 669 aFixedTexts[HTMLSGML ]=& aHTMLSGMLFT; 670 aFixedTexts[HTMLCOMMENT ]=& aHTMLCommentFT; 671 aFixedTexts[HTMLKEYWORD ]=& aHTMLKeywdFT; 672 aFixedTexts[HTMLUNKNOWN ]=& aHTMLUnknownFT; 673 aFixedTexts[CALCGRID ] = &aCalcGridFT ; 674 aFixedTexts[CALCPAGEBREAK ] = &aCalcPageBreakFT; 675 aFixedTexts[CALCPAGEBREAKMANUAL ] = &aCalcPageBreakManualFT; 676 aFixedTexts[CALCPAGEBREAKAUTOMATIC ] = &aCalcPageBreakAutoFT; 677 aFixedTexts[CALCDETECTIVE ]=& aCalcDetectiveFT; 678 aFixedTexts[CALCDETECTIVEERROR ]=& aCalcDetectiveErrorFT; 679 aFixedTexts[CALCREFERENCE ]=& aCalcReferenceFT; 680 aFixedTexts[CALCNOTESBACKGROUND ]=& aCalcNotesBackFT; 681 aFixedTexts[WRITERPAGEBREAKS] = &aWrtPageBreaksFT; 682 aFixedTexts[DRAWGRID ] = &aDrawGridFT ; 683 aFixedTexts[BASICIDENTIFIER ] = &aBasicIdentifierFT; 684 aFixedTexts[BASICCOMMENT ] = &aBasicCommentFT; 685 aFixedTexts[BASICNUMBER ] = &aBasicNumberFT; 686 aFixedTexts[BASICSTRING ] = &aBasicStringFT; 687 aFixedTexts[BASICOPERATOR ] = &aBasicOperatorFT; 688 aFixedTexts[BASICKEYWORD ] = &aBasicKeywordFT; 689 aFixedTexts[BASICERROR ] = &aBasicErrorFT; 690 aFixedTexts[SQLIDENTIFIER ] = &aSQLIdentifierFT; 691 aFixedTexts[SQLNUMBER ] = &aSQLNumberFT; 692 aFixedTexts[SQLSTRING ] = &aSQLStringFT; 693 aFixedTexts[SQLOPERATOR ] = &aSQLOperatorFT; 694 aFixedTexts[SQLKEYWORD ] = &aSQLKeywordFT; 695 aFixedTexts[SQLPARAMETER ] = &aSQLParameterFT; 696 aFixedTexts[SQLCOMMENT ] = &aSQLCommentFT; 697 698 aColorBoxes[DOCCOLOR ] = &aDocColorLB ; 699 aColorBoxes[DOCBOUNDARIES ] = &aDocBoundLB ; 700 aColorBoxes[APPBACKGROUND ] = &aAppBackLB ; 701 aColorBoxes[OBJECTBOUNDARIES ] = &aObjBoundLB ; 702 aColorBoxes[TABLEBOUNDARIES ] = &aTableBoundLB ; 703 aColorBoxes[FONTCOLOR ] = &aFontColorLB ; 704 aColorBoxes[LINKS ] = &aLinksLB ; 705 aColorBoxes[LINKSVISITED ] = &aLinksVisitedLB ; 706 aColorBoxes[SPELL ] = &aSpellLB ; 707 aColorBoxes[SMARTTAGS ] = &aSmarttagsLB ; 708 aColorBoxes[WRITERTEXTGRID ] = &aWrtTextGridLB ; 709 aColorBoxes[WRITERFIELDSHADINGS ] = &aWrtFieldLB ; 710 aColorBoxes[WRITERIDXSHADINGS ] = &aWrtIdxShadingBackLB ; 711 aColorBoxes[WRITERDIRECTCURSOR ] = &aWrtDirectCrsrLB ; 712 aColorBoxes[WRITERSCRIPTINDICATOR ] = &aWrtScriptIndicatorLB ; 713 aColorBoxes[WRITERSECTIONBOUNDARIES ] = &aWrtSectionBoundLB ; 714 aColorBoxes[WRITERPAGEBREAKS] = &aWrtPageBreaksLB; 715 aColorBoxes[HTMLSGML ] = &aHTMLSGMLLB ; 716 aColorBoxes[HTMLCOMMENT ] = &aHTMLCommentLB ; 717 aColorBoxes[HTMLKEYWORD ] = &aHTMLKeywdLB ; 718 aColorBoxes[HTMLUNKNOWN ] = &aHTMLUnknownLB ; 719 aColorBoxes[CALCGRID ] = &aCalcGridLB ; 720 aColorBoxes[CALCPAGEBREAK ] = &aCalcPageBreakLB ; 721 aColorBoxes[CALCPAGEBREAKMANUAL ] = &aCalcPageBreakManualLB ; 722 aColorBoxes[CALCPAGEBREAKAUTOMATIC]= &aCalcPageBreakAutoLB ; 723 aColorBoxes[CALCDETECTIVE ] = &aCalcDetectiveLB ; 724 aColorBoxes[CALCDETECTIVEERROR ] = &aCalcDetectiveErrorLB ; 725 aColorBoxes[CALCREFERENCE ] = &aCalcReferenceLB ; 726 aColorBoxes[CALCNOTESBACKGROUND ] = &aCalcNotesBackLB ; 727 aColorBoxes[DRAWGRID ] = &aDrawGridLB ; 728 aColorBoxes[BASICIDENTIFIER ] = &aBasicIdentifierLB; 729 aColorBoxes[BASICCOMMENT ] = &aBasicCommentLB; 730 aColorBoxes[BASICNUMBER ] = &aBasicNumberLB; 731 aColorBoxes[BASICSTRING ] = &aBasicStringLB; 732 aColorBoxes[BASICOPERATOR ] = &aBasicOperatorLB; 733 aColorBoxes[BASICKEYWORD ] = &aBasicKeywordLB; 734 aColorBoxes[BASICERROR ] = &aBasicErrorLB; 735 aColorBoxes[SQLIDENTIFIER ] = &aSQLIdentifierLB; 736 aColorBoxes[SQLNUMBER ] = &aSQLNumberLB; 737 aColorBoxes[SQLSTRING ] = &aSQLStringLB; 738 aColorBoxes[SQLOPERATOR ] = &aSQLOperatorLB; 739 aColorBoxes[SQLKEYWORD ] = &aSQLKeywordLB; 740 aColorBoxes[SQLPARAMETER ] = &aSQLParameterLB; 741 aColorBoxes[SQLCOMMENT ] = &aSQLCommentLB; 742 743 aWindows[DOCCOLOR ] = &aDocColorWN ; 744 aWindows[DOCBOUNDARIES ] = &aDocBoundWN ; 745 aWindows[APPBACKGROUND ] = &aAppBackWN ; 746 aWindows[OBJECTBOUNDARIES ] = &aObjBoundWN ; 747 aWindows[TABLEBOUNDARIES ] = &aTableBoundWN ; 748 aWindows[FONTCOLOR ] = &aFontColorWN ; 749 aWindows[LINKS ] = &aLinksWN ; 750 aWindows[LINKSVISITED ] = &aLinksVisitedWN ; 751 aWindows[SPELL ] = &aSpellWN ; 752 aWindows[SMARTTAGS ] = &aSmarttagsWN ; 753 aWindows[WRITERTEXTGRID ] = &aWrtTextGridWN ; 754 aWindows[WRITERFIELDSHADINGS ] = &aWrtFieldWN ; 755 aWindows[WRITERIDXSHADINGS ] = &aWrtIdxShadingBackWN ; 756 aWindows[WRITERDIRECTCURSOR ] = &aWrtDirectCrsrWN ; 757 aWindows[WRITERSCRIPTINDICATOR ] = &aWrtScriptIndicatorWN ; 758 aWindows[WRITERSECTIONBOUNDARIES ] = &aWrtSectionBoundWN ; 759 aWindows[WRITERPAGEBREAKS] = &aWrtPageBreaksWN; 760 aWindows[HTMLSGML ] = &aHTMLSGMLWN ; 761 aWindows[HTMLCOMMENT ] = &aHTMLCommentWN ; 762 aWindows[HTMLKEYWORD ] = &aHTMLKeywdWN ; 763 aWindows[HTMLUNKNOWN ] = &aHTMLUnknownWN ; 764 aWindows[CALCGRID ] = &aCalcGridWN ; 765 aWindows[CALCPAGEBREAK ] = &aCalcPageBreakWN ; 766 aWindows[CALCPAGEBREAKMANUAL ] = &aCalcPageBreakManualWN ; 767 aWindows[CALCPAGEBREAKAUTOMATIC] = &aCalcPageBreakAutoWN ; 768 aWindows[CALCDETECTIVE ] = &aCalcDetectiveWN ; 769 aWindows[CALCDETECTIVEERROR ] = &aCalcDetectiveErrorWN ; 770 aWindows[CALCREFERENCE ] = &aCalcReferenceWN ; 771 aWindows[CALCNOTESBACKGROUND ] = &aCalcNotesBackWN ; 772 aWindows[DRAWGRID ] = &aDrawGridWN ; 773 aWindows[BASICIDENTIFIER ] = &aBasicIdentifierWN; 774 aWindows[BASICCOMMENT ] = &aBasicCommentWN; 775 aWindows[BASICNUMBER ] = &aBasicNumberWN; 776 aWindows[BASICSTRING ] = &aBasicStringWN; 777 aWindows[BASICOPERATOR ] = &aBasicOperatorWN; 778 aWindows[BASICKEYWORD ] = &aBasicKeywordWN; 779 aWindows[BASICERROR ] = &aBasicErrorWN; 780 aWindows[SQLIDENTIFIER ] = &aSQLIdentifierWN; 781 aWindows[SQLNUMBER ] = &aSQLNumberWN; 782 aWindows[SQLSTRING ] = &aSQLStringWN; 783 aWindows[SQLOPERATOR ] = &aSQLOperatorWN; 784 aWindows[SQLKEYWORD ] = &aSQLKeywordWN; 785 aWindows[SQLPARAMETER ] = &aSQLParameterWN; 786 aWindows[SQLCOMMENT ] = &aSQLCommentWN; 787 788 aChapters.push_back(&aGeneralFT); aChapterWins.push_back(&aGeneralBackWN); 789 aChapters.push_back(&aWriterFT); aChapterWins.push_back(&aWriterBackWN); 790 aChapters.push_back(&aHTMLFT); aChapterWins.push_back(&aHTMLBackWN); 791 aChapters.push_back(&aCalcFT); aChapterWins.push_back(&aCalcBackWN); 792 aChapters.push_back(&aDrawFT); aChapterWins.push_back(&aDrawBackWN); 793 aChapters.push_back(&aBasicFT); aChapterWins.push_back(&aBasicBackWN); 794 aChapters.push_back(&aSQLFT); aChapterWins.push_back(&aSQLBackWN); 795 796 // calculate heights of groups which can be hidden 797 aChapters[GROUP_WRITER ]->SetGroupHeight( aChapters[GROUP_HTML]->GetPosPixel().Y() - aChapters[GROUP_WRITER]->GetPosPixel().Y() ); 798 aChapters[GROUP_HTML ]->SetGroupHeight( aChapters[GROUP_CALC]->GetPosPixel().Y() - aChapters[GROUP_HTML]->GetPosPixel().Y() ); 799 aChapters[GROUP_CALC ]->SetGroupHeight( aChapters[GROUP_DRAW]->GetPosPixel().Y() - aChapters[GROUP_CALC]->GetPosPixel().Y() ); 800 aChapters[GROUP_DRAW ]->SetGroupHeight( aChapters[GROUP_BASIC]->GetPosPixel().Y() - aChapters[GROUP_DRAW]->GetPosPixel().Y() ); 801 aChapters[GROUP_BASIC ]->SetGroupHeight( aChapters[GROUP_SQL]->GetPosPixel().Y() - aChapters[GROUP_BASIC]->GetPosPixel().Y() ); 802 803 ExtendedColorConfig aExtConfig; 804 sal_Int32 nExtCount = aExtConfig.GetComponentCount(); 805 if ( nExtCount ) 806 { 807 // calculate position behind last chapter 808 sal_Int32 nLastY = aSQLCommentWN.GetPosPixel().Y() + aSQLCommentWN.GetSizePixel().Height(); 809 nLastY = nLastY + LogicToPixel( Size( 0, 3 ), MAP_APPFONT ).Height(); 810 // to calculate the number of lines 811 sal_Int32 nHeight = LogicToPixel( Size( 0, _LINE_HEIGHT ), MAP_APPFONT ).Height(); 812 sal_Int32 nLineNum = nLastY / nHeight; 813 814 Point aFixedPos = LogicToPixel( Point( _FT_XPOS, nLineNum * _LINE_HEIGHT ), MAP_APPFONT ); 815 Point aLBPos = LogicToPixel( Point( _LB_XPOS, nLineNum * _LINE_HEIGHT ), MAP_APPFONT ); 816 Size aFixedSize = LogicToPixel( Size( _FT_WIDTH , _FT_HEIGHT ), MAP_APPFONT ); 817 Size aLBSize = LogicToPixel( Size( _LB_WIDTH , _LB_HEIGHT ), MAP_APPFONT ); 818 Size aWinSize = LogicToPixel( Size( _WN_WIDTH , _WN_HEIGHT ), MAP_APPFONT ); 819 820 for (sal_Int32 j = 0; j < nExtCount; ++j) 821 { 822 ::rtl::OUString sComponentName = aExtConfig.GetComponentName(j); 823 aChapterWins.push_back(new Window(this)); 824 ::boost::shared_ptr<SvxExtFixedText_Impl> pTitle(new SvxExtFixedText_Impl(this,ResId(FT_SQL_COMMAND, *rResId.GetResMgr()))); 825 m_aExtensionTitles.push_back(pTitle); 826 pTitle->SetPosSizePixel(LogicToPixel( Point( _FT_XPOS, nLineNum * _LINE_HEIGHT ), MAP_APPFONT ),aFixedSize); 827 pTitle->SetText(aExtConfig.GetComponentDisplayName(sComponentName)); 828 aChapters.push_back(pTitle.get()); 829 ++nLineNum; 830 sal_Int32 nColorCount = aExtConfig.GetComponentColorCount(sComponentName); 831 for (sal_Int32 i = 0; i < nColorCount; ++i,++nLineNum) 832 { 833 ExtendedColorConfigValue aColorEntry = aExtConfig.GetComponentColorConfigValue(sComponentName,i); 834 FixedText* pFixedText = new FixedText(this,ResId(FT_BASICERROR, *rResId.GetResMgr())); 835 pFixedText->SetPosSizePixel(LogicToPixel( Point( _FT_XPOS, nLineNum * _LINE_HEIGHT ), MAP_APPFONT ),aFixedSize); 836 pFixedText->SetText(aColorEntry.getDisplayName()); 837 aFixedTexts.push_back(pFixedText); 838 aCheckBoxes.push_back(NULL); // no checkboxes 839 ColorListBox* pColorBox = new ColorListBox(this,ResId(LB_BASICERROR, *rResId.GetResMgr())); 840 pColorBox->SetPosSizePixel(LogicToPixel( Point( _LB_XPOS, nLineNum * _LINE_HEIGHT ), MAP_APPFONT ),aLBSize); 841 aColorBoxes.push_back(pColorBox); 842 Window* pWin = new Window(this,ResId(WN_BASICERROR, *rResId.GetResMgr())); 843 pWin->SetPosSizePixel(LogicToPixel( Point( _WN_XPOS, nLineNum * _LINE_HEIGHT ), MAP_APPFONT ),aWinSize); 844 aWindows.push_back(pWin); 845 } // for (sal_Int32 i = 0; i < nExtCount; ++i,++nLineNum) 846 } 847 } 848 849 FreeResource(); 850 851 Color TempColor(COL_TRANSPARENT); 852 Wallpaper aTransparentWall(TempColor); 853 sal_Int32 nWinWidth = GetSizePixel().Width(); 854 sal_Int32 nFTHeight = aChapters[0]->GetSizePixel().Height(); 855 Color aBackColor; 856 const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); 857 sal_Bool bHighContrast = rStyleSettings.GetHighContrastMode(); 858 if ( bHighContrast ) 859 aBackColor = rStyleSettings.GetShadowColor(); 860 else 861 aBackColor = Color( COL_LIGHTGRAY); 862 sal_Int32 nCount = aChapterWins.size(); 863 for(sal_Int32 i = 0; i < nCount; ++i) 864 { 865 if ( lcl_isGroupVisible( i, m_aModuleOptions ) ) 866 { 867 Font aFont = aChapters[i]->GetFont(); 868 aFont.SetWeight(WEIGHT_BOLD); 869 aChapters[i]->SetFont(aFont); 870 aChapters[i]->SetBackground(aTransparentWall); 871 aChapterWins[i]->SetPosSizePixel( Point(0, aChapters[i]->GetPosPixel().Y()), 872 Size(nWinWidth, nFTHeight)); 873 aChapterWins[i]->SetBackground(Wallpaper(aBackColor)); 874 aChapterWins[i]->Show(); 875 } 876 else 877 { 878 aChapters[i]->Hide(); 879 aChapterWins[i]->Hide(); 880 } 881 } 882 Color aTextColor; 883 sal_Bool bSetTextColor = sal_False; 884 //#104195# when the window color is the same as the text color it has to be changed 885 Color aWinCol = rStyleSettings.GetWindowColor(); 886 Color aRCheckCol = rStyleSettings.GetRadioCheckTextColor(); 887 if(aWinCol == aRCheckCol ) 888 { 889 bSetTextColor = sal_True; 890 aRCheckCol.Invert(); 891 //if inversion didn't work (gray) then it's set to black 892 if(aRCheckCol == aWinCol) 893 aRCheckCol = Color(COL_BLACK); 894 } // if(aWinCol == aRCheckCol ) 895 nCount = aFixedTexts.size(); 896 sal_Int16 nGroup = GROUP_UNKNOWN; 897 for( sal_Int32 i = 0; i < nCount; i++ ) 898 { 899 if(ANCHOR == i) 900 continue; 901 sal_Int16 nNewGroup = lcl_getGroup(i); 902 sal_Bool bShow = lcl_isGroupVisible( nNewGroup, m_aModuleOptions ); 903 904 if ( nNewGroup > nGroup ) 905 { 906 nGroup = nNewGroup; 907 if ( bShow && nGroup >= GROUP_CALC ) 908 { 909 SetNewPosition( i, aChapters[nGroup] ); 910 SetNewPosition( i, aChapterWins[nGroup] ); 911 } 912 } 913 if(aCheckBoxes[i]) 914 { 915 if ( bShow ) 916 SetNewPosition( i, aCheckBoxes[i] ); 917 else 918 aCheckBoxes[i]->Hide(); 919 aCheckBoxes[i]->SetBackground(aTransparentWall); 920 aCheckBoxes[i]->SetHelpId( aColorCBHids[i] ); 921 if(bSetTextColor) 922 aCheckBoxes[i]->SetTextColor(aRCheckCol); 923 } 924 if(aFixedTexts[i]) 925 { 926 if ( bShow ) 927 SetNewPosition( i, aFixedTexts[i] ); 928 else 929 aFixedTexts[i]->Hide(); 930 aFixedTexts[i]->SetBackground(aTransparentWall); 931 if(bSetTextColor) 932 aFixedTexts[i]->SetTextColor(aRCheckCol); 933 } 934 if(aWindows[i]) 935 { 936 if ( bShow ) 937 SetNewPosition( i, aWindows[i] ); 938 else 939 aWindows[i]->Hide(); 940 aWindows[i]->SetBorderStyle(WINDOW_BORDER_MONO); 941 } 942 943 if ( aColorBoxes[i] ) 944 { 945 if ( bShow ) 946 SetNewPosition( i, aColorBoxes[i] ); 947 else 948 aColorBoxes[i]->Hide(); 949 } 950 } 951 952 XColorTable aColorTable( SvtPathOptions().GetPalettePath() ); 953 aColorBoxes[0]->InsertAutomaticEntry(); 954 for( sal_Int32 i = 0; i < aColorTable.Count(); i++ ) 955 { 956 XColorEntry* pEntry = aColorTable.GetColor(i); 957 aColorBoxes[0]->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); 958 } 959 960 aColorBoxes[0]->SetHelpId( aColorLBHids[0] ); 961 962 for( sal_Int32 i = 1; i < nCount; i++ ) 963 { 964 if(aColorBoxes[i]) 965 { 966 aColorBoxes[i]->CopyEntries( *aColorBoxes[0] ); 967 if( i < sal_Int32(sizeof(aColorLBHids)/sizeof(aColorLBHids[0])) ) 968 aColorBoxes[i]->SetHelpId( aColorLBHids[i] ); 969 } 970 } 971 } 972 /* -----------------------------27.03.2002 11:04------------------------------ 973 974 ---------------------------------------------------------------------------*/ 975 ColorConfigWindow_Impl::~ColorConfigWindow_Impl() 976 { 977 aChapters.clear(); 978 ::std::vector< SvxExtFixedText_Impl*>().swap(aChapters); 979 980 981 sal_Int32 nCount = aFixedTexts.size(); 982 for (sal_Int32 i = ColorConfigEntryCount; i < nCount; ++i) 983 { 984 delete aFixedTexts[i]; 985 delete aCheckBoxes[i]; 986 delete aColorBoxes[i]; 987 delete aWindows[i]; 988 } 989 for (sal_uInt32 i = GROUP_COUNT; i < aChapterWins.size(); ++i) 990 delete aChapterWins[i]; 991 aChapterWins.clear(); 992 ::std::vector< Window*>().swap(aChapterWins); 993 } 994 /* -----------------------------2002/06/20 12:48------------------------------ 995 996 ---------------------------------------------------------------------------*/ 997 void ColorConfigWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt ) 998 { 999 Window::DataChanged( rDCEvt ); 1000 if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && 1001 (rDCEvt.GetFlags() & SETTINGS_STYLE) ) 1002 { 1003 const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); 1004 sal_Bool bHighContrast = rStyleSettings.GetHighContrastMode(); 1005 Color aBackColor( bHighContrast ? COL_TRANSPARENT : COL_LIGHTGRAY); 1006 ::std::vector< Window* >::iterator aIter = aChapterWins.begin(); 1007 ::std::vector< Window* >::iterator aEnd = aChapterWins.end(); 1008 for(;aIter != aEnd; ++aIter ) 1009 (*aIter)->SetBackground(Wallpaper(aBackColor)); 1010 SetBackground(Wallpaper(rStyleSettings.GetWindowColor())); 1011 } 1012 } 1013 /* -----------------------------2002/06/26 10:49------------------------------ 1014 1015 ---------------------------------------------------------------------------*/ 1016 void SvxExtFixedText_Impl::DataChanged(const DataChangedEvent& rDCEvt) 1017 { 1018 FixedText::DataChanged(rDCEvt); 1019 Color TempColor(COL_TRANSPARENT); 1020 Wallpaper aTransparentWall(TempColor); 1021 if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && 1022 (rDCEvt.GetFlags() & SETTINGS_STYLE) ) 1023 { 1024 Font aFont = GetFont(); 1025 aFont.SetWeight(WEIGHT_BOLD); 1026 SetFont(aFont); 1027 SetBackground(aTransparentWall); 1028 } 1029 } 1030 1031 void ColorConfigWindow_Impl::SetNewPosition( sal_Int32 _nFeature, Window* _pWin ) 1032 { 1033 DBG_ASSERT( _pWin, "ColorConfigWindow_Impl::SetNewPosition(): no window" ); 1034 1035 // calculate the overall height of the invisible groups 1036 long nDelta = 0; 1037 sal_Int16 nGroup = lcl_getGroup( _nFeature ) - 1; 1038 while ( nGroup > 0 ) // GROUP_GENERAL (0) is always visible 1039 { 1040 if ( !lcl_isGroupVisible( nGroup, m_aModuleOptions ) ) 1041 nDelta += aChapters[nGroup]->GetGroupHeight(); 1042 nGroup--; 1043 } 1044 1045 // move this window to its new position 1046 if ( nDelta > 0 ) 1047 { 1048 Point aPos = _pWin->GetPosPixel(); 1049 aPos.Y() -= nDelta; 1050 _pWin->SetPosPixel( aPos ); 1051 } 1052 } 1053 1054 /* -----------------------------08.04.2002 17:10------------------------------ 1055 1056 ---------------------------------------------------------------------------*/ 1057 void ColorConfigWindow_Impl::Command( const CommandEvent& rCEvt ) 1058 { 1059 GetParent()->Command(rCEvt); 1060 } 1061 /* -----------------------------25.03.2002 10:44------------------------------ 1062 1063 ---------------------------------------------------------------------------*/ 1064 class ColorConfigCtrl_Impl : public Control 1065 { 1066 HeaderBar aHeaderHB; 1067 ScrollBar aVScroll; 1068 1069 String sOn; 1070 String sUIElem; 1071 String sColSetting; 1072 String sPreview; 1073 ColorConfigWindow_Impl aScrollWindow; 1074 1075 EditableColorConfig* pColorConfig; 1076 EditableExtendedColorConfig* pExtColorConfig; 1077 1078 long nScrollPos; 1079 1080 DECL_LINK(ScrollHdl, ScrollBar*); 1081 DECL_LINK(ClickHdl, CheckBox*); 1082 DECL_LINK(ColorHdl, ColorListBox*); 1083 DECL_LINK(ControlFocusHdl, Control*); 1084 1085 virtual long PreNotify( NotifyEvent& rNEvt ); 1086 virtual void Command( const CommandEvent& rCEvt ); 1087 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 1088 public: 1089 ColorConfigCtrl_Impl(Window* pParent, const ResId& rResId ); 1090 ~ColorConfigCtrl_Impl(); 1091 1092 void SetConfig(EditableColorConfig& rConfig) {pColorConfig = &rConfig;} 1093 void SetExtendedConfig(EditableExtendedColorConfig& rConfig) {pExtColorConfig = &rConfig;} 1094 void Update(); 1095 sal_Int32 GetScrollPosition() {return aVScroll.GetThumbPos();} 1096 void SetScrollPosition(sal_Int32 nSet) 1097 { 1098 aVScroll.SetThumbPos(nSet); 1099 ScrollHdl(&aVScroll); 1100 } 1101 }; 1102 /* -----------------------------25.03.2002 17:09------------------------------ 1103 1104 ---------------------------------------------------------------------------*/ 1105 ColorConfigCtrl_Impl::ColorConfigCtrl_Impl( 1106 Window* pParent, const ResId& rResId) : 1107 Control(pParent, rResId), 1108 1109 1110 aHeaderHB(this, WB_BUTTONSTYLE | WB_BOTTOMBORDER), 1111 aVScroll(this, ResId(VB_VSCROLL, *rResId.GetResMgr())), 1112 sOn( ResId(ST_ON, *rResId.GetResMgr())), 1113 sUIElem( ResId(ST_UIELEM, *rResId.GetResMgr())), 1114 sColSetting( ResId(ST_COLSET, *rResId.GetResMgr())), 1115 sPreview( ResId(ST_PREVIEW, *rResId.GetResMgr())), 1116 aScrollWindow(this, ResId(WN_SCROLL, *rResId.GetResMgr())), 1117 1118 pColorConfig(0), 1119 pExtColorConfig(0), 1120 nScrollPos(0) 1121 { 1122 FreeResource(); 1123 1124 const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); 1125 aScrollWindow.SetBackground(Wallpaper(rStyleSettings.GetFieldColor())); 1126 aScrollWindow.SetHelpId( HID_OPTIONS_COLORCONFIG_COLORLIST_WIN ); 1127 aVScroll.EnableDrag(); 1128 aVScroll.Show(); 1129 aHeaderHB.SetPosSizePixel( 1130 Point(0,0), 1131 Size(GetOutputSizePixel().Width(), aVScroll.GetPosPixel().Y())); 1132 sal_Int32 nFirstWidth = aScrollWindow.aGeneralFT.GetPosPixel().X(); 1133 sal_Int32 nSecondWidth = aScrollWindow.aColorBoxes[0]->GetPosPixel().X() - nFirstWidth; 1134 sal_Int32 nThirdWidth = aScrollWindow.aWindows[0]->GetPosPixel().X() - nFirstWidth - nSecondWidth; 1135 1136 const WinBits nHeadBits = HIB_VCENTER | HIB_FIXED| HIB_FIXEDPOS; 1137 aHeaderHB.InsertItem( 1, sOn, nFirstWidth, (sal_uInt16)nHeadBits|HIB_CENTER); 1138 aHeaderHB.InsertItem( 2, sUIElem, nSecondWidth, (sal_uInt16)nHeadBits|HIB_LEFT); 1139 aHeaderHB.InsertItem( 3, sColSetting, nThirdWidth, (sal_uInt16)nHeadBits|HIB_LEFT); 1140 aHeaderHB.InsertItem( 4, sPreview, 1141 aHeaderHB.GetSizePixel().Width() - nFirstWidth - nSecondWidth - nThirdWidth, (sal_uInt16)nHeadBits|HIB_LEFT); 1142 aHeaderHB.Show(); 1143 1144 aVScroll.SetRangeMin(0); 1145 sal_Int32 nScrollOffset = aScrollWindow.aColorBoxes[1]->GetPosPixel().Y() - aScrollWindow.aColorBoxes[0]->GetPosPixel().Y(); 1146 sal_Int32 nVisibleEntries = aScrollWindow.GetSizePixel().Height() / nScrollOffset; 1147 1148 aVScroll.SetRangeMax(aScrollWindow.aCheckBoxes.size() + aScrollWindow.aChapters.size() ); 1149 // static: minus three for ANCHOR, DRAWFILL and DRAWDRAWING 1150 aVScroll.SetRangeMax( aVScroll.GetRangeMax() - 3 ); 1151 // dynamic: calculate the hidden lines 1152 long nInvisibleLines = 0; 1153 sal_Int16 nGroup = GROUP_UNKNOWN; 1154 sal_Int32 nCount = aScrollWindow.aCheckBoxes.size(); 1155 for ( sal_Int32 i = 0; i < nCount; i++ ) 1156 { 1157 if ( ANCHOR == i || DRAWFILL == i || DRAWDRAWING == i ) // not used at the moment 1158 continue; 1159 sal_Int16 nNewGroup = lcl_getGroup(i); 1160 sal_Bool bVisible = lcl_isGroupVisible( nNewGroup, aScrollWindow.GetModuleOptions() ); 1161 if ( !bVisible ) 1162 nInvisibleLines++; 1163 if ( nNewGroup > nGroup ) 1164 { 1165 nGroup = nNewGroup; 1166 if ( !bVisible ) 1167 nInvisibleLines++; 1168 } 1169 } 1170 aVScroll.SetRangeMax( aVScroll.GetRangeMax() - nInvisibleLines ); 1171 1172 aVScroll.SetPageSize( nVisibleEntries - 1 ); 1173 aVScroll.SetVisibleSize(nVisibleEntries); 1174 Link aScrollLink = LINK(this, ColorConfigCtrl_Impl, ScrollHdl); 1175 aVScroll.SetScrollHdl(aScrollLink); 1176 aVScroll.SetEndScrollHdl(aScrollLink); 1177 1178 Link aCheckLink = LINK(this, ColorConfigCtrl_Impl, ClickHdl); 1179 Link aColorLink = LINK(this, ColorConfigCtrl_Impl, ColorHdl); 1180 Link aGetFocusLink = LINK(this, ColorConfigCtrl_Impl, ControlFocusHdl); 1181 for( sal_Int16 i = 0; i < nCount; i++ ) 1182 { 1183 if(aScrollWindow.aColorBoxes[i]) 1184 { 1185 aScrollWindow.aColorBoxes[i]->SetSelectHdl(aColorLink); 1186 aScrollWindow.aColorBoxes[i]->SetGetFocusHdl(aGetFocusLink); 1187 } 1188 if(aScrollWindow.aCheckBoxes[i]) 1189 { 1190 aScrollWindow.aCheckBoxes[i]->SetClickHdl(aCheckLink); 1191 aScrollWindow.aCheckBoxes[i]->SetGetFocusHdl(aGetFocusLink); 1192 } 1193 } 1194 } 1195 /* -----------------------------27.03.2002 10:46------------------------------ 1196 1197 ---------------------------------------------------------------------------*/ 1198 ColorConfigCtrl_Impl::~ColorConfigCtrl_Impl() 1199 { 1200 } 1201 /* -----------------------------25.03.2002 17:19------------------------------ 1202 1203 ---------------------------------------------------------------------------*/ 1204 void ColorConfigCtrl_Impl::Update() 1205 { 1206 DBG_ASSERT(pColorConfig, "Configuration not set" ); 1207 sal_Int32 i; 1208 for( i = 0; i < ColorConfigEntryCount; i++ ) 1209 { 1210 if(ANCHOR == i) 1211 continue; 1212 const ColorConfigValue& rColorEntry = pColorConfig->GetColorValue(ColorConfigEntry(i)); 1213 if(COL_AUTO == (sal_uInt32)rColorEntry.nColor) 1214 { 1215 if(aScrollWindow.aColorBoxes[i]) 1216 aScrollWindow.aColorBoxes[i]->SelectEntryPos(0); 1217 if(aScrollWindow.aWindows[i]) 1218 aScrollWindow.aWindows[i]->SetBackground( 1219 Wallpaper(ColorConfig::GetDefaultColor((ColorConfigEntry) i))); 1220 } 1221 else 1222 { 1223 Color aColor(rColorEntry.nColor); 1224 if(aScrollWindow.aColorBoxes[i]) 1225 aScrollWindow.aColorBoxes[i]->SelectEntry( aColor ); 1226 if(aScrollWindow.aWindows[i]) 1227 aScrollWindow.aWindows[i]->SetBackground(Wallpaper(aColor)); 1228 } 1229 if(aScrollWindow.aWindows[i]) 1230 aScrollWindow.aWindows[i]->Invalidate(); 1231 if(aScrollWindow.aCheckBoxes[i]) 1232 aScrollWindow.aCheckBoxes[i]->Check(rColorEntry.bIsVisible); 1233 } // for( i = 0; i < ColorConfigEntryCount; i++ ) 1234 1235 1236 sal_Int32 nExtCount = pExtColorConfig->GetComponentCount(); 1237 sal_Int32 nCount = aScrollWindow.aCheckBoxes.size(); 1238 sal_Int32 nPos = 0; 1239 i = ColorConfigEntryCount; 1240 for (sal_Int32 j = 0; j < nExtCount; ++j) 1241 { 1242 ::rtl::OUString sComponentName = pExtColorConfig->GetComponentName(j); 1243 sal_Int32 nColorCount = pExtColorConfig->GetComponentColorCount(sComponentName); 1244 1245 for( sal_Int32 k = 0; i < nCount && k < nColorCount; ++i ,++nPos,++k) 1246 { 1247 if(aScrollWindow.aColorBoxes[i]) 1248 { 1249 ExtendedColorConfigValue aColorEntry = pExtColorConfig->GetComponentColorConfigValue(sComponentName,k); 1250 Color aColor(aColorEntry.getColor()); 1251 if(aColorEntry.getDefaultColor() == aColorEntry.getColor() ) 1252 { 1253 aScrollWindow.aColorBoxes[i]->SelectEntryPos(0); 1254 } 1255 else 1256 { 1257 aScrollWindow.aColorBoxes[i]->SelectEntry( aColor ); 1258 } 1259 if(aScrollWindow.aWindows[i]) 1260 aScrollWindow.aWindows[i]->SetBackground(Wallpaper(aColor)); 1261 1262 if(aScrollWindow.aWindows[i]) 1263 aScrollWindow.aWindows[i]->Invalidate(); 1264 } 1265 } 1266 } 1267 } 1268 /* -----------------------------26.03.2002 12:55------------------------------ 1269 1270 ---------------------------------------------------------------------------*/ 1271 sal_Bool lcl_MoveAndShow(Window* pWindow, long nOffset, long nMaxVisible, bool _bShow) 1272 { 1273 sal_Bool bHide = sal_True; 1274 if(pWindow) 1275 { 1276 Point aPos = pWindow->GetPosPixel(); 1277 aPos.Y() += nOffset; 1278 pWindow->SetPosPixel(aPos); 1279 if ( _bShow ) 1280 bHide = aPos.Y() > nMaxVisible || (aPos.Y() + pWindow->GetSizePixel().Height()) < 0; 1281 pWindow->Show(!bHide); 1282 } 1283 return !bHide; 1284 } 1285 IMPL_LINK(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar) 1286 { 1287 aScrollWindow.SetUpdateMode(sal_True); 1288 sal_Int16 i; 1289 long nOffset = aScrollWindow.aColorBoxes[1]->GetPosPixel().Y() - aScrollWindow.aColorBoxes[0]->GetPosPixel().Y(); 1290 nOffset *= (nScrollPos - pScrollBar->GetThumbPos()); 1291 nScrollPos = pScrollBar->GetThumbPos(); 1292 const long nWindowHeight = aScrollWindow.GetSizePixel().Height(); 1293 sal_Int16 nFirstVisible = -1; 1294 sal_Int16 nLastVisible = -1; 1295 sal_Int32 nCount = aScrollWindow.aFixedTexts.size(); 1296 for( i = 0; i < nCount; i++ ) 1297 { 1298 if(ANCHOR == i) 1299 continue; 1300 Point aPos; 1301 //controls outside of the view need to be hidden to speed up accessibility tools 1302 bool bShowCtrl = ( lcl_isGroupVisible( 1303 lcl_getGroup(i), aScrollWindow.GetModuleOptions() ) != sal_False ); 1304 lcl_MoveAndShow(aScrollWindow.aCheckBoxes[i], nOffset, nWindowHeight, bShowCtrl); 1305 lcl_MoveAndShow(aScrollWindow.aFixedTexts[i], nOffset, nWindowHeight, bShowCtrl); 1306 lcl_MoveAndShow(aScrollWindow.aWindows[i] , nOffset, nWindowHeight, bShowCtrl); 1307 sal_Bool bShow = lcl_MoveAndShow(aScrollWindow.aColorBoxes[i], nOffset, nWindowHeight, bShowCtrl); 1308 if(bShow) 1309 { 1310 if(nFirstVisible == -1) 1311 nFirstVisible = i; 1312 else 1313 nLastVisible = i; 1314 } 1315 } 1316 //show the one prior to the first visible and the first after the last visble control 1317 //to enable KEY_TAB travelling 1318 1319 if(nFirstVisible) 1320 { 1321 //skip gaps where no controls exist for the related ColorConfigEntry 1322 do 1323 --nFirstVisible; 1324 while(!aScrollWindow.aCheckBoxes[nFirstVisible] && !aScrollWindow.aColorBoxes[nFirstVisible] && nFirstVisible >= 0); 1325 1326 if ( lcl_isGroupVisible( 1327 lcl_getGroup( nFirstVisible ), aScrollWindow.GetModuleOptions() ) != sal_False ) 1328 { 1329 if(aScrollWindow.aCheckBoxes[nFirstVisible]) 1330 aScrollWindow.aCheckBoxes[nFirstVisible]->Show(); 1331 if(aScrollWindow.aColorBoxes[nFirstVisible]) 1332 aScrollWindow.aColorBoxes[nFirstVisible]->Show(); 1333 } 1334 } 1335 1336 if(nLastVisible < nCount - 1) 1337 { 1338 nLastVisible++; 1339 //skip gaps where no controls exist for the related ColorConfigEntry 1340 while(!aScrollWindow.aCheckBoxes[nLastVisible] && !aScrollWindow.aColorBoxes[nLastVisible] && 1341 nLastVisible < nCount - 1 ) 1342 nLastVisible++; 1343 if ( nLastVisible < nCount ) 1344 { 1345 if ( lcl_isGroupVisible( 1346 lcl_getGroup( nLastVisible ), aScrollWindow.GetModuleOptions() ) != sal_False ) 1347 { 1348 if(aScrollWindow.aCheckBoxes[nLastVisible]) 1349 aScrollWindow.aCheckBoxes[nLastVisible]->Show(); 1350 if(aScrollWindow.aColorBoxes[nLastVisible]) 1351 aScrollWindow.aColorBoxes[nLastVisible]->Show(); 1352 } 1353 } 1354 } // if(nLastVisible < nCount - 1) 1355 sal_Int32 nChapterCount = aScrollWindow.aChapters.size(); 1356 for( i = 0; i < nChapterCount; i++ ) 1357 { 1358 Point aPos = aScrollWindow.aChapters[i]->GetPosPixel(); aPos.Y() += nOffset; aScrollWindow.aChapters[i]->SetPosPixel(aPos); 1359 aPos = aScrollWindow.aChapterWins[i]->GetPosPixel(); aPos.Y() += nOffset; aScrollWindow.aChapterWins[i]->SetPosPixel(aPos); 1360 } 1361 aScrollWindow.SetUpdateMode(sal_True); 1362 return 0; 1363 } 1364 /* -----------------------------29.04.2002 17:02------------------------------ 1365 1366 ---------------------------------------------------------------------------*/ 1367 long ColorConfigCtrl_Impl::PreNotify( NotifyEvent& rNEvt ) 1368 { 1369 if(rNEvt.GetType() == EVENT_COMMAND) 1370 { 1371 const CommandEvent* pCEvt = rNEvt.GetCommandEvent(); 1372 sal_uInt16 nCmd = pCEvt->GetCommand(); 1373 if( COMMAND_WHEEL == nCmd ) 1374 { 1375 Command(*pCEvt); 1376 return 1; 1377 } 1378 } 1379 return Control::PreNotify(rNEvt); 1380 } 1381 /* -----------------------------08.04.2002 16:37------------------------------ 1382 1383 ---------------------------------------------------------------------------*/ 1384 void ColorConfigCtrl_Impl::Command( const CommandEvent& rCEvt ) 1385 { 1386 switch ( rCEvt.GetCommand() ) 1387 { 1388 1389 case COMMAND_WHEEL: 1390 case COMMAND_STARTAUTOSCROLL: 1391 case COMMAND_AUTOSCROLL: 1392 { 1393 const CommandWheelData* pWheelData = rCEvt.GetWheelData(); 1394 if(pWheelData && !pWheelData->IsHorz() && COMMAND_WHEEL_ZOOM != pWheelData->GetMode()) 1395 { 1396 HandleScrollCommand( rCEvt, 0, &aVScroll ); 1397 } 1398 } 1399 break; 1400 default: 1401 Control::Command(rCEvt); 1402 } 1403 } 1404 1405 /* -----------------------------14.12.2005 12:37------------------------------ 1406 1407 ---------------------------------------------------------------------------*/ 1408 void ColorConfigCtrl_Impl::DataChanged( const DataChangedEvent& rDCEvt ) 1409 { 1410 Window::DataChanged( rDCEvt ); 1411 if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && 1412 (rDCEvt.GetFlags() & SETTINGS_STYLE) ) 1413 { 1414 const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); 1415 SetBackground(Wallpaper(rStyleSettings.GetFieldColor())); 1416 } 1417 } 1418 1419 1420 /* -----------------------------27.03.2002 11:43------------------------------ 1421 1422 ---------------------------------------------------------------------------*/ 1423 IMPL_LINK(ColorConfigCtrl_Impl, ClickHdl, CheckBox*, pBox) 1424 { 1425 DBG_ASSERT(pColorConfig, "Configuration not set" ); 1426 1427 for( sal_Int32 i = 0; i < ColorConfigEntryCount; i++ ) 1428 { 1429 if(ANCHOR == i) 1430 continue; 1431 if(aScrollWindow.aCheckBoxes[i] == pBox ) 1432 { 1433 ColorConfigValue aBoundCol = pColorConfig->GetColorValue(ColorConfigEntry(i)); 1434 aBoundCol.bIsVisible = pBox->IsChecked(); 1435 pColorConfig->SetColorValue(ColorConfigEntry(i), aBoundCol); 1436 break; 1437 } 1438 } // for( sal_Int32 i = 0; i < ColorConfigEntryCount; i++ ) 1439 return 0; 1440 } 1441 /* -----------------------------27.03.2002 11:43------------------------------ 1442 1443 ---------------------------------------------------------------------------*/ 1444 IMPL_LINK(ColorConfigCtrl_Impl, ColorHdl, ColorListBox*, pBox) 1445 { 1446 DBG_ASSERT(pColorConfig, "Configuration not set" ); 1447 sal_Int32 i = 0; 1448 for( ; i < ColorConfigEntryCount; i++ ) 1449 { 1450 if(pBox && aScrollWindow.aColorBoxes[i] == pBox) 1451 { 1452 ColorConfigValue aColorEntry = pColorConfig->GetColorValue(ColorConfigEntry(i)); 1453 if(!pBox->GetSelectEntryPos()) 1454 { 1455 aColorEntry.nColor = COL_AUTO; 1456 if(aScrollWindow.aWindows[i]) 1457 aScrollWindow.aWindows[i]->SetBackground( 1458 Wallpaper(ColorConfig::GetDefaultColor((ColorConfigEntry) i))); 1459 } 1460 else 1461 { 1462 Color aColor = pBox->GetSelectEntryColor(); // #i14869# no Color&, 'cause it's a ref to a temp object on the stack! 1463 aColorEntry.nColor = aColor.GetColor(); 1464 if(aScrollWindow.aWindows[i]) 1465 aScrollWindow.aWindows[i]->SetBackground(Wallpaper(aColor)); 1466 } 1467 if(aScrollWindow.aWindows[i]) 1468 aScrollWindow.aWindows[i]->Invalidate(); 1469 pColorConfig->SetColorValue(ColorConfigEntry(i), aColorEntry); 1470 break; 1471 } 1472 } // for( sal_Int32 i = 0; i < ColorConfigEntryCount; i++ ) 1473 sal_Int32 nExtCount = pExtColorConfig->GetComponentCount(); 1474 sal_Int32 nCount = aScrollWindow.aCheckBoxes.size(); 1475 sal_Int32 nPos = 0; 1476 i = ColorConfigEntryCount; 1477 for (sal_Int32 j = 0; j < nExtCount; ++j) 1478 { 1479 ::rtl::OUString sComponentName = pExtColorConfig->GetComponentName(j); 1480 sal_Int32 nColorCount = pExtColorConfig->GetComponentColorCount(sComponentName); 1481 1482 for( sal_Int32 k = 0; i < nCount && k < nColorCount; ++i ,++nPos,++k) 1483 { 1484 if(pBox && aScrollWindow.aColorBoxes[i] == pBox) 1485 { 1486 ExtendedColorConfigValue aColorEntry = pExtColorConfig->GetComponentColorConfigValue(sComponentName,k); 1487 Color aColor = pBox->GetSelectEntryColor(); // #i14869# no Color&, 'cause it's a ref to a temp object on the stack! 1488 aColorEntry.setColor(aColor.GetColor()); 1489 if( !pBox->GetSelectEntryPos() ) // auto color 1490 { 1491 aColorEntry.setColor(aColorEntry.getDefaultColor()); 1492 aColor.SetColor(aColorEntry.getColor()); 1493 } 1494 if ( aScrollWindow.aWindows[i] ) 1495 { 1496 aScrollWindow.aWindows[i]->SetBackground(Wallpaper(aColor)); 1497 aScrollWindow.aWindows[i]->Invalidate(); 1498 } 1499 pExtColorConfig->SetColorValue(sComponentName,aColorEntry); 1500 break; 1501 } 1502 } 1503 } 1504 return 0; 1505 } 1506 IMPL_LINK(ColorConfigCtrl_Impl, ControlFocusHdl, Control*, pCtrl) 1507 { 1508 //determine whether a control is completely visible 1509 //and make it visible 1510 Point aCtrlPos(pCtrl->GetPosPixel()); 1511 sal_Int32 nWinHeight = aScrollWindow.GetSizePixel().Height(); 1512 if(0 != (GETFOCUS_TAB & pCtrl->GetGetFocusFlags() && 1513 (aCtrlPos.Y() < 0 || 1514 nWinHeight < aCtrlPos.Y() + aScrollWindow.aColorBoxes[0]->GetSizePixel().Height()))) 1515 { 1516 long nThumbPos = aVScroll.GetThumbPos(); 1517 if(nWinHeight < aCtrlPos.Y() + aScrollWindow.aColorBoxes[0]->GetSizePixel().Height()) 1518 { 1519 //scroll down 1520 nThumbPos +=2; 1521 } 1522 else 1523 { 1524 //scroll up 1525 nThumbPos -= 2; 1526 if(nThumbPos < 0) 1527 nThumbPos = 0; 1528 } 1529 aVScroll.SetThumbPos(nThumbPos); 1530 ScrollHdl(&aVScroll); 1531 } 1532 return 0; 1533 }; 1534 /* -----------------------------25.03.2002 10:47------------------------------ 1535 1536 ---------------------------------------------------------------------------*/ 1537 SvxColorOptionsTabPage::SvxColorOptionsTabPage( 1538 Window* pParent, const SfxItemSet& rCoreSet) : 1539 SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_COLORCONFIG ), rCoreSet ), 1540 aColorSchemeFL( this, CUI_RES( FL_COLORSCHEME ) ), 1541 aColorSchemeFT( this, CUI_RES( FT_COLORSCHEME ) ), 1542 aColorSchemeLB( this, CUI_RES( LB_COLORSCHEME ) ), 1543 aSaveSchemePB( this, CUI_RES( PB_SAVESCHEME) ), 1544 aDeleteSchemePB( this, CUI_RES( PB_DELETESCHEME ) ), 1545 aCustomColorsFL( this, CUI_RES( FL_CUSTOMCOLORS ) ), 1546 bFillItemSetCalled(sal_False), 1547 pColorConfig(0), 1548 pExtColorConfig(0), 1549 pColorConfigCT( new ColorConfigCtrl_Impl(this, CUI_RES( CT_COLORCONFIG ) )) 1550 { 1551 FreeResource(); 1552 aColorSchemeLB.SetSelectHdl(LINK(this, SvxColorOptionsTabPage, SchemeChangedHdl_Impl)); 1553 Link aLk = LINK(this, SvxColorOptionsTabPage, SaveDeleteHdl_Impl ); 1554 aSaveSchemePB.SetClickHdl(aLk); 1555 aDeleteSchemePB.SetClickHdl(aLk); 1556 } 1557 /* -----------------------------25.03.2002 10:47------------------------------ 1558 1559 ---------------------------------------------------------------------------*/ 1560 SvxColorOptionsTabPage::~SvxColorOptionsTabPage() 1561 { 1562 //when the dialog is cancelled but the color scheme ListBox has been changed these 1563 //changes need to be undone 1564 if(!bFillItemSetCalled && aColorSchemeLB.GetSavedValue() != aColorSchemeLB.GetSelectEntryPos()) 1565 { 1566 rtl::OUString sOldScheme = aColorSchemeLB.GetEntry(aColorSchemeLB.GetSavedValue()); 1567 if(sOldScheme.getLength()) 1568 { 1569 pColorConfig->SetCurrentSchemeName(sOldScheme); 1570 pExtColorConfig->SetCurrentSchemeName(sOldScheme); 1571 } 1572 } 1573 delete pColorConfigCT; 1574 pColorConfig->ClearModified(); 1575 pColorConfig->EnableBroadcast(); 1576 delete pColorConfig; 1577 pExtColorConfig->ClearModified(); 1578 pExtColorConfig->EnableBroadcast(); 1579 delete pExtColorConfig; 1580 } 1581 /* -----------------------------25.03.2002 10:47------------------------------ 1582 1583 ---------------------------------------------------------------------------*/ 1584 SfxTabPage* SvxColorOptionsTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet ) 1585 { 1586 return ( new SvxColorOptionsTabPage( pParent, rAttrSet ) ); 1587 } 1588 /* -----------------------------25.03.2002 10:47------------------------------ 1589 1590 ---------------------------------------------------------------------------*/ 1591 sal_Bool SvxColorOptionsTabPage::FillItemSet( SfxItemSet& ) 1592 { 1593 bFillItemSetCalled = sal_True; 1594 if(aColorSchemeLB.GetSavedValue() != aColorSchemeLB.GetSelectEntryPos()) 1595 { 1596 pColorConfig->SetModified(); 1597 pExtColorConfig->SetModified(); 1598 } 1599 if(pColorConfig->IsModified()) 1600 pColorConfig->Commit(); 1601 if(pExtColorConfig->IsModified()) 1602 pExtColorConfig->Commit(); 1603 return sal_True; 1604 } 1605 /* -----------------------------25.03.2002 10:47------------------------------ 1606 1607 ---------------------------------------------------------------------------*/ 1608 void SvxColorOptionsTabPage::Reset( const SfxItemSet& ) 1609 { 1610 if(pColorConfig) 1611 { 1612 pColorConfig->ClearModified(); 1613 pColorConfig->DisableBroadcast(); 1614 delete pColorConfig; 1615 } 1616 pColorConfig = new EditableColorConfig; 1617 pColorConfigCT->SetConfig(*pColorConfig); 1618 1619 if(pExtColorConfig) 1620 { 1621 pExtColorConfig->ClearModified(); 1622 pExtColorConfig->DisableBroadcast(); 1623 delete pExtColorConfig; 1624 } 1625 pExtColorConfig = new EditableExtendedColorConfig; 1626 pColorConfigCT->SetExtendedConfig(*pExtColorConfig); 1627 1628 String sUser = GetUserData(); 1629 //has to be called always to speed up accessibility tools 1630 pColorConfigCT->SetScrollPosition(sUser.ToInt32()); 1631 aColorSchemeLB.Clear(); 1632 uno::Sequence< ::rtl::OUString > aSchemes = pColorConfig->GetSchemeNames(); 1633 const rtl::OUString* pSchemes = aSchemes.getConstArray(); 1634 for(sal_Int32 i = 0; i < aSchemes.getLength(); i++) 1635 aColorSchemeLB.InsertEntry(pSchemes[i]); 1636 aColorSchemeLB.SelectEntry(pColorConfig->GetCurrentSchemeName()); 1637 aColorSchemeLB.SaveValue(); 1638 aDeleteSchemePB.Enable( aSchemes.getLength() > 1 ); 1639 UpdateColorConfig(); 1640 } 1641 /* -----------------------------25.03.2002 10:47------------------------------ 1642 1643 ---------------------------------------------------------------------------*/ 1644 int SvxColorOptionsTabPage::DeactivatePage( SfxItemSet* _pSet ) 1645 { 1646 if ( _pSet ) 1647 FillItemSet( *_pSet ); 1648 return( LEAVE_PAGE ); 1649 } 1650 /* -----------------------------25.03.2002 15:32------------------------------ 1651 1652 ---------------------------------------------------------------------------*/ 1653 void SvxColorOptionsTabPage::UpdateColorConfig() 1654 { 1655 //update the color config control 1656 pColorConfigCT->Update(); 1657 } 1658 /* -----------------------------25.03.2002 15:30------------------------------ 1659 1660 ---------------------------------------------------------------------------*/ 1661 IMPL_LINK(SvxColorOptionsTabPage, SchemeChangedHdl_Impl, ListBox*, pBox) 1662 { 1663 pColorConfig->LoadScheme(pBox->GetSelectEntry()); 1664 pExtColorConfig->LoadScheme(pBox->GetSelectEntry()); 1665 UpdateColorConfig(); 1666 return 0; 1667 } 1668 /* -----------------------------09.04.2002 15:21------------------------------ 1669 1670 ---------------------------------------------------------------------------*/ 1671 IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, PushButton*, pButton ) 1672 { 1673 if(&aSaveSchemePB == pButton) 1674 { 1675 String sName; 1676 //CHINA001 SvxNameDialog aNameDlg(pButton, 1677 //CHINA001 sName, 1678 //CHINA001 String(CUI_RES(RID_SVXSTR_COLOR_CONFIG_SAVE2))); 1679 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); 1680 DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 1681 AbstractSvxNameDialog* aNameDlg = pFact->CreateSvxNameDialog( pButton, 1682 sName, String(CUI_RES(RID_SVXSTR_COLOR_CONFIG_SAVE2)) ); 1683 DBG_ASSERT(aNameDlg, "Dialogdiet fail!");//CHINA001 1684 aNameDlg->SetCheckNameHdl( LINK(this, SvxColorOptionsTabPage, CheckNameHdl_Impl)); 1685 aNameDlg->SetText(String(CUI_RES(RID_SVXSTR_COLOR_CONFIG_SAVE1))); 1686 aNameDlg->SetHelpId(HID_OPTIONS_COLORCONFIG_SAVE_SCHEME); 1687 aNameDlg->SetEditHelpId(HID_OPTIONS_COLORCONFIG_NAME_SCHEME); 1688 aNameDlg->SetCheckNameHdl( LINK(this, SvxColorOptionsTabPage, CheckNameHdl_Impl)); 1689 if(RET_OK == aNameDlg->Execute()) //CHINA001 if(RET_OK == aNameDlg.Execute()) 1690 { 1691 aNameDlg->GetName(sName); //CHINA001 aNameDlg.GetName(sName); 1692 pColorConfig->AddScheme(sName); 1693 pExtColorConfig->AddScheme(sName); 1694 aColorSchemeLB.InsertEntry(sName); 1695 aColorSchemeLB.SelectEntry(sName); 1696 aColorSchemeLB.GetSelectHdl().Call(&aColorSchemeLB); 1697 } 1698 delete aNameDlg; //add by CHINA001 1699 } 1700 else 1701 { 1702 DBG_ASSERT(aColorSchemeLB.GetEntryCount() > 1, "don't delete the last scheme"); 1703 QueryBox aQuery(pButton, CUI_RES(RID_SVXQB_DELETE_COLOR_CONFIG)); 1704 aQuery.SetText(String(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE))); 1705 if(RET_YES == aQuery.Execute()) 1706 { 1707 rtl::OUString sDeleteScheme(aColorSchemeLB.GetSelectEntry()); 1708 aColorSchemeLB.RemoveEntry(aColorSchemeLB.GetSelectEntryPos()); 1709 aColorSchemeLB.SelectEntryPos(0); 1710 aColorSchemeLB.GetSelectHdl().Call(&aColorSchemeLB); 1711 //first select the new scheme and then delete the old one 1712 pColorConfig->DeleteScheme(sDeleteScheme); 1713 pExtColorConfig->DeleteScheme(sDeleteScheme); 1714 } 1715 } 1716 aDeleteSchemePB.Enable( aColorSchemeLB.GetEntryCount() > 1 ); 1717 return 0; 1718 } 1719 /* -----------------------------09.04.2002 15:47------------------------------ 1720 1721 ---------------------------------------------------------------------------*/ 1722 IMPL_LINK(SvxColorOptionsTabPage, CheckNameHdl_Impl, AbstractSvxNameDialog*, pDialog ) 1723 { 1724 String sName; 1725 pDialog->GetName(sName); 1726 return sName.Len() && LISTBOX_ENTRY_NOTFOUND == aColorSchemeLB.GetEntryPos( sName ); 1727 } 1728 /* -----------------------------25.04.2002 15:12------------------------------ 1729 1730 ---------------------------------------------------------------------------*/ 1731 void SvxColorOptionsTabPage::FillUserData() 1732 { 1733 SetUserData(String::CreateFromInt32(pColorConfigCT->GetScrollPosition())); 1734 } 1735 1736