Revision 7143d89...

Go back to digest for 1st May 2011

Bug Fixes in Office

Thorsten Zachmann committed changes in [calligra/text-layoutrestructure-boemann] plugins/variables/PageVariable.cpp:

Fix endless updating of page variables

There was a problem with updating the page number on the page. It created an endless
loop which updated the page number all the time.
The problem was caused by the fact that sometimes when we try to set the page number
when resizing the variable the text position was not layouted yet and therefore a
the rootArea was a 0 pointer which let the page number be set to 0. Then later it was
set to 1 and the game began from the start.

To avoid that problem we break variable processing here until we get a valid rootArea.

It would be nice if someone with more knowledge on the text layout could have a look at
this and tell me if it is the right way to do.

The code works nicely and removes the endless loop and paints the correct page number.

File Changes

Modified 1 files
  • plugins/variables/PageVariable.cpp
1 files changed in total