Преглед на файлове

调整PPT解析的字段命名规则。

黄贺彬 преди 5 години
родител
ревизия
bb6c897b83

+ 6 - 6
TEAMModelOS.Service/Models/PowerPoint/Border.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -7,13 +7,13 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     public  class Border
     {
 
-        public double Width { get; set; }
-        public string Color { get; set; }
-        public string Type { get; set; }
+        public double width { get; set; }
+        public string color { get; set; }
+        public string type { get; set; }
         /// <summary>
         /// 描边
         /// </summary>
-        public string Stroke{ get; set; }
-        public string Dir { get; set; }
+        public string stroke{ get; set; }
+        public string dir { get; set; }
     }
 }

+ 20 - 20
TEAMModelOS.Service/Models/PowerPoint/Chart.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -6,15 +6,15 @@ namespace TEAMModelOS.Service.Model.PowerPoint
 {
     public   class Chart : Item
     {
-        public  List<CommonChart> Charts { get; set; }
-        public List<Paragraph> Title { get; set; }
+        public  List<CommonChart> charts { get; set; }
+        public List<Paragraph> title { get; set; }
     }
 
     public abstract class CommonChart {
         /// <summary>
         ///  bar col line pie area scatter radar plotAreaRegion stock surface
         /// </summary>
-        public string ChartType { get; set; }
+        public string chartType { get; set; }
         public List<Dictionary<string, object>> datas {get;set;}
     }
 
@@ -28,8 +28,8 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     /// </summary>
     public class SurfaceChart : CommonChart
     {
-        public string SurfaceType { get; set; }
-        public bool Is3D { get; set; }
+        public string surfaceType { get; set; }
+        public bool is3D { get; set; }
     }
     /// <summary>
     /// stockChart
@@ -41,7 +41,7 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     /// </summary>
     public class StockChart : CommonChart
     {
-        public string StockType { get; set; }
+        public string stockType { get; set; }
     }
     /// <summary>
     /// plotAreaRegion
@@ -53,7 +53,7 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     /// </summary>
     public class PlotAreaChart : CommonChart
     {
-        public string PlotAreaType { get;set;}
+        public string plotAreaType { get;set;}
     }
     /// <summary>
     ///  type radar
@@ -64,7 +64,7 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     /// </summary>
     public class RadarChart : CommonChart
     {
-        public string RadarType { get; set; }
+        public string radarType { get; set; }
     }
     /// <summary>
     /// type scatter
@@ -79,7 +79,7 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     /// </summary>
     public class ScatterChart : CommonChart
     {
-        public string ScatterType { get; set; }
+        public string scatterType { get; set; }
        // public bool Is3D { get; set; }
     }
     /// <summary>
@@ -95,8 +95,8 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     /// </summary>
     public class AreaChart : CommonChart
     {
-        public string AreaType { get; set; }
-        public bool Is3D { get; set; }
+        public string areaType { get; set; }
+        public bool is3D { get; set; }
     }
     /// <summary>
     /// type bar  条形图<c:barDir val="bar"/>   
@@ -111,8 +111,8 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     /// </summary>
     public class BarChart : CommonChart
     {
-        public string BarType { get; set; }
-        public bool Is3D { get; set; }
+        public string barType { get; set; }
+        public bool is3D { get; set; }
     }
     /// <summary>
     ///  type bar  柱状图<c:barDir val="col"/>
@@ -128,8 +128,8 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     /// </summary>
     public class ColChart : CommonChart
     {
-        public string ColType { get; set; }
-        public bool Is3D { get; set; }
+        public string colType { get; set; }
+        public bool is3D { get; set; }
     }
     /// <summary>
     /// type line   
@@ -148,8 +148,8 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     /// </summary>
     public class LineChart : CommonChart
     {
-        public string LineType { get; set; }
-        public bool Is3D { get; set; }
+        public string lineType { get; set; }
+        public bool is3D { get; set; }
     }
     
     /// <summary>
@@ -166,8 +166,8 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     /// </summary>
     public class PieChart : CommonChart
     {
-        public string PieType { get; set; }
-        public bool Is3D { get; set; }
+        public string pieType { get; set; }
+        public bool is3D { get; set; }
     }
 
 }

+ 2 - 2
TEAMModelOS.Service/Models/PowerPoint/Connector.cs

@@ -11,10 +11,10 @@ namespace TEAMModelOS.Service.Model.PowerPoint
         /// <summary>
         ///连接线 p:cxnSp
         /// </summary>
-        public string CxnType { get; set; }
+        public string cxnType { get; set; }
         //public string HeadEnd { get; set; }
         //public string TailEnd { get; set; }
-        public Border Border { get; set; }
+        public Border border { get; set; }
       
     }
 }

+ 2 - 2
TEAMModelOS.Service/Models/PowerPoint/Diagram.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -6,6 +6,6 @@ namespace TEAMModelOS.Service.Model.PowerPoint
 {
     public class Diagram :Item
     {
-        public List<Item> Shapes { get; set; }
+        public List<Item> shapes { get; set; }
     }
 }

+ 9 - 9
TEAMModelOS.Service/Models/PowerPoint/Fill.cs

@@ -14,10 +14,10 @@ namespace TEAMModelOS.Service.Model.PowerPoint
         /// [a:noFill, solidFill, gradFill, blipFill, pattFill,        grpFill]
         ///0,无填充 1.纯色填充 2.渐变填充 3.图片或纹理填充 4.图案填充
         /// </summary>
-        public int Type { get; set; }
-        public string Color { get; set; }
-        public string Image { get; set; }
-        public FillStyle Style { get; set; }
+        public int type { get; set; }
+        public string color { get; set; }
+        public string image { get; set; }
+        public FillStyle style { get; set; }
         //[Newtonsoft.Json.JsonIgnore]
         //[System.Text.Json.Serialization.JsonIgnore]
         //public string SvgText { get; set; }
@@ -25,7 +25,7 @@ namespace TEAMModelOS.Service.Model.PowerPoint
         //[System.Text.Json.Serialization.JsonIgnore]
         //public string HtmlText { get; set; }
         //渐变填充投射方向
-        public double Rot { get; set; }
+        public double rot { get; set; }
         //渐变填充  以及前景色 背景色 的图案填充  颜色列表
         public List<string> grad { get; set; }
         /// <summary>
@@ -38,10 +38,10 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     /// 填充图片偏移量px
     /// </summary>
     public class FillStyle {
-        public int Left { get; set; } = 0;
-        public int Top { get; set; } = 0;
-        public int Right { get; set; } = 0;
-        public int Bottom { get; set; } = 0;
+        public int left { get; set; } = 0;
+        public int top { get; set; } = 0;
+        public int right { get; set; } = 0;
+        public int bottom { get; set; } = 0;
     }
 
 }

+ 10 - 10
TEAMModelOS.Service/Models/PowerPoint/FontStyle.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -11,15 +11,15 @@ namespace TEAMModelOS.Service.Model.PowerPoint
         /// font-family、font-style、font-weight、font-variant、font-stretch、font-size、font-size-adjust、
         /// kerning、letter-spacing、word-spacing和text-decoration
         /// </summary>
-        public string Color { get; set; }
-        public double Size { get; set; }
+        public string color { get; set; }
+        public double size { get; set; }
         //inherit  继承父级
-        public string Family { get; set; }
-        public string Weight { get; set; }
-        public string Style { get; set; }
-        public string Decoration { get; set; }
-        public string VertAlign { get; set; }
-        public string Align { get; set; }
-        public string Shadow { get; set; }
+        public string family { get; set; }
+        public string weight { get; set; }
+        public string style { get; set; }
+        public string decoration { get; set; }
+        public string vertAlign { get; set; }
+        public string align { get; set; }
+        public string shadow { get; set; }
     }
 }

+ 2 - 2
TEAMModelOS.Service/Models/PowerPoint/Group.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -6,6 +6,6 @@ namespace TEAMModelOS.Service.Model.PowerPoint
 {
     public  class Group : Item
     {
-        public List<Item> Shapes { get; set; }
+        public List<Item> shapes { get; set; }
     }
 }

+ 7 - 7
TEAMModelOS.Service/Models/PowerPoint/Htex.cs

