Commit 2ef2f736 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

Правка для печати

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50096 954022d7-b5bf-4e40-9824-e11837661b57
parent c11d1ff9
......@@ -3286,7 +3286,8 @@ function DrawingObjects() {
right: 0, // pt
top: 0, // pt
button: 0 // pt
}
},
pageRange // c1, r1, c2, r2
}
*****************************************/
......@@ -3305,16 +3306,35 @@ function DrawingObjects() {
var index = i;
var drawingObject = aObjects[i];
if ( !printOptions ) {
if ( !drawingObject.inVisibleArea() )
continue;
}
if ( !drawingObject.flags.anchorUpdated )
drawingObject.updateAnchorPosition();
// Shape render
if ( drawingObject.isGraphicObject() ) {
drawingObject.graphicObject.draw( printOptions ? printOptions.ctx.DocumentRenderer : shapeCtx );
continue;
if ( printOptions ) {
var left = worksheet.getCellLeft(printOptions.pageRange.c1, 3) - worksheet.getCellLeft(0, 3);
var top = worksheet.getCellTop(printOptions.pageRange.r1, 3) - worksheet.getCellTop(0, 3);
var tx = drawingObject.graphicObject.transform.tx;
var ty = drawingObject.graphicObject.transform.ty;
drawingObject.graphicObject.transform.tx -= left;
drawingObject.graphicObject.transform.ty -= top;
drawingObject.graphicObject.draw( printOptions.ctx.DocumentRenderer );
// Restore
drawingObject.graphicObject.transform.tx = tx;
drawingObject.graphicObject.transform.ty = ty;
}
else
drawingObject.graphicObject.draw( shapeCtx );
}
}
}
......
......@@ -1858,7 +1858,8 @@
top: printPagesData.topFieldInPt - this.cellsTop,
right: printPagesData.rightFieldInPt,
bottom: printPagesData.bottomFieldInPt
}
},
pageRange: printPagesData.pageRange
};
this.objectRender.showDrawingObjectsEx(false, drawingPrintOptions);
this.visibleRange = tmpVisibleRange.clone(true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment