s.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package style
  2. import (
  3. "github.com/kpmy/odf/model"
  4. "github.com/kpmy/odf/xmlns"
  5. )
  6. const (
  7. Style model.LeafName = "style:style"
  8. TextProperties model.LeafName = "style:text-properties"
  9. TableProperties model.LeafName = "style:table-properties"
  10. ParagraphProperties model.LeafName = "style:paragraph-properties"
  11. TableRowProperties model.LeafName = "style:table-row-properties"
  12. TableColumnProperties model.LeafName = "style:table-column-properties"
  13. TableCellProperties model.LeafName = "style:table-cell-properties"
  14. DefaultStyle model.LeafName = "style:default-style"
  15. FontFace model.LeafName = "style:font-face"
  16. )
  17. const (
  18. Family model.AttrName = "style:family"
  19. Name model.AttrName = "style:name"
  20. FontName model.AttrName = "style:font-name"
  21. Width model.AttrName = "style:width"
  22. UseOptimalRowHeight model.AttrName = "style:use-optimal-row-height"
  23. UseOptimalColumnWidth model.AttrName = "style:use-optimal-column-width"
  24. )
  25. const (
  26. FamilyText = "text"
  27. FamilyParagraph = "paragraph"
  28. FamilyTable = "table"
  29. FamilyTableRow = "table-row"
  30. FamilyTableColumn = "table-column"
  31. FamilyTableCell = "table-cell"
  32. )
  33. func init() {
  34. xmlns.Typed[Family] = xmlns.ENUM
  35. xmlns.Enums[Family] = []string{FamilyText, FamilyParagraph, FamilyTable, FamilyTableRow, FamilyTableColumn, FamilyTableCell}
  36. xmlns.Typed[Width] = xmlns.MEASURE
  37. xmlns.Typed[UseOptimalColumnWidth] = xmlns.BOOL
  38. xmlns.Typed[UseOptimalRowHeight] = xmlns.BOOL
  39. }