Commit ddfb07ab 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@51411 954022d7-b5bf-4e40-9824-e11837661b57
parent 8c7b068e
......@@ -291,6 +291,7 @@ CDocument.prototype.Search_GetId = function(bNext)
if ( true === this.Selection.Use && selectionflag_Common === this.Selection.Flag )
Pos = ( true === bNext ? Math.max(this.Selection.StartPos, this.Selection.EndPos) : Math.min(this.Selection.StartPos, this.Selection.EndPos) );
var StartPos = Pos;
if ( true === bNext )
{
......@@ -311,6 +312,19 @@ CDocument.prototype.Search_GetId = function(bNext)
Pos++;
}
Pos = 0;
while ( Pos <= StartPos )
{
Id = this.Content[Pos].Search_GetId(true, false);
if ( null != Id )
return Id;
Pos++;
}
return null;
}
else
{
......@@ -330,12 +344,27 @@ CDocument.prototype.Search_GetId = function(bNext)
Pos--;
}
Pos = this.Content.length - 1;
while ( Pos >= StartPos )
{
Id = this.Content[Pos].Search_GetId(false, false);
if ( null != Id )
return Id;
Pos--;
}
return null;
}
}
else if ( docpostype_HdrFtr === this.CurPos.Type )
{
return this.HdrFtr.Search_GetId( bNext );
}
return null;
};
CDocument.prototype.Search_Set_Selection = function(bSelection)
......
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