[Libreoffice] [PUSHED] Allow GoUpSel, GoDownSel, GoLeftsel, GoRightSel to use "By" property

Olivier Hallot olivier.hallot at documentfoundation.org
Wed Aug 10 14:06:25 PDT 2011


HI Caolán

I had to add this patch to prevent the table boudaries crash issue that
raised when one use the By property for GoLeftSel and GoRightSel.

The test case is (GoLeftSel)

sub Main
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 ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$E$7"

dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "By"
args2(0).Value = 10

dispatcher.executeDispatch(document, ".uno:GoLeftSel", "", 0, args2())

end sub



2011/7/29 Caolán McNamara <caolanm at redhat.com>

> On Fri, 2011-07-29 at 06:30 -0300, Olivier Hallot wrote:
> > Here is a patch to allow GoUpSel, GoDownSel, GoLeftsel,GoRightSel to
> > receive "By" property
>
> Looks good.
>
> > a test file appended as well. Run Main macro to test patch
> >
> > I left
> > SID_CURSORBLKDOWN_SEL
> > SID_CURSORBLKUP_SEL
> > SID_CURSORBLKLEFT_SEL
> > SID_CURSORBLKRIGHT_SEL
> >
> > untouched because repetitions makes no sense to them AFAIK
>
> I see that the pre-existing ::ExecuteCursor doesn't make a distinction
> for the Block selections, it just repeats them the same as non block. So
> I adjusted your patch to include them as well to be consistent between
> moving, and selecting. (hopefully I haven't cocked this up, Kohei, et.
> al. can double check it for me I guess)
>
> Pushed as calc:2a6f95014f3f8be561b4b67e9274a3cc24e2d08f (to master, so
> not in 3-4 stream), thanks for this.
>
> C.
>
>


-- 
Olivier Hallot
Founder and Steering Commitee Member
The Document Foundation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110810/66925e18/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-boundaries-overflow-for-Go-Up-Down-Left-Right-Se.patch
Type: text/x-patch
Size: 1912 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110810/66925e18/attachment.bin>


More information about the LibreOffice mailing list