Bug 63659 - Document dispatcher opens window instead of applying the settings
Summary: Document dispatcher opens window instead of applying the settings
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.1.2 release
Hardware: All All
: lowest minor
Assignee: Noel Power
URL:
Whiteboard: target:4.1.0 target:4.0.4
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-17 22:08 UTC by pahmer
Modified: 2013-04-22 13:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pahmer 2013-04-17 22:08:24 UTC
In previous versions of LO (3.x) the following basic code changed the zoom setting, but now it opens the zoom window instead of making the change. 

sub ZoomIn( )
    Zoom(10)
end sub

sub ZoomOut( )
    Zoom(-10)
end sub

function Zoom(SStep as Integer)
    rem ----------------------------------------------------------------------
    rem define variables
    dim document   as object
    dim dispatcher as object
    rem ----------------------------------------------------------------------
    rem get access to the document
    document   = ThisComponent.CurrentController.Frame
    dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

    rem ----------------------------------------------------------------------
    sv = thiscomponent.currentcontroller.viewdata
    av = split(sv,";")
    Magnification = cInt(av(2))
    Magnification = Magnification + SStep
    if (Magnification < 20) then Magnification =20 'controls limits of zoom
    if (Magnification >600) then Magnification =600

    dim args1(2) as new com.sun.star.beans.PropertyValue
    args1(0).Name = "Zoom.Value"
    args1(0).Value = Magnification
    args1(1).Name = "Zoom.ValueSet"
    args1(1).Value = 28703
    args1(2).Name = "Zoom.Type"
    args1(2).Value = 0
    dispatcher.executeDispatch(document, ".uno:Zoom", "", 0, args1())
end function
Comment 1 Joel Madero 2013-04-18 01:41:58 UTC
Thank you for reporting this issue! I have been able to confirm the issue on:
Version: 4.1.0.0.alpha0+Build ID: 6e3e6ef7257e93743a72719581ef6fe0016e58e
Date:   Thu Apr 11 15:24:38 2013 +0200 
Platform: Bodhi Linux 2.2 x64

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
As I've been able to confirm this problem I am marking as:

New (confirmed)
Minor - doesn't prevent high quality work, can slow it down slightly if you're running this macro
Lowest - so far only one macro showing the issue so only one person affected, If other strange basic issues come up that are related maybe we can up this a bit 


Noel - any ideas about this one? Maybe the change was on purpose and this is expected now? Seems like an inadvertent change from what I can see

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage and join us on freenode at #libreoffice-qa

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 2 Noel Power 2013-04-18 08:18:36 UTC
no, no idea ( although this is vaguely reminiscent of issue #58403 ) perhaps someone has done some similar changes ( and broken ) zoom too :/
Comment 3 Noel Power 2013-04-18 08:22:15 UTC
(In reply to comment #2)
> no, no idea ( although this is vaguely reminiscent of issue #58403 ) perhaps
> someone has done some similar changes ( and broken ) zoom too :/

bug #58403
Comment 4 Commit Notification 2013-04-18 11:38:57 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c903c377ec885465e422d6acf0e8eb75483dff30

fix fdo#63659 restore handling of ZOOM MID, MID_VALUESET & MID_TYPE sub parmas



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2013-04-19 07:46:09 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b2a84e61e25679e63b5620e818c4532b64b2a4fc&h=libreoffice-4-0

fix fdo#63659 restore handling of ZOOM MID, MID_VALUESET & MID_TYPE sub parmas


It will be available in LibreOffice 4.0.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Jean-Baptiste Faure 2013-04-21 19:47:58 UTC
Hi Noël,

Your commit has an unwanted side-effect on the master and LO 4.0 branch: the zoom factor in the statusbar is always shown as 0%. I reverted locally your commit on my copy of LO 4.0.4.0+ and that solved this issue.

Best regards. JBF
Comment 7 Commit Notification 2013-04-22 09:41:04 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ad57664323e3ddf04ae99dba14ddaa22da2aacba

fdo#63659 <sigh> fix brain lapse, missing break



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Noel Power 2013-04-22 09:57:06 UTC
(In reply to comment #6)
> Hi Noël,
> 
> Your commit has an unwanted side-effect on the master and LO 4.0 branch: the
> zoom factor in the statusbar is always shown as 0%. I reverted locally your
> commit on my copy of LO 4.0.4.0+ and that solved this issue.
> 
> Best regards. JBF

Thanks for bringing it to my attention, seems I had a brain fart :-) should be fixed now
Comment 9 Commit Notification 2013-04-22 10:04:48 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fe3d1b7ab5ac2776b60efab0efbd6d832f63b655&h=libreoffice-4-0

fdo#63659 <sigh> fix brain lapse, missing break


It will be available in LibreOffice 4.0.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Noel Power 2013-04-22 13:25:43 UTC
from irc
>Jbfaure> noelp: fdo#63659 zoom ok on master and 4.0.4.0+. Thank you :-)