Bug 288006 - pptx: incorrect line-height results in text not displayed correctly
Summary: pptx: incorrect line-height results in text not displayed correctly
Status: RESOLVED FIXED
Alias: None
Product: calligrastage
Classification: Applications
Component: filter/pptx (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Matus Uzak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-01 18:22 UTC by Matus Uzak
Modified: 2011-12-01 19:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test file created by MS PowerPoint 2007 (901.28 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2011-12-01 18:22 UTC, Matus Uzak
Details
Test file displayed by MS PowerPoint (347.12 KB, image/png)
2011-12-01 18:45 UTC, Matus Uzak
Details
Test file displayed by Stage (378.22 KB, image/png)
2011-12-01 18:45 UTC, Matus Uzak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matus Uzak 2011-12-01 18:22:31 UTC
Created attachment 66272 [details]
Test file created by MS PowerPoint 2007

Version:           unspecified
OS:                Linux

The text is stretched over the entire page because the line-height is too big, probably resulting from font-size of text:line-break being too big.

Reproducible: Always

Steps to Reproduce:
1. Open the attached file in stage.
2. Observe the text on the slide and compare it to the screen shot from MS PowerPoint.

Actual Results:  
The text is stretched over the entire page because the line-height is too big.

Expected Results:  
The whole text should be visible.
Comment 1 Matus Uzak 2011-12-01 18:45:14 UTC
Created attachment 66276 [details]
Test file displayed by MS PowerPoint
Comment 2 Matus Uzak 2011-12-01 18:45:36 UTC
Created attachment 66277 [details]
Test file displayed by Stage
Comment 3 Matus Uzak 2011-12-01 19:49:38 UTC
Git commit fefddf3286cbf68a7dd28c0704ddb87c6a3f31d0 by Matus Uzak.
Committed on 01/12/2011 at 19:48.
Pushed by uzak into branch 'master'.

libmsooxml: libmsooxml: fine tuned text:line-break processing

Introducing a new <text:span> element having text-properties
defined by endParaRPr in selected situations in order to prevent
usage of the styleForModification function:

* Do not save text-properties into paragraph styles also in case
  of empty paragraphs.  Save an empty <text:span> having
  text-properties defined by endParaRPr.  Looking for the default
  font size defined by the application in case the endParaRPr
  formatted span is removed and new text is inserted.

* Insert an empty <text:span> having text-properties defined by
  endParaRPr in case the <text:line-break> is the last element of
  the paragraph in order to apply the correct fo:font-size to the
  new line.  Replaced the original fo:font-size from
  text-properties of <text:line-break> by TEXT_FONTSIZE_MIN to
  not affect the line-height calculation of both the new line and
  the current line.  This disables of course application of the
  default font-size defined by the application in case of
  <text:line-break>.

* Removing the fo:text-transform attribute is also removed from
  text-properties of text:line-break because it disables its
  functionality during layout (did not check the layout part).

* Also removing the style:text-underline-style attribute.  If
  text styles of the text chunk and text:line-break match,
  underline is applied until end of the line during layout.

BUG:288006

M  +70   -72   filters/libmsooxml/MsooXmlCommonReaderDrawingMLImpl.h
M  +2    -6    filters/libmsooxml/MsooXmlCommonReaderDrawingMLMethods.h
M  +1    -1    filters/stage/pptx/PptxXmlSlideReader.cpp
M  +3    -3    filters/stage/pptx/PptxXmlSlideReader.h

http://commits.kde.org/calligra/fefddf3286cbf68a7dd28c0704ddb87c6a3f31d0