https://bugs.documentfoundation.org/show_bug.cgi?id=51168
Justin L <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|EDITING: Numbering Size is |EDITING: Numbering Size is |Inconsistent with Text Size |Inconsistent with uniform |After Copy/Paste of |Text Size when numbered |hyperlink |text contains a hyperlink | |or a character style --- Comment #27 from Justin L <[email protected]> --- The code to investigate is SwTextFormatter::NewNumberPortion, specifically std::unique_ptr<SwFont> pNumFnt(new SwFont( &rInf.GetCharAttr(), pIDSA )); When the new SwFont::SwFont is created, it aTmpSize.setHeight( pAttrSet->GetSize().GetHeight() ); In the case of the 'normal' paragraphs, the entire paragraph is set to a single font size (say 36pt), then pAttrSet's call to SfxItemSet::Get(nWhich==8 SvxFontHeightItem) gets an immediate hit. That is because in the ODT internal autoformats, we have something like <style:style style:name="P1" style:family="paragraph"> <style:text-properties fo:font-size="36pt"/> But for the SwTextNode with a hyperlink, the internal auto-style "P2" doesn't specify a size, so it looks at the parent style (Preformatted Text) to get the size. So this is just a result of implementation details. For whatever reason, setting the size of an entire paragraph that contains a hyperlink does not set a style:text-properties fo:font-size on the paragraph style. The key seems to be in sw/source/core/txtnode/thints.cxx SwTextNode::SetAttr because HasHints(), and m_pSwpHints->Get( n )->IsCharFormatAttr() ). AFAICS, only hyperlinks and character styles are IsCharFormatAttr. This is at a pretty low level of the plumbing, so extremely dangerous to change it just to satisfy this edge case. -- You are receiving this mail because: You are the assignee for the bug.
