Revision f084b60...

Go back to digest for 4th December 2011

Other in Office

Matus Uzak committed changes in [calligra] /:

libmsooxml: text properties inheritance kung fu

* Don't add style:use-window-font-color="true" into
text-properties of a style of a text chunk when fo:color is not
provided. This only affects text inside tables at the moment,
becasue the default text colors (color scheme defined by
slideLayout) are used for any other text. This was overriding
the fo:color defined in the cell style.

* Remove all text-properties from paragraph style in case the
paragraph is not empty. The endParaRPr element specifies the
text run properties that are to be used if another run is
inserted after the last run specified. It does not affect
formatting of text chunks in the paragraph. That's a paragraph
specific piece of information that we are not going to save
into ODF at the moment.

* Store <text:line-break> inside of a <text:span> element.
Process the rPr (Text Run Properties) of the br (Text Line
Break) element, but only use it to format the
<text:line-break> (It should apply to a newly inserted run of
text). That's another piece of information that we are not
going to save into ODF at the moment.

> I inferred the following a inheritance hierarchy:
1. font-size defined in the rPr element inside br
2. minimal font-size in the paragraph if any font size is provided
3. font-size defined by endParaRPr if present
(other text-properties are not important at the moment)

REASON: At the moment the current text style is applied until
end of the line (like underline) and then the line-break is
applied. Also when a line-break is located at the end of
paragraph (empty line is inserted) the application default
font-size is used because there are no text-properties in the
pragraph style.

File Changes

Modified 5 files
  •   filters/libmsooxml/MsooXmlCommonReaderDrawingMLImpl.h
  •   filters/libmsooxml/MsooXmlCommonReaderDrawingMLMethods.h
  •   filters/libmsooxml/MsooXmlDrawingTableStyle.cpp
  •   filters/libmsooxml/MsooXmlDrawingTableStyle.h
  •   filters/stage/pptx/PptxXmlSlideReader.cpp
5 files changed in total