Re: [sc-dev] queryColumnDifferences working wrongly ?

2010-07-10 Thread Rony G. Flatscher
Hi Niklas,

On 09.07.2010 18:16, Niklas Nebel wrote:
 On 07/09/10 13:08, Rony G. Flatscher wrote:
 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

 Each column of the range is compared to a cell in the same column and
 the row of the parameter. They are not all compared to the same value.
Ah, that explains it, thank you very much for your help !

---rony


-
To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org
For additional commands, e-mail: dev-h...@sc.openoffice.org



Re: [sc-dev] queryColumnDifferences working wrongly ?

2010-07-09 Thread Rony G. Flatscher
Hi there,

just noticed that my e-mail was turned to a flat text file, hence the
coloring got lost. As described in the text the cells that differ from
the SearchValue (1) are: B1, B4, C3, C4, which do not differ from the
search value at all. (Trying to emphasize them in the table below by
placing the number between two asterisks.)

The cells that differ are instead: B2, B3, C1, C2.

---rony

P.S.: It is as if the returned cells are the inverse of their respective
column cells, i.e. those cells per column, that do not differ; as if
after the first column was processed some switch causing the inverse
result to be wrongly reported.


On 09.07.2010 13:08, Rony G. Flatscher wrote:
 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
   


-
To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org
For additional commands, e-mail: dev-h...@sc.openoffice.org



Re: [sc-dev] queryColumnDifferences working wrongly ?

2010-07-09 Thread Niklas Nebel

On 07/09/10 13:08, Rony G. Flatscher wrote:

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


Each column of the range is compared to a cell in the same column and 
the row of the parameter. They are not all compared to the same value.


Niklas

-
To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org
For additional commands, e-mail: dev-h...@sc.openoffice.org