Esempio n. 1
0
        internal static long WINDOW2(BinaryWriter output, bool frozen, bool selected)
        {
            long position = output.BaseStream.Position;

            WriteHeader(output, 574, 18);
            short aDst = BitField16.PutValue(180, 1536, (short)(selected ? 3 : 0));

            aDst = BitField16.PutValue(aDst, 8, (short)(frozen ? 1 : 0));
            output.Write(aDst);
            output.Write((ushort)0);
            output.Write((ushort)0);
            output.Write(64);
            output.Write((ushort)0);
            output.Write((ushort)0);
            output.Write(0);
            return(output.BaseStream.Position - position);
        }
Esempio n. 2
0
        internal static long WSBOOL(BinaryWriter output, bool rowSummaryBelow, bool colSummaryToRight)
        {
            long position = output.BaseStream.Position;

            WriteHeader(output, 129, 2);
            ushort num = 1025;

            if (rowSummaryBelow)
            {
                num = BitField16.PutValue(num, 64, 1);
            }
            if (colSummaryToRight)
            {
                num = BitField16.PutValue(num, 128, 1);
            }
            output.Write(num);
            return(output.BaseStream.Position - position);
        }
Esempio n. 3
0
        internal static long COLINFO(BinaryWriter output, ushort column, double colWidth, ushort outlineLevel, bool collapsed)
        {
            long position = output.BaseStream.Position;

            WriteHeader(output, 125, 12);
            output.Write(column);
            output.Write(column);
            output.Write((ushort)ToColumnWidth(colWidth));
            output.Write((ushort)15);
            ushort aDst = 0;

            outlineLevel = Math.Min(outlineLevel, (ushort)7);
            outlineLevel = Math.Max(outlineLevel, (ushort)0);
            aDst         = BitField16.PutValue(aDst, 1792, outlineLevel);
            aDst         = BitField16.PutValue(aDst, 4096, (ushort)(collapsed ? 1 : 0));
            aDst         = BitField16.PutValue(aDst, 1, (ushort)(collapsed ? 1 : 0));
            output.Write(aDst);
            output.Write((ushort)0);
            return(output.BaseStream.Position - position);
        }
Esempio n. 4
0
        internal static long ROW(BinaryWriter output, ushort rowIndex, ushort colMin, ushort colMax, ushort rowHeight, ushort outlineLevel, bool collapsed, bool autoSize)
        {
            long position = output.BaseStream.Position;

            WriteHeader(output, 520, 16);
            output.Write(rowIndex);
            output.Write(colMin);
            output.Write(colMax);
            output.Write(rowHeight);
            output.Write((ushort)0);
            output.Write((ushort)0);
            ushort aDst = 320;

            outlineLevel = Math.Min(outlineLevel, (ushort)7);
            outlineLevel = Math.Max(outlineLevel, (ushort)0);
            aDst         = BitField16.PutValue(aDst, 7, outlineLevel);
            aDst         = BitField16.PutValue(aDst, 64, (ushort)((!autoSize) ? 1 : 0));
            aDst         = BitField16.PutValue(aDst, 32, (ushort)(collapsed ? 1 : 0));
            aDst         = BitField16.PutValue(aDst, 16, (ushort)(collapsed ? 1 : 0));
            output.Write(aDst);
            output.Write((ushort)15);
            return(output.BaseStream.Position - position);
        }