Anybody working on text column separators?

Friedrich W. H. Kossebau kossebau at kde.org
Sat Jul 21 10:08:48 BST 2012


Am Freitag, 20. Juli 2012, 07:24:13 schrieb C. Boemann:
> On Thursday 19 July 2012 17:50:12 Friedrich W. H. Kossebau wrote:
> > Hi,
> > 
> > I came across the issue that columns in texts are not yet completely
> > supported. Is anyone working on that?
> > 
> > For a start I did a patch (attached) which makes at least the column
> > separator data survive a roundtrip through Words. Might be worth to add as
> > bugfix to 2.5. What do you think?
> > 
> > For master I would like to also add actually rendering the column
> > separator
> > as well as adding a control to the page style dialog to configure it. But
> > I have no idea yet how I best implement the rendering. I looked e.g. at
> > KWFrameLayout but saw no solution waiting between the code lines.
> > 
> > Any proposals from Words insiders how to approach this?
> > 
> > Support for different column widths are a separate issue and have no need
> > for me ATM :)
> > 
> > Cheers
> > Friedrich
> 
> Hi
> 
> Please move the parsing methods to lib odf too, we will need them elsewhere
> as I'll explain below.
> 
> and yes we eventually need to backport it too, before the release. It's data
> loss.
> 
> As far as rendering is concerned we are in trouble. The kind of columns
> words supports currently (pagestyle defined columns) are implemented with
> separate textshapes for each column.
> 
> This means there is no shape where we want to draw the separator. I actually
> don't have a solution right now. Maybe adding extra none-editable
> pathshapes in words/part/frames/KWFrameLayout.cpp.

Okay, so I did not miss something. Seems the textshape needs to be hacked to 
support columns? Or Words would get a special textshape which also does 
columns?

> The other type of columns that we don't render at all (section columns) also
> needs to load and save separator info, so maybe look into that before
> committing (only if you can make it before 2.5 is released).
> 
> For section columns look at style:section-properties which loads
> style:columns which loads section:column-sep. The section-properties are
> currently implemented in kotext/KoSectionStyle.cpp which really should use
> KoColumns and your new stuff somehow to handle column-sep

Had a look at that. The problem I see is that style:section-properties are 
properties of a style with parent styles and inheritage (and so are 
style:graphic-properties which also is said to use style:columns, though I 
have no idea for what yet), while style:page-layout-properties are properties 
of a style without parent styles and without inheritage.
So the implementation of storing/loading/saving would be different (unless the 
non-inheriting solution would be okay with all the overhead of properties 
approach. But so far I also miss how any style:graphic-properties code object 
can reuse the code for style:section-properties.

Also no idea yet if there are unit tests I can extend with checks for the 
style:columns code or if I need to do new ones.

See attached my current code draft. Feedback and guidance welcome. Or should I 
better already upload to reviewboard?

Cheers
Friedrich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: columnsSeparator.patch
Type: text/x-patch
Size: 32060 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120721/022ed4a5/attachment.bin>


More information about the calligra-devel mailing list