summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/viewshel.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-01-28 15:27:09 +0000
committerOliver Bolte <obo@openoffice.org>2005-01-28 15:27:09 +0000
commit6f3f44a132b773802c175fec00a656be66afeff9 (patch)
treef8eebba0cf7ccae2b86003cded1740e0408cd052 /sd/source/ui/view/viewshel.cxx
parent9c21fb08430e02520e380f2b4cc082496be18a54 (diff)
INTEGRATION: CWS impress20 (1.38.28); FILE MERGED
2005/01/12 14:24:41 af 1.38.28.5: RESYNC: (1.44-1.45); FILE MERGED 2004/12/10 15:35:17 af 1.38.28.4: RESYNC: (1.42-1.44); FILE MERGED 2004/12/10 15:16:44 af 1.38.28.3: Resolved merge problems. 2004/12/07 17:33:31 af 1.38.28.2: RESYNC: (1.38-1.42); FILE MERGED 2004/12/01 12:57:14 bm 1.38.28.1: #i32645# handle scroll whell via hierarchical Notify calls instead of ChildWindowListeners
Diffstat (limited to 'sd/source/ui/view/viewshel.cxx')
-rw-r--r--sd/source/ui/view/viewshel.cxx59
1 files changed, 38 insertions, 21 deletions
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 6b776a9219ce..b4b062bf5a61 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: viewshel.cxx,v $
*
- * $Revision: 1.46 $
+ * $Revision: 1.47 $
*
- * last change: $Author: rt $ $Date: 2005-01-27 14:24:13 $
+ * last change: $Author: obo $ $Date: 2005-01-28 16:27:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -751,13 +751,44 @@ void ViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin)
void ViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
{
+ BOOL bDone = HandleScrollCommand (rCEvt, pWin);
+
+ if( !bDone )
+ {
+ if(mpSlideShow)
+ {
+ mpSlideShow->command(rCEvt);
+ }
+ else if (pFuActual)
+ {
+ pFuActual->Command(rCEvt);
+ }
+ }
+}
+
+long ViewShell::Notify(NotifyEvent& rNEvt, ::sd::Window* pWin)
+{
+ // handle scroll commands when they arrived at child windows
+ long nRet = FALSE;
+ if( rNEvt.GetType() == EVENT_COMMAND )
+ {
+ // note: dynamic_cast is not possible as GetData() returns a void*
+ CommandEvent* pCmdEvent = reinterpret_cast< CommandEvent* >(rNEvt.GetData());
+ nRet = HandleScrollCommand(*pCmdEvent, pWin);
+ }
+ return nRet;
+}
+
+
+BOOL ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWin)
+{
BOOL bDone = FALSE;
switch( rCEvt.GetCommand() )
{
- case( COMMAND_WHEEL ):
- case( COMMAND_STARTAUTOSCROLL ):
- case( COMMAND_AUTOSCROLL ):
+ case COMMAND_WHEEL:
+ case COMMAND_STARTAUTOSCROLL:
+ case COMMAND_AUTOSCROLL:
{
const CommandWheelData* pData = rCEvt.GetWheelData();
@@ -780,10 +811,7 @@ void ViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
}
else
{
- ScrollBar* pWinHScroll = NULL;
- ScrollBar* pWinVScroll = NULL;
-
- if (mpContentWindow.get() == pWin)
+ if( mpContentWindow.get() == pWin )
{
bDone = pWin->HandleScrollCommand( rCEvt,
mpHorizontalScrollBar.get(),
@@ -797,22 +825,11 @@ void ViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
break;
}
- if( !bDone )
- {
- if(mpSlideShow)
- {
- mpSlideShow->command(rCEvt);
- }
- else if (pFuActual)
- {
- pFuActual->Command(rCEvt);
- }
- }
+ return bDone;
}
-
void ViewShell::SetupRulers (void)
{
if (mbHasRulers && (mpContentWindow.get() != NULL) && (mpSlideShow==NULL) )