Commit d2b5f8d9 authored by Alexander.Trofimov's avatar Alexander.Trofimov

delete textArtTranslate -> translateManager

parent 9a6cc488
...@@ -67,11 +67,6 @@ CShape.prototype.Get_Numbering = function() ...@@ -67,11 +67,6 @@ CShape.prototype.Get_Numbering = function()
return new CNumbering(); return new CNumbering();
}; };
CShape.prototype.getTextArtTranslate = function()
{
return Asc["editor"].textArtTranslate;
};
CShape.prototype.Is_UseInDocument = function(){ CShape.prototype.Is_UseInDocument = function(){
if(this.group) if(this.group)
{ {
......
...@@ -722,6 +722,10 @@ function CanStartEditText(oController) ...@@ -722,6 +722,10 @@ function CanStartEditText(oController)
DrawingObjectsController.prototype = DrawingObjectsController.prototype =
{ {
getDefaultText: function(){
return AscCommon.translateManager.getValue('Your text here');
},
getAllConnectors: function(aDrawings, allDrawings){ getAllConnectors: function(aDrawings, allDrawings){
var _ret = allDrawings; var _ret = allDrawings;
if(!_ret){ if(!_ret){
...@@ -7966,7 +7970,7 @@ DrawingObjectsController.prototype = ...@@ -7966,7 +7970,7 @@ DrawingObjectsController.prototype =
} }
else else
{ {
sText = oShape.getTextArtTranslate().DefaultText; sText = this.getDefaultText();
AscFormat.AddToContentFromString(oContent, sText); AscFormat.AddToContentFromString(oContent, sText);
oShape.bSelectedText = false; oShape.bSelectedText = false;
} }
...@@ -7993,7 +7997,7 @@ DrawingObjectsController.prototype = ...@@ -7993,7 +7997,7 @@ DrawingObjectsController.prototype =
} }
else else
{ {
sText = oShape.getTextArtTranslate().DefaultText; sText = this.getDefaultText();
AscFormat.AddToContentFromString(oContent, sText); AscFormat.AddToContentFromString(oContent, sText);
oShape.bSelectedText = false; oShape.bSelectedText = false;
} }
...@@ -8001,13 +8005,13 @@ DrawingObjectsController.prototype = ...@@ -8001,13 +8005,13 @@ DrawingObjectsController.prototype =
else else
{ {
oShape.bSelectedText = false; oShape.bSelectedText = false;
sText = (typeof sStartString === "string") ? sStartString : oShape.getTextArtTranslate().DefaultText; sText = (typeof sStartString === "string") ? sStartString : this.getDefaultText();
AscFormat.AddToContentFromString(oContent, sText); AscFormat.AddToContentFromString(oContent, sText);
} }
} }
else else
{ {
sText = (typeof sStartString === "string") ? sStartString : oShape.getTextArtTranslate().DefaultText; sText = (typeof sStartString === "string") ? sStartString : this.getDefaultText();
AscFormat.AddToContentFromString(oContent, sText); AscFormat.AddToContentFromString(oContent, sText);
} }
var oTextPr; var oTextPr;
......
...@@ -111,7 +111,6 @@ ...@@ -111,7 +111,6 @@
this.translateManager = AscCommon.translateManager.init(config['translate']); this.translateManager = AscCommon.translateManager.init(config['translate']);
// Chart // Chart
this.textArtTranslate = null;
this.chartPreviewManager = null; this.chartPreviewManager = null;
this.textArtPreviewManager = null; this.textArtPreviewManager = null;
this.shapeElementId = null; this.shapeElementId = null;
...@@ -1061,7 +1060,6 @@ ...@@ -1061,7 +1060,6 @@
this.ImageLoader.put_Api(this); this.ImageLoader.put_Api(this);
this.FontLoader.SetStandartFonts(); this.FontLoader.SetStandartFonts();
this.textArtTranslate = this.textArtTranslate ? this.textArtTranslate : new Asc.asc_TextArtTranslate();
this.chartPreviewManager = new AscCommon.ChartPreviewManager(); this.chartPreviewManager = new AscCommon.ChartPreviewManager();
this.textArtPreviewManager = new AscCommon.TextArtPreviewManager(); this.textArtPreviewManager = new AscCommon.TextArtPreviewManager();
......
...@@ -227,10 +227,6 @@ CShape.prototype.getDrawingDocument = function() ...@@ -227,10 +227,6 @@ CShape.prototype.getDrawingDocument = function()
return editor.WordControl.m_oLogicDocument.DrawingDocument; return editor.WordControl.m_oLogicDocument.DrawingDocument;
}; };
CShape.prototype.getTextArtTranslate = function()
{
return editor.textArtTranslate;
};
CShape.prototype.getTextArtPreviewManager = function() CShape.prototype.getTextArtPreviewManager = function()
{ {
return editor.textArtPreviewManager; return editor.textArtPreviewManager;
......
...@@ -98,10 +98,6 @@ CShape.prototype.getDrawingDocument = function() ...@@ -98,10 +98,6 @@ CShape.prototype.getDrawingDocument = function()
return editor.WordControl.m_oLogicDocument.DrawingDocument; return editor.WordControl.m_oLogicDocument.DrawingDocument;
}; };
CShape.prototype.getTextArtTranslate = function()
{
return editor.textArtTranslate;
};
CShape.prototype.getTextArtPreviewManager = function() CShape.prototype.getTextArtPreviewManager = function()
{ {
return editor.textArtPreviewManager; return editor.textArtPreviewManager;
......
...@@ -7204,7 +7204,7 @@ background-repeat: no-repeat;\ ...@@ -7204,7 +7204,7 @@ background-repeat: no-repeat;\
if (!oLogicDocument) if (!oLogicDocument)
return; return;
var sDefaultText = this.textArtTranslate ? this.textArtTranslate.DefaultText : "Your text here"; var sDefaultText = AscCommon.translateManager.getValue('Your text here');
if (AscCommonWord.sdttype_BlockLevel === nType) if (AscCommonWord.sdttype_BlockLevel === nType)
{ {
if (false === oLogicDocument.Document_Is_SelectionLocked(AscCommon.changestype_Document_Content)) if (false === oLogicDocument.Document_Is_SelectionLocked(AscCommon.changestype_Document_Content))
......
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