To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=108345





------- Additional comments from dtar...@openoffice.org Fri Apr  2 05:22:22 
+0000 2010 -------
dtardon->mst:
hi,

> did you have a look at the function lcl_IsNewAttrInSet() that is called?
> it contains the condition:
>     ( pOther->IsCharFmtAttr() || pOther->Which() == rItem.Which() )
> 
> the attribute set is initialized thus:
>     SfxItemSet aThisSet( GetDoc()->GetAttrPool(), aCharFmtSetRange );
> 
> which expands to (bastyp/init.cxx):
>       RES_CHRATR_BEGIN, RES_CHRATR_END-1,
>       RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
> 
> so the second part of the condition above compares the id of hints with the id
> of items from aThisSet.
> but since we have auto formats, there can never be hints with any of the types
> in aCharFmtSetRange; instead there would be a hint with RES_TXTATR_AUTOFMT 
> (such
> as the one inserted by your patch).

Yes, I looked at it. But it seems the meaning of it didn't penetrate through my
skull :(

> 
> as a result of this wrong condition the attributes from the paragraph could
> overwrite the attributes of an existing auto format text hint.
> 
> [i am not sure if there can be a auto format hint that spans the entire
> paragraph; maybe if FmtToTxtAttr is called on a node split path?]
> 
> furthermore, i don't understand why you copy the item set and introduced the
> function  lcl_CollectAttributes.
> all it does is to copy the items via lcl_MergeAttr, and all that does is 
> handle
> RES_TXTATR_AUTOFMT items specially by expanding them.
> but the item set that is copied can't contain RES_TXTATR_AUTOFMT in the first
> place, right?
> so this seems unnecessary to me.

Ahh, yes. For some reason I thought RES_TXTATR_AUTOFMT was part of the
aCharFmtSetRange range.

> 
> oh, another nitpick:
> please don't put pure whitespace changes into the patch, makes it difficult to
> review.
> only convert tabs on the lines that change anyway, and on adjacent 
> trivialities
> like { or }.
> but eliminating evil BOOLs is always acceptable :)

I'm sorry for that. They came in unintentionally as a result of shifting the
code one level out and back.

> 
> i'd like to have this fixed in 3.3, so please give it another try (you're
> definitely on the right track), or if you have something more important to do,
> i'll try to fix it.

I should be able to come with (hopefully) better version of the patch in a few 
days.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@sw.openoffice.org
For additional commands, e-mail: issues-h...@sw.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to