From b38748696589c03405a754c5bc8dc6e2605d706d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Wed, 6 Sep 2023 14:27:32 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=AB=A0=E3=80=81=E6=9D=A1=EF=BC=88?= =?UTF-8?q?=E4=B8=80=E5=88=B0=E4=BA=94=EF=BC=89=EF=BC=8C=E6=97=A0=E9=A2=98?= =?UTF-8?q?=EF=BC=88=E4=B8=80=E5=88=B0=E4=BA=94=EF=BC=89=E5=B7=A6=E7=BC=A9?= =?UTF-8?q?=E8=BF=9B=E4=B8=BA0=EF=BC=8C=E5=AD=97=E6=AF=8D=E5=88=97?= =?UTF-8?q?=E9=A1=B9=E5=B7=A6/=E6=82=AC=E6=8C=82=E7=BC=A9=E8=BF=9B0.74?= =?UTF-8?q?=EF=BC=8C=E6=95=B0=E5=AD=97=E5=88=97=E9=A1=B9=E5=B7=A6=E7=BC=A9?= =?UTF-8?q?=E8=BF=9B1.48=EF=BC=8C=E6=82=AC=E6=8C=82=E7=BC=A9=E8=BF=9B0.74?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../page1/components/FirstLevelListing.vue | 4 +- src/pages/page1/saicComponents/Init.vue | 6 +-- .../page1/saicComponents/chapterData.vue | 44 +++++++++---------- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/pages/page1/components/FirstLevelListing.vue b/src/pages/page1/components/FirstLevelListing.vue index c8049b0..d4a7d05 100644 --- a/src/pages/page1/components/FirstLevelListing.vue +++ b/src/pages/page1/components/FirstLevelListing.vue @@ -173,6 +173,7 @@ var oParaPr = numbering.GetParaPr(); oParaPr.SetSpacingLine(290, "auto"); oParaPr.SetJc("tab"); + oParaPr.SetIndFirstLine(-420); // oParaPr.SetIndFirstLine(0); oParagraph.SetNumbering(numbering) oParagraph.SetContextualSpacing(true) @@ -237,13 +238,14 @@ // oParaPr.SetIndLeft(1310) oParaPr.SetJc("left"); oParaPr.SetSpacingLine(290, "auto"); + oParaPr.SetIndFirstLine(-420); const oParagraph = Api.CreateParagraph() oParagraph.SetNumbering(numbering) oParagraph.SetContextualSpacing(true) oParagraph.SetFontFamily('宋体') oParagraph.SetSpacingBefore(2) oParagraph.SetFontSize(21) - oParagraph.SetIndLeft(1270); + oParagraph.SetIndLeft(1260); oParagraph.SetHighlight(255, 255, 0); oDocument.InsertContent([oParagraph]) let text = oParagraph.GetText() diff --git a/src/pages/page1/saicComponents/Init.vue b/src/pages/page1/saicComponents/Init.vue index 015d82b..630b3f9 100644 --- a/src/pages/page1/saicComponents/Init.vue +++ b/src/pages/page1/saicComponents/Init.vue @@ -1157,7 +1157,7 @@ export default { oParagraph.SetSpacingAfter(267) oParagraph.SetJc('left') oParagraph.SetColor(0, 0, 0) - oParagraph.SetIndLeft(20) + oParagraph.SetIndLeft(0) oParagraph.SetBold(false) oDocument.InsertContent([oParagraph]) @@ -1192,7 +1192,7 @@ export default { oParagraph4.SetSpacingBefore(267) oParagraph4.SetJc('left') oParagraph4.SetColor(0, 0, 0) - oParagraph4.SetIndLeft(20) + oParagraph4.SetIndLeft(0) oDocument.InsertContent([oParagraph4]) const oParagraph5 = Api.CreateParagraph() @@ -1247,7 +1247,7 @@ export default { oParagraph8.SetSpacingBefore(267) oParagraph8.SetJc('left') oParagraph8.SetColor(0, 0, 0) - oParagraph8.SetIndLeft(20) + oParagraph8.SetIndLeft(0) oDocument.InsertContent([oParagraph8]) const oParagraph9 = Api.CreateParagraph() diff --git a/src/pages/page1/saicComponents/chapterData.vue b/src/pages/page1/saicComponents/chapterData.vue index ec435b4..3978ab6 100644 --- a/src/pages/page1/saicComponents/chapterData.vue +++ b/src/pages/page1/saicComponents/chapterData.vue @@ -203,10 +203,10 @@ oNumLvl.SetSuff("space"); oParagraph.SetNumbering(oNumLvl) if (SpacingBefore) { - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); oParaPr.SetIndFirstLine(20); } else { - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); oParaPr.SetIndFirstLine(0); } oParagraph.SetSpacingAfter(267) @@ -338,7 +338,7 @@ let oNewDocumentStyle = null if (SpacingBefore) { if (Asc.scope.alias == '1') { - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); const sFormatString = Asc.scope.numData[SpacingBefore] + '.%1.%2'; numbering.SetCustomType("decimal", sFormatString, "left"); numbering.SetSuff("space"); @@ -351,7 +351,7 @@ let oTextPr = numbering.GetTextPr(); oTextPr.SetFontFamily("黑体"); } else if (Asc.scope.alias == '2') { - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); const sFormatString = Asc.scope.numData[SpacingBefore] + '.%1.%2.%3'; numbering.SetCustomType("decimal", sFormatString, "left"); numbering.SetSuff("space"); @@ -371,7 +371,7 @@ oNewDocumentStyle = oDocument.GetStyle("Heading 4"); const oTextPr3 = oNewDocumentStyle.GetTextPr(); oTextPr3.SetFontFamily("黑体"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); let oTextPr = numbering.GetTextPr(); oTextPr.SetFontFamily("黑体"); } else if (Asc.scope.alias == '4') { @@ -383,7 +383,7 @@ oNewDocumentStyle = oDocument.GetStyle("Heading 5"); const oTextPr3 = oNewDocumentStyle.GetTextPr(); oTextPr3.SetFontFamily("黑体"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); let oTextPr = numbering.GetTextPr(); oTextPr.SetFontFamily("黑体"); } else if (Asc.scope.alias == '5') { @@ -395,13 +395,13 @@ oNewDocumentStyle = oDocument.GetStyle("Heading 6"); const oTextPr3 = oNewDocumentStyle.GetTextPr(); oTextPr3.SetFontFamily("黑体"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); let oTextPr = numbering.GetTextPr(); oTextPr.SetFontFamily("黑体"); } } else { if (Asc.scope.alias == '1') { - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); const sFormatString = '%1.%2'; numbering.SetCustomType("decimal", sFormatString, "left"); numbering.SetSuff("space"); @@ -414,7 +414,7 @@ let oTextPr = numbering.GetTextPr(); oTextPr.SetFontFamily("黑体"); } else if (Asc.scope.alias == '2') { - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); const sFormatString = '%1.%2.%3'; numbering.SetCustomType("decimal", sFormatString, "left"); numbering.SetSuff("space"); @@ -434,7 +434,7 @@ oNewDocumentStyle = oDocument.GetStyle("Heading 4"); const oTextPr3 = oNewDocumentStyle.GetTextPr(); oTextPr3.SetFontFamily("黑体"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); let oTextPr = numbering.GetTextPr(); oTextPr.SetFontFamily("黑体"); } else if (Asc.scope.alias == '4') { @@ -446,7 +446,7 @@ oNewDocumentStyle = oDocument.GetStyle("Heading 5"); const oTextPr3 = oNewDocumentStyle.GetTextPr(); oTextPr3.SetFontFamily("黑体"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); let oTextPr = numbering.GetTextPr(); oTextPr.SetFontFamily("黑体"); } else if (Asc.scope.alias == '5') { @@ -458,7 +458,7 @@ oNewDocumentStyle = oDocument.GetStyle("Heading 6"); const oTextPr3 = oNewDocumentStyle.GetTextPr(); oTextPr3.SetFontFamily("黑体"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); let oTextPr = numbering.GetTextPr(); oTextPr.SetFontFamily("黑体"); } @@ -614,7 +614,7 @@ let oNewDocumentStyle = null if (SpacingBefore) { if (Asc.scope.alias == '1') { - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); const sFormatString = Asc.scope.numData[SpacingBefore] + '.%1.%2'; numbering.SetCustomType("decimal", sFormatString, "left"); numbering.SetSuff("space"); @@ -622,7 +622,7 @@ oParaPr.SetIndFirstLine(25); oNewDocumentStyle = oDocument.GetStyle("Normal"); } else if (Asc.scope.alias == '2') { - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); const sFormatString = Asc.scope.numData[SpacingBefore] + '.%1.%2.%3'; numbering.SetCustomType("decimal", sFormatString, "left"); numbering.SetSuff("space"); @@ -636,7 +636,7 @@ let oParaPr = numbering.GetParaPr(); oParaPr.SetIndFirstLine(25); oNewDocumentStyle = oDocument.GetStyle("Normal"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); } else if (Asc.scope.alias == '4') { const sFormatString = Asc.scope.numData[SpacingBefore] + '.%1.%2.%3.%4.%5'; numbering.SetCustomType("decimal", sFormatString, "left"); @@ -644,7 +644,7 @@ let oParaPr = numbering.GetParaPr(); oParaPr.SetIndFirstLine(25); oNewDocumentStyle = oDocument.GetStyle("Normal"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); } else if (Asc.scope.alias == '5') { const sFormatString = Asc.scope.numData[SpacingBefore] + '.%1.%2.%3.%4.%5.%6'; numbering.SetCustomType("decimal", sFormatString, "left"); @@ -652,11 +652,11 @@ let oParaPr = numbering.GetParaPr(); oParaPr.SetIndFirstLine(25); oNewDocumentStyle = oDocument.GetStyle("Normal"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); } } else { if (Asc.scope.alias == '1') { - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); const sFormatString = '%1.%2'; numbering.SetCustomType("decimal", sFormatString, "left"); numbering.SetSuff("space"); @@ -664,7 +664,7 @@ oParaPr.SetIndFirstLine(0); oNewDocumentStyle = oDocument.GetStyle("Normal"); } else if (Asc.scope.alias == '2') { - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); const sFormatString = '%1.%2.%3'; numbering.SetCustomType("decimal", sFormatString, "left"); numbering.SetSuff("space"); @@ -678,7 +678,7 @@ let oParaPr = numbering.GetParaPr(); oParaPr.SetIndFirstLine(0); oNewDocumentStyle = oDocument.GetStyle("Normal"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); } else if (Asc.scope.alias == '4') { const sFormatString = '%1.%2.%3.%4.%5'; numbering.SetCustomType("decimal", sFormatString, "left"); @@ -686,7 +686,7 @@ let oParaPr = numbering.GetParaPr(); oParaPr.SetIndFirstLine(0); oNewDocumentStyle = oDocument.GetStyle("Normal"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); } else if (Asc.scope.alias == '5') { const sFormatString = '%1.%2.%3.%4.%5.%6'; numbering.SetCustomType("decimal", sFormatString, "left"); @@ -694,7 +694,7 @@ let oParaPr = numbering.GetParaPr(); oParaPr.SetIndFirstLine(0); oNewDocumentStyle = oDocument.GetStyle("Normal"); - oParagraph.SetIndLeft(20); + oParagraph.SetIndLeft(0); } } // oParagraphOne.Delete()