calligra:fill-style-name and friends
Marijn Kruisselbrink
mkruisselbrink at kde.org
Thu May 17 18:17:39 BST 2012
On Wednesday, May 16, 2012 10:42:38 AM Jos van den Oever wrote:
> calligra:fill-style-name:
> -------------------------
> <style:table-cell-properties calligra:fill-style-name="gr1"
> fo:background- color="#ffff00" style:vertical-align="bottom"/>
> which points to
> <style:style style:name="gr1" style:family="graphic">
> <style:graphic-properties draw:fill="solid" draw:fill-color="#000000"
> draw:transparency="88%"/>
> </style:style>
> (after converting me03_different_color_pattern.xls)
>
> Do style:background-color and style:background-image not suffice? A
> background image can be nearly anything.
Yes, a background image would work great as fallback for other office suites,
but not if you want to allow actual editing of backgrounds. At the moment I
think the only background style sheets supports that is not just an
image/color is hatches, but gradients would probably not be very hard to
support too, and there isn't really a way to express that with standard odf.
So the calligra:fill-style-name attribute references a graphic style that is
used as background for the table cell.
> calligra:vertical-distributed
> -----------------------------
> <style:table-cell-properties
> calligra:vertical-distributed="distributed" fo:wrap-option="wrap"
> style:text-align-source="fix" style:vertical- align="top"/>
> (after converting me00_text_alignment_hc_vj_formatting.xls)
Excel has a couple more vertical alignment options than odf supports (and
sheets supports them too, although not exposed in the UI), so
we use this extra attribute to store that information. The attribute can be
either empty or have value "distributed" (and together with the vertical-align
property that then determines what the actual vertical alignment/distribution
is).
> calligra:number-length
> ----------------------
> <number:month calligra:number-length="extra-short"
> number:textual="true"/>
> (after converting me07_date_formatting.xlsx)
Again a feature Excel supports that odf doesn't. Extra-short here means that
the month is only displayed as the first character (not sure how you're
supposed to distinguish months that start with the same letter, but that's
what Excel does...)
Marijn
More information about the calligra-devel
mailing list