lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 21353ebd authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50601 954022d7-b5bf-4e40-9824-e11837661b57
parent 15e1ce11
...@@ -1142,7 +1142,7 @@ CDocumentContent.prototype = ...@@ -1142,7 +1142,7 @@ CDocumentContent.prototype =
} }
if(_final_bullet !== null) if(_final_bullet !== null)
{ {
_cur_paragraph.Remove_PresentationNumbering(); _cur_paragraph.Remove_PresentationNumbering(true);
var _theme = null, _master = null, _layout = null, _slide = null; var _theme = null, _master = null, _layout = null, _slide = null;
var parent_objects = _parent.getParentObjects(); var parent_objects = _parent.getParentObjects();
_theme = parent_objects.theme; _theme = parent_objects.theme;
...@@ -1210,7 +1210,7 @@ CDocumentContent.prototype = ...@@ -1210,7 +1210,7 @@ CDocumentContent.prototype =
{ {
_bullet.m_nType = numbering_presentationnumfrmt_Char; _bullet.m_nType = numbering_presentationnumfrmt_Char;
_bullet.m_sChar = _final_bullet.bulletType.Char[0]; _bullet.m_sChar = _final_bullet.bulletType.Char[0];
_cur_paragraph.Add_PresentationNumbering(_bullet); _cur_paragraph.Add_PresentationNumbering(_bullet, true);
break; break;
} }
...@@ -1218,12 +1218,12 @@ CDocumentContent.prototype = ...@@ -1218,12 +1218,12 @@ CDocumentContent.prototype =
{ {
_bullet.m_nType = g_NumberingArr[_final_bullet.bulletType.AutoNumType]; _bullet.m_nType = g_NumberingArr[_final_bullet.bulletType.AutoNumType];
_bullet.m_nStartAt = _final_bullet.bulletType.startAt; _bullet.m_nStartAt = _final_bullet.bulletType.startAt;
_cur_paragraph.Add_PresentationNumbering(_bullet); _cur_paragraph.Add_PresentationNumbering(_bullet, true);
break; break;
} }
case BULLET_TYPE_BULLET_NONE : case BULLET_TYPE_BULLET_NONE :
{ {
_cur_paragraph.Remove_PresentationNumbering(); _cur_paragraph.Remove_PresentationNumbering(true);
break; break;
} }
case BULLET_TYPE_BULLET_BLIP : case BULLET_TYPE_BULLET_BLIP :
......
...@@ -16,7 +16,9 @@ function CGraphicFrame(parent) ...@@ -16,7 +16,9 @@ function CGraphicFrame(parent)
this.recalcInfo = this.recalcInfo =
{ {
recalculateTransform: true, recalculateTransform: true,
recalculateSizes: true recalculateSizes: true,
recalculateNumbering: true,
recalculateShapeHierarchy: true
}; };
this.x = null; this.x = null;
...@@ -24,7 +26,7 @@ function CGraphicFrame(parent) ...@@ -24,7 +26,7 @@ function CGraphicFrame(parent)
this.extX = null; this.extX = null;
this.extY = null; this.extY = null;
this.transform = new CMatrix(); this.transform = new CMatrix();
this.compiledHierarchy = [];
this.textPropsForRecalc = []; this.textPropsForRecalc = [];
this.Lock = new CLock(); this.Lock = new CLock();
this.Id = g_oIdCounter.Get_NewId(); this.Id = g_oIdCounter.Get_NewId();
...@@ -196,10 +198,55 @@ CGraphicFrame.prototype = ...@@ -196,10 +198,55 @@ CGraphicFrame.prototype =
{ {
return this.Id; return this.Id;
}, },
getHierarchy: function()
{
if(this.recalcInfo.recalculateShapeHierarchy)
{
this.compiledHierarchy.length = 0;
var hierarchy = this.compiledHierarchy;
if(this.isPlaceholder())
{
var ph_type = this.getPlaceholderType();
var ph_index = this.getPlaceholderIndex();
switch (this.parent.kind)
{
case SLIDE_KIND:
{
hierarchy.push(this.parent.Layout.getMatchingShape(ph_type, ph_index));
hierarchy.push(this.parent.Layout.Master.getMatchingShape(ph_type, ph_index));
break;
}
case LAYOUT_KIND:
{
hierarchy.push(this.parent.Master.getMatchingShape(ph_type, ph_index));
break;
}
}
}
this.recalcInfo.recalculateShapeHierarchy = true;
}
return this.compiledHierarchy;
},
recalculate: function() recalculate: function()
{ {
if(isRealObject(this.graphicObject)) if(isRealObject(this.graphicObject))
{ {
if(this.recalcInfo.recalculateNumbering)
{
var rows = this.graphicObject.Content;
for(var i = 0; i < rows.length; ++i)
{
var row = rows[i];
var cells = row.Content;
for(var j = 0; j< cells.length; ++j )
{
var cell = cells[j];
cell.Content.RecalculateNumbering();
}
}
}
this.graphicObject.X = 0; this.graphicObject.X = 0;
this.graphicObject.Y = 0; this.graphicObject.Y = 0;
this.graphicObject.PageNum = 0; this.graphicObject.PageNum = 0;
...@@ -305,6 +352,7 @@ CGraphicFrame.prototype = ...@@ -305,6 +352,7 @@ CGraphicFrame.prototype =
recalcAllColors: function() recalcAllColors: function()
{ {
this.recalcInfo.recalculateNumbering = true;
this.stlesForParagraph = []; this.stlesForParagraph = [];
this.graphicObject.Recalc_CompiledPr(); this.graphicObject.Recalc_CompiledPr();
}, },
...@@ -314,7 +362,9 @@ CGraphicFrame.prototype = ...@@ -314,7 +362,9 @@ CGraphicFrame.prototype =
this.recalcInfo = this.recalcInfo =
{ {
recalculateTransform: true, recalculateTransform: true,
recalculateSizes: true recalculateSizes: true,
recalculateNumbering: true,
recalculateShapeHierarchy: true
}; };
this.stlesForParagraph = []; this.stlesForParagraph = [];
this.graphicObject.Recalc_CompiledPr(); this.graphicObject.Recalc_CompiledPr();
...@@ -1352,6 +1402,7 @@ CGraphicFrame.prototype = ...@@ -1352,6 +1402,7 @@ CGraphicFrame.prototype =
return null; return null;
}, },
getPhIndex: function() getPhIndex: function()
{ {
if(this.isPlaceholder()) if(this.isPlaceholder())
...@@ -1361,6 +1412,16 @@ CGraphicFrame.prototype = ...@@ -1361,6 +1412,16 @@ CGraphicFrame.prototype =
return null; return null;
}, },
getPlaceholderType: function()
{
return this.getPhType();
},
getPlaceholderIndex: function()
{
return this.getPhIndex();
},
setParent: function(parent) setParent: function(parent)
{ {
History.Add(this, {Type:historyitem_SetShapeParent, Old: this.parent, New: parent}); History.Add(this, {Type:historyitem_SetShapeParent, Old: this.parent, New: parent});
......
...@@ -8968,7 +8968,7 @@ Paragraph.prototype = ...@@ -8968,7 +8968,7 @@ Paragraph.prototype =
// Функции для работы с нумерацией параграфов в презентациях // Функции для работы с нумерацией параграфов в презентациях
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
// Добавляем нумерацию к данному параграфу // Добавляем нумерацию к данному параграфу
Add_PresentationNumbering : function(_Bullet) Add_PresentationNumbering : function(_Bullet, flag)
{ {
var Bullet = _Bullet.Copy(); var Bullet = _Bullet.Copy();
this.Numbering.Type = para_PresentationNumbering; this.Numbering.Type = para_PresentationNumbering;
...@@ -8978,7 +8978,7 @@ Paragraph.prototype = ...@@ -8978,7 +8978,7 @@ Paragraph.prototype =
var NewType = Bullet.Get_Type(); var NewType = Bullet.Get_Type();
this.PresentationPr.Bullet = Bullet; this.PresentationPr.Bullet = Bullet;
if ( OldType != NewType ) if ( OldType != NewType && !(flag === true))
{ {
var ParaPr = this.Get_CompiledPr2(false).ParaPr; var ParaPr = this.Get_CompiledPr2(false).ParaPr;
var LeftInd = Math.min( ParaPr.Ind.Left, ParaPr.Ind.Left + ParaPr.Ind.FirstLine ); var LeftInd = Math.min( ParaPr.Ind.Left, ParaPr.Ind.Left + ParaPr.Ind.FirstLine );
...@@ -9004,9 +9004,9 @@ Paragraph.prototype = ...@@ -9004,9 +9004,9 @@ Paragraph.prototype =
}, },
// Удаляем нумерацию // Удаляем нумерацию
Remove_PresentationNumbering : function() Remove_PresentationNumbering : function(flag)
{ {
this.Add_PresentationNumbering( new CPresentationBullet() ); this.Add_PresentationNumbering( new CPresentationBullet() , flag);
}, },
Set_PresentationLevel : function(Level) Set_PresentationLevel : function(Level)
......
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