Browse Source

完成文字段落属性,大纲符号

CrazyIter 4 năm trước cách đây
mục cha
commit
977bb86c4d

+ 2 - 2
HTEXLib/Controller/HtexController.cs

@@ -142,8 +142,8 @@ namespace HTEXLib.Controller
             int prevPage = _slideIndex >= _allSlidesCount ? _slideIndex : _slideIndex - 1;
             Slide slide=  DynamicBodyPart();
             if (slide != null) {
-                slide.netxPage = netxPage;
-                slide.prevPage = prevPage;
+               /* slide.netxPage = netxPage;
+                slide.prevPage = prevPage;*/
             }
             return slide;
 

+ 175 - 0
HTEXLib/Helpers/ShapeHelpers/BulletAutonumberHelper.cs

@@ -0,0 +1,175 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HTEXLib.Helpers.ShapeHelpers
+{
+    public class BulletAutonumberHelper
+    {
+
+        
+        public static string IntToCircle(int num,bool isBlack) {
+            string[] nw = new string[] { 
+                "①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩",
+                "⑪","⑫","⑬","⑭","⑮","⑯","⑰","⑱","⑲","⑳"
+            };// "❶❷❸❹❺❻❼❽❾❿⓫⓬⓭⓮⓯⓰⓱⓲⓳⓴";
+            string[] nb = new string[] { 
+                "❶","❷","❸","❹","❺","❻","❼","❽","❾","❿",
+                "⓫","⓬","⓭","⓮","⓯","⓰","⓱","⓲","⓳","⓴"
+            };
+            string[] ns;
+            if (isBlack)
+            {
+                ns = nb;
+            }
+            else {
+                ns = nw;
+            }
+            if (num >= 1 && num <= 20)
+            {
+                return ns[num - 1];
+            }
+            else {
+                return num + "";
+            }
+        }
+        public static string IntToRoman(int num,bool IsUp)
+        {
+            string res = String.Empty;
+            List<int> val = new List<int> { 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 };
+            List<string> strA = new List<string> { "M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I" };
+            List<string> stra = new List<string> { "m", "cm", "d", "cd", "c", "xc", "l", "xl", "x", "ix", "v", "iv", "i" };
+            List<string> str;
+            if (IsUp)
+            {
+                str = strA;
+            }
+            else {
+                str = stra;
+            }
+            for (int i = 0; i < val.Count; ++i)
+            {
+                while (num >= val[i])
+                {
+                    num -= val[i];
+                    res += str[i];
+                }
+            }
+            return res;
+        }
+        public static string IntToJp(int num)
+        {
+            // string A09 = "0123456789";
+            string[] C09 =new string[] { "〇", "一", "二", "三" , "四", "五", "六", "七", "八", "九" } ;
+            string[] resarr = (num + "").Select(s => s.ToString()).ToArray();
+            string res = num + "";
+            foreach (var str in resarr) {
+                res= res.Replace(str,C09[int.Parse(str)]);
+            }
+            return res;
+        }
+        public static string IntToChar(int num, bool IsUp)
+        {
+            string res = String.Empty;
+            //string a_z = "abcdefghijklmnopqrstuvwxyz";
+            //string A_Z = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+            char[] c = new char[100] ;
+            int m = solve(num, 26, c);
+            for (int i = m; i >= 0; i--) {
+                res= res + c[i];
+            }
+            if (IsUp)
+            {
+                res = res.ToUpper();
+            }
+            else {
+                res = res.ToLower();
+            }
+            return res;
+        }
+        public static int solve(int n, int r, char[] c)
+        {
+            int i = -1;
+            while (n > 0)
+            {
+                i++;
+                int t = n % r;
+                n = (n - 1) / r;        //不是26进制
+                if (t == 0)
+                    t = 26;
+                c[i] = (char)('A' + t - 1);
+            }
+            return i;
+        }
+        //千亿内的整型数值转化为中文数字
+        public static string LongToCh(long number)
+        {
+            string result = "";
+            string text = number.ToString();
+            if (System. Math.Abs(number).ToString().Length > 12)
+            {
+                return "参数过大!";
+            }
+            if (number == 0)
+            {
+                return "零";
+            }
+            else if (number < 0)
+            {
+                result += "负";
+                text = System.Math.Abs(number).ToString();
+            }
+            if (text.Length > 8)
+            {
+                LongBecomeText_step(ref result, ref text, 8, "亿");
+            }
+            if (text.Length > 4)
+            {
+                LongBecomeText_step(ref result, ref text, 4, "万");
+            }
+            LongBecomeText_step(ref result, ref text, 0, "");
+            if (result.Length > 1 && result.Substring(0, 1) == "一" && result.Substring(1, 1) == "十")
+            {
+                result = result.Remove(0, 1);
+            }
+            return result;
+        }
+        private static void LongBecomeText_step(ref string result, ref string text, int count, string name)
+        {
+            string[] nums = new string[] { "零", "一", "二", "三", "四", "五", "六", "七", "八", "九" };
+            string[] bits = new string[] { "", "十", "百", "千" };
+            string temp = text.Remove(text.Length - count, count);
+            int step = temp.Length - 1;
+            for (int i = 0; i < temp.Length; i++)
+            {
+                string single = temp.Substring(i, 1);
+                if (int.Parse(single) != 0)
+                {
+                    result += nums[int.Parse(single)] + bits[step];
+                }
+                else if (result.Length > 1 && result.Substring(result.Length - 1, 1) != "零")
+                {
+                    result += "零";
+                }
+                step--;
+            }
+            if (result.Length > 1 && result.Substring(result.Length - 1, 1) == "零")
+            {
+                result = result.Remove(result.Length - 1, 1);
+            }
+            if (int.Parse(temp) != 0)
+            {
+                result += name;
+            }
+            else
+            {
+                if (count > 0)
+                {
+                    result += "零";
+                }
+            }
+            text = text.Substring(temp.Length, count);
+        }
+    }
+}

+ 26 - 1
HTEXLib/Models/Brush.cs

@@ -15,6 +15,31 @@ namespace HTEXLib
         /// 通用筆, 螢光筆, 雷射筆 ,..   軟筆, 竹筆
         /// </summary>
         public string brushType { get; set; }
