Bug 140101 - Spacing between certain characters changing (which depends on zoom level) when moving a paragraph up. But not happing if it's the first paragraph
Summary: Spacing between certain characters changing (which depends on zoom level) whe...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.beta1+
Hardware: All All
: medium normal
Assignee: Andreas Heinisch
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks:
 
Reported: 2021-02-02 17:16 UTC by Telesto
Modified: 2021-07-11 13:20 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (9.52 KB, application/vnd.oasis.opendocument.text)
2021-02-02 17:16 UTC, Telesto
Details
Bibisect log (3.36 KB, text/plain)
2021-02-02 19:07 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-02-02 17:16:03 UTC
Description:
Spacing between certain characters changing (which depends on zoom level) when moving a paragraph up. But not happing if it's the first paragraph

Steps to Reproduce:
1. Open the attached file
2. Place cursor before Historique
3. Press backspace.
4. Notice certain letters moving: in the line L’enseignement de l’informatique dans le cadre des sciences et technologies
5. Press Undo
6. Repeat.. 
7. Change zoomlevel repeat
8. Delete the paragraph prior to the first heading..
9. Repeat.. now it's OK

Actual Results:
Spacing between certain characters changing

Expected Results:
Stable


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 66013201749df7d5ac5ddaf377a7b3732518a93b
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2021-02-02 17:16:17 UTC
Created attachment 169403 [details]
Example file
Comment 2 Telesto 2021-02-02 17:28:13 UTC
Also in (used zoom 200%)
Version: 7.1.0.0.beta1+ (x64)
Build ID: f9fab4203c1aa0b9a3f27ce2713b6d5addc7df19
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL

also in
7.0

stable for me with
Version: 6.4.0.0.beta1+ (x64)
Build ID: 20be5cd0bdc57d812bf34a2debfe48caa51de881
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL
Comment 3 Telesto 2021-02-02 19:07:49 UTC
Created attachment 169406 [details]
Bibisect log

Bisected to:
author	Noel Grandin <noel.grandin@collabora.co.uk>	2019-12-17 15:11:34 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2019-12-18 10:28:17 +0100
commit	568b820bc2d52c007ee08ad7a3849c94a458115d (patch)
tree	ddce0dda7891e3143c229ab9e8574bc0fd52e17d
parent	c4abc77f2e29d96ff2025b1bd84fe3f63715e011 (diff)
tdf#119227 fix freeze when copying a large bulleted list
freeze goes from 5 seconds to about 1 second for me

(1) used unordered_map instead of map
(2) don't create temporary SfxItemSet's just to check equality
Comment 5 Telesto 2021-02-02 19:11:13 UTC
The plot thickens, IMHO
Comment 6 Telesto 2021-02-02 19:17:42 UTC
(In reply to Telesto from comment #5)
> The plot thickens, IMHO

Especially with a comment around the relevant area, with the comment
// in the RSID, which should have no effect on text layout

RSID apparently having an influence
Comment 7 Telesto 2021-02-02 19:21:08 UTC
This might give some info: bug 52028
Comment 8 Telesto 2021-02-03 09:27:16 UTC
(In reply to Telesto from comment #7)
> This might give some info: bug 52028

author	Michael Stahl <mstahl@redhat.com>	2013-06-15 21:25:27 +0200
committer	Michael Stahl <mstahl@redhat.com>	2013-06-20 00:34:38 +0200
commit	6db39dbd7378351f6476f6db25eb7110c9cfb291 (patch)
tree	0f9321d40740e87e80d8ed05a7c7f474d5310afd
parent	e012f326c1c32c053304998a6826cb322f2c7728 (diff)
fdo#52028: sw: let text formatting ignore RSID in automatic styles
A suprising regression from 062eaeffe7cb986255063bb9b0a5f3fb3fc8e34c:
The RSID text attributes that are inserted for every user-inserted text
cause the text formatting (SwAttrIter) to create a lot more text portions,
and the portion breaks make font kerning impossible.

This is the only way i can think of to fix this problem; alternatives that
don't work are splitting the RSID out of the AUTOFMT hint into a separate
one and combining them in the sw UNO wrappers (fails because
SwXAutoStylesEnumerator actually does need to enumerate every AUTOFMT
including RSID), trying to detect and ignore them just in the text
formatting (the SwAttrIter cannot easily/cheaply detect when it's allowed
to skip), and having an internal subdivision inside the AUTOFMT hint (one
subsection for every RSID change) (which does not work because it cannot
ignore RSID-only AUTOFMTs completely).

Solve the problem with 2 additional flags on AUTOFMT and CHARFMT
attributes: FormatIgnoreStart and FormatIgnoreEnd, which indicate to
SwAttrIter::GetNextAttr() that the start or end of the hint should be
ignored, so that effectively it is merged with the preceding/subsequent
hint.  Of course the UNO API does not respect the flags so we can store
the RSIDs in automatic styles.

The flags are maintained in SwpHints::MergePortions, which detects both
RSID-only AUTOFMT hints (which can be ignored completely), and the
situation of N CHARFMT hints + AUTOFMT hint vs. N CHARFMT hints +
AUTOFMT hint where the AUTOFMT hints differ only in their RSID attribute.

This means that MergePortions needs to be called more often now, in cases
where the ignore flags may have been invalidated, such as:
- insertion of text with possible DontExpand flag set on hints
- deletion of hints
- SETATTR_NOHINTADJUST mode
Comment 9 Dieter 2021-04-30 06:51:56 UTC
Tested with

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 15a9bee9ef26ce13ed1e26319306a88b6d886158
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

and zoom-level 200%, but I can't see any change
Comment 10 Andreas Heinisch 2021-07-06 10:41:02 UTC
With the fix of 140197 in place, the problem cannot be reproduced.
Comment 11 BogdanB 2021-07-11 13:20:38 UTC
Seems ok now

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: eac5977bfc11797eda356560a5e45c51108ef5a1
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded