示例#1
0
 override protected void HandleStartElement(XmlNodeInformation nodeInfo)
 {
     #region switch (nodeInfo.NodeName)
     switch (nodeInfo.NodeName)
     {
         case "font":
             {
                 m_currentFont = new FontData();
                 m_inFont = true;
                 break;
             }
         case "sz":
             {
                 if (m_inFont)
                 {
                     m_currentFont.FontSize = Decimal.Parse(nodeInfo.GetAttributeValue("val"));
                 }
                 break;
             }
         case "fill":
             {
                 m_currentFill = new FillData();
                 m_inFill = true;
                 break;
             }
         case "patternFill":
             {
                 m_currentFill.SetPatternFill(nodeInfo.GetAttributeValue("patternType"));
                 break;
             }
         case "color":
         case "fgColor":
         case "bgColor":
             {
                 HandleColourElement(nodeInfo);
                 break;
             }
         case "cellStyleXfs":
             {
                 m_inStyleXf = true;
                 break;
             }
         case "xf":
             {
                 HandleFormatInfo(nodeInfo);
                 break;
             }
     }
     #endregion
     base.HandleStartElement(nodeInfo);
 }
 private void HandleColorElement(XmlNodeInformation nodeInfo)
 {
     if (m_interestedInWhiteText)
     {
         FontData fd = new FontData();
         fd.ResolveColour(nodeInfo);
         if (fd.IsWhiteText())
         {
             m_partialStringStateIsWhiteText = true;
         }
     }
 }