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_svtools.hxx" 30 31 #define _SVT_WIZDLG_CXX 32 #include <tools/debug.hxx> 33 #ifndef _VCL_FIXED_HXX 34 #include <vcl/fixed.hxx> 35 #endif 36 #ifndef _VCL_BUTTON_HXX 37 #include <vcl/button.hxx> 38 #endif 39 #ifndef _VCL_TABPAGE_HXX 40 #include <vcl/tabpage.hxx> 41 #endif 42 #include <svtools/wizdlg.hxx> 43 44 // ======================================================================= 45 46 #define WIZARDDIALOG_BUTTON_OFFSET_Y 6 47 #define WIZARDDIALOG_BUTTON_DLGOFFSET_X 6 48 #define WIZARDDIALOG_VIEW_DLGOFFSET_X 6 49 #define WIZARDDIALOG_VIEW_DLGOFFSET_Y 6 50 51 // ======================================================================= 52 53 struct ImplWizPageData 54 { 55 ImplWizPageData* mpNext; 56 TabPage* mpPage; 57 }; 58 59 // ----------------------------------------------------------------------- 60 61 struct ImplWizButtonData 62 { 63 ImplWizButtonData* mpNext; 64 Button* mpButton; 65 long mnOffset; 66 }; 67 68 // ======================================================================= 69 70 void WizardDialog::ImplInitData() 71 { 72 mpFirstPage = NULL; 73 mpFirstBtn = NULL; 74 mpFixedLine = NULL; 75 mpCurTabPage = NULL; 76 mpPrevBtn = NULL; 77 mpNextBtn = NULL; 78 mpViewWindow = NULL; 79 mnCurLevel = 0; 80 meViewAlign = WINDOWALIGN_LEFT; 81 mbEmptyViewMargin = false; 82 mnLeftAlignCount = 0; 83 } 84 85 // ----------------------------------------------------------------------- 86 void WizardDialog::SetLeftAlignedButtonCount( sal_Int16 _nCount ) 87 { 88 mnLeftAlignCount = _nCount; 89 } 90 91 // ----------------------------------------------------------------------- 92 93 void WizardDialog::SetEmptyViewMargin() 94 { 95 mbEmptyViewMargin = true; 96 } 97 98 // ----------------------------------------------------------------------- 99 100 void WizardDialog::ImplCalcSize( Size& rSize ) 101 { 102 // ButtonBar-Hoehe berechnen 103 long nMaxHeight = 0; 104 ImplWizButtonData* pBtnData = mpFirstBtn; 105 while ( pBtnData ) 106 { 107 long nBtnHeight = pBtnData->mpButton->GetSizePixel().Height(); 108 if ( nBtnHeight > nMaxHeight ) 109 nMaxHeight = nBtnHeight; 110 pBtnData = pBtnData->mpNext; 111 } 112 if ( nMaxHeight ) 113 nMaxHeight += WIZARDDIALOG_BUTTON_OFFSET_Y*2; 114 if ( mpFixedLine && mpFixedLine->IsVisible() ) 115 nMaxHeight += mpFixedLine->GetSizePixel().Height(); 116 rSize.Height() += nMaxHeight; 117 118 // View-Window-Groesse dazurechnen 119 if ( mpViewWindow && mpViewWindow->IsVisible() ) 120 { 121 Size aViewSize = mpViewWindow->GetSizePixel(); 122 if ( meViewAlign == WINDOWALIGN_TOP ) 123 rSize.Height() += aViewSize.Height(); 124 else if ( meViewAlign == WINDOWALIGN_LEFT ) 125 rSize.Width() += aViewSize.Width(); 126 else if ( meViewAlign == WINDOWALIGN_BOTTOM ) 127 rSize.Height() += aViewSize.Height(); 128 else if ( meViewAlign == WINDOWALIGN_RIGHT ) 129 rSize.Width() += aViewSize.Width(); 130 } 131 } 132 133 // ----------------------------------------------------------------------- 134 135 void WizardDialog::ImplPosCtrls() 136 { 137 Size aDlgSize = GetOutputSizePixel(); 138 long nBtnWidth = 0; 139 long nMaxHeight = 0; 140 long nOffY = aDlgSize.Height(); 141 142 ImplWizButtonData* pBtnData = mpFirstBtn; 143 int j = 0; 144 while ( pBtnData ) 145 { 146 if (j >= mnLeftAlignCount) 147 { 148 Size aBtnSize = pBtnData->mpButton->GetSizePixel(); 149 long nBtnHeight = aBtnSize.Height(); 150 if ( nBtnHeight > nMaxHeight ) 151 nMaxHeight = nBtnHeight; 152 nBtnWidth += aBtnSize.Width(); 153 nBtnWidth += pBtnData->mnOffset; 154 } 155 pBtnData = pBtnData->mpNext; 156 j++; 157 } 158 159 if ( nMaxHeight ) 160 { 161 long nOffX = aDlgSize.Width()-nBtnWidth-WIZARDDIALOG_BUTTON_DLGOFFSET_X; 162 long nOffLeftAlignX = LogicalCoordinateToPixel(6); 163 nOffY -= WIZARDDIALOG_BUTTON_OFFSET_Y+nMaxHeight; 164 165 pBtnData = mpFirstBtn; 166 int i = 0; 167 while ( pBtnData ) 168 { 169 Size aBtnSize = pBtnData->mpButton->GetSizePixel(); 170 if (i >= mnLeftAlignCount) 171 { 172 Point aPos( nOffX, nOffY+((nMaxHeight-aBtnSize.Height())/2) ); 173 pBtnData->mpButton->SetPosPixel( aPos ); 174 nOffX += aBtnSize.Width(); 175 nOffX += pBtnData->mnOffset; 176 } 177 else 178 { 179 Point aPos( nOffLeftAlignX, nOffY+((nMaxHeight-aBtnSize.Height())/2) ); 180 pBtnData->mpButton->SetPosPixel( aPos ); 181 nOffLeftAlignX += aBtnSize.Width(); 182 nOffLeftAlignX += pBtnData->mnOffset; 183 } 184 185 pBtnData = pBtnData->mpNext; 186 i++; 187 } 188 189 nOffY -= WIZARDDIALOG_BUTTON_OFFSET_Y; 190 } 191 192 if ( mpFixedLine && mpFixedLine->IsVisible() ) 193 { 194 nOffY -= mpFixedLine->GetSizePixel().Height(); 195 mpFixedLine->SetPosSizePixel( 0, nOffY, aDlgSize.Width(), 0, 196 WINDOW_POSSIZE_POS | WINDOW_POSSIZE_WIDTH ); 197 } 198 199 if ( mpViewWindow && mpViewWindow->IsVisible() ) 200 { 201 long nViewOffX = 0; 202 long nViewOffY = 0; 203 long nViewWidth = 0; 204 long nViewHeight = 0; 205 long nDlgHeight = nOffY; 206 sal_uInt16 nViewPosFlags = WINDOW_POSSIZE_POS; 207 if ( meViewAlign == WINDOWALIGN_TOP ) 208 { 209 nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X; 210 nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y; 211 nViewWidth = aDlgSize.Width()-(WIZARDDIALOG_VIEW_DLGOFFSET_X*2); 212 nViewPosFlags |= WINDOW_POSSIZE_WIDTH; 213 } 214 else if ( meViewAlign == WINDOWALIGN_LEFT ) 215 { 216 if ( mbEmptyViewMargin ) 217 { 218 nViewOffX = 0; 219 nViewOffY = 0; 220 nViewHeight = nDlgHeight; 221 } 222 else 223 { 224 nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X; 225 nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y; 226 nViewHeight = nDlgHeight-(WIZARDDIALOG_VIEW_DLGOFFSET_Y*2); 227 } 228 nViewPosFlags |= WINDOW_POSSIZE_HEIGHT; 229 } 230 else if ( meViewAlign == WINDOWALIGN_BOTTOM ) 231 { 232 nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X; 233 nViewOffY = nDlgHeight-mpViewWindow->GetSizePixel().Height()-WIZARDDIALOG_VIEW_DLGOFFSET_Y; 234 nViewWidth = aDlgSize.Width()-(WIZARDDIALOG_VIEW_DLGOFFSET_X*2); 235 nViewPosFlags |= WINDOW_POSSIZE_WIDTH; 236 } 237 else if ( meViewAlign == WINDOWALIGN_RIGHT ) 238 { 239 nViewOffX = aDlgSize.Width()-mpViewWindow->GetSizePixel().Width()-WIZARDDIALOG_VIEW_DLGOFFSET_X; 240 nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y; 241 nViewHeight = nDlgHeight-(WIZARDDIALOG_VIEW_DLGOFFSET_Y*2); 242 nViewPosFlags |= WINDOW_POSSIZE_HEIGHT; 243 } 244 mpViewWindow->SetPosSizePixel( nViewOffX, nViewOffY, 245 nViewWidth, nViewHeight, 246 nViewPosFlags ); 247 } 248 } 249 250 251 long WizardDialog::LogicalCoordinateToPixel(int iCoordinate){ 252 Size aLocSize = LogicToPixel(Size( iCoordinate, 0 ), MAP_APPFONT ); 253 int iPixelCoordinate = aLocSize.Width(); 254 return iPixelCoordinate; 255 } 256 257 258 // ----------------------------------------------------------------------- 259 260 void WizardDialog::ImplPosTabPage() 261 { 262 if ( !mpCurTabPage ) 263 return; 264 265 if ( !IsInInitShow() ) 266 { 267 // #100199# - On Unix initial size is equal to screen size, on Windows 268 // it's 0,0. One cannot calculate the size unless dialog is visible. 269 if ( !IsReallyVisible() ) 270 return; 271 } 272 273 // ButtonBar-Hoehe berechnen 274 long nMaxHeight = 0; 275 ImplWizButtonData* pBtnData = mpFirstBtn; 276 while ( pBtnData ) 277 { 278 long nBtnHeight = pBtnData->mpButton->GetSizePixel().Height(); 279 if ( nBtnHeight > nMaxHeight ) 280 nMaxHeight = nBtnHeight; 281 pBtnData = pBtnData->mpNext; 282 } 283 if ( nMaxHeight ) 284 nMaxHeight += WIZARDDIALOG_BUTTON_OFFSET_Y*2; 285 if ( mpFixedLine && mpFixedLine->IsVisible() ) 286 nMaxHeight += mpFixedLine->GetSizePixel().Height(); 287 288 // TabPage positionieren 289 Size aDlgSize = GetOutputSizePixel(); 290 aDlgSize.Height() -= nMaxHeight; 291 long nOffX = 0; 292 long nOffY = 0; 293 if ( mpViewWindow && mpViewWindow->IsVisible() ) 294 { 295 Size aViewSize = mpViewWindow->GetSizePixel(); 296 if ( meViewAlign == WINDOWALIGN_TOP ) 297 { 298 nOffY += aViewSize.Height()+WIZARDDIALOG_VIEW_DLGOFFSET_Y; 299 aDlgSize.Height() -= aViewSize.Height()+WIZARDDIALOG_VIEW_DLGOFFSET_Y; 300 } 301 else if ( meViewAlign == WINDOWALIGN_LEFT ) 302 { 303 long nViewOffset = mbEmptyViewMargin ? 0 : WIZARDDIALOG_VIEW_DLGOFFSET_X; 304 nOffX += aViewSize.Width() + nViewOffset; 305 aDlgSize.Width() -= nOffX; 306 } 307 else if ( meViewAlign == WINDOWALIGN_BOTTOM ) 308 aDlgSize.Height() -= aViewSize.Height()+WIZARDDIALOG_VIEW_DLGOFFSET_Y; 309 else if ( meViewAlign == WINDOWALIGN_RIGHT ) 310 aDlgSize.Width() -= aViewSize.Width()+WIZARDDIALOG_VIEW_DLGOFFSET_X; 311 } 312 Point aPos( nOffX, nOffY ); 313 mpCurTabPage->SetPosSizePixel( aPos, aDlgSize ); 314 } 315 316 // ----------------------------------------------------------------------- 317 318 void WizardDialog::ImplShowTabPage( TabPage* pTabPage ) 319 { 320 if ( mpCurTabPage == pTabPage ) 321 return; 322 323 TabPage* pOldTabPage = mpCurTabPage; 324 if ( pOldTabPage ) 325 pOldTabPage->DeactivatePage(); 326 327 mpCurTabPage = pTabPage; 328 if ( pTabPage ) 329 { 330 ImplPosTabPage(); 331 pTabPage->ActivatePage(); 332 pTabPage->Show(); 333 } 334 335 if ( pOldTabPage ) 336 pOldTabPage->Hide(); 337 } 338 339 // ----------------------------------------------------------------------- 340 341 TabPage* WizardDialog::ImplGetPage( sal_uInt16 nLevel ) const 342 { 343 sal_uInt16 nTempLevel = 0; 344 ImplWizPageData* pPageData = mpFirstPage; 345 while ( pPageData ) 346 { 347 if ( (nTempLevel == nLevel) || !pPageData->mpNext ) 348 break; 349 350 nTempLevel++; 351 pPageData = pPageData->mpNext; 352 } 353 354 if ( pPageData ) 355 return pPageData->mpPage; 356 return NULL; 357 } 358 359 // ======================================================================= 360 361 WizardDialog::WizardDialog( Window* pParent, WinBits nStyle ) : 362 ModalDialog( pParent, nStyle ) 363 { 364 ImplInitData(); 365 } 366 367 // ----------------------------------------------------------------------- 368 369 WizardDialog::WizardDialog( Window* pParent, const ResId& rResId ) : 370 ModalDialog( pParent, rResId ) 371 { 372 ImplInitData(); 373 } 374 375 // ----------------------------------------------------------------------- 376 377 WizardDialog::~WizardDialog() 378 { 379 if ( mpFixedLine ) 380 delete mpFixedLine; 381 382 // Remove all buttons 383 while ( mpFirstBtn ) 384 RemoveButton( mpFirstBtn->mpButton ); 385 386 // Remove all pages 387 while ( mpFirstPage ) 388 RemovePage( mpFirstPage->mpPage ); 389 } 390 391 // ----------------------------------------------------------------------- 392 393 void WizardDialog::Resize() 394 { 395 if ( IsReallyShown() && !IsInInitShow() ) 396 { 397 ImplPosCtrls(); 398 ImplPosTabPage(); 399 } 400 401 Dialog::Resize(); 402 } 403 404 // ----------------------------------------------------------------------- 405 406 void WizardDialog::StateChanged( StateChangedType nType ) 407 { 408 if ( nType == STATE_CHANGE_INITSHOW ) 409 { 410 if ( IsDefaultSize() ) 411 { 412 Size aDlgSize = GetPageSizePixel(); 413 if ( !aDlgSize.Width() || !aDlgSize.Height() ) 414 { 415 ImplWizPageData* pPageData = mpFirstPage; 416 while ( pPageData ) 417 { 418 if ( pPageData->mpPage ) 419 { 420 Size aPageSize = pPageData->mpPage->GetSizePixel(); 421 if ( aPageSize.Width() > aDlgSize.Width() ) 422 aDlgSize.Width() = aPageSize.Width(); 423 if ( aPageSize.Height() > aDlgSize.Height() ) 424 aDlgSize.Height() = aPageSize.Height(); 425 } 426 427 pPageData = pPageData->mpNext; 428 } 429 } 430 ImplCalcSize( aDlgSize ); 431 SetOutputSizePixel( aDlgSize ); 432 } 433 434 ImplPosCtrls(); 435 ImplPosTabPage(); 436 ImplShowTabPage( ImplGetPage( mnCurLevel ) ); 437 } 438 439 Dialog::StateChanged( nType ); 440 } 441 442 // ----------------------------------------------------------------------- 443 444 long WizardDialog::Notify( NotifyEvent& rNEvt ) 445 { 446 if ( (rNEvt.GetType() == EVENT_KEYINPUT) && mpPrevBtn && mpNextBtn ) 447 { 448 const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); 449 KeyCode aKeyCode = pKEvt->GetKeyCode(); 450 sal_uInt16 nKeyCode = aKeyCode.GetCode(); 451 452 if ( aKeyCode.IsMod1() ) 453 { 454 if ( aKeyCode.IsShift() || (nKeyCode == KEY_PAGEUP) ) 455 { 456 if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEUP) ) 457 { 458 if ( mpPrevBtn->IsVisible() && 459 mpPrevBtn->IsEnabled() && mpPrevBtn->IsInputEnabled() ) 460 { 461 mpPrevBtn->SetPressed( sal_True ); 462 mpPrevBtn->SetPressed( sal_False ); 463 mpPrevBtn->Click(); 464 } 465 return sal_True; 466 } 467 } 468 else 469 { 470 if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEDOWN) ) 471 { 472 if ( mpNextBtn->IsVisible() && 473 mpNextBtn->IsEnabled() && mpNextBtn->IsInputEnabled() ) 474 { 475 mpNextBtn->SetPressed( sal_True ); 476 mpNextBtn->SetPressed( sal_False ); 477 mpNextBtn->Click(); 478 } 479 return sal_True; 480 } 481 } 482 } 483 } 484 485 return Dialog::Notify( rNEvt ); 486 } 487 488 // ----------------------------------------------------------------------- 489 490 void WizardDialog::ActivatePage() 491 { 492 maActivateHdl.Call( this ); 493 } 494 495 // ----------------------------------------------------------------------- 496 497 long WizardDialog::DeactivatePage() 498 { 499 if ( maDeactivateHdl.IsSet() ) 500 return maDeactivateHdl.Call( this ); 501 else 502 return sal_True; 503 } 504 505 // ----------------------------------------------------------------------- 506 507 sal_Bool WizardDialog::ShowNextPage() 508 { 509 return ShowPage( mnCurLevel+1 ); 510 } 511 512 // ----------------------------------------------------------------------- 513 514 sal_Bool WizardDialog::ShowPrevPage() 515 { 516 if ( !mnCurLevel ) 517 return sal_False; 518 return ShowPage( mnCurLevel-1 ); 519 } 520 521 // ----------------------------------------------------------------------- 522 523 sal_Bool WizardDialog::ShowPage( sal_uInt16 nLevel ) 524 { 525 if ( DeactivatePage() ) 526 { 527 mnCurLevel = nLevel; 528 ActivatePage(); 529 ImplShowTabPage( ImplGetPage( mnCurLevel ) ); 530 return sal_True; 531 } 532 else 533 return sal_False; 534 } 535 536 // ----------------------------------------------------------------------- 537 538 sal_Bool WizardDialog::Finnish( long nResult ) 539 { 540 if ( DeactivatePage() ) 541 { 542 if ( mpCurTabPage ) 543 mpCurTabPage->DeactivatePage(); 544 545 if ( IsInExecute() ) 546 EndDialog( nResult ); 547 else if ( GetStyle() & WB_CLOSEABLE ) 548 Close(); 549 return sal_True; 550 } 551 else 552 return sal_False; 553 } 554 555 // ----------------------------------------------------------------------- 556 557 void WizardDialog::AddPage( TabPage* pPage ) 558 { 559 ImplWizPageData* pNewPageData = new ImplWizPageData; 560 pNewPageData->mpNext = NULL; 561 pNewPageData->mpPage = pPage; 562 563 if ( !mpFirstPage ) 564 mpFirstPage = pNewPageData; 565 else 566 { 567 ImplWizPageData* pPageData = mpFirstPage; 568 while ( pPageData->mpNext ) 569 pPageData = pPageData->mpNext; 570 pPageData->mpNext = pNewPageData; 571 } 572 } 573 574 // ----------------------------------------------------------------------- 575 576 void WizardDialog::RemovePage( TabPage* pPage ) 577 { 578 ImplWizPageData* pPrevPageData = NULL; 579 ImplWizPageData* pPageData = mpFirstPage; 580 while ( pPageData ) 581 { 582 if ( pPageData->mpPage == pPage ) 583 { 584 if ( pPrevPageData ) 585 pPrevPageData->mpNext = pPageData->mpNext; 586 else 587 mpFirstPage = pPageData->mpNext; 588 if ( pPage == mpCurTabPage ) 589 mpCurTabPage = NULL; 590 delete pPageData; 591 return; 592 } 593 594 pPrevPageData = pPageData; 595 pPageData = pPageData->mpNext; 596 } 597 598 DBG_ERROR( "WizardDialog::RemovePage() - Page not in list" ); 599 } 600 601 // ----------------------------------------------------------------------- 602 603 void WizardDialog::SetPage( sal_uInt16 nLevel, TabPage* pPage ) 604 { 605 sal_uInt16 nTempLevel = 0; 606 ImplWizPageData* pPageData = mpFirstPage; 607 while ( pPageData ) 608 { 609 if ( (nTempLevel == nLevel) || !pPageData->mpNext ) 610 break; 611 612 nTempLevel++; 613 pPageData = pPageData->mpNext; 614 } 615 616 if ( pPageData ) 617 { 618 if ( pPageData->mpPage == mpCurTabPage ) 619 mpCurTabPage = NULL; 620 pPageData->mpPage = pPage; 621 } 622 } 623 624 // ----------------------------------------------------------------------- 625 626 TabPage* WizardDialog::GetPage( sal_uInt16 nLevel ) const 627 { 628 sal_uInt16 nTempLevel = 0; 629 ImplWizPageData* pPageData = mpFirstPage; 630 while ( pPageData ) 631 { 632 if ( nTempLevel == nLevel ) 633 return pPageData->mpPage; 634 635 nTempLevel++; 636 pPageData = pPageData->mpNext; 637 } 638 639 return NULL; 640 } 641 642 // ----------------------------------------------------------------------- 643 644 void WizardDialog::AddButton( Button* pButton, long nOffset ) 645 { 646 ImplWizButtonData* pNewBtnData = new ImplWizButtonData; 647 pNewBtnData->mpNext = NULL; 648 pNewBtnData->mpButton = pButton; 649 pNewBtnData->mnOffset = nOffset; 650 651 if ( !mpFirstBtn ) 652 mpFirstBtn = pNewBtnData; 653 else 654 { 655 ImplWizButtonData* pBtnData = mpFirstBtn; 656 while ( pBtnData->mpNext ) 657 pBtnData = pBtnData->mpNext; 658 pBtnData->mpNext = pNewBtnData; 659 } 660 } 661 662 // ----------------------------------------------------------------------- 663 664 void WizardDialog::RemoveButton( Button* pButton ) 665 { 666 ImplWizButtonData* pPrevBtnData = NULL; 667 ImplWizButtonData* pBtnData = mpFirstBtn; 668 while ( pBtnData ) 669 { 670 if ( pBtnData->mpButton == pButton ) 671 { 672 if ( pPrevBtnData ) 673 pPrevBtnData->mpNext = pBtnData->mpNext; 674 else 675 mpFirstBtn = pBtnData->mpNext; 676 delete pBtnData; 677 return; 678 } 679 680 pPrevBtnData = pBtnData; 681 pBtnData = pBtnData->mpNext; 682 } 683 684 DBG_ERROR( "WizardDialog::RemoveButton() - Button not in list" ); 685 } 686 687 // ----------------------------------------------------------------------- 688 689 void WizardDialog::ShowButtonFixedLine( sal_Bool bVisible ) 690 { 691 if ( !mpFixedLine ) 692 { 693 if ( !bVisible ) 694 return; 695 696 mpFixedLine = new FixedLine( this ); 697 } 698 699 mpFixedLine->Show( bVisible ); 700 } 701 702 // ----------------------------------------------------------------------- 703 704 sal_Bool WizardDialog::IsButtonFixedLineVisible() 705 { 706 return (mpFixedLine && mpFixedLine->IsVisible()); 707 } 708