Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Calc: no PageCount value in DocumentStatistics | ||||||
---|---|---|---|---|---|---|---|
Product: | App Dev | Reporter: | oooforum (fr) <oooforum> | ||||
Component: | api | Assignee: | AOO issues mailing list <issues> | ||||
Status: | UNCONFIRMED --- | QA Contact: | |||||
Severity: | Normal | ||||||
Priority: | P5 (lowest) | ||||||
Version: | 4.1.1 | ||||||
Target Milestone: | --- | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Attachments: |
|
What is a meaningful page count for a spreadsheet? Yes: there is no page count in oDoc.DocumentProperties. I have a calc document with 3 sheets and without defined print ranges. a) File::Properties...::Statistic says Page Count: 20. b) File::Page Preview and (Print...) shows 17 pages The value differs because of empty areas inside the printranges. And the values will be changed if I change the paper size or paper orientation or the scaling factors (for printing). Pages will be created if the document is printed to something that describes a page size (screen, PDF, printer, ...). The document itself has no page size and no page count. How many pages do you expect for a spreadsheet? (In reply to mroe from comment #1) > How many pages do you expect for a spreadsheet? Properties dialog box shows this information. And I don't know how this number is calculated. Maybe an estimate based on basic parameters. But the main question is how to get it through API. |
Created attachment 84735 [details] Screenshot to show the problem With this macro, I want to get Document statistics for a spreadsheet: '************************************************* Sub DocStats oDoc = ThisComponent oProps = oDoc.DocumentProperties aStats = oProps.DocumentStatistics ' Loop through the array of c.s.s.beans.NamedValue for i = uBound(aStats) to 0 step -1 x = aStats(i) result = result & x.Name & ": " & x.Value & chr(10) next Msgbox result End Sub '************************************************* The result is different from File > Properties and Statistics tab (see screenshot). We have an "ObjectCount" value at zero but none "PageCount". Tested with AOO 4.1.1 and Win XP, Vista, 7 and Debian x64