-        public HTEXLib.Models.HTEX.ShapeStyle style { get; set; } = new Models.HTEX.ShapeStyle();
+        //由于point_xy 已经定义了画笔开始的坐标点,大小等。
+        // public HTEXLib.Models.HTEX.ShapeStyle style { get; set; } = new Models.HTEX.ShapeStyle();
+    }
+    public class BrushStyle
+    {
+        /// <summary>
+        /// #FFFF0000
+        /// </summary>
+        public string color { get; set; }
+        /// <summary>
+        /// "10.1 10.1 10.3 13 13", // *om* // 畫筆 點 寬度 集合  0.10000629913149856, // *om* // 畫筆 寬
+        /// </summary>
+        public string point_w { get; set; }
+        /// <summary>
+        ///  20.000012598262999, // *om* // 畫筆 高
+        /// </summary>
+        public string point_h { get; set; }
+        /// <summary>
+        /// "471.99,216 471.84,213.06 471.6,209.47 471.52,205.75 471.9,202.42" // *om* // 畫筆 點 (x,y) 集合
+        /// </summary>
+        public string point_xy { get; set; }
+        /// <summary>
+        /// "{0,1,1,-1,0,0}", // *om* // 畫筆 筆尖 矩陣
+        /// </summary>
+        public string stylustip_transform { get; set; }
+
     }
 }

+ 12 - 11
HTEXLib/Models/ExamItem.cs

@@ -20,8 +20,8 @@ namespace HTEXLib
             option = new List<CodeValue>();
             answer = new List<string>();
             points = new List<string>();
-            gradeCode = new List<string>();
-            repairResource = new List<ProcessRes>();
+            gradeIds = new List<string>();
+            repairs = new List<Repair>();
         }
         public string shaCode { get; set; }
         //题干
@@ -43,7 +43,7 @@ namespace HTEXLib
         //管理知识点
         public List<string> points { get; set; }
         //认知层次 应用 综合 理解 评鉴 知识
-        public string field { get; set; }
+        public int?   field { get; set; }
         public List<ExamItem> children { get; set; }
         // 配分  
         public double score { get; set; }
@@ -57,11 +57,11 @@ namespace HTEXLib
         /// <summary>
         /// 补救资源
         /// </summary>
-        public List<ProcessRes> repairResource { get; set; }
+        public List<Repair> repairs { get; set; }
 
-        public string subjectCode { get; set; }
-        public string periodCode { get; set; }
-        public List<string> gradeCode { get; set; }
+        public string subjectId { get; set; }
+        public string periodId { get; set; }
+        public List<string> gradeIds { get; set; }
 
         /// <summary>
         /// 难度
@@ -81,14 +81,15 @@ namespace HTEXLib
         public int usageCount { get; set; }
         public string examCode { get; set; }
         public string url { get; set; }
+        public string scope { get; set; }
     }
     public class CodeValue
     {
-        public Position position { get; set; }
+       // public Position position { get; set; }
         public string code { get; set; }
         public string value { get; set; }
     }
-    public class ProcessRes
+    public class Repair
     {
         /// <summary>
         /// 文件名字
@@ -99,8 +100,8 @@ namespace HTEXLib
         /// 
         /// </summary>
 
-        public string blobUrl { get; set; }
-        public int order { get; set; }
+        public string url { get; set; }
+        //public int order { get; set; }
         /// <summary>
         /// 文件大小
         /// </summary>

+ 1 - 1
HTEXLib/Models/FontStyle.cs

@@ -51,7 +51,7 @@ namespace HTEXLib
         public bool Invisible { get; set; }
         public bool isBullet { get; set; }
         public double rot { get; set; }
-        public int width { get; set; }
+        public double width { get; set; }
         public bool pictureBullet { get; set; }
         public double bulletSize { get; set; }
     }

+ 6 - 6
HTEXLib/Models/HTEX/HtexChart.cs

@@ -206,7 +206,7 @@ namespace HTEXLib.Models.HTEX
 
                     };
                 }
-                int newTop = par.getSpaceBeforePoints();
+                double newTop = par.getSpaceBeforePoints();
                 int left = 0;
                 List<HtexText> textElements = new List<HtexText>();
                 List<Text> texts = new List<Text>();
@@ -330,7 +330,7 @@ namespace HTEXLib.Models.HTEX
         }//We have two similar methods - this one is better because it measures the whole string with the font. 
         private void fixLeftSpacingForAlignment(List<HtexText> textElements, PPTParagraph par, System.Drawing.Font font)
         {
-            int combinedWidth = 0;
+            double combinedWidth = 0;
 
             StringBuilder combinedText = new StringBuilder();
             foreach (HtexText textElement in textElements)
@@ -340,7 +340,7 @@ namespace HTEXLib.Models.HTEX
                 else
                     combinedText.Append(textElement.Text);
             }
