Ejemplo n.º 1
0
        public override bool Equals(object o)
        {
            StringWrapperBIFF8 stringWrapperBIFF = (StringWrapperBIFF8)o;

            if (this.m_runsList == null != (stringWrapperBIFF.m_runsList == null))
            {
                return(false);
            }
            if ((stringWrapperBIFF.m_grbit & 0xFE) != (this.m_grbit & 0xFE))
            {
                return(false);
            }
            if (stringWrapperBIFF.m_rgb.Length != this.m_rgb.Length)
            {
                return(false);
            }
            if (string.Compare(stringWrapperBIFF.m_rgb, this.m_rgb, StringComparison.Ordinal) != 0)
            {
                return(false);
            }
            if (this.m_runsList != null && this.m_runsList.Count > 0)
            {
                for (int i = 0; i < this.m_runsList.Count; i++)
                {
                    Pair <int, int> pair  = stringWrapperBIFF.m_runsList[i];
                    Pair <int, int> pair2 = this.m_runsList[i];
                    if (pair.First != pair2.First || pair.Second != pair2.Second)
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
Ejemplo n.º 2
0
 public int AddString(StringWrapperBIFF8 aWrapper)
 {
     if (this.m_stringTable.ContainsKey(aWrapper))
     {
         return(this.m_stringTable[aWrapper]);
     }
     return(this.InternalAddString(aWrapper));
 }
Ejemplo n.º 3
0
 private int InternalAddString(StringWrapperBIFF8 aWrapper)
 {
     this.m_totalStrings++;
     this.m_stringTable[aWrapper] = this.m_stringOrder.Count;
     this.m_stringOrder.Add(aWrapper);
     if (this.m_stringTable.Count < this.m_baseUniqueStrings)
     {
         this.m_baseUniqueStrings++;
     }
     this.m_offset += aWrapper.Size;
     return(this.m_stringOrder.Count - 1);
 }
Ejemplo n.º 4
0
        private TransformResult CreateRichStringRecord(RichTextInfo richTextInfo, CellRenderingDetails details)
        {
            StringWrapperBIFF8 stringWrapperBIFF = richTextInfo.CompleteRun();

            if (stringWrapperBIFF.Cch > 32767)
            {
                throw new ReportRenderingException(ExcelRenderRes.MaxStringLengthExceeded(details.Row.ToString(CultureInfo.InvariantCulture), details.Column.ToString(CultureInfo.InvariantCulture)));
            }
            int isst = this.m_stringHandler.AddString(stringWrapperBIFF);

            this.OnCellBegin(253, details.Column);
            RecordFactory.LABELSST(details.Output, (ushort)details.Row, (ushort)details.Column, details.Ixfe, (uint)isst);
            return(TransformResult.Handled);
        }
Ejemplo n.º 5
0
        public StringWrapperBIFF8 CompleteRun()
        {
            if (this.m_font != null)
            {
                int num = this.m_styleContainer.AddFont(this.m_font);
                this.m_maxFontIndex = Math.Max(this.m_maxFontIndex, num);
                this.m_fontList.Add(new Pair <int, int>(this.m_startIndex, num));
            }
            StringWrapperBIFF8 stringWrapperBIFF = new StringWrapperBIFF8(this.m_stringBuilder.ToString());

            stringWrapperBIFF.SetRunsList(this.m_fontList);
            this.m_fontList      = null;
            this.m_font          = null;
            this.m_stringBuilder = null;
            return(stringWrapperBIFF);
        }