Bug 55350 - Letter spacing and "expand single word" do not work anymore on MacOSX
Summary: Letter spacing and "expand single word" do not work anymore on MacOSX
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) macOS (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks: mab4.0
  Show dependency treegraph
 
Reported: 2012-09-26 09:27 UTC by Roman Eisele
Modified: 2012-10-09 16:09 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file (9.24 KB, application/vnd.oasis.opendocument.text)
2012-09-26 09:27 UTC, Roman Eisele
Details
Screenshot: test results with LOdev build 2012-09-20: everything OK (130.05 KB, image/png)
2012-09-26 09:28 UTC, Roman Eisele
Details
Screenshot: test results with LOdev build 2012-09-24: regression! (132.01 KB, image/png)
2012-09-26 09:29 UTC, Roman Eisele
Details
Patch that fixes the bug (3.39 KB, patch)
2012-10-02 15:12 UTC, Sergey Farbotka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Eisele 2012-09-26 09:27:13 UTC
Created attachment 67710 [details]
Test file

In the current master build for Mac OS X, two features involving the spacing of individual letters do not work anymore.

I will attach a test file which shows both problems,
and screenshots exposing the results.


Steps to reproduce (the same as used to create the test file):

I) Letter spacing
-----------------
1) Start LibreOffice.
2) New Writer document (with default styles).
3) Type “Hello world!”
4) Select the text.
5) From the menu bar, select “Format > Character...”.
   → “Character“ dialog appears.
6) Switch to tab “Position”.
7) Under “Spacing”, select “Expanded” from the popup menu
   and enter some value in the “by” field, e.g. (to get impressive results)
   “3pt”.
8) Click “OK”.
Expected result: “Hello world!” shows expanded letterspacing.
Actual result:    There is a very big space between “Hello” and “world!”,
   but the letter spacing is stil default (+/- 0).

II) Feature “expand single word” of justified text
--------------------------------------------------
 1) Start LibreOffice.
 2) New Writer document (with default styles).
 3) Type some lines of arbitrary text (no special formatting).
 4) Select that text.
 5) From the menu bar, select “Format > Paragraph...”.
    → “Paragraph“ dialog appears.
 6) Switch to tab “Indents and Spacing”.
 7) Under “Indent”, set “After text” to a big value, e.g. “12cm”,
    to simulate a very narrow column.
 8) Switch to tab “Alignment.”
 9) Select “Justified” alignment.
10) Check “Expand single word”.
11) Optional: automatic hyphenation should be off to show the problem
    more clearly, so, if you have activated it by default,
    please switch to tab “Text Flow” and uncheck Hyphenation:
    “Automatically”, if necessary.
12) Click “OK”.
13) Now click somewhere into your text and enter a very long word which
    is so long that no other word fits before or after it into the same
    line (this is easier to achieve if you also make the previous and
    next words rather long).
Expected result: The very long word shows expanded letterspacing,
    in order to fill a full line (this is what the feature
    “expand single word” means).
Actual result:   The long word is not expanded at all, but there is
    a big blank space *after* the word until the end of the line.


This is a REGRESSION introduced in the latest master builds --
* LOdev pull time 2012-09-20 05:53:26 was still OK,
* LOdev pull time 2012-09-24 23:40:55 shows the problem.
Tests done on Mac OS X 10.6.8 (Intel), LOdev with US English langpack installed.

I fear that this regression might be a side-effect of the fix for bug 55142 -- “Character position doesn't match caret position in justified text”, which was committed 2012-09-21:
  http://cgit.freedesktop.org/libreoffice/core/commit/?id=f1651ee579bf38a49b839dbcb28ac38c0163a3d2

If this is true, we need either some fine-tuning for this fix (to fix the fix) or we should revert that fix, sorry.
Comment 1 Roman Eisele 2012-09-26 09:28:39 UTC
Created attachment 67711 [details]
Screenshot: test results with LOdev build 2012-09-20: everything OK
Comment 2 Roman Eisele 2012-09-26 09:29:16 UTC
Created attachment 67712 [details]
Screenshot: test results with LOdev build 2012-09-24: regression!
Comment 3 Roman Eisele 2012-09-26 09:30:01 UTC
Comment on attachment 67711 [details]
Screenshot: test results with LOdev build 2012-09-20: everything OK


(Fix MIME Type of screenshot.)
Comment 4 Roman Eisele 2012-09-26 09:37:13 UTC
@ Thorsten:

This is a new regression in the current master builds for Mac OS X. Please take a look at it -- we should fix it right now, as long as it is rather easy to find out what has caused the regression. I fear that it is related to the patch for bug 55142, so please check this possibility.

Thank you very much!
Comment 5 Michael Meeks 2012-09-27 08:33:23 UTC
Wow - nice catch; thanks so much for running master & digging these out; we'll discuss at ESC later.
Comment 6 Caolán McNamara 2012-10-02 12:30:05 UTC
caolanm->sergey: can you determine if f1651ee579bf38a49b839dbcb28ac38c0163a3d2 triggered this ?
Comment 7 Sergey Farbotka 2012-10-02 15:07:12 UTC
Confirm that the bug is caused by f1651ee579bf38a49b839dbcb28ac38c0163a3d2.
After analysing the code I found the solution. I'll attach a patch a bit later that cancels f1651ee579bf38a49b839dbcb28ac38c0163a3d2 and fixes bug 55142 in master branch.
Hope, my fix will kill two birds with one stone :)
Comment 8 Sergey Farbotka 2012-10-02 15:12:17 UTC
Created attachment 67998 [details]
Patch that fixes the bug

This patch should fix the bug
Comment 9 Thorsten Behrens (allotropia) 2012-10-02 15:38:18 UTC
Confirmed -
Comment 10 Thorsten Behrens (allotropia) 2012-10-02 15:38:58 UTC
Reverted the prior fix for bug 55142, applied new offset fix.
Comment 11 Roman Eisele 2012-10-09 16:09:56 UTC
VERIFIED as FIXED with
LOdev 3.7.0.0.alpha0+ (build ID: 1ae1bca; pull time: 2012-10-09 04:37:06).

The test file looks again like in LibreOffice 3.4 to 3.6 (correctly).

Thank you very much!