[Libreoffice-bugs] [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

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Feb 3 09:27:16 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=140101

--- Comment #8 from Telesto <telesto at surfxs.nl> ---
(In reply to Telesto from comment #7)
> This might give some info: bug 52028

author  Michael Stahl <mstahl at redhat.com>       2013-06-15 21:25:27 +0200
committer       Michael Stahl <mstahl at 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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210203/f5583913/attachment.htm>


More information about the Libreoffice-bugs mailing list