Exemple #1
0
        public CT_BooleanProperty AddNewStrike()
        {
            CT_BooleanProperty prop = new CT_BooleanProperty();

            this.strikeField.Add(prop);
            return(prop);
        }
Exemple #2
0
        public CT_BooleanProperty AddNewB()
        {
            CT_BooleanProperty newB = new CT_BooleanProperty();

            this.bField.Add(newB);
            return(newB);
        }
Exemple #3
0
        public CT_BooleanProperty AddNewI()
        {
            CT_BooleanProperty newI = new CT_BooleanProperty();

            this.iField.Add(newI);
            return(newI);
        }
Exemple #4
0
        public CT_BooleanProperty AddNewStrike()
        {
            if (this.strikeField == null)
            {
                this.strikeField = new List <CT_BooleanProperty>();
            }
            CT_BooleanProperty prop = new CT_BooleanProperty();

            this.strikeField.Add(prop);
            return(prop);
        }
Exemple #5
0
        public CT_BooleanProperty AddNewI()
        {
            if (this.iField == null)
            {
                this.iField = new List <CT_BooleanProperty>();
            }
            CT_BooleanProperty newI = new CT_BooleanProperty();

            this.iField.Add(newI);
            return(newI);
        }
Exemple #6
0
        public static CT_BooleanProperty Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_BooleanProperty ctObj = new CT_BooleanProperty();

            if (node.Attributes["val"] != null)
            {
                ctObj.val = XmlHelper.ReadBool(node.Attributes["val"]);
            }
            return(ctObj);
        }
