LabelSST.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Runtime.InteropServices;
  5. using Biff8Excel.Interfaces;
  6. namespace Biff8Excel.Records
  7. {
  8. [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)]
  9. struct RecordLabelSST
  10. {
  11. public ushort opcode;
  12. public ushort length;
  13. public ushort row;
  14. public ushort col;
  15. public ushort xf;
  16. public uint sstIdx;
  17. }
  18. internal class LabelSST : IRecords
  19. {
  20. RecordLabelSST labelsst;
  21. public LabelSST()
  22. {
  23. labelsst.opcode = 0xFD;
  24. labelsst.length = 0xA;
  25. }
  26. public ushort Row
  27. {
  28. set {labelsst.row = value;}
  29. }
  30. public ushort Column
  31. {
  32. set {labelsst.col = value;}
  33. }
  34. public ushort CellStyle
  35. {
  36. set {labelsst.xf = value;}
  37. }
  38. public uint SSTIndex
  39. {
  40. set { labelsst.sstIdx = value; }
  41. }
  42. #region IRecords ³ÉÔ±
  43. public byte[] GetByte()
  44. {
  45. return Globals.GetStructToBytes(labelsst);
  46. }
  47. #endregion
  48. }
  49. }