f.go 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package fo
  2. import (
  3. "github.com/kpmy/odf/model"
  4. "github.com/kpmy/odf/xmlns"
  5. )
  6. const (
  7. FontSize model.AttrName = "fo:font-size"
  8. TextAlign model.AttrName = "fo:text-align"
  9. BreakBefore model.AttrName = "fo:break-before"
  10. Color model.AttrName = "fo:color"
  11. FontWeight model.AttrName = "fo:font-weight"
  12. FontStyle model.AttrName = "fo:font-style"
  13. BorderRight model.AttrName = "fo:border-right"
  14. BorderLeft model.AttrName = "fo:border-left"
  15. BorderTop model.AttrName = "fo:border-top"
  16. BorderBottom model.AttrName = "fo:border-bottom"
  17. )
  18. const (
  19. Page = "page"
  20. Bold = "bold"
  21. Italic = "italic"
  22. )
  23. const (
  24. Start = "start"
  25. End = "end"
  26. Left = "left"
  27. Right = "right"
  28. Center = "center"
  29. Justify = "justify"
  30. )
  31. const (
  32. None = "none"
  33. Solid = "solid"
  34. Dotted = "dotted"
  35. Dash = "dash"
  36. LongDash = "long-dash"
  37. DotDash = "dot-dash"
  38. DotDotDash = "dot-dot-dash"
  39. Wave = "wave"
  40. )
  41. func init() {
  42. xmlns.Typed[FontSize] = xmlns.INT
  43. xmlns.Typed[TextAlign] = xmlns.ENUM
  44. xmlns.Enums[TextAlign] = []string{Start, End, Left, Right, Center, Justify}
  45. xmlns.Typed[BreakBefore] = xmlns.ENUM
  46. xmlns.Enums[BreakBefore] = []string{Page}
  47. xmlns.Typed[Color] = xmlns.COLOR
  48. }