Documentation
¶
Index ¶
- Constants
- Variables
- func GetPlainText(reader io.ReadSeeker, code uint16) (paragraphs []string)
- func I8(b byte) uint8
- func I16(b []byte) uint16
- func I32(b []byte) uint32
- func ParseAsPropertyBasic(rawBuf []byte, offset int, ptype uint32) (e any, size int)
- func ParseInfomartion(name string, reader_info io.ReadSeeker) (data map[uint32]any)
- func ReadDoc(file string) []string
- func UTF16Decode(data []byte) string
- type File
- type Header
- type Ole
- type PSS
- type Sector
- type Stream
- type StreamReader
Constants ¶
View Source
const ( VT_EMPTY = 0 VT_NULL = 1 VT_I2 = 2 VT_I4 = 3 VT_R4 = 4 VT_R8 = 5 VT_CY = 6 VT_DATE = 7 VT_BSTR = 8 VT_DISPATCH = 9 VT_ERROR = 10 VT_BOOL = 11 VT_VARIANT = 12 VT_UNKNOWN = 13 VT_DECIMAL = 14 VT_I1 = 16 VT_UI1 = 17 VT_UI2 = 18 VT_UI4 = 19 VT_I8 = 20 VT_UI8 = 21 VT_INT = 22 VT_UINT = 23 VT_VOID = 24 VT_HRESULT = 25 VT_PTR = 26 VT_SAFEARRAY = 27 VT_CARRAY = 28 VT_USERDEFINED = 29 VT_LPSTR = 30 VT_LPWSTR = 31 VT_FILETIME = 64 VT_BLOB = 65 VT_STREAM = 66 VT_STORAGE = 67 VT_STREAMED_OBJECT = 68 VT_STORED_OBJECT = 69 VT_BLOB_OBJECT = 70 VT_CF = 71 VT_CLSID = 72 VT_VECTOR = 0x1000 PAGECODE_UTF16LE = 1200 PAGECODE_UTF16BE = 1201 PAGECODE_UTF8 = 65001 PAGECODE_GB2312 = 956 PAGECODE_BIG5 = 950 )
Variables ¶
View Source
var ( VT = map[uint32]string{ 0: "VT_EMPTY", 1: "VT_NULL", 2: "VT_I2", 3: "VT_I4", 4: "VT_R4", 5: "VT_R8", 6: "VT_CY", 7: "VT_DATE", 8: "VT_BSTR", 9: "VT_DISPATCH", 10: "VT_ERROR", 11: "VT_BOOL", 12: "VT_VARIANT", 13: "VT_UNKNOWN", 14: "VT_DECIMAL", 16: "VT_I1", 17: "VT_UI1", 18: "VT_UI2", 19: "VT_UI4", 20: "VT_I8", 21: "VT_UI8", 22: "VT_INT", 23: "VT_UINT", 24: "VT_VOID", 25: "VT_HRESULT", 26: "VT_PTR", 27: "VT_SAFEARRAY", 28: "VT_CARRAY", 29: "VT_USERDEFINED", 30: "VT_LPSTR", 31: "VT_LPWSTR", 64: "VT_FILETIME", 65: "VT_BLOB", 66: "VT_STREAM", 67: "VT_STORAGE", 68: "VT_STREAMED_OBJECT", 69: "VT_STORED_OBJECT", 70: "VT_BLOB_OBJECT", 71: "VT_CF", 72: "VT_CLSID", 0x1000: "VT_VECTOR", } SUMMARY_ATTRIBS = []string{"codepage", "title", "subject", "author", "keywords", "comments", "template", "last_saved_by", "revision_number", "total_edit_time", "last_printed", "create_time", "last_saved_time", "num_pages", "num_words", "num_chars", "thumbnail", "creating_application", "security", } DOCSUM_ATTRIBS = []string{"codepage_doc", "category", "presentation_target", "bytes", "lines", "paragraphs", "slides", "notes", "hidden_slides", "mm_clips", "scale_crop", "heading_pairs", "titles_of_parts", "manager", "company", "links_dirty", "chars_with_spaces", "unused", "shared_doc", "link_base", "hlinks", "hlinks_changed", "version", "dig_sig", "content_type", "content_status", "language", "doc_version", } )
View Source
var DEBUG = false
View Source
var ENDOFCHAIN = uint32(0xFFFFFFFE) //-2
View Source
var FREESECT = uint32(0xFFFFFFFF) // -1
Functions ¶
func GetPlainText ¶
func GetPlainText(reader io.ReadSeeker, code uint16) (paragraphs []string)
func ParseAsPropertyBasic ¶
func ParseInfomartion ¶
func ParseInfomartion(name string, reader_info io.ReadSeeker) (data map[uint32]any)
func UTF16Decode ¶
Types ¶
type File ¶
type Header ¶
type Header struct {
Id [2]uint32
Clid [4]uint32
Verminor uint16
Verdll uint16
Byteorder uint16
Lsectorb uint16
Lssectorb uint16
Cfat uint32 //Total number of sectors used for the sector allocation table
Dirstart uint32 //SecID of first sector of the directory stream
Sectorcutoff uint32 //Minimum size of a standard stream
Sfatstart uint32 //SecID of first sector of the short-sector allocation table
Csfat uint32 //Total number of sectors used for the short-sector allocation table
Difstart uint32 //SecID of first sector of the master sector allocation table
Cdif uint32 //Total number of sectors used for the master sector allocation table
Msat [109]uint32
// contains filtered or unexported fields
}
type Ole ¶
type StreamReader ¶
type StreamReader struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.