Issue 101556 - Changing style only visible after selecting text box
Summary: Changing style only visible after selecting text box
Status: CLOSED FIXED
Alias: None
Product: Impress
Classification: Application
Component: editing (show other issues)
Version: OOo 3.1 RC2
Hardware: All Windows XP
: P3 Trivial (vote)
Target Milestone: OOo 3.1.1
Assignee: wolframgarten
QA Contact: issues@graphics
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2009-05-05 09:15 UTC by cno
Modified: 2009-07-30 11:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Fix as patch (7.43 KB, text/plain)
2009-06-23 16:32 UTC, Armin Le Grand
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description cno 2009-05-05 09:15:05 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...
Comment 1 cno 2009-05-05 09:17:56 UTC
was OK in previous version > regression
Comment 2 wolframgarten 2009-05-05 10:24:47 UTC
Reproducible. Reassigned.
Comment 3 groucho266 2009-06-05 10:54:29 UTC
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.
Comment 4 jumbo444 2009-06-08 08:42:15 UTC
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.
Comment 5 Armin Le Grand 2009-06-22 15:07:19 UTC
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.
Comment 6 Armin Le Grand 2009-06-23 15:45:32 UTC
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...
Comment 7 Armin Le Grand 2009-06-23 16:04:04 UTC
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).
Comment 8 Armin Le Grand 2009-06-23 16:31:11 UTC
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.
Comment 9 Armin Le Grand 2009-06-23 16:32:09 UTC
Created attachment 63173 [details]
Fix as patch
Comment 10 jumbo444 2009-06-25 17:14:35 UTC
Hi,

This may also solve issue 100340, or is it a different problem ?
Comment 11 Armin Le Grand 2009-07-06 16:35:06 UTC
AW: Ckecked with wntmsci12.pro build, works as expected.
Comment 12 Armin Le Grand 2009-07-07 09:57:38 UTC
AW->WG: Please review as described (font color is a good choice)
Comment 13 wolframgarten 2009-07-09 09:57:33 UTC
Verified in CWS.
Comment 14 wolframgarten 2009-07-30 11:40:07 UTC
Tested in m17. Closed.