Apache OpenOffice (AOO) Bugzilla – Issue 24444
TextPortionType returns "Frame" not "TextContent"
Last modified: 2013-08-07 14:38:26 UTC
The string property "TextPortionType" never returns the text "TextContent" as specified in the documentation. It does, however, return the text "Frame", which is not specified as an expected return type in the documentation. Run the macro below on a document that contains Text Content. Although "Frame" is returned, "TextContent" is never returned as a text content type. Sub EnumerateTextSections Dim oParEnum 'Paragraph enumerator Dim osecEnum 'text section enumerator Dim oPar 'Current paragraph Dim oParSection 'Current Section Dim nPars As Integer 'Number of paragraphs Dim s$ oParEnum = ThisComponent.Text.createEnumeration() Do While oParEnum.hasMoreElements() oPar = oParEnum.nextElement() If oPar.supportsService("com.sun.star.text.Paragraph") Then nPars = nPars + 1 oSecEnum = oPar.createEnumeration() s = s & nPars & ":" Do While oSecEnum.hasMoreElements() oParSection = oSecEnum.nextElement() s = s & oParSection.TextPortionType & ":" Loop s = s & CHR$(10) If nPars MOD 25 = 0 Then MsgBox s, 0, "Paragraph Text Sections" s = "" End If End If Loop MsgBox s, 0, "Paragraph Text Sections" End Sub Joerg had the following to say: The described implementation does not conform to this specification. Please submit a bug report. In case of doubt the specification is right, so the bug should be submitted against the implementation - i.e. against the 'sw' component. If the developer thinks that the documentation is broken, he will redirect the issue himself.
Reassigned to JSK
Created attachment 14887 [details] Before renaming the library
Argh. Caching again. The attachment went to the wrong document. Please ignore i24094-library.sxw.
Forwarding to AB.
ab->os: At the first look this is an API issue, not Basic core
os->tl: Please change the documentation.
.
tl/cn: office later