Commit 63b375b5 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

проверки на наличие graphicPage

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@63722 954022d7-b5bf-4e40-9824-e11837661b57
parent f829ab77
......@@ -278,6 +278,8 @@ NullState.prototype =
{
drawing_page = this.drawingObjects.getHdrFtrObjectsByPageIndex(pageIndex);
}
if(drawing_page)
{
ret = handleFloatObjects(this.drawingObjects, drawing_page.beforeTextObjects, e, x, y, null, pageIndex, true);
if(ret)
{
......@@ -334,7 +336,7 @@ NullState.prototype =
return ret;
}
}
}
if(start_target_doc_content)
{
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
......
......@@ -899,7 +899,7 @@ CGraphicObjects.prototype =
draw: function(pageIndex, graphics)
{
this.graphicPages[pageIndex].draw(graphics);
this.graphicPages[pageIndex] && this.graphicPages[pageIndex].draw(graphics);
},
selectionDraw: function()
......@@ -1259,8 +1259,11 @@ CGraphicObjects.prototype =
documentStatistics: function( CurPage, Statistics )
{
if(this.graphicPages[CurPage])
{
this.graphicPages[CurPage].documentStatistics(Statistics);
}
},
setSelectionState: DrawingObjectsController.prototype.setSelectionState,
......@@ -1480,9 +1483,12 @@ CGraphicObjects.prototype =
documentSearch: function( CurPage, String, search_Common )
{
if(this.graphicPages[CurPage])
{
this.graphicPages[CurPage].documentSearch(String, search_Common);
CGraphicPage.prototype.documentSearch.call(this.getHdrFtrObjectsByPageIndex(CurPage), String, search_Common);
}
},
getSelectedElementsInfo: function( Info )
......@@ -1515,7 +1521,7 @@ CGraphicObjects.prototype =
{
graphic_page = this.graphicPages[pageIndex];
}
return graphic_page.behindDocObjects.concat(graphic_page.wrappingObjects.concat(graphic_page.inlineObjects.concat(graphic_page.beforeTextObjects)));
return graphic_page? graphic_page.behindDocObjects.concat(graphic_page.wrappingObjects.concat(graphic_page.inlineObjects.concat(graphic_page.beforeTextObjects))) : [];
},
selectNextObject: DrawingObjectsController.prototype.selectNextObject,
......@@ -1757,17 +1763,23 @@ CGraphicObjects.prototype =
},
drawBehindDoc: function(pageIndex, graphics)
{
if(this.graphicPages[pageIndex])
{
graphics.shapePageIndex = pageIndex;
this.graphicPages[pageIndex].drawBehindDoc(graphics);
graphics.shapePageIndex = null;
}
},
drawWrappingObjects: function(pageIndex, graphics)
{
if(this.graphicPages[pageIndex])
{
graphics.shapePageIndex = pageIndex;
this.graphicPages[pageIndex].drawWrappingObjects(graphics);
graphics.shapePageIndex = null;
}
},
drawWrappingObjectsInContent: function(pageIndex, graphics, content)
......@@ -1791,10 +1803,13 @@ CGraphicObjects.prototype =
},
drawBeforeObjects: function(pageIndex, graphics)
{
if(this.graphicPages[pageIndex])
{
graphics.shapePageIndex = pageIndex;
this.graphicPages[pageIndex].drawBeforeObjects(graphics);
graphics.shapePageIndex = null;
}
},
drawBehindDocHdrFtr: function(pageIndex, graphics)
......@@ -2591,6 +2606,8 @@ CGraphicObjects.prototype =
getAllRasterImagesOnPage: function(pageIndex)
{
var ret = [];
if(this.graphicPages[pageIndex])
{
var graphic_page = this.graphicPages[pageIndex];
var hdr_ftr_page = this.getHdrFtrObjectsByPageIndex(pageIndex);
......@@ -2601,6 +2618,7 @@ CGraphicObjects.prototype =
if(graphic_array[i].getAllRasterImages)
graphic_array[i].getAllRasterImages(ret);
}
}
return ret;
},
......
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