Skip to content

Commit

Permalink
[se] By bug 63104: table width
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaZotov committed Oct 19, 2023
1 parent 753f8ae commit 961c0dc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion common/wordcopypaste.js
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,7 @@ function PasteProcessor(api, bUploadImage, bUploadFonts, bNested, pasteInExcel,
this.bInBlock = null;

//ширина элемента в который вставляем страница или ячейка
this.dMaxWidth = Page_Width - X_Left_Margin - X_Right_Margin;
this.dMaxWidth = getPageWidth();
//коэфициент сжатия(например при вставке таблица сжалась, значит при вставке содержимого ячейки к картинкам и таблице будет применен этот коэффициент)
this.dScaleKoef = 1;
this.bUseScaleKoef = false;
Expand Down Expand Up @@ -10975,6 +10975,16 @@ function CheckDefaultFontSize(val, api)
return "0px" === val && api && api.getDefaultFontSize ? api.getDefaultFontSize() + "pt" : val;
}

function getPageWidth()
{
let logicDocument = editor && editor.WordControl && editor.WordControl.m_oLogicDocument && editor.WordControl.m_oLogicDocument;
let isPortraitOrient = true;
if (logicDocument) {
isPortraitOrient = logicDocument && logicDocument.Get_DocumentOrientation();
}
return !isPortraitOrient ? Page_Height - (Y_Top_Margin + Y_Bottom_Margin) : Page_Width - (X_Left_Margin + X_Right_Margin);
}

function CreateImageFromBinary(bin, nW, nH)
{
var w, h;
Expand Down

0 comments on commit 961c0dc

Please sign in to comment.