Thans Eike for the enlighment.<br><br>I am not skilled in C++ (thanks for your patience), but scslots.hxx looks different for GoUpSel and GoDownSel, if that matters, around the line that starts with "73/*Offset*/" and "74/*Offset*/"<br>
<br><br>// Slot Nr. 145 : 26521<br> SFX_NEW_SLOT_ARG( ScCellShell,SID_CURSORDOWN_SEL,SID_CURSORDOWN_SEL,GID_NAVIGATOR,<br> 0 ,&aScCellShellSlots_Impl[146] /*Offset Next*/,<br> SFX_STUB_PTR(ScCellShell,ExecuteCursorSel),SFX_STUB_PTR(ScCellShell,GetStateCursor),<br>
SFX_SLOT_CACHABLE|SFX_SLOT_SYNCHRON|SFX_SLOT_RECORDPERSET|SFX_SLOT_ACCELCONFIG|SFX_SLOT_READONLYDOC|0,<br> 0,<br> SfxVoidItem,<br> 73/*Offset*/, 1/*Count*/, 0, SFX_SLOT_METHOD|0,"GoDownSel" ),<br>
// Slot Nr. 146 : 26522<br> SFX_NEW_SLOT_ARG( ScCellShell,SID_CURSORUP_SEL,SID_CURSORUP_SEL,GID_NAVIGATOR,<br> 0 ,&aScCellShellSlots_Impl[147] /*Offset Next*/,<br> SFX_STUB_PTR(ScCellShell,ExecuteCursorSel),SFX_STUB_PTR(ScCellShell,GetStateCursor),<br>
SFX_SLOT_CACHABLE|SFX_SLOT_SYNCHRON|SFX_SLOT_RECORDPERSET|SFX_SLOT_ACCELCONFIG|SFX_SLOT_READONLYDOC|0,<br> 0,<br> SfxVoidItem,<br> 74/*Offset*/, 1/*Count*/,".GoUpSel",SFX_SLOT_METHOD|0,"GoUpSel" ),<br>
<br><br>Anyway, the whole thing is that GoDownSel (/UpSel/LeftSel/RightSel) has thus a property value FN_PARAM_1 which represent a repetition of the command named ("By"), I guess..<br><br>1) So the following code <br>
<br>rem ----------------------------------------------------------------------<br>dim args1(1) as new com.sun.star.beans.PropertyValue<br>args1(0).Name = "By"<br>args1(0).Value = 10<br>args1(1).Name = "Sel"<br>
args1(1).Value = True<br><br>dispatcher.executeDispatch(document, ".uno:GoDown", "", 0, args1())<br><br>should select 10 lines downward, no?<br><br>But it don't as far as I can see. It moves 10 lines and select one more, the 11th.<br>
<br>I think the issue is in sc/source/ui/view/cellsh4.cxx, where the repetition nRepeat <br><br> if( IS_AVAILABLE( FN_PARAM_1, &pItem ) )<br> nRepeat = static_cast<SCsCOLROW>(((const SfxInt16Item*)pItem)->GetValue());<br>
<br>is not used as loop or passed properly when bSel is true, just below...<br><br>2) And the code <br><br>rem ----------------------------------------------------------------------<br>dim args2(0) as new com.sun.star.beans.PropertyValue<br>
args2(0).Name = "By"<br>args2(0).Value = 10<br><br>dispatcher.executeDispatch(document, ".uno:GoDownSel", "", 0, args2())<br><br>does not select more than 2 cells, probably because the loop nRepeat is missing, it is not taken from rReq in method<br>
<br>void ScCellShell::ExecuteCursorSel( SfxRequest& rReq )<br><br>and besides, the recent fix of bug <a href="https://bugs.freedesktop.org/show_bug.cgi?id=38955">https://bugs.freedesktop.org/show_bug.cgi?id=38955</a> <br>
fixes the recording but does not return the "By" property, as it may miss a line like<br><br>rReq.AppendItem( SfxInt16Item(FN_PARAM_1, static_cast<sal_Int16>(nRepeat)) );<br><br>thus the recorded macro does not show the "By" property<br>
<br>Again sorry for bothering, but isn't this a defect? I am not sure with respect to the specifications.<br><br>Kind regards<br><br>Olivier<br><br><div class="gmail_quote">2011/7/27 Eike Rathke <span dir="ltr"><<a href="mailto:ooo@erack.de">ooo@erack.de</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Olivier,<br>
<div class="im"><br>
On Wednesday, 2011-07-27 14:50:33 -0300, Olivier Hallot wrote:<br>
<br>
> Investigating sc/sdi/cellsh.sdi<br>
</div>> [...]<br>
<div class="im">> So it looks like GoDownSel has an argument "By", which seems to be "select<br>
> FN_PARAM_1 cells down", but GoUpSel (GoRightSel and GoLeftSel) does not have<br>
> this parameter.<br>
><br>
> Which one is the correct?<br>
<br>
</div>Tricky.. both ;-) The slot parameters of the first definition of an<br>
ExecMethod are inherited by following definitions with the same<br>
ExecMethod. So actually SID_CURSORUP_SEL inherits By from the first<br>
definition of ExecuteCursorSel that happens to be SID_CURSORDOWN_SEL.<br>
Compare with the generated sc/$INPATH/inc/scslots.hxx<br>
<br>
Eike<br>
<font color="#888888"><br>
--<br>
PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication.<br>
Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD<br>
</font><br>_______________________________________________<br>
LibreOffice mailing list<br>
<a href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/libreoffice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Olivier Hallot<br>Founder and Steering Commitee Member<br>The Document Foundation<br><br>