Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Wed, 2011-07-27 at 21:05 -0300, Olivier Hallot wrote:
2) ... the code 

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

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

does not select more than 2 cells, probably because the loop nRepeat
is missing, it is not taken from rReq in method

void ScCellShell::ExecuteCursorSel( SfxRequest& rReq )

Yes, that looks to be the case. Presumably to get this to work in
ScCellShell::ExecuteCursorSel the 1,s and -1's in should be
"nRepeat/-nRepeat" where nRepeat defaults to 1, then has something
like ...

const SfxItemSet*   pReqArgs = rReq.GetArgs();
if ( pReqArgs != NULL )
{
    const   SfxPoolItem* pItem;
    if( IS_AVAILABLE( FN_PARAM_1, &pItem ) )
        nRepeat = static_cast<SCsCOLROW>(((const
SfxInt16Item*)pItem)->GetValue());
}

to set it to the repeat value if set.

...

and then a final 

    rReq.AppendItem( SfxInt16Item(FN_PARAM_1,
static_cast<sal_Int16>(nRepeat)) );

before the trailing rReq.Done() to explictly record the nRepeat as "1"
if unset for macro recording.

C.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.