showwin.cxx (4d7c9de0) | showwin.cxx (61060e70) |
---|---|
1/************************************************************** | 1/************************************************************** |
2 * | 2 * |
3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at | 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at |
10 * | 10 * |
11 * http://www.apache.org/licenses/LICENSE-2.0 | 11 * http://www.apache.org/licenses/LICENSE-2.0 |
12 * | 12 * |
13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. | 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. |
19 * | 19 * |
20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_sd.hxx" 26 27#include <com/sun/star/awt/Key.hpp> --- 30 unchanged lines hidden (view full) --- 58, mbShowNavigatorAfterSpecialMode( sal_False ) 59, mbMouseAutoHide(true) 60, mbMouseCursorHidden(false) 61, mnFirstMouseMove(0) 62, mxController( xController ) 63{ 64 SetOutDevViewType( OUTDEV_VIEWTYPE_SLIDESHOW ); 65 | 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_sd.hxx" 26 27#include <com/sun/star/awt/Key.hpp> --- 30 unchanged lines hidden (view full) --- 58, mbShowNavigatorAfterSpecialMode( sal_False ) 59, mbMouseAutoHide(true) 60, mbMouseCursorHidden(false) 61, mnFirstMouseMove(0) 62, mxController( xController ) 63{ 64 SetOutDevViewType( OUTDEV_VIEWTYPE_SLIDESHOW ); 65 |
66 // Do never mirror the preview window. This explicitly includes right 67 // to left writing environments. 68 EnableRTL (sal_False); | 66 // Do never mirror the preview window. This explicitly includes right 67 // to left writing environments. 68 EnableRTL (sal_False); |
69 70 MapMode aMap(GetMapMode()); 71 aMap.SetMapUnit(MAP_100TH_MM); 72 SetMapMode(aMap); 73 74 // HelpId setzen 75 SetHelpId( HID_SD_WIN_PRESENTATION ); 76 SetUniqueId( HID_SD_WIN_PRESENTATION ); 77 78 maPauseTimer.SetTimeoutHdl( LINK( this, ShowWindow, PauseTimeoutHdl ) ); 79 maPauseTimer.SetTimeout( 1000 ); 80 maMouseTimer.SetTimeoutHdl( LINK( this, ShowWindow, MouseTimeoutHdl ) ); 81 maMouseTimer.SetTimeout( HIDE_MOUSE_TIMEOUT ); 82 83 maShowBackground = Wallpaper( Color( COL_BLACK ) ); 84// SetBackground( Wallpaper( Color( COL_BLACK ) ) ); | 69 70 MapMode aMap(GetMapMode()); 71 aMap.SetMapUnit(MAP_100TH_MM); 72 SetMapMode(aMap); 73 74 // HelpId setzen 75 SetHelpId( HID_SD_WIN_PRESENTATION ); 76 SetUniqueId( HID_SD_WIN_PRESENTATION ); 77 78 maPauseTimer.SetTimeoutHdl( LINK( this, ShowWindow, PauseTimeoutHdl ) ); 79 maPauseTimer.SetTimeout( 1000 ); 80 maMouseTimer.SetTimeoutHdl( LINK( this, ShowWindow, MouseTimeoutHdl ) ); 81 maMouseTimer.SetTimeout( HIDE_MOUSE_TIMEOUT ); 82 83 maShowBackground = Wallpaper( Color( COL_BLACK ) ); 84// SetBackground( Wallpaper( Color( COL_BLACK ) ) ); |
85 SetBackground(); // avoids that VCL paints any background! | 85 SetBackground(); // avoids that VCL paints any background! |
86 GetParent()->Show(); 87 AddEventListener( LINK( this, ShowWindow, EventHdl ) ); 88} 89 90ShowWindow::~ShowWindow(void) 91{ 92 maPauseTimer.Stop(); 93 maMouseTimer.Stop(); 94} 95 96/************************************************************************* | 86 GetParent()->Show(); 87 AddEventListener( LINK( this, ShowWindow, EventHdl ) ); 88} 89 90ShowWindow::~ShowWindow(void) 91{ 92 maPauseTimer.Stop(); 93 maMouseTimer.Stop(); 94} 95 96/************************************************************************* |
97|* | |
98|* Keyboard event | 97|* Keyboard event |
99|* | |
100\************************************************************************/ 101 102void ShowWindow::KeyInput(const KeyEvent& rKEvt) 103{ 104 sal_Bool bReturn = sal_False; 105 106 if( SHOWWINDOWMODE_PREVIEW == meShowWindowMode ) 107 { --- 69 unchanged lines hidden (view full) --- 177 } 178 } 179 180 if( mpViewShell ) 181 mpViewShell->SetActiveWindow( this ); 182} 183 184/************************************************************************* | 98\************************************************************************/ 99 100void ShowWindow::KeyInput(const KeyEvent& rKEvt) 101{ 102 sal_Bool bReturn = sal_False; 103 104 if( SHOWWINDOWMODE_PREVIEW == meShowWindowMode ) 105 { --- 69 unchanged lines hidden (view full) --- 175 } 176 } 177 178 if( mpViewShell ) 179 mpViewShell->SetActiveWindow( this ); 180} 181 182/************************************************************************* |
185|* | |
186|* MouseButtonDown event | 183|* MouseButtonDown event |
187|* | |
188\************************************************************************/ 189 190void ShowWindow::MouseButtonDown(const MouseEvent& /*rMEvt*/) 191{ 192 if( SHOWWINDOWMODE_PREVIEW == meShowWindowMode ) 193 { 194 TerminateShow(); 195 } 196 else if( mpViewShell ) 197 { 198 mpViewShell->SetActiveWindow( this ); 199 } 200} 201 202/************************************************************************* | 184\************************************************************************/ 185 186void ShowWindow::MouseButtonDown(const MouseEvent& /*rMEvt*/) 187{ 188 if( SHOWWINDOWMODE_PREVIEW == meShowWindowMode ) 189 { 190 TerminateShow(); 191 } 192 else if( mpViewShell ) 193 { 194 mpViewShell->SetActiveWindow( this ); 195 } 196} 197 198/************************************************************************* |
203|* | |
204|* MouseMove event | 199|* MouseMove event |
205|* | |
206\************************************************************************/ 207 208void ShowWindow::MouseMove(const MouseEvent& /*rMEvt*/) 209{ 210 if( mbMouseAutoHide ) 211 { 212 if( mbMouseCursorHidden ) 213 { --- 28 unchanged lines hidden (view full) --- 242 } 243 } 244 245 if( mpViewShell ) 246 mpViewShell->SetActiveWindow( this ); 247} 248 249/************************************************************************* | 200\************************************************************************/ 201 202void ShowWindow::MouseMove(const MouseEvent& /*rMEvt*/) 203{ 204 if( mbMouseAutoHide ) 205 { 206 if( mbMouseCursorHidden ) 207 { --- 28 unchanged lines hidden (view full) --- 236 } 237 } 238 239 if( mpViewShell ) 240 mpViewShell->SetActiveWindow( this ); 241} 242 243/************************************************************************* |
250|* | |
251|* MouseButtonUp event | 244|* MouseButtonUp event |
252|* | |
253\************************************************************************/ 254 255void ShowWindow::MouseButtonUp(const MouseEvent& rMEvt) 256{ 257 if( SHOWWINDOWMODE_PREVIEW == meShowWindowMode ) 258 { 259 TerminateShow(); 260 } 261 else if( (SHOWWINDOWMODE_END == meShowWindowMode) && !rMEvt.IsRight() ) 262 { 263 TerminateShow(); 264 } 265 else if( (( SHOWWINDOWMODE_BLANK == meShowWindowMode ) || ( SHOWWINDOWMODE_PAUSE == meShowWindowMode )) 266 && !rMEvt.IsRight() ) 267 { | 245\************************************************************************/ 246 247void ShowWindow::MouseButtonUp(const MouseEvent& rMEvt) 248{ 249 if( SHOWWINDOWMODE_PREVIEW == meShowWindowMode ) 250 { 251 TerminateShow(); 252 } 253 else if( (SHOWWINDOWMODE_END == meShowWindowMode) && !rMEvt.IsRight() ) 254 { 255 TerminateShow(); 256 } 257 else if( (( SHOWWINDOWMODE_BLANK == meShowWindowMode ) || ( SHOWWINDOWMODE_PAUSE == meShowWindowMode )) 258 && !rMEvt.IsRight() ) 259 { |
268 RestartShow(); | 260 RestartShow(); |
269 } 270 else 271 { 272 if( mxController.is() ) 273 mxController->mouseButtonUp( rMEvt ); 274 } 275} 276 277/************************************************************************* | 261 } 262 else 263 { 264 if( mxController.is() ) 265 mxController->mouseButtonUp( rMEvt ); 266 } 267} 268 269/************************************************************************* |
278|* | |
279|* Paint-Event: wenn FuSlideShow noch erreichbar ist, weiterleiten | 270|* Paint-Event: wenn FuSlideShow noch erreichbar ist, weiterleiten |
280|* | |
281\************************************************************************/ 282 283void ShowWindow::Paint(const Rectangle& rRect) 284{ 285 if( (meShowWindowMode == SHOWWINDOWMODE_NORMAL) || (meShowWindowMode == SHOWWINDOWMODE_PREVIEW) ) 286 { 287/* 288 Region aOldClipRegion( GetClipRegion() ); | 271\************************************************************************/ 272 273void ShowWindow::Paint(const Rectangle& rRect) 274{ 275 if( (meShowWindowMode == SHOWWINDOWMODE_NORMAL) || (meShowWindowMode == SHOWWINDOWMODE_PREVIEW) ) 276 { 277/* 278 Region aOldClipRegion( GetClipRegion() ); |
289 | 279 |
290 Region aClipRegion( rRect ); 291 aClipRegion.Exclude( maPresArea ); 292 SetClipRegion( aClipRegion ); 293 294 DrawWallpaper( rRect, maShowBackground ); 295 296 SetClipRegion( aOldClipRegion ); 297*/ --- 21 unchanged lines hidden (view full) --- 319 else if( SHOWWINDOWMODE_BLANK == meShowWindowMode ) 320 { 321 DrawBlankScene(); 322 } 323 } 324} 325 326/************************************************************************* | 280 Region aClipRegion( rRect ); 281 aClipRegion.Exclude( maPresArea ); 282 SetClipRegion( aClipRegion ); 283 284 DrawWallpaper( rRect, maShowBackground ); 285 286 SetClipRegion( aOldClipRegion ); 287*/ --- 21 unchanged lines hidden (view full) --- 309 else if( SHOWWINDOWMODE_BLANK == meShowWindowMode ) 310 { 311 DrawBlankScene(); 312 } 313 } 314} 315 316/************************************************************************* |
327|* | |
328|* Notify | 317|* Notify |
329|* | |
330\************************************************************************/ 331 332long ShowWindow::Notify(NotifyEvent& rNEvt) 333{ 334 long nOK = sal_False; 335/* 336 if( mpViewShell && rNEvt.GetType() == EVENT_GETFOCUS ) 337 { --- 113 unchanged lines hidden (view full) --- 451 452 return( SHOWWINDOWMODE_PAUSE == meShowWindowMode ); 453} 454 455// ----------------------------------------------------------------------------- 456 457sal_Bool ShowWindow::SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor ) 458{ | 318\************************************************************************/ 319 320long ShowWindow::Notify(NotifyEvent& rNEvt) 321{ 322 long nOK = sal_False; 323/* 324 if( mpViewShell && rNEvt.GetType() == EVENT_GETFOCUS ) 325 { --- 113 unchanged lines hidden (view full) --- 439 440 return( SHOWWINDOWMODE_PAUSE == meShowWindowMode ); 441} 442 443// ----------------------------------------------------------------------------- 444 445sal_Bool ShowWindow::SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor ) 446{ |
459 if( ( SHOWWINDOWMODE_NORMAL == meShowWindowMode ) && mpViewShell && mpViewShell->GetView() ) | 447 if( ( SHOWWINDOWMODE_NORMAL == meShowWindowMode ) && mpViewShell && mpViewShell->GetView() ) |
460 { 461 DeleteWindowFromPaintView(); 462 mnRestartPageIndex = nPageIndexToRestart; 463 meShowWindowMode = SHOWWINDOWMODE_BLANK; 464// maShowBackground = GetBackground(); 465// SetBackground( Wallpaper( rBlankColor ) ); 466 maShowBackground = Wallpaper( rBlankColor ); 467 --- 22 unchanged lines hidden (view full) --- 490void ShowWindow::TerminateShow() 491{ 492 maLogo.Clear(); 493 maPauseTimer.Stop(); 494 maMouseTimer.Stop(); 495 Erase(); 496// SetBackground( maShowBackground ); 497 maShowBackground = Wallpaper( Color( COL_BLACK ) ); | 448 { 449 DeleteWindowFromPaintView(); 450 mnRestartPageIndex = nPageIndexToRestart; 451 meShowWindowMode = SHOWWINDOWMODE_BLANK; 452// maShowBackground = GetBackground(); 453// SetBackground( Wallpaper( rBlankColor ) ); 454 maShowBackground = Wallpaper( rBlankColor ); 455 --- 22 unchanged lines hidden (view full) --- 478void ShowWindow::TerminateShow() 479{ 480 maLogo.Clear(); 481 maPauseTimer.Stop(); 482 maMouseTimer.Stop(); 483 Erase(); 484// SetBackground( maShowBackground ); 485 maShowBackground = Wallpaper( Color( COL_BLACK ) ); |
498 meShowWindowMode = SHOWWINDOWMODE_NORMAL; | 486 meShowWindowMode = SHOWWINDOWMODE_NORMAL; |
499 mnPauseTimeout = SLIDE_NO_TIMEOUT; 500 501 if( mpViewShell ) 502 { 503 // show navigator? 504 if( mbShowNavigatorAfterSpecialMode ) 505 { 506 mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, sal_True ); --- 14 unchanged lines hidden (view full) --- 521 RestartShow( mnRestartPageIndex ); 522} 523 524// ----------------------------------------------------------------------------- 525 526void ShowWindow::RestartShow( sal_Int32 nPageIndexToRestart ) 527 528{ | 487 mnPauseTimeout = SLIDE_NO_TIMEOUT; 488 489 if( mpViewShell ) 490 { 491 // show navigator? 492 if( mbShowNavigatorAfterSpecialMode ) 493 { 494 mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, sal_True ); --- 14 unchanged lines hidden (view full) --- 509 RestartShow( mnRestartPageIndex ); 510} 511 512// ----------------------------------------------------------------------------- 513 514void ShowWindow::RestartShow( sal_Int32 nPageIndexToRestart ) 515 516{ |
529 ShowWindowMode eOldShowWindowMode = meShowWindowMode; | 517 ShowWindowMode eOldShowWindowMode = meShowWindowMode; |
530 531 maLogo.Clear(); 532 maPauseTimer.Stop(); 533 Erase(); 534// SetBackground( maShowBackground ); 535 maShowBackground = Wallpaper( Color( COL_BLACK ) ); 536 meShowWindowMode = SHOWWINDOWMODE_NORMAL; 537 mnPauseTimeout = SLIDE_NO_TIMEOUT; 538 539 if( mpViewShell ) 540 { 541 rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( mpViewShell->GetViewShellBase() ) ); | 518 519 maLogo.Clear(); 520 maPauseTimer.Stop(); 521 Erase(); 522// SetBackground( maShowBackground ); 523 maShowBackground = Wallpaper( Color( COL_BLACK ) ); 524 meShowWindowMode = SHOWWINDOWMODE_NORMAL; 525 mnPauseTimeout = SLIDE_NO_TIMEOUT; 526 527 if( mpViewShell ) 528 { 529 rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( mpViewShell->GetViewShellBase() ) ); |
542 | 530 |
543 if( xSlideShow.is() ) 544 { 545 AddWindowToPaintView(); | 531 if( xSlideShow.is() ) 532 { 533 AddWindowToPaintView(); |
546 547 if( SHOWWINDOWMODE_BLANK == eOldShowWindowMode ) | 534 535 if( SHOWWINDOWMODE_BLANK == eOldShowWindowMode ) |
548 { 549 xSlideShow->pause(false); 550 Invalidate(); 551 } | 536 { 537 xSlideShow->pause(false); 538 Invalidate(); 539 } |
552 else | 540 else |
553 { 554 xSlideShow->jumpToPageIndex( nPageIndexToRestart ); 555 } 556 } 557 } 558 559 mnRestartPageIndex = PAGE_NO_END; 560 --- 46 unchanged lines hidden (view full) --- 607 if( SLIDE_NO_TIMEOUT != mnPauseTimeout ) 608 { 609 MapMode aVMap( rMap ); 610 VirtualDevice aVDev( *this ); 611 612 aVMap.SetOrigin( Point() ); 613 aVDev.SetMapMode( aVMap ); 614 aVDev.SetBackground( Wallpaper( Color( COL_BLACK ) ) ); | 541 { 542 xSlideShow->jumpToPageIndex( nPageIndexToRestart ); 543 } 544 } 545 } 546 547 mnRestartPageIndex = PAGE_NO_END; 548 --- 46 unchanged lines hidden (view full) --- 595 if( SLIDE_NO_TIMEOUT != mnPauseTimeout ) 596 { 597 MapMode aVMap( rMap ); 598 VirtualDevice aVDev( *this ); 599 600 aVMap.SetOrigin( Point() ); 601 aVDev.SetMapMode( aVMap ); 602 aVDev.SetBackground( Wallpaper( Color( COL_BLACK ) ) ); |
615 | 603 |
616 // set font first, to determine real output height 617 aVDev.SetFont( aFont ); | 604 // set font first, to determine real output height 605 aVDev.SetFont( aFont ); |
618 | 606 |
619 const Size aVDevSize( aOutSize.Width(), aVDev.GetTextHeight() ); 620 621 if( aVDev.SetOutputSize( aVDevSize ) ) 622 { 623 // Note: if performance gets an issue here, we can use NumberFormatter directly 624 SvtSysLocale aSysLocale; | 607 const Size aVDevSize( aOutSize.Width(), aVDev.GetTextHeight() ); 608 609 if( aVDev.SetOutputSize( aVDevSize ) ) 610 { 611 // Note: if performance gets an issue here, we can use NumberFormatter directly 612 SvtSysLocale aSysLocale; |
625 const LocaleDataWrapper& aLocaleData = aSysLocale.GetLocaleData(); 626 | 613 const LocaleDataWrapper& aLocaleData = aSysLocale.GetLocaleData(); 614 |
627 aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ( " )); 628 aText += aLocaleData.getDuration( Time( 0, 0, mnPauseTimeout ) ); 629 aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " )" )); 630 aVDev.DrawText( Point( aOffset.Width(), 0 ), aText ); 631 DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), aVDevSize, Point(), aVDevSize, aVDev ); 632 bDrawn = sal_True; 633 } 634 } --- 25 unchanged lines hidden (view full) --- 660 DrawText( Point( aOutOrg.X() + aTextSize.Height(), aOutOrg.Y() + aTextSize.Height() ), aText ); 661 SetFont( aOldFont ); 662} 663 664// ----------------------------------------------------------------------------- 665 666void ShowWindow::DrawBlankScene() 667{ | 615 aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ( " )); 616 aText += aLocaleData.getDuration( Time( 0, 0, mnPauseTimeout ) ); 617 aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " )" )); 618 aVDev.DrawText( Point( aOffset.Width(), 0 ), aText ); 619 DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), aVDevSize, Point(), aVDevSize, aVDev ); 620 bDrawn = sal_True; 621 } 622 } --- 25 unchanged lines hidden (view full) --- 648 DrawText( Point( aOutOrg.X() + aTextSize.Height(), aOutOrg.Y() + aTextSize.Height() ), aText ); 649 SetFont( aOldFont ); 650} 651 652// ----------------------------------------------------------------------------- 653 654void ShowWindow::DrawBlankScene() 655{ |
668 // just blank through background color => nothing to be done here | 656 // just blank through background color => nothing to be done here |
669} 670 671// ----------------------------------------------------------------------------- 672 673IMPL_LINK( ShowWindow, PauseTimeoutHdl, Timer*, pTimer ) 674{ 675 if( !( --mnPauseTimeout ) ) 676 RestartShow(); --- 6 unchanged lines hidden (view full) --- 683 return 0L; 684} 685 686IMPL_LINK( ShowWindow, MouseTimeoutHdl, Timer*, EMPTYARG ) 687{ 688 if( mbMouseCursorHidden ) 689 { 690 // not enough mouse movements since first recording so | 657} 658 659// ----------------------------------------------------------------------------- 660 661IMPL_LINK( ShowWindow, PauseTimeoutHdl, Timer*, pTimer ) 662{ 663 if( !( --mnPauseTimeout ) ) 664 RestartShow(); --- 6 unchanged lines hidden (view full) --- 671 return 0L; 672} 673 674IMPL_LINK( ShowWindow, MouseTimeoutHdl, Timer*, EMPTYARG ) 675{ 676 if( mbMouseCursorHidden ) 677 { 678 // not enough mouse movements since first recording so |
691 // cancle show mouse pointer for now | 679 // cancel show mouse pointer for now |
692 mnFirstMouseMove = 0; 693 } 694 else 695 { 696 // mouse has been idle to long, hide pointer 697 ShowPointer( sal_False ); 698 mbMouseCursorHidden = true; 699 } --- 18 unchanged lines hidden (view full) --- 718 maPresArea = rPresArea; 719} 720 721void ShowWindow::DeleteWindowFromPaintView() 722{ 723 if( mpViewShell->GetView() ) 724 mpViewShell->GetView()->DeleteWindowFromPaintView( this ); 725 | 680 mnFirstMouseMove = 0; 681 } 682 else 683 { 684 // mouse has been idle to long, hide pointer 685 ShowPointer( sal_False ); 686 mbMouseCursorHidden = true; 687 } --- 18 unchanged lines hidden (view full) --- 706 maPresArea = rPresArea; 707} 708 709void ShowWindow::DeleteWindowFromPaintView() 710{ 711 if( mpViewShell->GetView() ) 712 mpViewShell->GetView()->DeleteWindowFromPaintView( this ); 713 |
726 sal_uInt16 nChild = GetChildCount(); | 714 sal_uInt16 nChild = GetChildCount(); |
727 while( nChild-- ) 728 GetChild( nChild )->Show( sal_False ); 729} 730 731void ShowWindow::AddWindowToPaintView() 732{ 733 if( mpViewShell->GetView() ) 734 mpViewShell->GetView()->AddWindowToPaintView( this ); 735 | 715 while( nChild-- ) 716 GetChild( nChild )->Show( sal_False ); 717} 718 719void ShowWindow::AddWindowToPaintView() 720{ 721 if( mpViewShell->GetView() ) 722 mpViewShell->GetView()->AddWindowToPaintView( this ); 723 |
736 sal_uInt16 nChild = GetChildCount(); | 724 sal_uInt16 nChild = GetChildCount(); |
737 while( nChild-- ) 738 GetChild( nChild )->Show( sal_True ); 739} 740 741// Overload the sd::Window's CreateAccessible to create a different accessible object 742::com::sun::star::uno::Reference< | 725 while( nChild-- ) 726 GetChild( nChild )->Show( sal_True ); 727} 728 729// Overload the sd::Window's CreateAccessible to create a different accessible object 730::com::sun::star::uno::Reference< |
743 ::com::sun::star::accessibility::XAccessible> 744 ShowWindow::CreateAccessible (void) | 731 ::com::sun::star::accessibility::XAccessible> 732 ShowWindow::CreateAccessible (void) |
745{ 746 ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible(sal_False); 747 if (xAcc.get()) 748 { 749 return xAcc; 750 } | 733{ 734 ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible(sal_False); 735 if (xAcc.get()) 736 { 737 return xAcc; 738 } |
751 if (mpViewShell != NULL) | 739 if (mpViewShell != NULL) |
752 { 753 xAcc = mpViewShell->CreateAccessibleDocumentView (this); 754 SetAccessible(xAcc); 755 return xAcc; 756 } | 740 { 741 xAcc = mpViewShell->CreateAccessibleDocumentView (this); 742 SetAccessible(xAcc); 743 return xAcc; 744 } |
757 else 758 { 759 OSL_TRACE ("::sd::Window::CreateAccessible: no view shell"); | 745 else 746 { 747 OSL_TRACE ("::sd::Window::CreateAccessible: no view shell"); |
760 return ::Window::CreateAccessible (); | 748 return ::Window::CreateAccessible (); |
761 } | 749 } |
762} 763} // end of namespace sd | 750} 751} // end of namespace sd |
752 753/* vim: set noet sw=4 ts=4: */ |
|