Exemple #7
0
        public static CT_Font Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Font ctObj = new CT_Font();

            ctObj.charset   = new List <CT_IntProperty>();
            ctObj.family    = new List <CT_IntProperty>();
            ctObj.b         = new List <CT_BooleanProperty>();
            ctObj.i         = new List <CT_BooleanProperty>();
            ctObj.strike    = new List <CT_BooleanProperty>();
            ctObj.color     = new List <CT_Color>();
            ctObj.sz        = new List <CT_FontSize>();
            ctObj.u         = new List <CT_UnderlineProperty>();
            ctObj.vertAlign = new List <CT_VerticalAlignFontProperty>();
            ctObj.scheme    = new List <CT_FontScheme>();
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "outline")
                {
                    ctObj.outline = CT_BooleanProperty.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "shadow")
                {
                    ctObj.shadow = CT_BooleanProperty.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "condense")
                {
                    ctObj.condense = CT_BooleanProperty.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "extend")
                {
                    ctObj.extend = CT_BooleanProperty.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "name")
                {
                    ctObj.name = CT_FontName.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "charset")
                {
                    ctObj.charset.Add(CT_IntProperty.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "family")
                {
                    ctObj.family.Add(CT_IntProperty.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "b")
                {
                    ctObj.b.Add(CT_BooleanProperty.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "i")
                {
                    ctObj.i.Add(CT_BooleanProperty.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "strike")
                {
                    ctObj.strike.Add(CT_BooleanProperty.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "color")
                {
                    ctObj.color.Add(CT_Color.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "sz")
                {
                    ctObj.sz.Add(CT_FontSize.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "u")
                {
                    ctObj.u.Add(CT_UnderlineProperty.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "vertAlign")
                {
                    ctObj.vertAlign.Add(CT_VerticalAlignFontProperty.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "scheme")
                {
                    ctObj.scheme.Add(CT_FontScheme.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }
Exemple #8
0
 public CT_BooleanProperty AddNewCondense()
 {
     this.condenseField = new CT_BooleanProperty();
     return this.condenseField;
 }
Exemple #9
0
 public void SetOutlineArray(CT_BooleanProperty[] array)
 {
     this.outlineField = array.Length > 0 ? array[0] : null;
 }
Exemple #10
0
 public void SetStrikeArray(CT_BooleanProperty[] array)
 {
     this.strikeField = new List<CT_BooleanProperty>(array);
 }
Exemple #11
0
 public CT_BooleanProperty AddNewShadow()
 {
     this.shadowField = new CT_BooleanProperty();
     return(this.shadowField);
 }
Exemple #12
0
 public void SetIArray(CT_BooleanProperty[] array)
 {
     this.iField = array.Length > 0 ? array[0] : null;
 }
Exemple #13
0
 public CT_BooleanProperty AddNewI()
 {
     this.iField = new CT_BooleanProperty();
     return this.iField;
 }
Exemple #14
0
 public CT_BooleanProperty AddNewStrike()
 {
     if (this.strikeField == null)
         this.strikeField = new List<CT_BooleanProperty>();
     CT_BooleanProperty prop = new CT_BooleanProperty();
     this.strikeField.Add(prop);
     return prop;
 }
Exemple #15
0
 public CT_BooleanProperty AddNewI()
 {
     if (this.iField == null)
         this.iField = new List<CT_BooleanProperty>();
     CT_BooleanProperty newI = new CT_BooleanProperty();
     this.iField.Add(newI);
     return newI;
 }
Exemple #16
0
 public CT_BooleanProperty AddNewB()
 {
     if (this.bField == null)
         this.bField = new List<CT_BooleanProperty>();
     CT_BooleanProperty newB = new CT_BooleanProperty();
     this.bField.Add(newB);
     return newB;
 }
Exemple #17
0
 public CT_BooleanProperty AddNewOutline()
 {
     this.outlineField = new CT_BooleanProperty();
     return(this.outlineField);
 }
Exemple #18
0
 public CT_BooleanProperty AddNewStrike()
 {
     this.strikeField = new CT_BooleanProperty();
     return this.strikeField;
 }
Exemple #19
0
 public CT_BooleanProperty AddNewExtend()
 {
     this.extendField = new CT_BooleanProperty();
     return(this.extendField);
 }
Exemple #20
0
 public void SetStrikeArray(CT_BooleanProperty[] array)
 {
     this.strikeField = array.Length > 0 ? array[0] : null;
 }
Exemple #21
0
 public void SetStrikeArray(int index, CT_BooleanProperty value)
 {
     this.strikeField[index]= value;
 }
Exemple #22
0
 public static CT_BooleanProperty Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_BooleanProperty ctObj = new CT_BooleanProperty();
     if (node.Attributes["val"]!=null)
         ctObj.val = XmlHelper.ReadBool(node.Attributes["val"]);
     return ctObj;
 }
Exemple #23
0
 public CT_BooleanProperty AddNewOutline()
 {
     this.outlineField = new CT_BooleanProperty();
     return this.outlineField;
 }
 public CT_BooleanProperty AddNewI()
 {
     this.iField = new CT_BooleanProperty();
     return(this.iField);
 }
Exemple #25
0
 public CT_BooleanProperty AddNewShadow()
 {
     this.shadowField = new CT_BooleanProperty();
     return this.shadowField;
 }
 public void SetIArray(CT_BooleanProperty[] array)
 {
     this.iField = array.Length > 0 ? array[0] : null;
 }
Exemple #27
0
 public CT_BooleanProperty AddNewExtend()
 {
     this.extendField = new CT_BooleanProperty();
     return this.extendField;
 }
 public CT_BooleanProperty AddNewStrike()
 {
     this.strikeField = new CT_BooleanProperty();
     return(this.strikeField);
 }
 public void SetStrikeArray(CT_BooleanProperty[] array)
 {
     this.strikeField = array.Length > 0 ? array[0] : null;
 }
Exemple #30
0
 public CT_BooleanProperty AddNewB()
 {
     CT_BooleanProperty newB = new CT_BooleanProperty();
     this.bField.Add(newB);
     return newB;
 }
Exemple #31
0
 public void SetIArray(int index, CT_BooleanProperty value)
 {
     this.iField[index] = value;
 }
Exemple #32
0
 public CT_BooleanProperty AddNewI()
 {
     CT_BooleanProperty newI=new CT_BooleanProperty();
     this.iField.Add(newI);
     return newI;
 }
Exemple #33
0
 public void SetStrikeArray(int index, CT_BooleanProperty value)
 {
     this.strikeField[index] = value;
 }
Exemple #34
0
 public void SetIArray(int index, CT_BooleanProperty value)
 {
     this.iField[index]= value;
 }
Exemple #35
0
 public void SetOutlineArray(CT_BooleanProperty[] array)
 {
     this.outlineField = array.Length > 0 ? array[0] : null;
 }
Exemple #36
0
 public void SetIArray(CT_BooleanProperty[] array)
 {
     if (array == null)
         this.iField = new List<CT_BooleanProperty>();
     else
         this.iField = new List<CT_BooleanProperty>(array);
 }
Exemple #37
0
 public CT_BooleanProperty AddNewCondense()
 {
     this.condenseField = new CT_BooleanProperty();
     return(this.condenseField);
 }
Exemple #38
0
 public CT_BooleanProperty AddNewStrike()
 {
     CT_BooleanProperty prop = new CT_BooleanProperty();
     this.strikeField.Add(prop);
     return prop;
 }
Exemple #39
0
        public CT_Font Clone()
        {
            CT_Font ctFont = new CT_Font();

            if (this.name != null)
            {
                CT_FontName newName = ctFont.AddNewName();
                newName.val = this.name.val;
            }
            if (this.charset != null)
            {
                foreach (CT_IntProperty ctCharset in this.charset)
                {
                    CT_IntProperty newCharset = ctFont.AddNewCharset();
                    newCharset.val = ctCharset.val;
                }
            }
            if (this.family != null)
            {
                foreach (CT_IntProperty ctFamily in this.family)
                {
                    CT_IntProperty newFamily = ctFont.AddNewFamily();
                    newFamily.val = ctFamily.val;
                }
            }
            if (this.b != null)
            {
                foreach (CT_BooleanProperty ctB in this.b)
                {
                    CT_BooleanProperty newB = ctFont.AddNewB();
                    newB.val = ctB.val;
                }
            }
            if (this.i != null)
            {
                foreach (CT_BooleanProperty ctI in this.i)
                {
                    CT_BooleanProperty newI = ctFont.AddNewB();
                    newI.val = ctI.val;
                }
            }
            if (this.strike != null)
            {
                foreach (CT_BooleanProperty ctStrike in this.strike)
                {
                    CT_BooleanProperty newstrike = ctFont.AddNewStrike();
                    newstrike.val = ctStrike.val;
                }
            }
            if (this.outline != null)
            {
                ctFont.outline     = new CT_BooleanProperty();
                ctFont.outline.val = this.outline.val;
            }
            if (this.shadow != null)
            {
                ctFont.shadow     = new CT_BooleanProperty();
                ctFont.shadow.val = this.shadow.val;
            }
            if (this.condense != null)
            {
                ctFont.condense     = new CT_BooleanProperty();
                ctFont.condense.val = this.condense.val;
            }
            if (this.extend != null)
            {
                ctFont.extend     = new CT_BooleanProperty();
                ctFont.extend.val = this.extend.val;
            }
            if (this.color != null)
            {
                foreach (CT_Color ctColor in this.color)
                {
                    CT_Color newColor = ctFont.AddNewColor();
                    newColor.theme = ctColor.theme;
                }
            }
            if (this.sz != null)
            {
                foreach (CT_FontSize ctSz in this.sz)
                {
                    CT_FontSize newSz = ctFont.AddNewSz();
                    newSz.val = ctSz.val;
                }
            }
            if (this.u != null)
            {
                foreach (CT_UnderlineProperty ctU in this.u)
                {
                    CT_UnderlineProperty newU = ctFont.AddNewU();
                    newU.val = ctU.val;
                }
            }
            if (this.vertAlign != null)
            {
                foreach (CT_VerticalAlignFontProperty ctVertAlign in this.vertAlign)
                {
                    CT_VerticalAlignFontProperty newVertAlign = ctFont.AddNewVertAlign();
                    newVertAlign.val = ctVertAlign.val;
                }
            }
            if (this.scheme != null)
            {
                foreach (CT_FontScheme ctScheme in this.scheme)
                {
                    CT_FontScheme newScheme = ctFont.AddNewScheme();
                    newScheme.val = ctScheme.val;
                }
            }
            return(ctFont);
        }
Exemple #40
0
        public CT_Font Clone()
        {
            CT_Font ctFont = new CT_Font();

            if (this.name != null)
            {
                CT_FontName newName = ctFont.AddNewName();
                newName.val = this.name.val;
            }
            if (this.charset != null)
            {
                foreach (CT_IntProperty ctCharset in this.charset)
                {
                    CT_IntProperty newCharset = ctFont.AddNewCharset();
                    newCharset.val = ctCharset.val;
                }
            }
            if (this.family != null)
            {
                foreach (CT_IntProperty ctFamily in this.family)
                {
                    CT_IntProperty newFamily = ctFont.AddNewFamily();
                    newFamily.val = ctFamily.val;
                }
            }
            if (this.b != null)
            {
                foreach (CT_BooleanProperty ctB in this.b)
                {
                    CT_BooleanProperty newB = ctFont.AddNewB();
                    newB.val = ctB.val;
                }
            }
            if (this.i != null)
            {
                foreach (CT_BooleanProperty ctI in this.i)
                {
                    CT_BooleanProperty newI = ctFont.AddNewI();
                    newI.val = ctI.val;
                }
            }
            if (this.strike != null)
            {
                foreach (CT_BooleanProperty ctStrike in this.strike)
                {
                    CT_BooleanProperty newstrike = ctFont.AddNewStrike();
                    newstrike.val = ctStrike.val;
                }
            }
            if (this.outline != null)
            {
                ctFont.outline     = new CT_BooleanProperty();
                ctFont.outline.val = this.outline.val;
            }
            if (this.shadow != null)
            {
                ctFont.shadow     = new CT_BooleanProperty();
                ctFont.shadow.val = this.shadow.val;
            }
            if (this.condense != null)
            {
                ctFont.condense     = new CT_BooleanProperty();
                ctFont.condense.val = this.condense.val;
            }
            if (this.extend != null)
            {
                ctFont.extend     = new CT_BooleanProperty();
                ctFont.extend.val = this.extend.val;
            }
            if (this.color != null)
            {
                foreach (CT_Color ctColor in this.color)
                {
                    CT_Color newColor = ctFont.AddNewColor();
                    newColor.theme          = ctColor.theme; //Forces themeSpecified to true even if a theme wasn't specified.
                    newColor.themeSpecified = ctColor.themeSpecified;
                    newColor.rgb            = ctColor.rgb;
                    newColor.rgbSpecified   = ctColor.rgbSpecified;
                    newColor.tint           = ctColor.tint;
                    newColor.tintSpecified  = ctColor.tintSpecified;
                    newColor.auto           = ctColor.auto;
                    newColor.autoSpecified  = ctColor.autoSpecified;
                    //Does not copy indexed color field because we don't support indexed colors for XSSF.
                    //If copying indexed colors between two documents you need to account for the color palettes
                    //potentially being different between two documents. (MSSQL Reporting Services did this in HSSF)
                }
            }
            if (this.sz != null)
            {
                foreach (CT_FontSize ctSz in this.sz)
                {
                    CT_FontSize newSz = ctFont.AddNewSz();
                    newSz.val = ctSz.val;
                }
            }
            if (this.u != null)
            {
                foreach (CT_UnderlineProperty ctU in this.u)
                {
                    CT_UnderlineProperty newU = ctFont.AddNewU();
                    newU.val = ctU.val;
                }
            }
            if (this.vertAlign != null)
            {
                foreach (CT_VerticalAlignFontProperty ctVertAlign in this.vertAlign)
                {
                    CT_VerticalAlignFontProperty newVertAlign = ctFont.AddNewVertAlign();
                    newVertAlign.val = ctVertAlign.val;
                }
            }
            if (this.scheme != null)
            {
                foreach (CT_FontScheme ctScheme in this.scheme)
                {
                    CT_FontScheme newScheme = ctFont.AddNewScheme();
                    newScheme.val = ctScheme.val;
                }
            }
            return(ctFont);
        }