Hi there,

Using the interface
"http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/XCellRangesQuery";
the range "A1:C4" is compared with the value in cell "B5 (4,1)" (value
"1") using the "queryColumnDifferences" method of the range,  supplying
the address of the cell "4,1" as an argument. The resulting
XSheetCellRanges is then used to colorize the cells in red, and also its
method getRangeAsAddresses is used to display the cell ranges in a human
readable form in "A7"

The result is as follows (directly copied from the spreadsheet):


    1   1       2
    1   2       2
    1   2       1
    1   1       1
    Search value:       1       

        
        
    Sheet1.B1;Sheet1.B4;Sheet1.C3:C4    
        


Now, the result of "queryColumnDifferences" surprises me, as I would
have expected the cells containing the value "2" to be returned from
"queryColumnDifferences", rather four cells are returned that
column-wise indicate those cells that have a matching value with the
search value, rather than those cells that have different values (i.e.
"B2:B3" and "C1:C2").

Is this the intended behaviour of this method?
<http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/XCellRangesQuery.html#queryColumnDifferences>
states:

     "...All cells which are different to this comparison cell will be
    returned."

[Using  the method "queryRowDifferences" will return all (!) cells in
the given range!]

All of this is OOo 3.2.1 running under Windows XP SP3.

Can someone shed some light on this (I did not find any issues linked to
queryColumnDifferences in the issue tracker) ?

---rony

Reply via email to