renaissance1: #i107215# Do not show buttons for Draw documents.
This commit is contained in:
@@ -857,11 +857,19 @@ void SelectionFunction::SwitchToMultiSelectionMode (
|
||||
|
||||
|
||||
|
||||
void SelectionFunction::SwitchToButtonMode (void)
|
||||
bool SelectionFunction::SwitchToButtonMode (void)
|
||||
{
|
||||
if (mpModeHandler->GetMode() != ButtonMode)
|
||||
SwitchMode(::boost::shared_ptr<ModeHandler>(
|
||||
new ButtonModeHandler(mrSlideSorter, *this)));
|
||||
// Do not show the buttons for draw pages.
|
||||
::boost::shared_ptr<ViewShell> pMainViewShell (mrSlideSorter.GetViewShellBase()->GetMainViewShell());
|
||||
if (pMainViewShell
|
||||
&& pMainViewShell->GetShellType()!=ViewShell::ST_DRAW
|
||||
&& mpModeHandler->GetMode() != ButtonMode)
|
||||
{
|
||||
SwitchMode(::boost::shared_ptr<ModeHandler>(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
|
||||
{
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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<ViewShell> 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<ViewShell> 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user