To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=116909 Issue #|116909 Summary|PageCount (DocumentStatistics) is not correct Component|Word processor Version|OOo 3.3 Platform|Unknown URL| OS/Version|All Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|writerneedsconfirm Reported by|brinzing
------- Additional comments from [email protected] Thu Feb 10 12:25:02 +0000 2011 ------- steps to reproduce: - open new writer document - run macro provided below - result: "PageCount" (DocumentStatistics) is not correct, it shows "0" instead of "1" - open File - Properties - "Statistics" - run macro again - result is "1" now ... Sub Test() MsgBox getPageCount(ThisComponent) & Chr(13) & ThisComponent.getCurrentController().PageCount End Sub Function getPageCount(oDoc) oProps = oDoc.getDocumentProperties() aStats = oProps.DocumentStatistics for i = uBound(aStats) to 0 step -1 x = aStats(i) if x.Name = "PageCount" then exit for next getPageCount = 0 if i > -1 then getPageCount = x.Value End Function --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