@@ -7,7 +7,7 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     public class Htex
     {
         public Htex() {
-            Slides = new List<string>();
+            slides = new List<string>();
             //size = new PptSize();
             //FontStyles = new Dictionary<string, FontStyle>();
             //Fills = new Dictionary<string, Fill>();
@@ -16,16 +16,16 @@ namespace TEAMModelOS.Service.Model.PowerPoint
             //Borders = new Dictionary<string, Border>();
 
         }
-        public HtexSize Size { get; set; }
+        public HtexSize size { get; set; }
         //缩略图
-        public string Thumbnail { get; set; }
+        public string thumbnail { get; set; }
         //PPT幻灯片集合
         //  public List<string> HiXmls { get; set; }
-        public List<string> Slides { get; set; }
+        public List<string> slides { get; set; }
         // public string PptUrl { get; set; }
         // public string Sha1Code { get; set; }
         //页数
-        public int Page { get; set; }
+        public int page { get; set; }
 
         //public Dictionary<string, FontStyle> FontStyles { get;set;}
         //public Dictionary<string, Fill> Fills { get; set; }
@@ -36,8 +36,8 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     public class HtexSize
     {
         //宽度
-        public double Width { get; set; }
+        public double width { get; set; }
         //高度
-        public double Height { get; set; }
+        public double height { get; set; }
     }
 }

+ 5 - 5
TEAMModelOS.Service/Models/PowerPoint/Item.cs

@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -7,11 +7,11 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     public abstract class Item
     {
         // Sp  CxnSp Media Group  Table Chart
-        public string Type { get; set; }
-        public Position Position { get; set; }
+        public string type { get; set; }
+        public Position position { get; set; }
       //  public string Xml { get; set; }
-        public int Index { get; set; }
-        public Svg Svg { get; set; }
+        public int index { get; set; }
+        public Svg svg { get; set; }
         //public Picture Picture { get; set; }
         //public Shape Shape { get; set; }
         //public Math Math { get; set; }

+ 3 - 3
TEAMModelOS.Service/Models/PowerPoint/Math.cs

@@ -7,11 +7,11 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     public class Math : Item
     {
     
-        public string Content { get; set; }
+        public string content { get; set; }
         
-        public Fill Fill { get; set; }
+        public Fill fill { get; set; }
         
-        public Border Border { get; set; }
+        public Border border { get; set; }
       
     }
 }

+ 5 - 5
TEAMModelOS.Service/Models/PowerPoint/Media.cs

@@ -7,15 +7,15 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     public   class Media : Item
     {
         //image 图片 video.视频 audio 音频
-        public string MediaType { get; set; }
+        public string mediaType { get; set; }
         //视频资源链接
-        public string Url { get; set; }
+        public string url { get; set; }
         //图片或视频音频缩略图链接
-        public string Image { get; set; }
+        public string image { get; set; }
      
-        public Fill Fill { get; set; }
+        public Fill fill { get; set; }
       
-        public Border Border { get; set; }
+        public Border border { get; set; }
      
     }
 }

+ 19 - 19
TEAMModelOS.Service/Models/PowerPoint/Paragraph.cs

@@ -7,48 +7,48 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     public class Paragraph
     {
          
-        public ParagraphStyle Style { get; set; }
+        public ParagraphStyle style { get; set; }
         public Paragraph() {
-            Texts = new List<Text>();
+            texts = new List<Text>();
         }
  
-        public BuChar BuChar { get; set; }
-        public List<Text> Texts { get; set; }
+        public BuChar buChar { get; set; }
+        public List<Text> texts { get; set; }
        
     }
     public class Text
     {
       //  public string StyleSha { get; set; }
-        public string Content { get; set; }
-        public string Href { get; set; }
-        public bool Isbr { get; set; } = false;
+        public string content { get; set; }
+        public string href { get; set; }
+        public bool isbr { get; set; } = false;
         
-        public FontStyle Style { get; set; }
+        public FontStyle style { get; set; }
     }
 
     public class BuChar {
         //TYPE_BULPIC  TYPE_NUMERIC TYPE_BULLET  TYPE_NONE  没有图标的 只有缩进
-        public string Type{ get; set; }
-        public double Left { get; set; }
-        public double Riht { get; set; }
-        public string Buchar { get; set; }
-        public string Typeface { get; set; }
-        public double  Size { get; set; }
-        public string Float { get; set; }
+        public string type{ get; set; }
+        public double left { get; set; }
+        public double riht { get; set; }
+        public string buchar { get; set; }
+        public string typeface { get; set; }
+        public double  size { get; set; }
+        public string @float { get; set; }
         /// <summary>
         /// ltr	默认。文本方向从左到右
         /// rtl	文本方向从右到左。
         /// inherit	规定应该从父元素继承 direction 属性的值。
         /// </summary>
-        public string Direction { get; set; } = "inherit";
+        public string direction { get; set; } = "inherit";
     }
 
     public class ParagraphStyle
     {
-        public string Vert { get; set; }
+        public string vert { get; set; }
         // public string LeftMargin { get; set; }
-        public string Hori { get; set; }
-        public string Writing { get; set; }
+        public string hori { get; set; }
+        public string writing { get; set; }
       
     }
 }

