Version: 2.0 beta-7 (using 4.2.67 (KDE 4.2.67 (KDE 4.3 >= 20090318)), Eth-OS) Compiler: gcc OS: Linux (i686) release 2.6.28-ARCH To reproduce: Start a presentation, add a piece of text with the text shape and edit it. Choose Variable from the Insert menu, and choose page number or page count. Date works, but page counts don't.
This functionality is not yet implemented for kpresenter/kivio at the moment.
KPresenter should use KoTextShapeData::setPage(KoTextPage* textpage); It should also call KoTextShapeData::relayoutFor(KoTextPage &textPage); from the paint method in case the shape is used on more than one page (for instance in a header/footer). Last it should use the KoCanvasResourceProvider to set the property KoInlineObject::PageCount with a value of the number of pages (well, slides, I guess) in the current document.
SVN commit 1021089 by zachmann: o Fix page count variable by updating the corrosponding object key. CCBUG: 187838 M +14 -1 KoPADocument.cpp M +3 -0 KoPADocument.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1021089
SVN commit 1025130 by zachmann: Fix Bug 187838: Variables do not work The patch adds a KoPageProvider that can give back a KoTextPage for shape. This is done in the paint event of the textshape. It will relayout the textshape if needed (when the page number changed) and will block all update calls when doing so to avoid retriggering of the paint event. If a application does not offer a page provider the behaviour is the same as before. It is possible to use this behaviour for selected shapes only if an app whishes. BUG: 187838 M +1 -1 libs/flake/KoShape.h M +1 -0 libs/flake/KoShapeContainer.h M +2 -0 libs/kopageapp/CMakeLists.txt M +3 -0 libs/kopageapp/KoPACanvas.cpp M +2 -1 libs/kopageapp/KoPADocument.cpp M +6 -2 libs/kopageapp/KoPADocumentModel.cpp AM libs/kopageapp/KoPAPageProvider.cpp [License: LGPL (v2+)] AM libs/kopageapp/KoPAPageProvider.h [License: LGPL (v2+)] A libs/kopageapp/KoPATextPage.cpp [License: LGPL (v2+)] A libs/kopageapp/KoPATextPage.h [License: LGPL (v2+)] M +1 -0 libs/kotext/CMakeLists.txt AM libs/kotext/KoPageProvider.cpp [License: LGPL (v2+)] AM libs/kotext/KoPageProvider.h [License: LGPL (v2+)] M +9 -0 libs/kotext/KoTextShapeData.cpp M +44 -3 plugins/textshape/TextShape.cpp M +8 -0 plugins/textshape/TextShape.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1025130
You need to log in before you can comment on or make changes to this bug.