You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Michael Wyraz <li...@wyraz.de> on 2004/02/28 09:00:16 UTC

Page Breaks

Hello,

some time ago i wrote some code to enable manual page breaks for
poi. I forgot to commit it but i was requested by a poi user to do
so, so here's the code.

I'm sorry but it is not completely finished and i don't have the time
to finish and test it. But i'll write what i changed and what should be
done to finish it. It's not much work but it needs some knowledge of
poi and i did not work with poi for a while...

In src/java/org/apache/hssf/record:

I added two new records (HorizontalPageBreaksRecord and 
VerticalPageBreaksRecord). Each of them holds every horizontal/vertical
Page Breaks. They don't occur when there are no page breaks. Some 
comments are in the files.
I found the information how page breaks are stored somewhere in the mail 
archives.

I added these new records to RecordFactory (there are two arrays 
containing known records. i added both classes to both arrays).


In src/java/org/apache/hssf/usermodel:

I added two methods to HSSFSheet. They return (and create if nessecary)
the page break records.
This is dirty code for the usermodel because it returns the records and 
let the user manipulate them. This methods should be decladed private 
(or protected) and some code should be added to modify page breaks using 
  the HSSFSheet class.

That's it. Hope it helps.

Michael.