+ 7 - 7
TEAMModelOS.Service/Models/PowerPoint/Position.cs

@@ -7,19 +7,19 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     public class Position
     {
         //旋转角度
-        public double Rot { get; set; } = 0;
+        public double rot { get; set; } = 0;
         //水平翻转
-        public int FlipH { get; set; } = 0;
+        public int flipH { get; set; } = 0;
         //垂直翻转
-        public int FlipV { get; set; } = 0;
+        public int flipV { get; set; } = 0;
         //x轴
-        public double X { get; set; } = 0;
+        public double x { get; set; } = 0;
         //y轴
-        public double Y { get; set; } = 0;
+        public double y { get; set; } = 0;
         //宽度
-        public double Cx { get; set; } = 0;
+        public double cx { get; set; } = 0;
         //高度
-        public double Cy { get; set; } = 0;
+        public double cy { get; set; } = 0;
         ////初始坐标x
         //public Int64 ChX { get; set; } = 0;
         ////初始坐标Y

+ 30 - 30
TEAMModelOS.Service/Models/PowerPoint/Shape.cs

@@ -6,10 +6,10 @@ namespace TEAMModelOS.Service.Model.PowerPoint
 {
      public class Shape : Item
     { 
-        public string ShapeType;
-        public List<Paragraph> Paragraph { get; set; }
-        public Fill Fill { get; set; }
-        public Border Border { get; set; }
+        public string shapeType;
+        public List<Paragraph> paragraph { get; set; }
+        public Fill fill { get; set; }
+        public Border border { get; set; }
        
         //public List<ShapeGuide> ShapeGuides { get; set; }
         //public List<Path> Paths { get; set; }
@@ -19,13 +19,13 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     }
 
     public class Svg {
-        public string Id { get; set; }
+        public string id { get; set; }
         //public string Width { get; set; }
         //public string Height { get; set; }
         //public string Top { get; set; }
         //public string Left { get; set; }
         //public string Style { get; set; }
-        public List<SvgShape> SvgShape { get; set; }
+        public List<SvgShape> svgShape { get; set; }
         //public string Defs { get; set; }
       //  public string Transform { get; set; }
   
@@ -35,7 +35,7 @@ namespace TEAMModelOS.Service.Model.PowerPoint
 
     public abstract class SvgShape {
         // rect ,circle ,ellipse ,line ,polygon ,polyline ,path
-        public string Type { get; set; }
+        public string type { get; set; }
        // public string Style { get; set; }
        // public string Stroke { get; set; }
         //描边的不透明度
@@ -44,65 +44,65 @@ namespace TEAMModelOS.Service.Model.PowerPoint
         // 虚线类型描边
        // public string StrokeDasharray { get; set; }
        // public string Fill { get; set; }
-        public string Transform { get; set; }
-        public string Start { get; set; }
-        public string End { get; set; }
+        public string transform { get; set; }
+        public string start { get; set; }
+        public string end { get; set; }
         //填充色的不透明度
         //  public string FillOpacity { get; set; } = "1";
     }
     public class Rect : SvgShape
     { 
         //矩形左上角的x位置
-        public string X { get; set; }
+        public string x { get; set; }
         //矩形左上角的y位置
-        public string Y { get; set; }
+        public string y { get; set; }
         //矩形的宽度
-        public string Width { get; set; }
+        public string width { get; set; }
         //矩形的高度
-        public string Height { get; set; }
+        public string height { get; set; }
         // 圆角的x方位的半径
-        public string Rx { get; set; }
+        public string rx { get; set; }
         // 圆角的y方位的半径
-        public string Ry { get; set; }
+        public string ry { get; set; }
     }
     public class Circle : SvgShape
     {
         //圆的半径
-        public string R { get; set; }
+        public string r { get; set; }
         //圆心的x位置
-        public string Cx { get; set; }
+        public string cx { get; set; }
         //圆心的y位置
-        public string Cy { get; set; }
+        public string cy { get; set; }
     }
     public class Ellipse : SvgShape
     {
         // 椭圆的x方位的半径
-        public string Rx { get; set; }
+        public string rx { get; set; }
         // 椭圆的y方位的半径
-        public string Ry { get; set; }
+        public string ry { get; set; }
 
         //椭圆的x位置
-        public string Cx { get; set; }
+        public string cx { get; set; }
         //椭圆的y位置
-        public string Cy { get; set; }
+        public string cy { get; set; }
     }
     public class Line : SvgShape
     {
         //起点的x位置
-        public string X1 { get; set; }
+        public string x1 { get; set; }
         //起点的Y位置
-        public string Y1 { get; set; }
+        public string y1 { get; set; }
         //终点的X位置
-        public string X2 { get; set; }
+        public string x2 { get; set; }
         //终点的Y位置
-        public string Y2 { get; set; }
+        public string y2 { get; set; }
     }
     public class Polyline : SvgShape
     {
         /// <summary>
         /// 点集数列。每个数字用空白、逗号、终止命令符或者换行符分隔开。每个点必须包含2个数字,一个是x坐标,一个是y坐标。所以点列表 (0,0), (1,1) 和(2,2)可以写成这样:“0 0, 1 1, 2 2”。
         /// </summary>
-        public string Points { get; set; }
+        public string points { get; set; }
     }
     public class Polygon : SvgShape
     {
@@ -110,12 +110,12 @@ namespace TEAMModelOS.Service.Model.PowerPoint
         /// 点集数列。每个数字用空白符、逗号、终止命令或者换行符分隔开。每个点必须包含2个数字,一个是x坐标,一个是y坐标。
         /// 所以点列表 (0,0), (1,1) 和(2,2)可以写成这样:“0 0, 1 1, 2 2”。路径绘制完后闭合图形,所以最终的直线将从位置(2,2)连接到位置(0,0)。
         /// </summary>
-        public string Points { get; set; }
+        public string points { get; set; }
 
     }
     public class SvgPath : SvgShape
     {
-        public string D { get; set; }
+        public string d { get; set; }
     
     }
 }

+ 8 - 8
TEAMModelOS.Service/Models/PowerPoint/Slide.cs

@@ -8,19 +8,19 @@ namespace TEAMModelOS.Service.Model.PowerPoint
 {
     public class Slide
     {
-        public List<Item> Item { get; set; }
-        public Fill Fill { get; set; }
-        public int Index { 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 width { get; set; }
         //高度
-        public double Height { get; set; }
-        public ItemInfo Exercise { get; set; }
+        public double height { get; set; }
+        public ItemInfo exercise { get; set; }
         //1 PPTX  2 HTML  来源
-        public int Source { get; set; }
+        public int source { get; set; }
         /// <summary>
         /// 1默认为普通页面,2为题目
         /// </summary>
-        public int Flag { get; set; } 
+        public int flag { get; set; } 
     }
 }

+ 14 - 14
TEAMModelOS.Service/Models/PowerPoint/Table.cs

@@ -7,39 +7,39 @@ namespace TEAMModelOS.Service.Model.PowerPoint
     public class Table :Item
     {
         public Table() {
-            Tr = new List<Tr>();
+            tr = new List<Tr>();
         }
         //内容排版方向 左书写 右书写
-        public string Dir { get; set; }
-        public string Collapse { get; set; } = "collapse";
+        public string dir { get; set; }
+        public string collapse { get; set; } = "collapse";
        // public Border Border { get; set; }
        // public Fill Fill { get; set; }
-        public List<Tr> Tr { get; set; }
+        public List<Tr> tr { get; set; }
     }
 
     public class Tr {
         public Tr()
         {
-            Td = new List<Td>();
+            td = new List<Td>();
         }
        
-        public Fill Fill { get; set; }
+        public Fill fill { get; set; }
         public  double height { get; set; }
-        public List<Td> Td { get; set; }
+        public List<Td> td { get; set; }
     
-        public List<Border> Borders { get; set; }
+        public List<Border> borders { get; set; }
     }
     public class Td
     {
         public double width { get; set; }
     
-        public Fill Fill { get; set; }
-        public int Rowspan { get; set; }
-        public int Colspan { get; set; }
+        public Fill fill { get; set; }
+        public int rowspan { get; set; }
+        public int colspan { get; set; }
 
-        public int VMerge { get; set; }
-        public int HMerge { get; set; }
-        public List<Paragraph> Paragraphs { get; set; }
+        public int vmerge { get; set; }
+        public int hmerge { get; set; }
+        public List<Paragraph> paragraphs { get; set; }
       
     }
 }

Файловите разлики са ограничени, защото са твърде много
+ 225 - 221
TEAMModelOS.Service/Services/PowerPoint/Implement/HtexService.cs


+ 37 - 37
TEAMModelOS.Service/Services/PowerPoint/Implement/ShapeHelper.cs

@@ -149,7 +149,7 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
             {
                 borderWidth = 0.75;
             }
-            Border border = new Border() { Width = borderWidth };
+            Border border = new Border() { width = borderWidth };
            
             XmlNode lineNode = null;
             if (bType == "shape")
@@ -168,7 +168,7 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
                 XmlNode wnode = lineNode.GetTextByPath("@w");
                 if (wnode != null)
                 {
-                    border.Width = double.Parse(wnode.Value) / px12700;
+                    border.width = double.Parse(wnode.Value) / px12700;
                 }
                 // Border width: 1pt = 12700, default = 0.75pt
                 //  borderWidth = double.Parse(ShapeHelper.GetTextByPath(lineNode, "@w").Value) / px12700;
@@ -192,57 +192,57 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
                     switch (borderType.Value)
                     {
                         case "solid":
-                            border.Type = "solid";
-                            border.Stroke = "0";
+                            border.type = "solid";
+                            border.stroke = "0";
                             break;
                         case "dash":
-                            border.Type += "dashed";
-                            border.Stroke = "5";
+                            border.type += "dashed";
+                            border.stroke = "5";
                             break;
                         case "dashDot":
-                            border.Type = "dashed";
-                            border.Stroke = "5, 5, 1, 5";
+                            border.type = "dashed";
+                            border.stroke = "5, 5, 1, 5";
                             break;
                         case "dot":
-                            border.Type = "dotted";
-                            border.Stroke = "1, 5";
+                            border.type = "dotted";
+                            border.stroke = "1, 5";
                             break;
                         case "lgDash":
-                            border.Type = "dashed";
-                            border.Stroke = "10, 5";
+                            border.type = "dashed";
+                            border.stroke = "10, 5";
                             break;
                         case "lgDashDotDot":
-                            border.Type = "dashed";
-                            border.Stroke = "10, 5, 1, 5, 1, 5";
+                            border.type = "dashed";
+                            border.stroke = "10, 5, 1, 5, 1, 5";
                             break;
                         case "sysDash":
-                            border.Type = "dashed";
-                            border.Stroke = "5, 2";
+                            border.type = "dashed";
+                            border.stroke = "5, 2";
                             break;
                         case "sysDashDot":
-                            border.Type = "dashed";
-                            border.Stroke = "5, 2, 1, 5";
+                            border.type = "dashed";
+                            border.stroke = "5, 2, 1, 5";
                             break;
                         case "sysDashDotDot":
-                            border.Type = "dashed";
-                            border.Stroke = "5, 2, 1, 5, 1, 5";
+                            border.type = "dashed";
+                            border.stroke = "5, 2, 1, 5, 1, 5";
                             break;
                         case "sysDot":
-                            border.Type = "dotted";
-                            border.Stroke = "2, 5";
+                            border.type = "dotted";
+                            border.stroke = "2, 5";
                             break;
                         case null:
                         //console.log(borderType);
                         default:
-                            border.Type = "solid";
-                            border.Stroke = "0";
+                            border.type = "solid";
+                            border.stroke = "0";
                             break;
                     }
                 }
             }
             else {
-                border.Type = "solid";
-                border.Stroke = "0";
+                border.type = "solid";
+                border.stroke = "0";
             }
             // Border color
             string borderColorstr = "";
@@ -298,9 +298,9 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
 
             }
             if (!string.IsNullOrEmpty(borderColorstr)) {
-                border.Color = borderColorstr;
-                if (border.Width == 0.0) {
-                    border.Width = 1;
+                border.color = borderColorstr;
+                if (border.width == 0.0) {
+                    border.width = 1;
                 }
             }
             return border;
@@ -578,7 +578,7 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
         }
         public static Fill GetPatternFill(XmlNode node, Dictionary<string, string> slideLayoutClrOvride, XmlNode slideMasterContent, XmlNode themeContent)
         {
-            Fill fill = new Fill { Type = 4 };
+            Fill fill = new Fill { type = 4 };
             //处理前景色 
             var fgClr = node.GetTextByPath("a:fgClr");
             string fgclr = GetSolidFill(fgClr, slideLayoutClrOvride, slideMasterContent, themeContent);
@@ -630,9 +630,9 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
             }
             return new Fill()
             {
-                Type = 2,
+                type = 2,
                 grad = color_ary,
-                Rot = rot
+                rot = rot
             };
         }
 
@@ -674,10 +674,10 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
             h = System.Math.Round(double.Parse(ext.GetTextByPath("@cy").Value) * px96 / px914400, degree);
             return new Position()
             {
-                Cx = w,
-                Cy = h,
-                X = x,
-                Y = y
+                cx = w,
+                cy = h,
+                x = x,
+                y = y
             };
         }
 
@@ -900,7 +900,7 @@ namespace TEAMModelOS.Service.Services.PowerPoint.Implement
             {
                 if (phClr == null)
                 {
-                    return new Fill { Type = 1, Color = phClr };
+                    return new Fill { type = 1, color = phClr };
                 }
             }
             return null;

Файловите разлики са ограничени, защото са твърде много
+ 385 - 385
TEAMModelOS.Service/Services/PowerPoint/Implement/ShapeSvg.cs


+ 20 - 20
TEAMModelOS/Startup.cs

@@ -42,11 +42,11 @@ namespace TEAMModelOS
         {
 
            
-            // true,默認情況下,聲明映射將以舊格式映射聲明名稱,以適應較早的SAML應用程序,RoleClaimType = 'http://schemas.microsoft.com/ws/2008/06/identity/claims/role'
-            // false,RoleClaimType = 'roles' 
+            // true锛岄粯瑾嶆儏娉佷笅锛岃伈鏄庢槧灏勫皣浠ヨ垔鏍煎紡鏄犲皠鑱叉槑鍚嶇ū锛屼互閬╂噳杓冩棭鐨凷AML鎳夌敤绋嬪簭锛孯oleClaimType = 'http://schemas.microsoft.com/ws/2008/06/identity/claims/role'
+            // false锛孯oleClaimType = 'roles' 
             /*
             JwtSecurityTokenHandler.DefaultMapInboundClaims = false;
-            //這個設定ValidAudiences等專案準備要布署時,會在Azure CN 設置AD金鑰,晚一點處理沒關係,會搭配訪問其他雲服務時的Client金鑰獲取及刷新代碼,之後再提供
+            //這個設定ValidAudiences等專案準備要布署時,會在Azure CN 設置AD金鑰,晚一點處理沒關係,會搭配訪問其他雲服務時的Client金鑰獲取及刷新代碼,之後再提供
             var tokenvalidationparameters = new TokenValidationParameters
             {
                 RoleClaimType = "roles",
@@ -57,13 +57,13 @@ namespace TEAMModelOS
                 options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
             }).AddJwtBearer(options => //AzureADJwtBearer
             {
-                //options.SaveToken = true; //驗證令牌由服務器生成才有效,不適用於服務重啟或分布式架構
+                //options.SaveToken = true; //椹楄瓑浠ょ墝鐢辨湇鍕欏櫒鐢熸垚鎵嶆湁鏁堬紝涓嶉仼鐢ㄦ柤鏈嶅嫏閲嶅暉鎴栧垎甯冨紡鏋舵�
                 options.Authority = "https://login.microsoftonline.com/73a2bcc5-fe99-4566-aa8a-07e7bb287df1/v2.0";
                 options.RequireHttpsMetadata = true;
                 options.Audience = "8768b06f-c5c5-4b0c-abfb-d7ded354626d";
                 options.TokenValidationParameters = tokenvalidationparameters;
                 options.Events = new JwtBearerEvents();
-                //下列事件有需要紀錄則打開
+                //涓嬪垪浜嬩欢鏈夐渶瑕佺磤閷勫墖鎵撻枊
                 //options.Events.OnMessageReceived = async context => { await Task.FromResult(0); };
                 //options.Events.OnForbidden = async context => { await Task.FromResult(0); };
                 //options.Events.OnChallenge = async context => { await Task.FromResult(0); };
@@ -73,14 +73,14 @@ namespace TEAMModelOS
                     if (!context.Principal.Claims.Any(x => x.Type == "http://schemas.microsoft.com/identity/claims/scope") //ClaimConstants.Scope
                        && !context.Principal.Claims.Any(y => y.Type == "roles")) //ClaimConstants.Roles //http://schemas.microsoft.com/ws/2008/06/identity/claims/role
                     {
-                        //TODO 需處理額外授權非角色及範圍的訪問異常紀錄
+                        //TODO 需處理額外授權非角色及範圍的訪問異常紀錄
                         throw new UnauthorizedAccessException("Neither scope or roles claim was found in the bearer token.");
                     }
                     await Task.FromResult(0);
                 };
             });
             */
-            //設定跨域請求
+            //瑷�畾璺ㄥ煙璜嬫眰
             //services.AddCors(options =>
             //{
             //    options.AddPolicy(MyAllowSpecificOrigins,
@@ -95,7 +95,7 @@ namespace TEAMModelOS
             services.AddMemoryCache();
           //  services.AddJsonRpc();
             services.AddControllers().AddNewtonsoftJson().AddJsonOptions(options => { options.JsonSerializerOptions.IgnoreNullValues = true; });
-            //上传文件最大处理
+            //上传文件最大处理
             services.Configure<FormOptions>(x =>
             {   x.BufferBodyLengthLimit= long.MaxValue;
                 x.ValueLengthLimit = int.MaxValue;
@@ -103,19 +103,19 @@ namespace TEAMModelOS
                 x.MultipartHeadersLengthLimit = int.MaxValue;
             });
 
-            // Table配置
+            // Table閰嶇疆
             services.AddScoped<IAzureTableDBRepository, AzureTableDBRepository>();
-            //使用Blob配置
+            //浣跨敤Blob閰嶇疆
             services.AddAzureBlobStorage().AddConnection(Configuration.GetSection("Azure:Blob").Get<AzureBlobOptions>());
-            //使用CosmosDB
+            //浣跨敤CosmosDB
             services.AddAzureCosmosDB().AddCosmosDBConnection(Configuration.GetSection("Azure:CosmosDB").Get<AzureCosmosDBOptions>());
-            //HttpContextAccessor,并用来访问HttpContext。
+            //HttpContextAccessor,并用来访问HttpContext。
             services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
-            //引入Jwt配置
+            //寮曞叆Jwt閰嶇疆
             services.JwtAuth(Configuration.GetSection("JwtSetting"));
 
             //services.AddSingleton<PowerPointService, PowerPointService>();
-            //全局扫描基于IBusinessService接口的实现类
+            //鍏ㄥ眬鎵�弿鍩轰簬IBusinessService鎺ュ彛鐨勫疄鐜扮被
             services.Scan(scan => scan.FromApplicationDependencies()
                .AddClasses(classes => classes.AssignableTo<IBusinessService>())
                    .AsImplementedInterfaces()
@@ -130,15 +130,15 @@ namespace TEAMModelOS
                 app.UseDeveloperExceptionPage();
             }
             app.UseMiddleware<HttpGlobalExceptionInvoke>();
-            //以下需要按照順序載入中間件  如果应用调用 UseStaticFiles,请将 UseStaticFiles 置于 UseRouting之前。
+            //以下需要按照順序載入中間件  如果应用调用 UseStaticFiles,请将 UseStaticFiles 置于 UseRouting之前。
             app.UseStaticFiles();
-            //app.UseSpaStaticFiles(); //使用中間件不開
+            //app.UseSpaStaticFiles(); //使用中間件不開
             app.UseRouting();
            
-            //app.UseCors(MyAllowSpecificOrigins); //使用跨域設定
-            //app.UseHttpsRedirection(); //開發中暫時關掉
-            //如果应用使用身份验证/授权功能(如 AuthorizePage 或 [Authorize]),请将对 UseAuthentication 和 UseAuthorization的
-            //调用放在之后、UseRouting 和 UseCors,但在 UseEndpoints之前
+            //app.UseCors(MyAllowSpecificOrigins); //浣跨敤璺ㄥ煙瑷�畾
+            //app.UseHttpsRedirection(); //開發中暫時關掉
+            //如果应用使用身份验证/授权功能(如 AuthorizePage 或 [Authorize]),请将对 UseAuthentication 和 UseAuthorization的
+            //调用放在之后、UseRouting 和 UseCors,但在 UseEndpoints之前
             app.UseAuthentication();
             app.UseAuthorization();
           //  app.UseJsonRpc();