Issue 121506 - Zoom slider disappears after changing page/slide in Draw/Impress
Summary: Zoom slider disappears after changing page/slide in Draw/Impress
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: 3.4.1
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 19:59 UTC by Ed
Modified: 2013-05-08 10:13 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Macro to test the status of UNO commands in the statusbar (13.68 KB, application/vnd.oasis.opendocument.presentation)
2013-05-08 09:26 UTC, Ariel Constenla-Haile
no flags Details
A possible fix (1.38 KB, patch)
2013-05-08 10:13 UTC, Ariel Constenla-Haile
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Ed 2012-12-18 19:59:11 UTC
The zoom slider disappears from all open Draw and Impress files after switching page/slide in any of them.

The zoom slider is present in files opened after the switch, but does not reappear in any of the documents is disappeared from until they are closed and reopened.

Noticed in AOO 3.4.1, testing in OOo-dev-3.5.0 gives same result.  Tested on Windows 7 and Mageia 2.
Comment 1 Ariel Constenla-Haile 2012-12-18 20:13:34 UTC
(In reply to comment #0)
> The zoom slider disappears from all open Draw and Impress files after
> switching page/slide in any of them.
> 
> The zoom slider is present in files opened after the switch, but does not
> reappear in any of the documents is disappeared from until they are closed
> and reopened.

If you select a shape, the zoom slider comes back.
Comment 2 Ariel Constenla-Haile 2013-05-08 09:26:11 UTC
Created attachment 80652 [details]
Macro to test the status of UNO commands in the statusbar

The problem is that when left Pages (Draw)/ Slides (Impress) pane gets the focus, ".uno:ZoomSlider" is disabled.

Steps to reproduce:

- New Impress document
- You can see the zoom slider in the statusbar
- Click with the mouse in the "Slides" pane on the left
- The slide sorter disappear
- Click with the mouse somewhere on the document window in the center
- The slide sorter appears again

You can run the macro in the attached document to see that ".uno:ZoomSlider" is disabled when the Slide Pane has the focus
Comment 3 Ariel Constenla-Haile 2013-05-08 10:13:08 UTC
Created attachment 80653 [details]
A possible fix

The SlideSorterView interface is defined to handle the SID_ATTR_ZOOMSLIDER, this will end up in

void SlotManager::GetStatusBarState (SfxItemSet& rSet)
sd/source/ui/slidesorter/controller/SlsSlotManager.cxx

where the slot is disabled. This is fine for the Slide Sorter view, but not for the Slide pane.

A possible solution can be not to define SID_ATTR_ZOOMSLIDER in the SlideSorterView interface, and let it be handled by some of the view shells on top of which the slide sorter view shell is stacked (this is the current behavior for SID_ATTR_ZOOM).

The problem of disabling SID_ATTR_ZOOMSLIDER for the Slide Sorter view can be solved by doing this conditionally:

// No slider when the Slide Sorter is the main view shell
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) &&
    mrSlideSorter.GetViewShell() &&
    mrSlideSorter.GetViewShell()->IsMainViewShell() )
{
   rSet.Put( SfxVoidItem( SID_ATTR_ZOOMSLIDER ) );
}

This is to be on the safe side, because the slot is already disabled when sd::slidesorter::controller::SlotManager::GetStatusBarState() is called.