Commit 9e42cfaa authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баг с получением выделенного текста(для цитирования в комментариях)....

Исправлен баг с получением выделенного текста(для цитирования в комментариях). Исправлен баг с получением позиции выделенного текста (для добавления комментариев). Исправлен баг с позиционированием курсора в параграфе. Исправлен баг с пересчетом пустого параграфа с разрывом секции.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55641 954022d7-b5bf-4e40-9824-e11837661b57
parent 512a5a54
......@@ -982,6 +982,11 @@ ParaComment.prototype =
Get_AllFontNames : function(AllFonts)
{
},
Get_SelectedText : function(bAll, bClearText)
{
return "";
},
//-----------------------------------------------------------------------------------
// Функции пересчета
//-----------------------------------------------------------------------------------
......
......@@ -12580,10 +12580,13 @@ CDocument.prototype =
else if ( docpostype_DrawingObjects === this.CurPos.Type )
{
var ParaDrawing = this.DrawingObjects.getMajorParaDrawing();
Result.X0 = ParaDrawing.GraphicObj.x;
Result.Y = ParaDrawing.GraphicObj.y;
Result.X1 = ParaDrawing.GraphicObj.x + ParaDrawing.GraphicObj.extX;
Result.Page = ParaDrawing.PageNum;
Result =
{
X0 : ParaDrawing.GraphicObj.x,
Y : ParaDrawing.GraphicObj.y,
X1 : ParaDrawing.GraphicObj.x + ParaDrawing.GraphicObj.extX,
Page : ParaDrawing.PageNum
};
}
else
{
......@@ -12591,6 +12594,10 @@ CDocument.prototype =
Result = this.Content[Pos].Get_SelectionAnchorPos();
}
var PageLimit = this.Get_PageLimits(Result.Page);
Result.X0 = PageLimit.X;
Result.X1 = PageLimit.XLimit;
var Coords0 = this.DrawingDocument.ConvertCoordsToCursorWR( Result.X0, Result.Y, Result.Page );
var Coords1 = this.DrawingDocument.ConvertCoordsToCursorWR( Result.X1, Result.Y, Result.Page );
......
......@@ -134,6 +134,24 @@ ParaHyperlink.prototype =
return this.Content[0].Is_StartFromNewLine();
},
Get_SelectedText : function(bAll, bClearText)
{
var Str = "";
var Count = this.Content.length;
for ( var Pos = 0; Pos < Count; Pos++ )
{
var _Str = this.Content[Pos].Get_SelectedText( bAll, bClearText );
if ( null === _Str )
return null;
Str += _Str;
}
return Str;
},
Get_TextPr : function(_ContentPos, Depth)
{
......
......@@ -336,6 +336,19 @@ ParaMath.prototype =
// TODO: ParaMath.Get_AllFontNames
AllFonts["Cambria Math"] = true;
},
Get_SelectedText : function(bAll, bClearText)
{
if ( true === bAll || true === this.Selection_IsUse() )
{
if ( true === bClearText )
return null;
return "";
}
return "";
},
//-----------------------------------------------------------------------------------
// Функции пересчета
//-----------------------------------------------------------------------------------
......
This diff is collapsed.
......@@ -1105,6 +1105,58 @@ ParaRun.prototype =
Item.documentGetAllFontNames( AllFonts );
}
},
Get_SelectedText : function(bAll, bClearText)
{
var StartPos = 0;
var EndPos = 0;
if ( true === bAll )
{
StartPos = 0;
EndPos = this.Content.length;
}
else if ( true === this.Selection.Use )
{
StartPos = this.State.Selection.StartPos;
EndPos = this.State.Selection.EndPos;
if ( StartPos > EndPos )
{
var Temp = EndPos;
EndPos = StartPos;
StartPos = Temp;
}
}
var Str = "";
for ( var Pos = StartPos; Pos < EndPos; Pos++ )
{
var Item = this.Content[Pos];
switch ( Item.Type )
{
case para_Drawing:
case para_End:
case para_Numbering:
case para_PresentationNumbering:
case para_PageNum:
{
if ( true === bClearText )
return null;
break;
}
case para_Text : Str += Item.Value; break;
case para_Space:
case para_Tab : Str += " "; break;
}
}
return Str;
},
//-----------------------------------------------------------------------------------
// Функции пересчета
//-----------------------------------------------------------------------------------
......
......@@ -93,10 +93,10 @@
<!-- sdk -->
<script type="text/javascript" src="../../../sdk/Common/docscoapisettings.js"></script>
<script type="text/javascript" src="../../../sdk/Common/AllFonts.js"></script>
<!--<script type="text/javascript" src="../../../sdk/Word/sdk-all.js"></script>-->
<!-- application -->
<script type="text/javascript" src="../../../../OfficeWeb/Common/AllFonts.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/browser.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/editorscommon.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/downloaderfiles.js"></script>
......
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