mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-02-10 18:15:19 +08:00
@ -3872,6 +3872,24 @@
|
||||
};
|
||||
|
||||
|
||||
CShape.prototype._isTextRotated = function(bodyPr) {
|
||||
if (!bodyPr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let isRotated = (bodyPr.vert === AscFormat.nVertTTvert
|
||||
|| bodyPr.vert === AscFormat.nVertTTvert270
|
||||
|| bodyPr.vert === AscFormat.nVertTTeaVert
|
||||
);
|
||||
|
||||
if (bodyPr.wrap !== AscFormat.nTWTNone
|
||||
&& bodyPr.upright
|
||||
&& !checkNormalRotate(this.getFullRotate())) {
|
||||
isRotated = !isRotated;
|
||||
}
|
||||
|
||||
return isRotated;
|
||||
};
|
||||
CShape.prototype.recalculateDocContent = function (oDocContent, oBodyPr) {
|
||||
let nStartPage = this.Get_AbsolutePage ? this.Get_AbsolutePage() : 0;
|
||||
let oRet = {w: 0, h: 0, contentH: 0};
|
||||
@ -4022,7 +4040,15 @@
|
||||
&& !this.isForm()
|
||||
&& oDocContent.GetLogicDocument()
|
||||
&& !oDocContent.GetLogicDocument().IsPresentationEditor()) {
|
||||
oDocContent.Set_ClipInfo(0, oRect.l - l_ins, oRect.r - l_ins, oRect.t - t_ins, oRect.b - t_ins);
|
||||
|
||||
let x = oRect.l - l_ins;
|
||||
let y = oRect.t - t_ins;
|
||||
|
||||
if (this._isTextRotated(oBodyPr)) {
|
||||
oDocContent.Set_ClipInfo(0, y, y + h, x, x + w);
|
||||
} else {
|
||||
oDocContent.Set_ClipInfo(0, x, x + w, y, y + h);
|
||||
}
|
||||
}
|
||||
|
||||
return oRet;
|
||||
|
||||
Reference in New Issue
Block a user