-            int bulletOffset = 0;
+            double bulletOffset = 0;
             if (par.bullet != null && textElements.Count > 0 && !textElements[0].isBullet)
             {
                 bulletOffset = par.bullet.bulletSize;
@@ -367,11 +367,11 @@ namespace HTEXLib.Models.HTEX
         //There is mistake in the calculations coming from that and the difference is bigger when there are more elements. 
         private void fixLeftSpacingForAlignment(List<HtexText> textElements, PPTParagraph par)
         {
-            int combinedWidth = 0;
+            double combinedWidth = 0;
 
             foreach (HtexText textElement in textElements)
                 combinedWidth += textElement.width;
-            int bulletOffset = 0;
+            double bulletOffset = 0;
             if (par.bullet != null && textElements.Count > 0 && !textElements[0].isBullet)
             {
                 combinedWidth += par.bullet.bulletSize;
@@ -395,7 +395,7 @@ namespace HTEXLib.Models.HTEX
             List<PPTRunProperties> list = par.RunPropList;
             List<PPTRunProperties> result = new List<PPTRunProperties>();
             String previousToken = null;
-            int bulletSize = 0;
+            double bulletSize = 0;
             foreach (var text in list)
             {
                 float points = float.Parse(text.FontSize.ToString()) * 72.0F / 96.0F;

+ 9 - 10
HTEXLib/Models/HTEX/HtexShape.cs

@@ -207,20 +207,19 @@ namespace HTEXLib.Models.HTEX
             elmt.Add(shape);
             return elmt;
         }
-
         public List<Paragraph> DrawText() {
-            double top = getTopForCurrentAnchoring(this.Shape.VerticalAlign, this.Shape.Texts);
+            double top = getTopForCurrentAnchoring(this.Shape.Anchor, this.Shape.Texts);
             List<Paragraph> Paragraphs = new List<Paragraph>();
             foreach (var par in Shape.Texts)
             {
-                double paragraphTop = this.top + (this.Shape.VerticalAlign.Equals(DocumentFormat.OpenXml.Drawing.TextAnchoringTypeValues.Top) ? par.getSpaceBeforePoints() : 0);
+                double paragraphTop = this.top + (this.Shape.Anchor.Equals(DocumentFormat.OpenXml.Drawing.TextAnchoringTypeValues.Top) ? par.getSpaceBeforePoints() : 0);
                 Paragraph paragraph= new HTEXLib.Paragraph { animatable = par.Animatable ,invisible=par.Invisible};
                 paragraph.style.position.y = paragraphTop;
                 paragraph.style.position.x =this.left;
                 paragraph.style.position.cx = width;
                 paragraph.style.position.cy = height;
                 paragraph.style.position.rot = rot;
-                paragraph.style.vert = this.Shape.VerticalAlign.ToString();
+                paragraph.style.vert = this.Shape.Anchor.ToString();
                 paragraph.style.hori = par.Align;
                 paragraph.style.writing = Shape.WritingMode;
                 if (par.bullet != null) {
@@ -237,7 +236,7 @@ namespace HTEXLib.Models.HTEX
                     };
                 }
                
-                int newTop = par.getSpaceBeforePoints();
+                double newTop = par.getSpaceBeforePoints();
                 int left = 0;
                 List<HtexText> textElements = new List<HtexText>();
                 if (par.RunPropList == null || par.RunPropList.Count == 0 && par.defaultRunProperties != null)  //Only paragraph!
@@ -371,11 +370,11 @@ namespace HTEXLib.Models.HTEX
         //There is mistake in the calculations coming from that and the difference is bigger when there are more elements. 
         private void fixLeftSpacingForAlignment(List<HtexText> textElements, PPTParagraph par)
         {
-            int combinedWidth = 0;
+            double combinedWidth = 0;
 
             foreach (HtexText textElement in textElements)
                 combinedWidth += textElement.width;
-            int bulletOffset = 0;
+            double bulletOffset = 0;
             if (par.bullet != null && textElements.Count > 0 && !textElements[0].isBullet)
             {
                 combinedWidth += par.bullet.bulletSize;
@@ -398,7 +397,7 @@ namespace HTEXLib.Models.HTEX
         //We have two similar methods - this one is better because it measures the whole string with the font. 
         private void fixLeftSpacingForAlignment(List<HtexText> textElements, PPTParagraph par, Font font)
         {
-            int combinedWidth = 0;
+            double combinedWidth = 0;
 
             StringBuilder combinedText = new StringBuilder();
             foreach (HtexText textElement in textElements)
@@ -408,7 +407,7 @@ namespace HTEXLib.Models.HTEX
                 else
                     combinedText.Append(textElement.Text);
             }
-            int bulletOffset = 0;
+            double bulletOffset = 0;
             if (par.bullet != null && textElements.Count > 0 && !textElements[0].isBullet)
             {
                 bulletOffset = par.bullet.bulletSize;
@@ -481,7 +480,7 @@ namespace HTEXLib.Models.HTEX
             List<PPTRunProperties> list = par.RunPropList;
             List<PPTRunProperties> result = new List<PPTRunProperties>();
             String previousToken = null;
-            int bulletSize = 0;
+            double bulletSize = 0;
             foreach (var text in list)
             {
                 float points = float.Parse(text.FontSize.ToString()) * 72.0F / 96.0F;

+ 6 - 6
HTEXLib/Models/HTEX/HtexTable.cs

@@ -111,7 +111,7 @@ namespace HTEXLib.Models.HTEX
 
                     };
                 }
-                int newTop = par.getSpaceBeforePoints();
+                double newTop = par.getSpaceBeforePoints();
                 int left = 0;
                 List<HtexText> textElements = new List<HtexText>();
                 List<Text> texts = new List<Text>();
@@ -234,7 +234,7 @@ namespace HTEXLib.Models.HTEX
         //We have two similar methods - this one is better because it measures the whole string with the font. 
         private void fixLeftSpacingForAlignment(List<HtexText> textElements, PPTParagraph par, System.Drawing.Font font)
         {
-            int combinedWidth = 0;
+            double combinedWidth = 0;
 
             StringBuilder combinedText = new StringBuilder();
             foreach (HtexText textElement in textElements)
@@ -244,7 +244,7 @@ namespace HTEXLib.Models.HTEX
                 else
                     combinedText.Append(textElement.Text);
             }
-            int bulletOffset = 0;
+            double bulletOffset = 0;
             if (par.bullet != null && textElements.Count > 0 && !textElements[0].isBullet)
             {
                 bulletOffset = par.bullet.bulletSize;
@@ -272,11 +272,11 @@ namespace HTEXLib.Models.HTEX
         //There is mistake in the calculations coming from that and the difference is bigger when there are more elements. 
         private void fixLeftSpacingForAlignment(List<HtexText> textElements, PPTParagraph par)
         {
-            int combinedWidth = 0;
+            double combinedWidth = 0;
 
             foreach (HtexText textElement in textElements)
                 combinedWidth += textElement.width;
-            int bulletOffset = 0;
+            double bulletOffset = 0;
             if (par.bullet != null && textElements.Count > 0 && !textElements[0].isBullet)
             {
                 combinedWidth += par.bullet.bulletSize;
@@ -300,7 +300,7 @@ namespace HTEXLib.Models.HTEX
             List<PPTRunProperties> list = par.RunPropList;
             List<PPTRunProperties> result = new List<PPTRunProperties>();
             String previousToken = null;
-            int bulletSize = 0;
+            double bulletSize = 0;
             foreach (var text in list)
             {
                 float points = float.Parse(text.FontSize.ToString()) * 72.0F / 96.0F;

+ 2 - 2
HTEXLib/Models/HTEX/HtexText.cs

@@ -12,12 +12,12 @@ namespace HTEXLib.Models.HTEX
         public bool PictureBullet { get; set; }
         public bool isBullet { get; set; }
         public  int DefaultBulletSize { get; set; } = 12;
-        public int bulletSize { get; set; }
+        public double bulletSize { get; set; }
         public bool bold { get; set; }
         public bool italic { get; set; }
         public string underline { get; set; }
         public int slideIndex { get; set; }
-        public int width { get; set; }
+        public double width { get; set; }
         public double Rotate { get; set; }
         public void setLeft(double newLeft)
         {

+ 2 - 0
HTEXLib/Models/Math.cs

@@ -15,6 +15,8 @@ namespace HTEXLib
         public string shapeType { get; set; }
        
         public Item back { get; set; }
+
+        
     }
     public class MathML {
         public string formula { get; set; }

+ 228 - 25
HTEXLib/Models/PPTX/PPTParagraph.cs

@@ -9,6 +9,7 @@ using DocumentFormat.OpenXml;
 using DocumentFormat.OpenXml.Drawing;
 using DocumentFormat.OpenXml.Packaging;
 using DocumentFormat.OpenXml.Presentation;
+using HTEXLib.Helpers.ShapeHelpers;
 
 namespace HTEXLib.Models.Inner
 {
@@ -52,40 +53,40 @@ namespace HTEXLib.Models.Inner
         }
 
 
-        public int getLineSpacingInPointsFromFont(int fontHeight)
+        public double getLineSpacingInPointsFromFont(double fontHeight)
         {
             if (lineSpacing == null)
                 return fontHeight;
             if (lineSpacing.SpacingPoints != null)
                 return lineSpacing.SpacingPoints.Val;
             if (lineSpacing.SpacingPercent != null)
-                return lineSpacing.SpacingPercent.Val * fontHeight / Globals.PercentageConstant;
+                return lineSpacing.SpacingPercent.Val * fontHeight*1.0 / Globals.PercentageConstant;
             return fontHeight;
         }
-        public int getSpaceBeforePoints()
+        public double getSpaceBeforePoints()
         {
             return getSpacingInPoints(spaceBefore, 0);
         }
-        public int getSpaceBeforePoints(int height)
+        public double getSpaceBeforePoints(double height)
         {
             return getSpacingInPoints(spaceBefore, height);
         }
 
-        public int getSpaceAfterPoints()
+        public double getSpaceAfterPoints()
         {
             return getSpacingInPoints(spaceAfter, 0);
         }
-        public int getSpaceAfterPoints(int height)
+        public double getSpaceAfterPoints(double height)
         {
             return getSpacingInPoints(spaceAfter, height);
         }
 
-        private int getSpacingInPoints(DocumentFormat.OpenXml.Drawing.TextSpacingType spacing, int height)
+        private double getSpacingInPoints(DocumentFormat.OpenXml.Drawing.TextSpacingType spacing, double height)
         {
             if (spacing == null)
                 return 0;
             if (spacing.SpacingPoints != null)
-                return spacing.SpacingPoints.Val / Globals.FontPoint;
+                return spacing.SpacingPoints.Val *1.0 / Globals.FontPoint;
             if (spacing.SpacingPercent.Val != null && height != 0)
                 return spacing.SpacingPercent.Val * height / Globals.PercentageConstant;
             return 0;
@@ -185,6 +186,12 @@ namespace HTEXLib.Models.Inner
 
         private void FillParagraphProperties(TextParagraphPropertiesType baseProperties, OpenXmlPart slidePart)
         {
+            ///行距该元素指定段落中要使用的垂直行间距。可以用两种不同的方式来指定,百分比间距和字体点间距。如果省略此元素,则两行文本之间的间距应由一行中最大文本的点大小确定。
+            ///<a:lnSpc>  
+            // < a:spcPct val = "200%" />
+            // a: spcPct.
+            //a:spcPts.
+            //</ a:lnSpc >
             if (baseProperties.LineSpacing != null)
             {
                 lineSpacing = baseProperties.LineSpacing;
@@ -203,9 +210,30 @@ namespace HTEXLib.Models.Inner
             }
             if (baseProperties.FontAlignment != null)
             {
+                /*
+                 * <a:txtBody>
+ …
+ <a:pPr fontAlgn="b" …/>
+ …
+ <a:r>
+ <a:rPr …/>
+ <a:t>H </a:t>
+ </a:r>
+ <a:r>
+ <a:rPr sz="1200" …/>
+ <a:t>2</a:t>
+ </a:r>
+ <a:r>
+ <a:rPr …/>
+ <a:t>O</a:t>
+ </a:r>
+ …
+</p:txBody>
+                H2O 文字居底 ,将2 字号变小 化学公式
+                 * */
                 FontAlign = baseProperties.FontAlignment.Value.ToString();
             }
-
+https://docs.microsoft.com/zh-cn/dotnet/api/documentformat.openxml.drawing.textparagraphpropertiestype?view=openxml-2.8.1
             if (baseProperties.LeftMargin != null)
             {
                 marginLeft = baseProperties.LeftMargin.Value*1.0  / Globals.px12700;
@@ -214,7 +242,7 @@ namespace HTEXLib.Models.Inner
             {
                 marginRight = baseProperties.RightMargin.Value *1.0/ Globals.px12700;
             }
-
+            //缩进
             if (baseProperties.Indent != null)
             {
                 Indent = baseProperties.Indent.Value / Globals.px12700;
@@ -227,7 +255,14 @@ namespace HTEXLib.Models.Inner
             {
                 bullet = null;
             }
-           
+            /// 指定标点符号是被强制地放置在一行文本上,还是放置在另一行文本上。
+            /// 也就是说,如果在应该携带的一系列文本的末尾有标点符号  转到另一行,它实际上会被结转吗。
+            /// 真值允许挂起标点符号,迫使标点符号不被结转,假值允许标点符号被结转  带到下一个文本行。 
+            /// 如果省略此属性,则隐含值为0或false。
+            /// baseProperties.Height
+            ///baseProperties.LatinLineBreak ,EastAsianLineBreak
+            /// baseProperties.RightToLeft;
+            ///baseProperties.DefaultTabSize;
 
         }
 
@@ -246,9 +281,13 @@ namespace HTEXLib.Models.Inner
                 {
                     this.ReadPictureBullets(baseProperties, bulletProp, slidePart);
                 }
+                else if (baseProperties.GetFirstChild<AutoNumberedBullet>() != null) {
+                    this.ReadAutoNumberedBullet(baseProperties, bulletProp);
+                }
             }
         }
 
+      
         private void ReadPictureBullets(TextParagraphPropertiesType baseProperties, PPTRunProperties bulletProp, OpenXmlPart slidePart)
         {   //TODO  获取段落的Bullet  大纲 提纲符号
             this.SetBulletProperties(baseProperties, bulletProp);
@@ -283,9 +322,164 @@ namespace HTEXLib.Models.Inner
                 }
             }
         }
+        public void ReadAutoNumberedBullet(TextParagraphPropertiesType baseProperties, PPTRunProperties bulletProp)
+        {
+           
+            string text ="";
+            AutoNumberedBullet autoNumberedBullet = baseProperties.GetFirstChild<AutoNumberedBullet>();
+            int num = Paragraph + 1;
+            if (autoNumberedBullet.StartAt != null)
+            {
+                num = autoNumberedBullet.StartAt.Value + (Paragraph+1 - 1);
+            }
+            switch (autoNumberedBullet.Type.Value) {
+                case
+                    TextAutoNumberSchemeValues.AlphaLowerCharacterParenBoth:
+                    //(a), (b), (c), …
+                    text = "(" + BulletAutonumberHelper.IntToChar(num, false) + ")";
+                    break;
+                case
+                    TextAutoNumberSchemeValues.AlphaLowerCharacterParenR:
+                    //a), b), c), …
+                    text =  BulletAutonumberHelper.IntToChar(num, false) + ")";
+                    break;
+                case
+                    TextAutoNumberSchemeValues.AlphaLowerCharacterPeriod:
+                    //a., b., c., …
+                    text = BulletAutonumberHelper.IntToChar(num, false) + ".";
+                    break;
+                case
+                    TextAutoNumberSchemeValues.AlphaUpperCharacterParenBoth:
+                    //(A), (B), (C), …
+                    text = "(" +BulletAutonumberHelper.IntToChar(num, true) + ")";
+                    break;
+                case
+                    TextAutoNumberSchemeValues.AlphaUpperCharacterParenR:
+                    //A), B), C), …
+                    text =   BulletAutonumberHelper.IntToChar(num, true) + ")";
+                    break;
+                case
+                    TextAutoNumberSchemeValues.AlphaUpperCharacterPeriod:
+                    text = "(" + BulletAutonumberHelper.IntToChar(num, true) + ".";
+                    //A., B., C., …
+                    break;
+                case
+                    TextAutoNumberSchemeValues.ArabicParenBoth:
+                    text = "(" + num + ")";
+                    //(1), (2), (3), …
+                    break;
+                case
+                    TextAutoNumberSchemeValues.ArabicParenR:
+                    //1), 2), 3), …
+                    text =   num + ")";
+                    break;
+                case
+                    TextAutoNumberSchemeValues.ArabicPeriod:
+                case
+                    TextAutoNumberSchemeValues.ArabicDoubleBytePeriod:
+                    //1., 2., 3., …
+                    text =  num + ".";
+                    break;
+                case
+                    TextAutoNumberSchemeValues.ArabicPlain:
+                case
+                    TextAutoNumberSchemeValues.ArabicDoubleBytePlain:
+                    //1, 2, 3, …
+                    text= num+"";
+                    break;
+                case
+                    TextAutoNumberSchemeValues.RomanLowerCharacterParenBoth:
+                    text = "(" + BulletAutonumberHelper.IntToRoman(num, false) + ")";
+                    //(i), (ii), (iii), …
+                    break;
+                case
+                    TextAutoNumberSchemeValues.RomanLowerCharacterParenR:
+                    text =   BulletAutonumberHelper.IntToRoman(num, false) + ")";
+                    //i), ii), iii), …
+                    break;
+                case
+                    TextAutoNumberSchemeValues.RomanLowerCharacterPeriod:
+                    text = "(" + BulletAutonumberHelper.IntToRoman(num, false) + ".";
+                    //i., ii., iii., …
+                    break;
+                case
+                    TextAutoNumberSchemeValues.RomanUpperCharacterParenBoth:
+                    text = "(" + BulletAutonumberHelper.IntToRoman(num, true) + ")";
+                    //(I), (II), (III), …
+                    break;
+                case
+                    TextAutoNumberSchemeValues.RomanUpperCharacterParenR:
+                    text =   BulletAutonumberHelper.IntToRoman(num, true) + ")";
+                    //I), II), III), …
+                    break;
+                case
+                    TextAutoNumberSchemeValues.RomanUpperCharacterPeriod:
+                    text = BulletAutonumberHelper.IntToRoman(num, true) + ".";
+                    //I., II., III., …
+                    break;
+                case
+                    TextAutoNumberSchemeValues.EastAsianJapaneseKoreanPlain:
+                    //一,二,三 …,一〇 … 二〇,三〇
+                    text = BulletAutonumberHelper.IntToJp(num) ;
+                    break;
+                case
+                    TextAutoNumberSchemeValues.EastAsianJapaneseDoubleBytePeriod:
+                case
+                    TextAutoNumberSchemeValues.EastAsianJapaneseKoreanPeriod:
+                    text = BulletAutonumberHelper.IntToJp(num)+".";
+                    //一.,二.,三. …,一〇. …二〇.,三〇.
+                    break;
+                case TextAutoNumberSchemeValues.EastAsianSimplifiedChinesePeriod:
+                    //一.,二.,三. …,十.,十一. …,二十.,二十一.
+                    text = BulletAutonumberHelper.LongToCh(num) + ".";
+                    break;
+                case TextAutoNumberSchemeValues.EastAsianSimplifiedChinesePlain:
+                    //一,二,三 …,十,十一 …,二十,二十一
+                    text = BulletAutonumberHelper.LongToCh(num);
+                    break;
+                case TextAutoNumberSchemeValues.EastAsianTraditionalChinesePeriod:
+                    //一.,二.,三. …,十.,十一. …,二〇.,二一.
+                    text = BulletAutonumberHelper.LongToCh(num)+".";
+                    break;
+                case TextAutoNumberSchemeValues.EastAsianTraditionalChinesePlain:
+                    //一,二,三 …,十,十一…,二〇,二一
+                    text = BulletAutonumberHelper.LongToCh(num);
+                    break;
+                case TextAutoNumberSchemeValues.CircleNumberDoubleBytePlain:
+                case TextAutoNumberSchemeValues.CircleNumberWingdingsWhitePlain:
+                    // "①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳";
+                    text = BulletAutonumberHelper.IntToCircle(num,false);
+                    break;
+                case TextAutoNumberSchemeValues.CircleNumberWingdingsBlackPlain:
+                    text = BulletAutonumberHelper.IntToCircle(num, true);
+                    // "❶❷❸❹❺❻❼❽❾❿⓫⓬⓭⓮⓯⓰⓱⓲⓳⓴";
+                    break;
+                    /// 阿拉伯文 数字
+                    /// TextAutoNumberSchemeValues.Arabic1Minus
+                    /// TextAutoNumberSchemeValues.Arabic2Minus
+                    /// 希伯来语 数字
+                    /// TextAutoNumberSchemeValues.Hebrew2Minus
+                    /// 古印度语 数字
+                    /// TextAutoNumberSchemeValues.hindiAlpha1Period  hindiAlphaPeriod hindiNumParenR hindiNumPeriod
+                    /// 泰语 数字
+                    /// TextAutoNumberSchemeValues.thaiAlphaParenBoth thaiAlphaParenR thaiAlphaPeriod thaiNumParenBoth thaiNumParenR thaiNumPeriod
+            }
+            //大纲符号 自动编号类型
+            bulletProp.BulletType = "AutoNum";
+            bulletProp.Text = text;
+            var bufont = baseProperties.GetFirstChild<BulletFont>();
+            if (baseProperties.GetFirstChild<BulletFont>() != null)
+            {
+                bulletProp.bulletSize = bufont.PitchFamily;
+                bulletProp.FontFamily = bufont.Typeface;
+            }
+            this.SetBulletProperties(baseProperties, bulletProp);
+        }
 
         private void ReadCharacterBullets(TextParagraphPropertiesType baseProperties, PPTRunProperties bulletProp)
         {
+            bulletProp.BulletType = "Character";
+            // BulletFontText   此元素指定段落的符号的字体应与包含每个符号的文本相同。
             //<a:buFont typeface="Arial" panose="020B0604020202020204" pitchFamily="34" charset="0" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" />
             bulletProp.Text = "" + baseProperties.GetFirstChild<CharacterBullet>().Char;
             var bufont = baseProperties.GetFirstChild<BulletFont>();
@@ -298,31 +492,34 @@ namespace HTEXLib.Models.Inner
 
         private void SetBulletProperties(TextParagraphPropertiesType baseProperties, PPTRunProperties bulletProp)
         {
+            //  BulletSizeText  可忽略 此元素指定段落的符号大小应与包含每个符号的文本相同。
             this.ReadBulletFont(baseProperties, bulletProp);
             this.ReadBulletColor(baseProperties, bulletProp);
             this.ReadBulletSizePercentage(baseProperties, bulletProp);
             bulletProp.Left = marginLeft;
-            bulletProp.BulletType = "Character";
             bullet = bulletProp;
 
         }
 
         private void ReadBulletColor(TextParagraphPropertiesType baseProperties, PPTRunProperties bulletProp)
         {
+            //BulletColorText 指定Bullet的文本颜色与正文的颜色相同 可忽略不处理
             BulletColor buCol = baseProperties.GetFirstChild<BulletColor>();
             if (buCol != null)
             {
-                if (buCol.RgbColorModelHex != null)
-                {
-                    bulletProp.FontColor = "#" + buCol.RgbColorModelHex.Val.Value;
-                }
-                else
-                {
-                    if (buCol.GetFirstChild<SchemeColor>() != null)
-                    {
-                        bulletProp.ReadThemeSchemeColor(buCol.GetFirstChild<SchemeColor>());
-                    }
-                }
+                bulletProp.FontColor= PPTXHelper.   ColorTypeColors(buCol, slide);
+
+                //if (buCol.RgbColorModelHex != null)
+                //{
+                //    bulletProp.FontColor = "#" + buCol.RgbColorModelHex.Val.Value;
+                //}
+                //else
+                //{
+                //    if (buCol.GetFirstChild<SchemeColor>() != null)
+                //    {
+                //        bulletProp.ReadThemeSchemeColor(buCol.GetFirstChild<SchemeColor>());
+                //    }
+                //}
             }
         }
 
@@ -368,12 +565,18 @@ namespace HTEXLib.Models.Inner
                 BulletSizePercentage pct = baseProperties.GetFirstChild<BulletSizePercentage>();
                 if (bulletProp.bulletSize != 0)
                 {
-                    bulletProp.bulletSize = bulletProp.bulletSize * pct.Val / Globals.PercentageConstant;
+                    bulletProp.bulletSize = bulletProp.bulletSize * pct.Val *1.0/ Globals.PercentageConstant;
                 }
                 else
                 {
                     bulletProp.bulletSize = Globals.DefaultBulletSize;
-                    bulletProp.bulletSize = bulletProp.bulletSize * pct.Val / Globals.PercentageConstant;
+                    bulletProp.bulletSize = bulletProp.bulletSize * pct.Val * 1.0 / Globals.PercentageConstant;
+                }
+            }
+            if (baseProperties.GetFirstChild<BulletSizePoints>() != null) {
+                BulletSizePoints bulletSizePoints= baseProperties.GetFirstChild<BulletSizePoints>();
+                if (bulletSizePoints.Val != null) {
+                    bulletProp.bulletSize = bulletSizePoints.Val * 1.0 / 100;
                 }
             }
         }

+ 1 - 1
HTEXLib/Models/PPTX/PPTRunProperties.cs

@@ -30,7 +30,7 @@ namespace HTEXLib.Models.Inner
         public bool isBreak { get; set; }
         public bool isBullet { get; set; }
         public string BulletType { get; set; }
-        public int bulletSize { get; set; }
+        public double bulletSize { get; set; }
         public string link { get; set; }
         public string linkType { get; set; }
         public PPTSlide slide { get; set; }

+ 67 - 5
HTEXLib/Models/PPTX/PPTShape.cs

@@ -163,13 +163,75 @@ namespace HTEXLib.Models.Inner
             if (shape.TextBody.BodyProperties != null)
             {
                 if (shape.TextBody.BodyProperties.Anchor != null)
-                    VerticalAlign = shape.TextBody.BodyProperties.Anchor;
+                    Anchor = shape.TextBody.BodyProperties.Anchor;
                 if (shape.TextBody.BodyProperties.GetFirstChild<NormalAutoFit>() != null &&
                     shape.TextBody.BodyProperties.GetFirstChild<NormalAutoFit>().FontScale != null)
                     fontScale = shape.TextBody.BodyProperties.GetFirstChild<NormalAutoFit>().FontScale.Value;
                 if (shape.TextBody.BodyProperties.Vertical != null) {
-                    WritingMode = shape.TextBody.BodyProperties.Vertical.ToString();
+                    Vertical = shape.TextBody.BodyProperties.Vertical;
                 }
+                if (shape.TextBody.BodyProperties.TopInset != null)
+                {
+                    TopInset = System.Math.Round((double)shape.TextBody.BodyProperties.TopInset.Value * 1.0 / 12700, Globals.degree);
+                }
+                if (shape.TextBody.BodyProperties.BottomInset != null)
+                {
+                    BottomInset = System.Math.Round((double)shape.TextBody.BodyProperties.BottomInset.Value * 1.0 / 12700, Globals.degree);
+                }
+                if (shape.TextBody.BodyProperties.RightInset != null)
+                {
+                    RightInset = System.Math.Round((double)shape.TextBody.BodyProperties.RightInset.Value * 1.0 / 12700, Globals.degree);
+                }
+                if (shape.TextBody.BodyProperties.LeftInset != null)
+                {
+                    LeftInset = System.Math.Round((double)shape.TextBody.BodyProperties.LeftInset.Value * 1.0 / 12700, Globals.degree);
+                }
+                if (shape.TextBody.BodyProperties.AnchorCenter != null)
+                {
+                    AnchorCenter = shape.TextBody.BodyProperties.AnchorCenter;
+                }
+                if (shape.TextBody.BodyProperties.RightToLeftColumns != null)
+                {
+                    RightToLeftColumns = shape.TextBody.BodyProperties.RightToLeftColumns;
+                }
+                if (shape.TextBody.BodyProperties.Wrap != null)
+                {
+                    Wrap = shape.TextBody.BodyProperties.Wrap;
+                }
+                if (shape.TextBody.BodyProperties.Vertical != null)
+                {
+                    Vertical = shape.TextBody.BodyProperties.Vertical;
+                }
+                if (shape.TextBody.BodyProperties.Rotation != null)
+                {
+                    rot = shape.TextBody.BodyProperties.Rotation.Value / 60000.0;
+                }
+                var elements = shape.TextBody.BodyProperties.ChildElements;
+                foreach (var element in elements)
+                {
+                    if (element is NoAutoFit)
+                    {
+                        //此元素指定文本主体内的文本不应自动适合于边框。 自动拟合是当文本框内的文本被缩放以保持在文本框内时。
+                        autoFit = false;
+                    }
+                    if (element is NormalAutoFit normalAutoFit)
+                    {
+                        //每个形状的文本都停留在该形状的范围内
+                        autoFit = true;
+                        fontScale = normalAutoFit.FontScale.Value;
+                    }
+                    if (element is ShapeAutoFit)
+                    {
+                        //每个形状的文本都停留在该形状的范围内。
+                        autoFit = true;
+                    }
+                    //TODO  3D Scene3DType  Shape3DType FlatText
+                }
+               
+            }
+
+            if (shape.TextBody.ListStyle!=null) {
+                shapeListStyleSlide = shape.TextBody.ListStyle;
             }
             int index = 0;
             foreach (var paragraph in shape.TextBody.Descendants<DocumentFormat.OpenXml.Drawing.Paragraph>())
@@ -219,7 +281,7 @@ namespace HTEXLib.Models.Inner
                 }
                 runProp.Text = run.Text.Text;
                 runProp.SetRunProperties(run.RunProperties, shape, ref effectShapes);
-                runProp.FontSize = System.Math.Round(fontScale * runProp.FontSize / Globals.PercentageConstant);
+                runProp.FontSize = System.Math.Round(fontScale * runProp.FontSize / Globals.PercentageConstant, Globals.degree);
                 par.RunPropList.Add(runProp);
             }
 
@@ -234,7 +296,7 @@ namespace HTEXLib.Models.Inner
                 }
                 runProp.Text = run.Text.Text;
                 runProp.SetRunProperties(run.RunProperties, shape, ref effectShapes);
-                runProp.FontSize =System. Math.Round(fontScale * runProp.FontSize / Globals.PercentageConstant);
+                runProp.FontSize =System. Math.Round(fontScale * runProp.FontSize / Globals.PercentageConstant, Globals.degree);
                 par.RunPropList.Add(runProp);
             }
 
@@ -243,7 +305,7 @@ namespace HTEXLib.Models.Inner
                 Break aBreak = (Break)obj;
                 PPTRunProperties runProp = new PPTRunProperties(par.defaultRunProperties);
                 runProp.SetRunProperties(aBreak.RunProperties, shape, ref effectShapes);
-                runProp.FontSize =System. Math.Round(fontScale * runProp.FontSize / Globals.PercentageConstant);
+                runProp.FontSize =System. Math.Round(fontScale * runProp.FontSize / Globals.PercentageConstant, Globals.degree);
                 runProp.isBreak = true;
                 par.RunPropList.Add(runProp);
             }

+ 58 - 5
HTEXLib/Models/PPTX/PPTShapeBase.cs

@@ -6,6 +6,7 @@ using System;
 using System.Globalization;
 using System.Linq;
 using System.Xml.Linq;
+using DocumentFormat.OpenXml.Drawing;
 
 namespace HTEXLib.Models.Inner
 {
@@ -21,7 +22,9 @@ namespace HTEXLib.Models.Inner
         public String HoverLinkUrl { get; set; }
         public DocumentFormat.OpenXml.Drawing.ListStyle shapeListStyleMaster { get; set; }
         public DocumentFormat.OpenXml.Drawing.ListStyle shapeListStyleLayout { get; set; }
-        public DocumentFormat.OpenXml.Drawing.TextAnchoringTypeValues VerticalAlign { get; set; }
+        public DocumentFormat.OpenXml.Drawing.ListStyle shapeListStyleSlide { get; set; }
+        public DocumentFormat.OpenXml.Drawing.TextAnchoringTypeValues Anchor { get; set; }
+        public BooleanValue AnchorCenter { get; set; }
         public DocumentFormat.OpenXml.Packaging.OpenXmlPart SlidePart { get; set; }
         public TableStylesPart tableStylesPart { get; set; }
         public ChartPart chartPart { get; set; }
@@ -160,7 +163,17 @@ namespace HTEXLib.Models.Inner
 
 
         }
+        public BooleanValue RightToLeftColumns { get; set; }
+        public DocumentFormat.OpenXml.Drawing.TextWrappingValues Wrap { get; set; }
 
+        public DocumentFormat.OpenXml.Drawing.TextVerticalValues Vertical { get; set; }
+        public double rot { get; set; }
+        /// <summary>
+        /// autoFit 大于 wrap设定 
+        /// true 每个形状的文本都停留在该形状的范围内
+        /// flase 此元素指定文本主体内的文本不应自动适合于边框。
+        /// </summary>
+        public bool autoFit { get; set; } = true;
         private void fillPropertiesFromMasterShape(DocumentFormat.OpenXml.Presentation.Shape masterShape, bool isLayout, bool addListStyle)
         {
             if (null != masterShape.TextBody)
@@ -173,7 +186,7 @@ namespace HTEXLib.Models.Inner
                         shapeListStyleMaster = masterShape.TextBody.ListStyle;
                 }
                 if (masterShape.TextBody.BodyProperties != null && masterShape.TextBody.BodyProperties.Anchor != null)
-                    VerticalAlign = masterShape.TextBody.BodyProperties.Anchor;
+                    Anchor = masterShape.TextBody.BodyProperties.Anchor;
                 if (masterShape.TextBody.BodyProperties.TopInset != null)
                 {
                     TopInset = System. Math.Round((double)masterShape.TextBody.BodyProperties.TopInset.Value *1.0/ 12700, Globals.degree);
@@ -190,11 +203,51 @@ namespace HTEXLib.Models.Inner
                 {
                     LeftInset = System.Math.Round((double)masterShape.TextBody.BodyProperties.LeftInset.Value * 1.0 / 12700, Globals.degree);
                 }
-
                 if (masterShape.TextBody.BodyProperties != null &&
-                    masterShape.TextBody.BodyProperties.GetFirstChild<DocumentFormat.OpenXml.Drawing.NormalAutoFit>() != null &&
-                      masterShape.TextBody.BodyProperties.GetFirstChild<DocumentFormat.OpenXml.Drawing.NormalAutoFit>().FontScale != null)
+                    masterShape.TextBody.BodyProperties.GetFirstChild<DocumentFormat.OpenXml.Drawing.NormalAutoFit>() != null && masterShape.TextBody.BodyProperties.GetFirstChild<DocumentFormat.OpenXml.Drawing.NormalAutoFit>().FontScale != null)
                     fontScale = masterShape.TextBody.BodyProperties.GetFirstChild<DocumentFormat.OpenXml.Drawing.NormalAutoFit>().FontScale.Value;
+
+                if (masterShape.TextBody.BodyProperties.AnchorCenter != null)
+                {
+                    AnchorCenter = masterShape.TextBody.BodyProperties.AnchorCenter;
+                }
+                if (masterShape.TextBody.BodyProperties.RightToLeftColumns != null)
+                {
+                    RightToLeftColumns = masterShape.TextBody.BodyProperties.RightToLeftColumns;
+                }
+                if (masterShape.TextBody.BodyProperties.Wrap != null)
+                {
+                    Wrap = masterShape.TextBody.BodyProperties.Wrap;
+                }
+                if (masterShape.TextBody.BodyProperties.Vertical != null)
+                {
+                    Vertical = masterShape.TextBody.BodyProperties.Vertical;
+                }
+                if (masterShape.TextBody.BodyProperties.Rotation != null)
+                {
+                    rot = masterShape.TextBody.BodyProperties.Rotation.Value / 60000.0;
+                }
+                var elements = masterShape.TextBody.BodyProperties.ChildElements;
+                foreach (var element in elements)
+                {
+                    if (element is NoAutoFit)
+                    {
+                        //此元素指定文本主体内的文本不应自动适合于边框。 自动拟合是当文本框内的文本被缩放以保持在文本框内时。
+                        autoFit = false;
+                    }
+                    if (element is NormalAutoFit normalAutoFit)
+                    {
+                        //每个形状的文本都停留在该形状的范围内
+                        autoFit = true;
+                        fontScale = normalAutoFit.FontScale.Value;
+                    }
+                    if (element is ShapeAutoFit)
+                    {
+                        //每个形状的文本都停留在该形状的范围内。
+                        autoFit = true;
+                    }
+                    //TODO  3D Scene3DType  Shape3DType FlatText
+                }
             }
             if (masterShape.ShapeProperties.Transform2D != null)
             {

+ 7 - 0
HTEXLib/Models/Paragraph.cs

@@ -58,7 +58,14 @@ namespace HTEXLib
 
     public class ParagraphStyle
     {
+        /// <summary>
+        /// 垂直方向
+        /// </summary>
         public string vert { get; set; }
+        /// <summary>
+        /// 水平方向
+        /// //ctr, l, r, just, dist, thai, justLow  thaiDist
+        /// </summary>
         // public string LeftMargin { get; set; }
         public string hori { get; set; }
         /// <summary>

+ 20 - 6
HTEXLib/Models/Slide.cs

@@ -12,20 +12,34 @@ namespace HTEXLib
     {
         public List<Animtime>  animations { get; set; }
         public List<Item> item { get; set; }
+
         public Fill fill { get; set; }
-        public int index { get; set; }
         //宽度
         public double width { get; set; }
         //高度
         public double height { get; set; }
+        /// <summary>
+        /// exercise如果不为null 则说明当前页面包含 题目,则题目信息可以与 item 一起渲染在当前页面。
+        /// </summary>
         public ExamItem exercise { get; set; }
-        //1 PPTX  2 HTML  来源
-        public int source { get; set; }
+        /// <summary>
+        /// 1 以htex 方式渲染  2 HTML来源,以html方式渲染 
+        /// </summary>
+        public int render { get; set; }
+        /// <summary>
+        /// #00FFFFFF
+        /// </summary>
+        public string colortag { get; set; }
+        /// <summary>
+        ///  直接以guidxxx_snapshot.jpg 存储在blob中
+        /// </summary>
+       // public string snapshot { get; set; }
+        //public int index { get; set; }
         /// <summary>
         /// 1默认为普通页面,2为题目
         /// </summary>
-        public int flag { get; set; } 
-        public int netxPage { get; set; }
-        public int prevPage { get; set; }
+        //public int flag { get; set; } 
+        //public int netxPage { get; set; }
+        //public int prevPage { get; set; }
     }
 }

+ 55 - 0
HTEXLib/Models/TextBody.cs

@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HTEXLib.Models
+{
+    public  class TextBody
+    {
+        public List<Paragraph> paragraph { get; set; }
+        /// <summary>
+        /// 垂直布局 Top 0,Center 1 , Bootom 2
+        /// </summary>
+        public string anchor { get; set; }
+        /// <summary>
+        /// 水平布局 水平居中anchorCt
+        /// </summary>
+        public string anchorCtr { get; set; }
+        // 书写方向 false 从左到右书写,true从右到左
+        bool rtlCol { get; set; }
+        /// <summary>
+        /// square 不溢出, none 溢出
+        /// </summary>
+        public string wrap { get; set; }
+        /// <summary>
+        /// "horz". 横向水平排版 默认
+        /// "vert". 顺时针旋转90 ,多一行则向左前进
+        /// "vert270". 顺时针旋转270,多一行则向右前进
+        ///     |------
+        ///     |---1
+        ///     |---2
+        ///     |---3
+        ///     》》》》》
+        ///     |
+        ///     |123
+        ///     ||||
+        ///     ||||
+        ///     -------
+        /// "wordArtVert". 堆积从左到右
+        /// "wordArtVertRtl".堆积从右到左
+        /// "eaVert". 垂直90度书写  
+        /// "mongolianVert". 垂直书写,从左到右
+        /// </summary>
+        public string vert { get; set; } = "horz";
+        /// <summary>
+        /// 旋转角度
+        /// </summary>
+        public double rot { get; set; } = 0;
+        /// <summary>
+        /// autoFit 大于 wrap设定 
+        /// true 每个形状的文本都停留在该形状的范围内
+        /// flase 此元素指定文本主体内的文本不应自动适合于边框。
+        /// </summary>
+        public bool autoFit { get; set; } = true;
+    }
+}

+ 22 - 1
HTEXTest/Program.cs

@@ -54,7 +54,28 @@ namespace HTEXTest
         }
 
         static void Main(string[] args)
-        {//FF3333
+        {
+            Console.WriteLine(BulletAutonumberHelper.LongToText(10));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(11));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(20));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(21));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(99));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(100));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(101));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(999));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(1000));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(1001));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(1101));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(10101));
+            Console.WriteLine(BulletAutonumberHelper.LongToText(10000));
+            Console.WriteLine(BulletAutonumberHelper.IntToCircle(15, true));
+            Console.WriteLine( BulletAutonumberHelper.IntToRoman(12, true));
+            Console.WriteLine(BulletAutonumberHelper.IntToRoman(27, true));
+            Console.WriteLine(BulletAutonumberHelper.IntToChar(25,false));
+            Console.WriteLine(BulletAutonumberHelper.IntToChar(26, false));
+            Console.WriteLine(BulletAutonumberHelper.IntToChar(27, false));
+            Console.WriteLine(BulletAutonumberHelper.IntToChar(2019, false));
+            //FF3333
             Color color = ColorTranslator.FromHtml("#" + "FF0000CC");
             string cls=  ColorTranslator.ToHtml(color);
             string time = string.Format("{0:yyyyMMdd-HH:mm:ss.fff}", DateTimeOffset.Now);