Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 23/11/11 19:06, Maxime de Roucy wrote:
Hello

I am the author of the bug number 43067
( https://bugs.freedesktop.org/show_bug.cgi?id=43067 ).

I am trying to solve that bug.
I tried to insert
"rWrtShell.ResetAttr();" 
just before the 
"rWrtShell.SetAttr(*pTemplateItemSet);"
line.

It works but only when I just apply text formatting (hold Ctrl when you
select the text to format).

i believe the merging is intentional; resetting the attributes is not
desired: think about what should happen if you apply the formatting to a
selection that has non-uniform formatting, surely we want to retain e.g.
different font sizes when the style that is painted only says "bold".

I would like to know how to differentiate formatting attributes that
come from style:family="paragraph" and those that come from
style:family="text".

the paragraph formatting attributes are SfxPoolItems with WhichIds
RES_CHARATR_* contained directly in the SfxItemPool (or was it a writer
specific subclass?) that is stored in the SwTxtNode; there are various
SwTxtNode methods to get/set them, but the UI should not call those
directly.

for spans with automatic styles, we create a text hint SwTxtAttr that
contains a SfxPoolItem with WhichId RES_TXTATR_AUTOFMT, which in turn
contains an SfxItemSet that contains the SfxPoolItems with WhichId
RES_CHARATR_*.
for spans with non-automatic text styles, we create a text hint
SwTxtCharFmt with WhichId  RES_TXTATR_CHARFMT.

the text hints live in the SwpHints instance of the SwTxtNode (a.k.a the
hints array).

regards,
 michael


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.