From 127cd7453de5ef4338f80d091a6cf6e2c73f94b5 Mon Sep 17 00:00:00 2001 From: huqi Date: Tue, 6 Jul 2021 04:22:30 +0000 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E6=96=87=E8=BD=ACword=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 476cf4e5f05a543bdc90bfb57cf3d064aac72899) --- .../Documenteditor/templete/standard.html | 4 +- .../x_component_process_Xform/widget/OOXML.js | 50 +++++-------------- 2 files changed, 15 insertions(+), 39 deletions(-) diff --git a/o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/standard.html b/o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/standard.html index 40d9375010..60f8e3fd15 100644 --- a/o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/standard.html +++ b/o2web/source/x_component_process_FormDesigner/Module/Documenteditor/templete/standard.html @@ -127,7 +127,7 @@

- +

 

@@ -154,7 +154,7 @@
-
+
diff --git a/o2web/source/x_component_process_Xform/widget/OOXML.js b/o2web/source/x_component_process_Xform/widget/OOXML.js index 375eb7ad75..3eb9be6883 100644 --- a/o2web/source/x_component_process_Xform/widget/OOXML.js +++ b/o2web/source/x_component_process_Xform/widget/OOXML.js @@ -1498,43 +1498,19 @@ o2.xApplication.process.Xform.widget.OOXML.WordprocessingML = o2.OOXML.WML = new this.insertSiblings(oo_wsp, [oo_cNvCnPr, oo_spPr, oo_style, oo_bodyPr], "beforeend"); - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - + var w = hr.style.width; + if (w && o2.typeOf(w)==="string"){ + var u = w.substring(w.length-1, w.length); + if (u==="%"){ + w = w.toFloat()*1000; + var oo_sizeRelH = this.createEl(oo_doc, "sizeRelH", "wp14"); + this.setAttrs(oo_sizeRelH, {"relativeFrom": "margin"}, false); + var oo_pctWidth = this.createEl(oo_doc, "pctWidth", "wp14"); + oo_pctWidth.appendChild(oo_doc.createTextNode(w)); + oo_sizeRelH.appendChild(oo_pctWidth); + oo_anchor.appendChild(oo_sizeRelH); + } + } oo_p.appendChild(oo_run); }, -- GitLab