Issue 20260 - Trailing spaces generate blank line, differently from Powerpoint.
Summary: Trailing spaces generate blank line, differently from Powerpoint.
Status: CONFIRMED
Alias: None
Product: Impress
Classification: Application
Component: code (show other issues)
Version: OOo 1.0.3
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-28 08:29 UTC by wykoh
Modified: 2017-05-20 11:11 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Screen of a test file in Impress (74.37 KB, image/gif)
2003-09-28 08:31 UTC, wykoh
no flags Details
Screen of a test file in Powerpoint (66.09 KB, image/gif)
2003-09-28 08:31 UTC, wykoh
no flags Details
The test PPT file (13.00 KB, application/octet-stream)
2003-09-28 08:32 UTC, wykoh
no flags Details
this patch is better, please test (1.43 KB, patch)
2006-10-17 14:37 UTC, jlcheng
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description wykoh 2003-09-28 08:29:09 UTC
Impress's handling of trailing spaces in a text box is different from
Powerpoint. When you add spaces at the end of a line in a textbox, Powerpoint
let the cursor move outside the text box and does not generate new line until
you enter a non-space character. Whereas Impress generates new line immediately
after the cursor reaches the right end of the textbox. Due to this difference
Impress pushes bottom lines of some text boxes too down for some PPT files
created by Powerpoint.
Comment 1 wykoh 2003-09-28 08:31:10 UTC
Created attachment 9743 [details]
Screen of a test file in Impress
Comment 2 wykoh 2003-09-28 08:31:42 UTC
Created attachment 9744 [details]
Screen of a test file in Powerpoint
Comment 3 wykoh 2003-09-28 08:32:17 UTC
Created attachment 9745 [details]
The test PPT file
Comment 4 wolframgarten 2003-09-29 07:33:28 UTC
Reassigned to Christian.
Comment 5 christian.guenther 2003-09-29 12:32:30 UTC
The problem are the spaces outside the textbox.
Place your cursor in the line 'however, in Powerpoint they ...' and
press the 'End' key. You see that the cursor is outside the textbox.
Delete the spaces outside the textbox and save the file again.
After loading the 'changed' file in Impress there is no gap. 
Comment 6 christian.guenther 2003-09-29 15:15:46 UTC
Hi Matthias
As discussed here is the summary:
- PPT-Import: Delete the Trailing spaces and insert a soft return
- PPT-Export: Delete the spaces in the 'first' line and insert a soft
      
  return, keep the leading spaces in the 'second' line
- Load old and current Impress files: Keep all spaces, new lines and end
  of lines. 
Comment 7 matthias.mueller-prove 2003-09-29 16:18:00 UTC
-
Comment 8 matthias.mueller-prove 2003-09-30 16:49:15 UTC
MMP>KA: we have a proposed solution that seems to be too much effort
for Q (according to Sven Jacobi). Can you please take a look and
decide if this fits into our Q priority "interoperability", anyway?
Comment 9 ooo 2003-10-22 13:17:01 UTC
I'd like to leave this on 'OOo Later' due to the heavy workload we
have in this area, but this task has definitely the highest priority
when fixing bugs taken out of the Later pool for OOo 2.0. => SJ,
please take care of this task appropriately
Comment 10 sven.jacobi 2004-01-21 11:27:11 UTC
accepted
Comment 11 christian.guenther 2004-02-10 15:47:21 UTC
Please have a look to the internal bug 114649.
It's duplicate to this issue.
Comment 12 sven.jacobi 2006-04-05 14:55:02 UTC
sj->tl: This is an outliner/editengine problem, so please take over.
Comment 13 jlcheng 2006-10-16 03:34:22 UTC
Oh, now OOo 2.1 can fix this problem? Many other problems are ref to this one.
Comment 14 jlcheng 2006-10-17 14:37:33 UTC
Created attachment 39828 [details]
this patch is better, please test
Comment 15 clippka 2006-10-17 16:17:03 UTC
I do not accept this patch as it is now. If we change only the default behaviour
of the edit engine, we change the layout of existing OpenOffice documents. We
will not fix an issue by introducing a new one.

As sven explained to me we also can't fix this issue by removing or introducing
whitespaces during ppt import and export. So the only way to solve this issue is
to introduce some kind of a compatibility setting at a shape that defines if the
new formating is used or not. This must be set at the ppt import and must also
be stored persistent in the OOo xml format.

Therefore thesetasks are left to solve this issue
- add code to ppt import to set this compatibility flag on each importet shape
- add code to xmloff to import and export this compatibility flag
- add code to edit engine to only use new formating if compatibility flag is set
- introduce compatibility flag to oasis file format
Comment 16 clippka 2006-10-17 16:26:49 UTC
if( pNode->GetChar( nBreakInLine ) == ' ' || pNode->GetChar( nBreakInLine +
nLineStart ) == cBlankCJKChar )

This looks wrong, why nBreakInLine and then nBreakInLine + nLineStart?
Comment 17 jlcheng 2006-10-18 06:29:57 UTC
Yes, it is wrong, and should be:
if( pNode->GetChar( nBreakInLine + nLineStart ) == ' ' || pNode->GetChar(
nBreakInLine + nLineStart ) == cBlankCJKChar )

I think this issue is not good in fact, and I like OOo behaviour. But somebody
think MS PPT is standard, I find I understand some code of OOo behaviour. This 
issue is so long, I want to give you some patch for your test only and I think
maybe learn more knowledge about OOo.
Comment 18 clippka 2007-09-12 13:40:30 UTC
retargeted
Comment 19 clippka 2008-06-02 18:28:48 UTC
retargeted
Comment 20 Marcus 2017-05-20 11:11:37 UTC
Reset assigne to the default "issues@openoffice.apache.org".