Hi,
some remarks inserted in your message...
Message de Christian Lohmaier date 2007-02-02 12:38 :
Hi *,
I got some trouble with the DocumentInfo's properties.
file:///opt/openoffice.org2.1_sdk/docs/common/ref/com/sun/star/document/DocumentInfo.html
http://api.openoffice.org/docs/common/ref/com/sun/star/document/DocumentInfo.html
The properties I can query don't match those that are listed in the
reference.
I originally tried in Java, but I get the same results when using Basic.
Try the following macro:
sub docinfoprops()
Dim props() as Variant
oDoc = ThisComponent
oText = oDoc.getText()
xprops = oDoc.getDocumentInfo()
xpsi = xprops.getPropertySetInfo()
props = xpsi.getProperties()
for i = 0 To UBound(props)
oText.InsertString(oCursor, "Prop " & i & " " & props(i).Name , false)
oinspect = xprops.getPropertyValue(props(i).Name) ' can watch this...
oText.insertControlCharacter(oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
next
print "Done"
end sub
You'll get 33 Properties, but not all are listed in the docs, and you don't get
all that are listed in the docs.
I get 31 properties in a Writer or Calc document.
You can read them easily in Basic with Xray macro.
Xray thisComponent.DocumentInfo
(look e.g. for the "Language" property listed in the docs. It is not
available. Instead you got a property "CharLocale")
Language is documented but does not exist.
CharLocale is not documented in DocumentInfo page, and does not exist in
DocumentInfo object.
CharLocale is directly accessible (with Basic) from the document itself.
Is the problem the documentation? Is the problem in the functionality of
the Office?
Documentation is incorrect. See Issue 26672 created nearly 3 years ago.
Regards
Bernard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]