Bug 264471 - Text is displaying across the picture
Summary: Text is displaying across the picture
Alias: None
Product: calligrastage
Classification: Applications
Component: filter/pptx (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: T Zachmann
Depends on:
Reported: 2011-01-27 13:39 UTC by swathi
Modified: 2021-03-09 08:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:

Test data (193.46 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2011-01-27 13:39 UTC, swathi
Screenshot in MS Powerpoint (291.08 KB, image/x-png)
2011-01-27 13:41 UTC, swathi
Screenshot in Calligra Stage (503.84 KB, image/x-png)
2011-01-27 13:41 UTC, swathi
document to show the fix with the underlines. (4.04 KB, application/vnd.oasis.opendocument.text)
2011-08-17 14:37 UTC, Halla Rempt

Note You need to log in before you can comment on or make changes to this bug.
Description swathi 2011-01-27 13:39:10 UTC
Created attachment 56502 [details]
Test data

Version: git commit  6ea30bc370b7eb5223e322fc6ee596cee00d19a9
         (using KDE 4.4.3)                
     OS: Kubuntu 10.04

Test data is in MS Powerpoint 2007 format which has picture and text in it.
Open the same document in Calligra Stage, and observe the display of 
Expected outcome:
Text and Picture should be displayed clearly as like in the mspowerpoint 2007 file.

Actual outcome:
Text is displaying across the picture.
Please check the screenshots attached.
Comment 1 swathi 2011-01-27 13:41:21 UTC
Created attachment 56504 [details]
Screenshot in MS Powerpoint
Comment 2 swathi 2011-01-27 13:41:56 UTC
Created attachment 56505 [details]
Screenshot in Calligra Stage
Comment 3 T Zachmann 2011-03-17 04:49:41 UTC
There is now a big black border on the right and left of the image
Comment 4 T Zachmann 2011-03-17 04:50:16 UTC
*** Bug 264467 has been marked as a duplicate of this bug. ***
Comment 5 LukasT 2011-08-03 15:13:49 UTC
Git commit 87a13b950005a28cba23da34bd98dbbb7b90afbb by Lukáš Tvrdý.
Committed on 03/08/2011 at 17:10.
Pushed by lukast into branch 'master'.

Fix the black border of the image

o make the pixels transparent


M  +8    -7    filters/libmsooxml/MsooXmlCommonReaderDrawingMLImpl.h

Comment 6 Halla Rempt 2011-08-17 10:17:33 UTC
The underline is not a filter issue: it's in the drawing of lines of text.

The text-through-image issue has to do with font metrics differing on Windows and other systems, so we'll have to live with that.
Comment 7 Halla Rempt 2011-08-17 11:53:48 UTC
Found the reason for the text across the image as well. Nothing to do with font stuff; kotextloader doesn't apply the style if we don't load any text for a line. There's an empty line with just a linebreak that if it would have the right style would have a bigger font (32 instead of 12) and that would push the text down enough.
Comment 8 Halla Rempt 2011-08-17 14:35:31 UTC
Git commit 93352ed72216d403c39f6c773e1c86c56ca944f4 by Boudewijn Rempt.
Committed on 17/08/2011 at 16:30.
Pushed by rempt into branch 'master'.

fix painting of paragraph decorations for multi-line text fragments

While iterating over the lines of a multi-line text fragment to paint
the decorations line by line, the start position of the area we paint
wouldn't increase. If you had a fragment starting after the beginning
of a line, for all lines, the start position for painting decorations
would be there, instead of at the beginning of the next line.

CCBUG: 264471

M  +46   -7    libs/textlayout/KoTextLayoutArea_paint.cpp

Comment 9 Halla Rempt 2011-08-17 14:37:02 UTC
Created attachment 62901 [details]
document to show the fix with the underlines.
Comment 10 Halla Rempt 2011-08-17 14:37:35 UTC
The underline part also fixes issues with multiline underlines -- see the attached odt.
Comment 11 Halla Rempt 2011-08-18 07:09:14 UTC
Git commit 2fc2b38ffd0d1aedcbb51bdf5e0810f34bd74f8e by Boudewijn Rempt.
Committed on 18/08/2011 at 09:07.
Pushed by rempt into branch 'master'.

Use the start of the line to determine paragraph decorations

For multi-line text fragments, the decoration on all lines after the
first line start at the beginning. This simplifies the code a lot.

CCBUG: 264471

M  +26   -18   libs/textlayout/KoTextLayoutArea_paint.cpp

Comment 12 Halla Rempt 2011-08-18 07:36:42 UTC
Git commit 099217dbc996a0020c228d835ba59492d17be23b by Boudewijn Rempt.
Committed on 18/08/2011 at 09:35.
Pushed by rempt into branch 'master'.

Insert an invisible space if we have an empty text span

For empty spans, we would set the style, load the span, do nothing
except increase the span depth and then unset the style. This change
inserts an invisible space (http://www.unicode.org/charts/PDF/U2000.pdf)
so the the style doesn't get lost.

BUG: 264471

M  +6    -0    libs/kotext/opendocument/KoTextLoader.cpp

Comment 13 swathi 2011-08-19 10:59:11 UTC
Verified in 85115210810acc59bd34f77251a616e5ca9e00e0 .
Comment 14 swathi 2011-08-19 11:02:37 UTC
Verified in 85115210810acc59bd34f77251a616e5ca9e00e0
Comment 15 Camilla Boemann 2011-12-26 13:35:34 UTC
Reopening as I am reverting the commit. We sholdn't add blank characters. In fact lowriter displays the converted document just as bad as we do. The bug is in the filter eventhough we have now gained some understanding