You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Nick Burch <ni...@alfresco.com> on 2010/09/02 11:56:17 UTC

Re: Patch: Scratchpad Logging

On Mon, 30 Aug 2010, Stephan Götter wrote:
> I do get a lot of log messages of org.apache.poi.hslf.model.Sheet to 
> stderr because of invalid documents.

Part of the hope of using stderr rather than logger was that it would 
inspire people to fix the problems in the scratchpad code...

If there's one common thing that's always triggering messages for your 
documents, don't suppose you'd fancy fixing POI so it can handle that case 
without warnings? :)

Nick

Re: Patch: Scratchpad Logging

Posted by Nick Burch <ni...@alfresco.com>.
On Thu, 16 Sep 2010, Stephan Götter wrote:
> TextRulerAtom is already supported and MasterTextPropAtom is according 
> to the specs similar to StyleTextPropAtom, which is "safely ignored" in 
> hslf.model.Sheet. So all of these and the TextHeaderAtom can be safely 
> ignored here?

It looks like they're probably safe to skip over, yes. Not sure if we'd 
add full support for MasterTextPropAtom, since if it's like 
StyleTextPropAtom there'd be quite a bit of work, but skipping on id might 
be fine.

Any chance you could find a .ppt file which we can use as the basis for a 
unit test for this? I'd ideally like to double check with a real file 
before I put in the skips, and we'll then also have something for testing 
going forward

Thanks
Nick

Re: Patch: Scratchpad Logging

Posted by Stephan Götter <ke...@gmail.com>.
2010/9/2 Nick Burch <ni...@alfresco.com>:
>> How can this be fixed?
>
> First step would be to add record level support for these two atom records.
> The specs are now freely available from Microsoft (a link to the binary
> format docs is on the POI site). Once we're able to process the records, we
> can then edit hslf.model.Sheet to pick the correct sibling to match up with
> when building the text runs.
>
> If you're able to code up the former, I'm happy to help out with the latter
> :)
2010/9/2 Nick Burch <ni...@alfresco.com>:
>>
>> MasterTextPropAtom (4002) and TextRulerAtom (4006)
>>
>> How can this be fixed?
>
> First step would be to add record level support for these two atom records.
> The specs are now freely available from Microsoft (a link to the binary
> format docs is on the POI site). Once we're able to process the records, we
> can then edit hslf.model.Sheet to pick the correct sibling to match up with
> when building the text runs.
>
> If you're able to code up the former, I'm happy to help out with the latter
> :)

TextRulerAtom is already supported and MasterTextPropAtom is according
to the specs similar to StyleTextPropAtom, which is "safely ignored"
in hslf.model.Sheet. So all of these and the TextHeaderAtom can be
safely ignored here?

Greets,

Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Patch: Scratchpad Logging

Posted by Nick Burch <ni...@alfresco.com>.
On Thu, 2 Sep 2010, Stephan Götter wrote:
> Found a TextHeaderAtom not followed by a TextBytesAtom or
> TextCharsAtom: Followed by 4002
> Found a TextHeaderAtom not followed by a TextBytesAtom or
> TextCharsAtom: Followed by 4006
>
> MasterTextPropAtom (4002) and TextRulerAtom (4006)
>
> How can this be fixed?

First step would be to add record level support for these two atom 
records. The specs are now freely available from Microsoft (a link to the 
binary format docs is on the POI site). Once we're able to process the 
records, we can then edit hslf.model.Sheet to pick the correct sibling to 
match up with when building the text runs.

If you're able to code up the former, I'm happy to help out with the 
latter :)

> PS: Isn't an error log entry annoying enough to inspire people? :)

It would be if most people didn't turn off all poi logging by default...!

Nick

Re: Patch: Scratchpad Logging

Posted by Stephan Götter <ke...@gmail.com>.
Hi Nick,

I wrote the patch because at
http://jira.atlassian.com/browse/CONF-18721 is stated that the
scratchpad code is correct, at least for TextHeaderAtom (3999).

After inspecting the logs I've found additionally these entries:

Found a TextHeaderAtom not followed by a TextBytesAtom or
TextCharsAtom: Followed by 4002
Found a TextHeaderAtom not followed by a TextBytesAtom or
TextCharsAtom: Followed by 4006

MasterTextPropAtom (4002) and TextRulerAtom (4006)

How can this be fixed?

Thanks,
Stephan

PS: Isn't an error log entry annoying enough to inspire people? :)

2010/9/2 Nick Burch <ni...@alfresco.com>:
> On Mon, 30 Aug 2010, Stephan Götter wrote:
>>
>> I do get a lot of log messages of org.apache.poi.hslf.model.Sheet to
>> stderr because of invalid documents.
>
> Part of the hope of using stderr rather than logger was that it would
> inspire people to fix the problems in the scratchpad code...
>
> If there's one common thing that's always triggering messages for your
> documents, don't suppose you'd fancy fixing POI so it can handle that case
> without warnings? :)
>
> Nick
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org