libreoffice python访问属性对象
鉴于以这种方式获取的变量属性的属性
view_settings = current_controller.ViewSettings
property_set=view_settings.getPropertySetInfo()
properties=property_set.getProperties()
如何访问值。
例如:
(com.sun.star.beans.Property){ Name = (string)"ZoomValue", Handle = (long)0x1b, Type = (type)short, Attributes = (short)0x0 }
这些失败:
properties.ZoomValue
properties.getattr('ZoomValue')
properties['ZoomValue']
Given this Property of the variable properties
acquired in this way
view_settings = current_controller.ViewSettings
property_set=view_settings.getPropertySetInfo()
properties=property_set.getProperties()
How do I access the values.
For example:
(com.sun.star.beans.Property){ Name = (string)"ZoomValue", Handle = (long)0x1b, Type = (type)short, Attributes = (short)0x0 }
These fail :
properties.ZoomValue
properties.getattr('ZoomValue')
properties['ZoomValue']
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎您有点迷路了。
It seems like you got a little lost. ???? This is enough to get the value.
getPropertySetInfo() tells information about the properties rather than giving access to the property values. For example you could determine the property type like this:
Result: