|
@@ -1,6 +1,6 @@
|
|
|
using DocumentFormat.OpenXml.Packaging;
|
|
|
-using HiTeachCC.Model.PowerPoint;
|
|
|
-using HiTeachCC.Service.PowerPoint.Interface;
|
|
|
+using TEAMModelOS.Service.Model.PowerPoint;
|
|
|
+using TEAMModelOS.Service.PowerPoint.Interface;
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
@@ -13,17 +13,16 @@ using TEAMModelOS.SDK.Context.Constant;
|
|
|
using TEAMModelOS.SDK.Context.Constant.Common;
|
|
|
using TEAMModelOS.SDK.Context.Exception;
|
|
|
using TEAMModelOS.SDK.Helper.Common.CollectionHelper;
|
|
|
-using TEAMModelOS.SDK.Helper.Common.JsonHelper;
|
|
|
using TEAMModelOS.SDK.Helper.Security.ShaHash;
|
|
|
using TEAMModelOS.SDK.Module.AzureBlob.Container;
|
|
|
using TEAMModelOS.SDK.Module.AzureBlob.Interfaces;
|
|
|
-using TEAMModelOS.Service.Models.PowerPoint.Inner;
|
|
|
-using TEAMModelOS.Service.Services.PowerPoint.Implement;
|
|
|
-using Fill = HiTeachCC.Model.PowerPoint.Fill;
|
|
|
-using Media = HiTeachCC.Model.PowerPoint.Media;
|
|
|
-using Position = HiTeachCC.Model.PowerPoint.Position;
|
|
|
+using TEAMModelOS.Service.Models.PowerPoint.Inner;
|
|
|
+using Fill = TEAMModelOS.Service.Model.PowerPoint.Fill;
|
|
|
+using Media = TEAMModelOS.Service.Model.PowerPoint.Media;
|
|
|
+using Position = TEAMModelOS.Service.Model.PowerPoint.Position;
|
|
|
+using TEAMModelOS.Service.Services.PowerPoint.Interface;
|
|
|
|
|
|
-namespace HiTeachCC.Service.PowerPoint.Implement
|
|
|
+namespace TEAMModelOS.Service.Services.PowerPoint.Implement
|
|
|
{
|
|
|
public class PowerPointService : IPowerPointService
|
|
|
{
|
|
@@ -102,9 +101,9 @@ namespace HiTeachCC.Service.PowerPoint.Implement
|
|
|
/// </summary>
|
|
|
/// <param name="presentationFile"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<Pptx> ProcessPPTX(XmlDocument xdoc, string shaCode)
|
|
|
+ public async Task<Htex> ProcessPPTX(XmlDocument xdoc, string shaCode)
|
|
|
{
|
|
|
- Pptx pptx = new Pptx();
|
|
|
+ Htex pptx = new Htex();
|
|
|
// List<Dictionary<string, object>> post_ary = new List<Dictionary<string, object>>();
|
|
|
Dictionary<string, object> post_ary = new Dictionary<string, object>();
|
|
|
var dateBefore = DateTimeOffset.Now.UtcTicks;
|
|
@@ -118,7 +117,7 @@ namespace HiTeachCC.Service.PowerPoint.Implement
|
|
|
var slideLayoutNodes = xdoc.GetTextByPathList("//pkg:part[@pkg:contentType='application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml']");
|
|
|
//获取ppt的宽高
|
|
|
var slideSize = ShapeHelper.GetSlideSize(xdoc);
|
|
|
- pptx.Size = new PptSize { Width = slideSize.width, Height = slideSize.height };
|
|
|
+ pptx.Size = new HtexSize { Width = slideSize.width, Height = slideSize.height };
|
|
|
// post_ary.Add( "slideSize", slideSize );
|
|
|
//加载当前PPT使用到的PPT节点
|
|
|
var themeContent = LoadTheme(xdoc);
|
|
@@ -163,7 +162,7 @@ namespace HiTeachCC.Service.PowerPoint.Implement
|
|
|
// return cssText;
|
|
|
//}
|
|
|
|
|
|
- public async Task<Slide> ProcessSingleSlide(XmlDocument xdoc, XmlNode xnode, string sldFileName, int index, dynamic slideSize, XmlNode themeContent, XmlNode tableStyles,Pptx pptx)
|
|
|
+ public async Task<Slide> ProcessSingleSlide(XmlDocument xdoc, XmlNode xnode, string sldFileName, int index, dynamic slideSize, XmlNode themeContent, XmlNode tableStyles,Htex pptx)
|
|
|
{
|
|
|
|
|
|
var resName = sldFileName.Replace("slides/slide", "slides/_rels/slide") + ".rels";
|
|
@@ -294,7 +293,7 @@ namespace HiTeachCC.Service.PowerPoint.Implement
|
|
|
slideMasterContent = slideMasterContent,
|
|
|
themeContent = themeContent,
|
|
|
tableStyles = tableStyles,
|
|
|
- pptx = pptx
|
|
|
+ htex = pptx
|
|
|
};
|
|
|
var bgColor = await GetSlideBackgroundFill(slideContent, index, warpObj);
|
|
|
//string sha = null;
|
|
@@ -1400,7 +1399,7 @@ namespace HiTeachCC.Service.PowerPoint.Implement
|
|
|
spY = System.Math.Round(double.Parse(startPoint.GetTextByPath("@y").Value) * 96 / 914400,degree);
|
|
|
}
|
|
|
var d = "M" + spX + "," + spY;
|
|
|
- // List<HiTeachCC.Model.PowerPoint.Path> Paths = new List<Model.PowerPoint.Path>();
|
|
|
+ // List<TEAMModelOS.Service.Model.PowerPoint.Path> Paths = new List<Model.PowerPoint.Path>();
|
|
|
XmlNodeList pathChildNodes = pathLstNode.GetTextByPath("a:path").ChildNodes;
|
|
|
foreach (XmlNode childNode in pathChildNodes)
|
|
|
{
|