DO NOT REPLY [Bug 23951] - setSheetOrder(...) of HSSFWorkBook class doesn't set tab name correctly in Excel file

2007-03-27 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=23951


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Additional Comments From [EMAIL PROTECTED]  2007-03-27 12:44 ---
Here's a better workaround for using setSheetOrder() without using cloneSheet() 
method. The current open-source version will not 

support sheet cloning if the sheet has any embedded images or objects. As 
you've probably found out, setSheetOrder() only swaps 

the actual sheet content -- not the sheet's name. So you'll need to manually 
set that on your own.

As regards to the contents not swapping properly, try not to think about it 
as 'sheet 3 BEFORE sheet 1', but rather the opposite 

direction. So if you write the code as:

   workbook.setSheetName(sheetNameWhereIndexIsZero, 3); //this will work.

Anyways, here's my arbitrary positioned workaround:

//sheetName buffer.
int intTotalSheet = workbbook.getNumberOfSheets();
String[] straSheetName = new String[intTotalSheet];

for (int b=0; bhttp://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/



Re[2]: Is Glen Stampoultzis still a POI developer?

2007-03-27 Thread Yegor Kozlov

AS>  if we have testcases, we
AS> should be confident to commit... that's the point of testcases, no?

That is my concern. There is a testcase for DrawingGroupRecord but if
I apply my fix it fails. I suspect that the test logic is wrong.
It checks serialization against artificial data, not against a real xls file.

I'd like to clarify it.

Regards,
Yegor

AS> Yeah, Glen is one of the oldest commiters on POI. I imagine, real life 
would 
AS> be taking more of his time these days...

AS> I'd wait for him to reply a day or two, otherwise, if we have testcases, we 
AS> should be confident to commit... that's the point of testcases, no?

AS> Regards
AS> -
AS> Avik


AS> On Tuesday 27 Mar 2007 7:38:19 pm Yegor Kozlov wrote:
>> He doesn't seem to be posting in poi-user and poi-dev for quite a long
>> time.
>>
>> He is the author of org.apache.poi.hssf.record.DrawingGroupRecord
>> and I think I found a bug in it. Before applying the fix I would like
>> to make sure it is correct and won't break anything.
>>
>> The bug is in DrawingGroupRecord.writeData.
>> If the record is over max record size then continue record is not
>> written right after the first portion. Instead it writes two chunks with
>> sid=DrawingGroupRecord.sid and continue records only after it.
>>
>> In other words,  DrawingGroupRecord serializes data as follows:
>>
>> [DrawingGroupRecord] [DrawingGroupRecord] [continued]...
>>
>> while it should be
>>
>> [DrawingGroupRecord] [continued] [continued] ...
>>
>>
>> I found it when fixing Bug 28744 and have a test case which fails with
>> Glen's code and works fine with my fix.
>>
>> Regards,
>> Yegor
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> Mailing List:http://jakarta.apache.org/site/mail2.html#poi
>> The Apache Jakarta POI Project: http://jakarta.apache.org/poi/



AS> -
AS> To unsubscribe, e-mail: [EMAIL PROTECTED]
AS> Mailing List:http://jakarta.apache.org/site/mail2.html#poi
AS> The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/



Re: Is Glen Stampoultzis still a POI developer?

2007-03-27 Thread Avik Sengupta
Yeah, Glen is one of the oldest commiters on POI. I imagine, real life would 
be taking more of his time these days...

I'd wait for him to reply a day or two, otherwise, if we have testcases, we 
should be confident to commit... that's the point of testcases, no?

Regards
-
Avik


On Tuesday 27 Mar 2007 7:38:19 pm Yegor Kozlov wrote:
> He doesn't seem to be posting in poi-user and poi-dev for quite a long
> time.
>
> He is the author of org.apache.poi.hssf.record.DrawingGroupRecord
> and I think I found a bug in it. Before applying the fix I would like
> to make sure it is correct and won't break anything.
>
> The bug is in DrawingGroupRecord.writeData.
> If the record is over max record size then continue record is not
> written right after the first portion. Instead it writes two chunks with
> sid=DrawingGroupRecord.sid and continue records only after it.
>
> In other words,  DrawingGroupRecord serializes data as follows:
>
> [DrawingGroupRecord] [DrawingGroupRecord] [continued]...
>
> while it should be
>
> [DrawingGroupRecord] [continued] [continued] ...
>
>
> I found it when fixing Bug 28744 and have a test case which fails with
> Glen's code and works fine with my fix.
>
> Regards,
> Yegor
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> Mailing List:http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta POI Project: http://jakarta.apache.org/poi/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/



Is Glen Stampoultzis still a POI developer?

2007-03-27 Thread Yegor Kozlov

He doesn't seem to be posting in poi-user and poi-dev for quite a long
time.

He is the author of org.apache.poi.hssf.record.DrawingGroupRecord
and I think I found a bug in it. Before applying the fix I would like
to make sure it is correct and won't break anything.

The bug is in DrawingGroupRecord.writeData.
If the record is over max record size then continue record is not
written right after the first portion. Instead it writes two chunks with
sid=DrawingGroupRecord.sid and continue records only after it.

In other words,  DrawingGroupRecord serializes data as follows:

[DrawingGroupRecord] [DrawingGroupRecord] [continued]...

while it should be

[DrawingGroupRecord] [continued] [continued] ...


I found it when fixing Bug 28744 and have a test case which fails with
Glen's code and works fine with my fix.

Regards,
Yegor


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/