Commit dfae938d authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

поправлен selection для истории в функции promote

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52291 954022d7-b5bf-4e40-9824-e11837661b57
parent 6993b04b
...@@ -7889,14 +7889,24 @@ Range.prototype.promote=function(bCtrl, bVertical, nIndex){ ...@@ -7889,14 +7889,24 @@ Range.prototype.promote=function(bCtrl, bVertical, nIndex){
if(bVertical) if(bVertical)
{ {
if(nIndex > 0) if(nIndex > 0)
{
if(nIndex >= nHeight)
oSelectionRedo.assign(oBBox.c1, oBBox.r1, oBBox.c2, oBBox.r1 + nIndex); oSelectionRedo.assign(oBBox.c1, oBBox.r1, oBBox.c2, oBBox.r1 + nIndex);
else
oSelectionRedo.assign(oBBox.c1, oBBox.r1, oBBox.c2, oBBox.r1 + nIndex - 1);
}
else if(nIndex < 0) else if(nIndex < 0)
oSelectionRedo.assign(oBBox.c1, oBBox.r1 + nIndex, oBBox.c2, oBBox.r2); oSelectionRedo.assign(oBBox.c1, oBBox.r1 + nIndex, oBBox.c2, oBBox.r2);
} }
else else
{ {
if(nIndex > 0) if(nIndex > 0)
{
if(nIndex >= nWidth)
oSelectionRedo.assign(oBBox.c1, oBBox.r1, oBBox.c1 + nIndex, oBBox.r2); oSelectionRedo.assign(oBBox.c1, oBBox.r1, oBBox.c1 + nIndex, oBBox.r2);
else
oSelectionRedo.assign(oBBox.c1, oBBox.r1, oBBox.c1 + nIndex - 1, oBBox.r2);
}
else if(nIndex < 0) else if(nIndex < 0)
oSelectionRedo.assign(oBBox.c1 + nIndex, oBBox.r1, oBBox.c2, oBBox.r2); oSelectionRedo.assign(oBBox.c1 + nIndex, oBBox.r1, oBBox.c2, oBBox.r2);
} }
......
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