Class | Ole::Types::PropertySet |
In: |
lib/ole/types/property_set.rb
|
Parent: | Object |
The PropertySet class currently supports readonly access to the properties serialized in "property set" streams, such as the file "\005SummaryInformation", in OLE files.
Think it has its roots in MFC property set serialization.
See poi.apache.org/hpsf/internals.html for details
HEADER_SIZE | = | 28 | ||
HEADER_PACK | = | "vvVa#{Clsid::SIZE}V" | ||
OS_MAP | = | { 0 => :win16, 1 => :mac, 2 => :win32, 0x20001 => :ooffice, # open office on linux... } | ||
DATA | = | YAML.load_file(File.dirname(__FILE__) + '/../../../data/propids.yaml'). inject({}) { |hash, (key, value)| hash.update Clsid.parse(key) => value } | define a smattering of the property set guids. | |
PROPERTY_MAP | = | DATA.inject({}) do |h1, (guid, data)| data[1].inject(h1) { |h2, (id, name)| h2.update name => [guid, id] } | create an inverted map of names to guid/key pairs |