Apache OpenOffice (AOO) Bugzilla – Issue 101169
word / character wise effects broken
Last modified: 2009-04-29 14:11:09 UTC
in OOo 3.1RC1 it is notpossible to have a word or charcter wise object animation / effect. The object will alwasy be animated as a whole. Regression from OOo 3.0.1 in common functionality
Created attachment 61646 [details] test case with several effects
I tested it on openSUSE 10.3-i586, KDE 3.5.10 with OpenOffice.org 3.0.1-de and OpenOffice.org 3.1rc1-de (RPM) and can confirm the issue. I tried it out with the animation turning (drehen) and slow. It worked on OOo 3.0.1. If I run the test on 3.1rc1 the whole sentence was turned.
Reassigned to AF.
Add CCs.
Information about the animated text is taken from meta files. Character and word boundaries are encoded in comments. These somehow got lost in the recent transition to a primitive based drawing layer. A simple fix for this is this: Index: source/processor2d/vclmetafileprocessor2d.cxx =================================================================== --- source/processor2d/vclmetafileprocessor2d.cxx (revision 270468) +++ source/processor2d/vclmetafileprocessor2d.cxx (working copy) @@ -924,7 +924,7 @@ // restore DrawMode mpOutputDevice->SetDrawMode(nOriginalDrawMode); - if(pTextDecoratedCandidate) + // if(pTextDecoratedCandidate) { // support for TEXT_ MetaFile actions only for decorated texts if(!mxBreakIterator.is()) With this fix the animation looks largely as before. However, there is a long delay between lines.
The long delay between lines is probably related to too many "words" that are created with the "fix". Here is the count of "words" for the first slide: OOO300m15: 33 DEV300m45: 3 DEV300m45 with "fix": 89 @aw: Please take over. You know the metafile generation from primitives much better than I do.
I would suggest to concentrate on the question why pTextDecoratedCandidate is null....
AW: Okay, taking a look. Comparing DEV300 m29 (last version before primitives) with OOO310 m7. This shows that the preparation is pretty identical, but the decision for pTextDecoratedCandidate has to be removed (as already stated). The 2nd issue with the too many generated breaks is quickly found: The code in drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx uses rTxt = rTextCandidate.getText() and rTxt.getLength() for the BreakIterator looping and processing. This is generally wrong, since the TextSimplePortionPrimitive2D works with String, Position and Length parameters; thus currently e.g. for a text portion with start at 50 and length of 30, the whole string was tagged again and again for each single portion. Corrected, that, works as expected. Tesing a little more...
Created attachment 61702 [details] Diff showing the fix
AW: Looks good, compared BugDoc animation completely with old behaviour, looks identical now. Attached the fix. It's not a dangerous one, it's very locally bounded in drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx and only used for this MetaFile tag generation (one advantage of modular architectures with primitives :-)).
I can confirm that the fix restores the original behavior.
AW: Changing target, adding to CWS aw072, targeted for OOo 3.1...
AW: Checked in, done.
AW->WG: Please verify. To do so, use the BugDoc. When starting the presentation, word/character wise will work now as in OOo 3.0.
Verified in CWS under Linux and Windows XP.
Tested in master m11. Closed.