summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-06-15 21:25:27 +0200
committerMichael Stahl <mstahl@redhat.com>2013-06-20 00:34:38 +0200
commit6db39dbd7378351f6476f6db25eb7110c9cfb291 (patch)
tree0f9321d40740e87e80d8ed05a7c7f474d5310afd /basctl
parente012f326c1c32c053304998a6826cb322f2c7728 (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 Change-Id: I1fb95a87c654c67d114f6f7f2c43b847c50b0ffa
Diffstat (limited to 'basctl')
0 files changed, 0 insertions, 0 deletions