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 = ...@@ -278,6 +278,8 @@ NullState.prototype =
{ {
drawing_page = this.drawingObjects.getHdrFtrObjectsByPageIndex(pageIndex); drawing_page = this.drawingObjects.getHdrFtrObjectsByPageIndex(pageIndex);
} }
if(drawing_page)
{
ret = handleFloatObjects(this.drawingObjects, drawing_page.beforeTextObjects, e, x, y, null, pageIndex, true); ret = handleFloatObjects(this.drawingObjects, drawing_page.beforeTextObjects, e, x, y, null, pageIndex, true);
if(ret) if(ret)
{ {
...@@ -334,7 +336,7 @@ NullState.prototype = ...@@ -334,7 +336,7 @@ NullState.prototype =
return ret; return ret;
} }
} }
}
if(start_target_doc_content) if(start_target_doc_content)
{ {
this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]); this.drawingObjects.drawingDocument.OnRecalculatePage(pageIndex, this.drawingObjects.document.Pages[pageIndex]);
......
...@@ -899,7 +899,7 @@ CGraphicObjects.prototype = ...@@ -899,7 +899,7 @@ CGraphicObjects.prototype =
draw: function(pageIndex, graphics) draw: function(pageIndex, graphics)
{ {
this.graphicPages[pageIndex].draw(graphics); this.graphicPages[pageIndex] && this.graphicPages[pageIndex].draw(graphics);
}, },
selectionDraw: function() selectionDraw: function()
...@@ -1259,8 +1259,11 @@ CGraphicObjects.prototype = ...@@ -1259,8 +1259,11 @@ CGraphicObjects.prototype =
documentStatistics: function( CurPage, Statistics ) documentStatistics: function( CurPage, Statistics )
{
if(this.graphicPages[CurPage])
{ {
this.graphicPages[CurPage].documentStatistics(Statistics); this.graphicPages[CurPage].documentStatistics(Statistics);
}
}, },
setSelectionState: DrawingObjectsController.prototype.setSelectionState, setSelectionState: DrawingObjectsController.prototype.setSelectionState,
...@@ -1480,9 +1483,12 @@ CGraphicObjects.prototype = ...@@ -1480,9 +1483,12 @@ CGraphicObjects.prototype =
documentSearch: function( CurPage, String, search_Common ) documentSearch: function( CurPage, String, search_Common )
{
if(this.graphicPages[CurPage])
{ {
this.graphicPages[CurPage].documentSearch(String, search_Common); this.graphicPages[CurPage].documentSearch(String, search_Common);
CGraphicPage.prototype.documentSearch.call(this.getHdrFtrObjectsByPageIndex(CurPage), String, search_Common); CGraphicPage.prototype.documentSearch.call(this.getHdrFtrObjectsByPageIndex(CurPage), String, search_Common);
}
}, },
getSelectedElementsInfo: function( Info ) getSelectedElementsInfo: function( Info )
...@@ -1515,7 +1521,7 @@ CGraphicObjects.prototype = ...@@ -1515,7 +1521,7 @@ CGraphicObjects.prototype =
{ {
graphic_page = this.graphicPages[pageIndex]; 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, selectNextObject: DrawingObjectsController.prototype.selectNextObject,
...@@ -1757,17 +1763,23 @@ CGraphicObjects.prototype = ...@@ -1757,17 +1763,23 @@ CGraphicObjects.prototype =
}, },
drawBehindDoc: function(pageIndex, graphics) drawBehindDoc: function(pageIndex, graphics)
{
if(this.graphicPages[pageIndex])
{ {
graphics.shapePageIndex = pageIndex; graphics.shapePageIndex = pageIndex;
this.graphicPages[pageIndex].drawBehindDoc(graphics); this.graphicPages[pageIndex].drawBehindDoc(graphics);
graphics.shapePageIndex = null; graphics.shapePageIndex = null;
}
}, },
drawWrappingObjects: function(pageIndex, graphics) drawWrappingObjects: function(pageIndex, graphics)
{
if(this.graphicPages[pageIndex])
{ {
graphics.shapePageIndex = pageIndex; graphics.shapePageIndex = pageIndex;
this.graphicPages[pageIndex].drawWrappingObjects(graphics); this.graphicPages[pageIndex].drawWrappingObjects(graphics);
graphics.shapePageIndex = null; graphics.shapePageIndex = null;
}
}, },
drawWrappingObjectsInContent: function(pageIndex, graphics, content) drawWrappingObjectsInContent: function(pageIndex, graphics, content)
...@@ -1791,10 +1803,13 @@ CGraphicObjects.prototype = ...@@ -1791,10 +1803,13 @@ CGraphicObjects.prototype =
}, },
drawBeforeObjects: function(pageIndex, graphics) drawBeforeObjects: function(pageIndex, graphics)
{
if(this.graphicPages[pageIndex])
{ {
graphics.shapePageIndex = pageIndex; graphics.shapePageIndex = pageIndex;
this.graphicPages[pageIndex].drawBeforeObjects(graphics); this.graphicPages[pageIndex].drawBeforeObjects(graphics);
graphics.shapePageIndex = null; graphics.shapePageIndex = null;
}
}, },
drawBehindDocHdrFtr: function(pageIndex, graphics) drawBehindDocHdrFtr: function(pageIndex, graphics)
...@@ -2591,6 +2606,8 @@ CGraphicObjects.prototype = ...@@ -2591,6 +2606,8 @@ CGraphicObjects.prototype =
getAllRasterImagesOnPage: function(pageIndex) getAllRasterImagesOnPage: function(pageIndex)
{ {
var ret = []; var ret = [];
if(this.graphicPages[pageIndex])
{
var graphic_page = this.graphicPages[pageIndex]; var graphic_page = this.graphicPages[pageIndex];
var hdr_ftr_page = this.getHdrFtrObjectsByPageIndex(pageIndex); var hdr_ftr_page = this.getHdrFtrObjectsByPageIndex(pageIndex);
...@@ -2601,6 +2618,7 @@ CGraphicObjects.prototype = ...@@ -2601,6 +2618,7 @@ CGraphicObjects.prototype =
if(graphic_array[i].getAllRasterImages) if(graphic_array[i].getAllRasterImages)
graphic_array[i].getAllRasterImages(ret); graphic_array[i].getAllRasterImages(ret);
} }
}
return 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