Apache OpenOffice (AOO) Bugzilla – Issue 101556
Changing style only visible after selecting text box
Last modified: 2009-07-30 11:40:07 UTC
- new presentation - choose lay-out with text - add some text - bring focus away from the text box - in Stylist, change the outline level 1 style (font size, type, or color) - OK > change not visible in slide - click on text box > change becomes visible selecting the text box, has to be done for each slide...
was OK in previous version > regression
Reproducible. Reassigned.
Looks like a problem of the OutlinerParaObject: Modifying a style leads to a repaint. The text object is asked for its primitive sequence (or is it a tree?) which is then compared to a previously created primitive sequence. This involves a comparison of OutlinerParaObjects. When, for example, the color is modified then OutlinerParaObject::operator==() always exits early because the impl pointers of the two compared OutlinerParaObject objects are identical. @aw: Please have a look, you know this area better than I do.
Hello, It seems to be the same problem as modification in master page not visible : - create new presentation - add title - go to master page - change title color, font, size... - quit master page => title did not change same behavior with OOo3.1.0 and OOo-dev32m49 This is dramatic if you want to rapidly change color contrast due to light in the room for projection few seconds before presentation. Easy workaround is to save and reload document.
AW: Adding to CWS aw074 to take a look. Already changed OPO (OutlinerParaObject) compare operator in CWS aw073, so maybe influenced. Maybe changing style does not change the impl class pointer, then the operator== has to take the style into account, too.
AW: Basic reason is that the primitive text representation used for comparing with the old version currently still has some compromizes regarding the data holded. In principle, a primitive should hold all data needed for it's definition and evtl. decomposition. For text, this is not yet true: It holds a copy of the OPO (OutlinerParaObject), but only a reference of the SdrText object and no Information about the text attributes in the SdrObject (in it's SfxItemSet in the range EE_ITEMS_START, EE_ITEMS_END), and no information about the SfxItemSet's parents which define the styles. Thus, a change in that range is not detected. Remembering the StyleSheet (or the SfxItemSet and it's chain of parents) will not help; this will be changed internally, but not their pointers. In Principle, a copy of the mentioned data would be needed (i know why i avoided this for the moment). This would also be too expensive for a 3.1.1 fix. I checked that a StyleSheet change is detected in the model, thus the idea is now to hold a 'version number' of the text style used at the model object. Using that version number in the text primitive data and incrementing it when the style is changed should work for the moment. Added code, compiling, checking...
AW: Works as expected. Added some more version number incrementers on text item changes, not only style sheet. Added version number mechanism to TextProperties implementation. Using in SdrTextAttribute constructor. Annotation: This is only necessary for text attributes; the other attributes (e.g. Fill style, etc.) are always extracted from the current Model definition of the object, using the whole SfxItemSet and it's parent chains (aka taking StyleSheets into account).
AW: Checked the example from jumbo444 (thanks for that!), also works well with the fix. Commenting a bit more, comitting changes, done. Adding a patch file, too.
Created attachment 63173 [details] Fix as patch
Hi, This may also solve issue 100340, or is it a different problem ?
AW: Ckecked with wntmsci12.pro build, works as expected.
AW->WG: Please review as described (font color is a good choice)
Verified in CWS.
Tested in m17. Closed.