diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index 2ef7bdcc6a34..fb1dd05c8861 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -857,11 +857,19 @@ void SelectionFunction::SwitchToMultiSelectionMode ( -void SelectionFunction::SwitchToButtonMode (void) +bool SelectionFunction::SwitchToButtonMode (void) { - if (mpModeHandler->GetMode() != ButtonMode) - SwitchMode(::boost::shared_ptr( - new ButtonModeHandler(mrSlideSorter, *this))); + // Do not show the buttons for draw pages. + ::boost::shared_ptr pMainViewShell (mrSlideSorter.GetViewShellBase()->GetMainViewShell()); + if (pMainViewShell + && pMainViewShell->GetShellType()!=ViewShell::ST_DRAW + && mpModeHandler->GetMode() != ButtonMode) + { + SwitchMode(::boost::shared_ptr(new ButtonModeHandler(mrSlideSorter, *this))); + return true; + } + else + return false; } @@ -1357,8 +1365,8 @@ bool NormalModeHandler::ProcessButtonDownEvent ( // (or being faded in.) if (mrSlideSorter.GetView().GetButtonBar().IsVisible(rDescriptor.mpHitDescriptor)) { - mrSelectionFunction.SwitchToButtonMode(); - ReprocessEvent(rDescriptor); + if (mrSelectionFunction.SwitchToButtonMode()) + ReprocessEvent(rDescriptor); } else { diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx index 358d58b6d761..1280b83af771 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx @@ -117,7 +117,7 @@ public: void SwitchToNormalMode (void); void SwitchToDragAndDropMode(const Point aMousePosition); void SwitchToMultiSelectionMode (const Point aMousePosition, const sal_uInt32 nEventCode); - void SwitchToButtonMode (void); + bool SwitchToButtonMode (void); void ResetShiftKeySelectionAnchor (void); diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index 8c0a8b4de83f..1b33625daefe 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -955,15 +955,20 @@ void SlideSorterView::UpdatePageUnderMouse ( SharedSdWindow pWindow (mrSlideSorter.GetContentWindow()); const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition)); - const bool bIsMouseOverButtonBar (GetButtonBar().IsMouseOverBar()); - GetButtonBar().ProcessMouseMotionEvent(rpDescriptor, aMouseModelPosition, bIsMouseButtonDown); - // Set the help text of the slide when the mouse was moved from - // the button bar back over the preview. - if (rpDescriptor - && GetButtonBar().IsMouseOverBar() != bIsMouseOverButtonBar - && bIsMouseOverButtonBar) + ::boost::shared_ptr pMainViewShell (mrSlideSorter.GetViewShellBase()->GetMainViewShell()); + if (pMainViewShell + && pMainViewShell->GetShellType()!=ViewShell::ST_DRAW) { - mpToolTip->ShowDefaultHelpText(); + const bool bIsMouseOverButtonBar (GetButtonBar().IsMouseOverBar()); + GetButtonBar().ProcessMouseMotionEvent(rpDescriptor, aMouseModelPosition, bIsMouseButtonDown); + // Set the help text of the slide when the mouse was moved from the + // button bar back over the preview. + if (rpDescriptor + && GetButtonBar().IsMouseOverBar() != bIsMouseOverButtonBar + && bIsMouseOverButtonBar) + { + mpToolTip->ShowDefaultHelpText(); + } } } @@ -1017,12 +1022,17 @@ bool SlideSorterView::SetState ( RequestRepaint(pDescriptor); } - // Fade in or out the buttons. - if (eState == PageDescriptor::ST_MouseOver) - if (bStateValue) - GetButtonBar().RequestFadeIn(rpDescriptor, bAnimate); - else - GetButtonBar().RequestFadeOut(rpDescriptor, bAnimate); + ::boost::shared_ptr pMainViewShell(mrSlideSorter.GetViewShellBase()->GetMainViewShell()); + if (pMainViewShell + && pMainViewShell->GetShellType()!=ViewShell::ST_DRAW) + { + // Fade in or out the buttons. + if (eState == PageDescriptor::ST_MouseOver) + if (bStateValue) + GetButtonBar().RequestFadeIn(rpDescriptor, bAnimate); + else + GetButtonBar().RequestFadeOut(rpDescriptor, bAnimate); + } return bModified; }