Commit 32db3160 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47572 954022d7-b5bf-4e40-9824-e11837661b57
parent aa36ff32
......@@ -4040,7 +4040,14 @@ function CDrawingDocument()
var _ar = hor_ruler.m_arrTabs;
for (var i = 0; i < _len; i++)
_ar[i] = new CTab(__tabs[i].Pos, g_tabtype_left);
{
if (__tabs[i].Value == tab_Left)
_ar[i] = new CTab(__tabs[i].Pos, g_tabtype_left);
else if (__tabs[i].Value == tab_Center)
_ar[i] = new CTab(__tabs[i].Pos, g_tabtype_center);
else if (__tabs[i].Value == tab_Right)
_ar[i] = new CTab(__tabs[i].Pos, g_tabtype_right);
}
hor_ruler.CorrectTabs();
this.m_oWordControl.UpdateHorRuler();
......
......@@ -1043,11 +1043,13 @@ function CEditorPage(api)
if (false === oThis.m_oApi.bInit_word_control)
return;
// пока только левые табы
return;
var oWordControl = oThis;
if (oWordControl.m_nTabsType == g_tabtype_left)
{
oWordControl.m_nTabsType = g_tabtype_center;
oWordControl.m_oLeftRuler_buttonsTabs.HtmlElement.style.backgroundPosition = "0px -37px";
}
else if (oWordControl.m_nTabsType == g_tabtype_center)
{
oWordControl.m_nTabsType = g_tabtype_right;
oWordControl.m_oLeftRuler_buttonsTabs.HtmlElement.style.backgroundPosition = "0px -18px";
......
var g_tabtype_left = 0;
var g_tabtype_right = 1;
function CTab(pos,type)
function CTab(pos,type)
{
this.pos = pos;
this.type = type;
......@@ -1239,7 +1236,14 @@ function CHorRuler()
var _arr = new CParaTabs();
var _c = this.m_arrTabs.length;
for (var i = 0; i < _c; i++)
_arr.Add( new CParaTab( tab_Left, this.m_arrTabs[i].pos ) );
{
if (this.m_arrTabs[i].type == g_tabtype_left)
_arr.Add( new CParaTab( tab_Left, this.m_arrTabs[i].pos ) );
else if (this.m_arrTabs[i].type == g_tabtype_right)
_arr.Add( new CParaTab( tab_Right, this.m_arrTabs[i].pos ) );
else if (this.m_arrTabs[i].type == g_tabtype_center)
_arr.Add( new CParaTab( tab_Center, this.m_arrTabs[i].pos ) );
}
if ( false === this.m_oWordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Properties) )
{
......@@ -1456,6 +1460,16 @@ function CHorRuler()
context.stroke();
break;
}
case g_tabtype_center:
{
context.beginPath();
context.moveTo(_x, _positon_y);
context.lineTo(_x, _positon_y + 5);
context.moveTo(_x - 5, _positon_y + 5);
context.lineTo(_x + 5, _positon_y + 5);
context.stroke();
break;
}
default:
break;
}
......@@ -1607,6 +1621,16 @@ function CHorRuler()
context.stroke();
break;
}
case g_tabtype_center:
{
context.beginPath();
context.moveTo(_x, _positon_y);
context.lineTo(_x, _positon_y + 5);
context.moveTo(_x - 5, _positon_y + 5);
context.lineTo(_x + 5, _positon_y + 5);
context.stroke();
break;
}
default:
break;
}
......
......@@ -814,7 +814,7 @@ asc_docs_api.prototype.CreateCSS = function()
var style1 = document.createElement('style');
style1.type = 'text/css';
style1.innerHTML = ".buttonTabs {\
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAmCAYAAAAm56DSAAAABGdBTUEAALGPC/xhBQAAAO9JREFUSEvtlj0Kg0AQhc3FbBQslK38q0QXtFkvkSplruLFPMOEJwgmgozLi5XCdPIx88b58DFNkwSsBzBWBSzQMuEKe77e4lsr4ws2z7OcLTRww87lps7MOSfjOB4uRQ1r21a6ruPAyrKUqqo4sDRNxRjDgcVxLEmSLMC6rsVau8tQnVkYhgJglmWCkZEhlrK9EjVMc1rXwGjWYHjtP3Kkduab1zXb1HxXv+/cnR0rG0c+DAPn0AFqmoYDAyjPcw6sKAqBfb18hoz6vl9GAwiSjKLID7ZmhNEAgnVhX6/ONBdxzQX4mmP3S0X1GQP2AWVA4FGLO9QYAAAAAElFTkSuQmCC);\
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAA5CAYAAADUZxCcAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAUVJREFUWEftlr9OhEAQhwex4i0srXwWXsCERhsTKwoaCLWViY2WvgC8ipXlvQOE/wHMbGa5nHe77J57ykW+ZLLshPyyswlfsNI0HcEQF7QawWjYNObH54Y1juHm+oqtO2EPd7esqcPL2/sUttw7O9OwMAwhiiLazSMNK4qClSrSsLIsWakye7Kqqmg3zyWtB2maBmzbBs/zwHGcqeI4pjd2kZ6sbVvo+x6GYZhqHMWSWe7ndBprmMDomGdwZ6tplfm7MDRvEAS020crrOs6qOuadvtohWGQzLxaYWhdmXmlpsU7QkGicXnQ0WPiHWEQjsaDsCdiNa0+RsdcbtjptO0/3rOmDk/Pr6u2f4BSmO/7rOb4/ZPNSZGjFJbnOWRZRjsxQm27rktPW7BnWRb7r02ShLpbhCfjzv9eXOGHWO7n9C+0DfAFUOr1fzFrfLcAAAAASUVORK5CYII=);\
background-position: 0px 0px;\
background-repeat: no-repeat;\
}";
......
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