Hi Maximilian,

> Hi,
>
> there is a bug in Writer, so that all Autocorrects which use a stlye do 
> not work in the EditEngines, such as setting a text to bold etc.
>
> This therefore affects all draw objects as well as the notes. I looked 
> into it, the issue here is that the wrong which id is set, e.g. it sets 
> SID_ATTR_CHAR_WEIGHT, but the writer EditEngine only understands 
> EE_CHAR_WEIGHT.
>
> The SD,Draw and SC EditEngines understand both attributes, I guess as 
> they are based on a XOutDevItemPool, but the writer one is not.
>
> I am now wondering about the correct fix:
>
> - I would think just use the different itempool for writer EditEngines 
> as well is not an option, as other stuff would break, but maybe I'm 
> wrong here
>
> - make writer EditEngine/ItemPool understand both attributes like the 
> other ones
>
> - The fix I would go for now (as it is the easiest one)is just adding 
> TYPEINFO information to SvxAutoCorrDoc and derived classes, when the one 
> from the writer core is involved, set SID_ATTR_CHAR_WEIGHT, otherwise 
> EE_CHAR_WEIGHT, as all the other EditEngines understand this one as well.
>
> Any comments?
>   
If you grep in Writer for EE_CHAR_xxx you will find many code parts
where either SID_ATTR_CHAR_xxx or RES_CHRATR_xxx gets manually mapped to
the respective EE_CHAR_xxx.
See for example ui/shells/annotsh.cxx or ui/shells/drwtex.cxx thus that
type of solution is commonly used in Writer and nothing should be wrong
with it as long as you know for sure that you will pass that one to a
EditEngine.

I don't know about how other applications do that. They may have better
ones but the simple mapping should be fair enough within sw.


Regards,
Thomas



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to