summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-04-06 12:27:30 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-04-06 12:27:30 +0000
commit92ed70feb078ccd3ade131c744b753de05ed3efc (patch)
treee10e4a1345bb37c7e6b53938187799702f2df890 /sd
parente00b283a76829138dc3f97417969f053d9516707 (diff)
INTEGRATION: CWS slideshowkeys01 (1.27.76); FILE MERGED
2006/03/24 14:46:08 cl 1.27.76.2: #i54381# changed slide show controlling 2006/03/21 15:25:46 cl 1.27.76.1: #i54381# changed slide show controlling
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx61
1 files changed, 43 insertions, 18 deletions
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 54fd52feb842..d1a184c9cd37 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: slideshowimpl.cxx,v $
*
- * $Revision: 1.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: obo $ $Date: 2006-03-29 11:23:35 $
+ * last change: $Author: vg $ $Date: 2006-04-06 13:27:30 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -451,6 +451,7 @@ sal_Int32 AnimationSlideController::getNextSlideNumber() const
}
}
+
bool AnimationSlideController::nextSlide()
{
return jumpToSlideIndex( getNextSlideIndex() );
@@ -1327,12 +1328,33 @@ void SlideshowImpl::registerShapeEvents( Reference< XShapes >& xShapes )
}
}
+void SlideshowImpl::gotoNextEffect()
+{
+ if( mxShow.is() && mpSlideController.get() && mpShowWindow )
+ {
+ const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
+ if( eMode == SHOWWINDOWMODE_END )
+ {
+ mpShowWindow->TerminateShow();
+ }
+ else if( (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK) )
+ {
+ mpShowWindow->RestartShow();
+ }
+ else
+ {
+ mxShow->nextEffect();
+ update();
+ }
+ }
+}
+
void SlideshowImpl::gotoPreviousSlide()
{
if( mxShow.is() && mpSlideController.get() ) try
{
const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
- if( (eMode == SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) )
+ if( (eMode == SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK) )
{
const sal_Int32 nLastSlideIndex = mpSlideController->getSlideIndexCount() - 1;
if( nLastSlideIndex >= 0 )
@@ -1964,7 +1986,6 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
{
// cancel show
case KEY_ESCAPE:
- case KEY_BACKSPACE:
case KEY_SUBTRACT:
// in case the user cancels the presentation, switch to current slide
// in edit mode
@@ -1977,9 +1998,18 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
break;
// advance show
+ case KEY_PAGEDOWN:
+ if(rKEvt.GetKeyCode().IsMod2())
+ {
+ gotoNextSlide();
+ break;
+ }
+ // warning, fall through!
case KEY_SPACE:
- mxShow->nextEffect();
- update();
+ case KEY_RIGHT:
+ case KEY_DOWN:
+ case KEY_N:
+ gotoNextEffect();
break;
case KEY_RETURN:
@@ -1995,8 +2025,7 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
}
else
{
- mxShow->nextEffect();
- update();
+ gotoNextEffect();
}
}
break;
@@ -2015,17 +2044,11 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
maCharBuffer.Append( rKEvt.GetCharCode() );
break;
- case KEY_PAGEDOWN:
- case KEY_RIGHT:
- case KEY_DOWN:
- case KEY_N:
- gotoNextSlide();
- break;
-
case KEY_PAGEUP:
case KEY_LEFT:
case KEY_UP:
case KEY_P:
+ case KEY_BACKSPACE:
gotoPreviousSlide();
break;
@@ -2037,12 +2060,14 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
gotoLastSlide();
break;
- case( KEY_B ):
- case( KEY_W ):
+ case KEY_B:
+ case KEY_W:
+ case KEY_POINT:
+ case KEY_COMMA:
{
if( mpShowWindow )
{
- const Color aBlankColor( (nKeyCode == KEY_B ) ? COL_BLACK : COL_WHITE );
+ const Color aBlankColor( ((nKeyCode == KEY_W ) || (nKeyCode == KEY_COMMA)) ? COL_WHITE : COL_BLACK );
if( mpShowWindow->SetBlankMode( mpSlideController->getCurrentSlideIndex(), aBlankColor ) )
pause( true );
}