[calligra] libs/kotext/styles: fixes wrong writing of double-border style also with a non-double border

Friedrich W. H. Kossebau kossebau at kde.org
Tue Jul 17 16:10:44 BST 2012


Am Dienstag, 17. Juli 2012, 17:03:30 schrieb Sven Langkamp:
> On Tue, Jul 17, 2012 at 4:41 PM, Friedrich W. H. Kossebau
> 
> <kossebau at kde.org>wrote:
> > Hi Thorsten,
> > 
> > Am Dienstag, 17. Juli 2012, 14:42:17 schrieb Thorsten Zachmann:
> > > Hello Friedrich,
> > > 
> > > On Friday 06 July 2012 19:26:52 Friedrich W.  H.  Kossebau wrote:
> > > > Git commit 4ec5156f204933980ff05c0a52326ba0264708f0 by Friedrich W. H.
> > > > Kossebau. Committed on 06/07/2012 at 19:25.
> > > > Pushed by kossebau into branch 'master'.
> > > > 
> > > > fixes wrong writing of double-border style also with a non-double
> > 
> > border
> > 
> > > > REVIEW: 105431
> > > > 
> > > > Thanks boemann for review
> > > > 
> > > > M  +4    -4    libs/kotext/styles/KoParagraphStyle.cpp
> > 
> > http://commits.kde.org/calligra/4ec5156f204933980ff05c0a52326ba0264708f0
> > 
> > > seems like this commit has broken a unit test.  See
> > 
> > http://158.36.191.251:8080/viewLog.html?buildId=7044&tab=buildResultsDiv&b
> > ui> 
> > > ldTypeId=bt6#testId5363
> > > 
> > > Would be nice if you could have a look.
> > 
> > Hm, did not look at the test when doing that commit :)
> > 
> > But now I did. And I think that my commit only uncovered for the test a
> > bug in
> > another part, the parsing of the fo:border(-*) values.
> > 
> > "20.176.2 fo:border" refers to ยง7.29.3 of [XSL]. That one defines the
> > value to
> > be "[ <border-width> || <border-style> || <color> ] | inherit".
> > 
> > Now I wonder what "||" means in this grammatic, is not defined for what I
> > saw.
> > 
> > But what I see is that the parsing code in
> > KoParagraphStyle::loadOdfProperties(...) expects all three values to
> > exist, at
> > least the starting ones (due to .value(0..2) ). So either the test values
> > used
> > in the test are bad (e.g. just "double") or the parsing code is bad.
> > 
> > Can you tell what || means and what is wrong?
> 
> Refers too http://www.w3.org/TR/CSS2/about.html#property-defs
> 
> "A double bar (||) separates two or more options: one or more of them must
> occur, in any order."

Aha, thanks.

So this means the parsing code is broken. And fixing it needs somebody writing 
non-trivial parsing code :/ Anyknown knows similar code for a similar problem 
in other parts of Calligra code?

Cheers
Friedrich



More information about the calligra-devel mailing list