Commit 2dec9442 authored by SergeyLuzyanin's avatar SergeyLuzyanin

put_TextPrLang

parent 52326ec5
/**
* Created by Sergey.Luzyanin on 4/25/2017.
*/
(function(undefined){
function CBaseParams() {
this.aAdj = [];//{"@adjName": value};
this.posX = null;
this.posY = null;
this.extX = null;
this.extY = null;
this.flipH = null;
this.flipV = null;
this.rot = null;
}
function CConnectionShape() {
AscFormat.CShape.call(this);
}
CConnectionShape.prototype = Object.create(AscFormat.CShape.prototype);
CConnectionShape.prototype.constructor = CConnectionShape;
CConnectionShape.prototype.calculateBaseParams = function(startPos, endPos){
}
})();
\ No newline at end of file
......@@ -161,6 +161,7 @@ var asc_CShapeProperty = Asc.asc_CShapeProperty;
drawingConstructorsMap[AscDFH.historyitem_ThemeSetColorScheme ] = ClrScheme;
drawingConstructorsMap[AscDFH.historyitem_ThemeSetFontScheme ] = FontScheme;
drawingConstructorsMap[AscDFH.historyitem_ThemeSetFmtScheme ] = FmtScheme;
drawingConstructorsMap[AscDFH.historyitem_UniNvPr_SetUniSpPr ] = CNvUniSpPr;
AscDFH.changesFactory[AscDFH.historyitem_DefaultShapeDefinition_SetSpPr] = CChangesDrawingsObject;
......@@ -183,6 +184,7 @@ var asc_CShapeProperty = Asc.asc_CShapeProperty;
AscDFH.changesFactory[AscDFH.historyitem_UniNvPr_SetCNvPr] = CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_UniNvPr_SetUniPr] = CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_UniNvPr_SetNvPr] = CChangesDrawingsObject;
AscDFH.changesFactory[AscDFH.historyitem_UniNvPr_SetUniSpPr] = CChangesDrawingsObjectNoId;
AscDFH.changesFactory[AscDFH.historyitem_ShapeStyle_SetLnRef] = CChangesDrawingsObjectNoId;
AscDFH.changesFactory[AscDFH.historyitem_ShapeStyle_SetFillRef] = CChangesDrawingsObjectNoId;
AscDFH.changesFactory[AscDFH.historyitem_ShapeStyle_SetFontRef] = CChangesDrawingsObjectNoId;
......@@ -4832,11 +4834,70 @@ Ph.prototype =
}
};
function CNvUniSpPr()
{
this.locks = null;
this.stCnxIdx = null;
this.stCnxId = null;
this.endCnxIdx = null;
this.endCnxId = null;
}
CNvUniSpPr.prototype.Write_ToBinary = function(w){
if(AscFormat.isRealNumber(this.locks)){
w.WriteBool(true);
w.WriteLong(this.locks);
}
else {
w.WriteBool(false);
}
w.WriteLong(this.locks);
if(AscFormat.isRealNumber(this.stCnxIdx) && AscFormat.isRealNumber(this.stCnxId)){
w.WriteBool(true);
w.WriteLong(this.stCnxIdx);
w.WriteLong(this.stCnxId);
}
else {
w.WriteBool(false);
}
if(AscFormat.isRealNumber(this.endCnxIdx) && AscFormat.isRealNumber(this.endCnxId)){
w.WriteBool(true);
w.WriteLong(this.endCnxIdx);
w.WriteLong(this.endCnxId);
}
else {
w.WriteBool(false);
}
};
CNvUniSpPr.prototype.Read_FromBinary = function(r){
var bCnx = r.GetBool();
if(bCnx){
this.locks = r.GetLong();
}
else{
this.locks = null;
}
bCnx = r.GetBool();
if(bCnx){
this.stCnxIdx = r.GetLong();
this.stCnxId = r.GetLong();
}
else{
this.stCnxIdx = r.GetLong();
this.stCnxId = r.GetLong();
}
};
function UniNvPr()
{
this.cNvPr = new CNvPr();
this.UniPr = null;
this.nvPr = new NvPr();
this.nvUniSpPr = CNvUniSpPr();
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
......@@ -4862,6 +4923,11 @@ UniNvPr.prototype =
this.cNvPr = cNvPr;
},
setUniSpPr: function(pr){
History.Add(new CChangesDrawingsObjectNoId(this, AscDFH.historyitem_UniNvPr_SetUniSpPr, this.UniPr, pr));
this.nvUniSpPr = pr;
},
setUniPr: function(uniPr)
{
History.Add(new CChangesDrawingsObject(this, AscDFH.historyitem_UniNvPr_SetUniPr, this.UniPr, uniPr));
......@@ -10469,6 +10535,7 @@ function CorrectUniColor(asc_color, unicolor, flag)
window['AscFormat'].CreateUnifillFromAscColor = CreateUnifillFromAscColor;
window['AscFormat'].CorrectUniColor = CorrectUniColor;
window['AscFormat'].deleteDrawingBase = deleteDrawingBase;
window['AscFormat'].CNvUniSpPr = CNvUniSpPr;
window['AscFormat'].builder_CreateShape = builder_CreateShape;
......
......@@ -1770,9 +1770,10 @@
window['AscDFH'].historyitem_Ph_SetSz = window['AscDFH'].historyitem_type_Ph | 4;
window['AscDFH'].historyitem_Ph_SetType = window['AscDFH'].historyitem_type_Ph | 5;
window['AscDFH'].historyitem_UniNvPr_SetCNvPr = window['AscDFH'].historyitem_type_UniNvPr | 1;
window['AscDFH'].historyitem_UniNvPr_SetUniPr = window['AscDFH'].historyitem_type_UniNvPr | 2;
window['AscDFH'].historyitem_UniNvPr_SetNvPr = window['AscDFH'].historyitem_type_UniNvPr | 3;
window['AscDFH'].historyitem_UniNvPr_SetCNvPr = window['AscDFH'].historyitem_type_UniNvPr | 1;
window['AscDFH'].historyitem_UniNvPr_SetUniPr = window['AscDFH'].historyitem_type_UniNvPr | 2;
window['AscDFH'].historyitem_UniNvPr_SetNvPr = window['AscDFH'].historyitem_type_UniNvPr | 3;
window['AscDFH'].historyitem_UniNvPr_SetUniSpPr = window['AscDFH'].historyitem_type_UniNvPr | 4;
window['AscDFH'].historyitem_StyleRef_SetIdx = window['AscDFH'].historyitem_type_StyleRef | 1;
window['AscDFH'].historyitem_StyleRef_SetColor = window['AscDFH'].historyitem_type_StyleRef | 2;
......
......@@ -2372,6 +2372,20 @@ background-repeat: no-repeat;\
this.UpdateInterfaceState();
}
};
asc_docs_api.prototype.put_TextPrLang = function(value)
{
if (false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content))
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(AscDFH.historydescription_Document_SetTextLang);
this.WordControl.m_oLogicDocument.AddToParagraph(new AscCommonWord.ParaTextPr({Lang : {Val : value}}));
this.WordControl.m_oLogicDocument.Spelling.Check_CurParas();
//if (true === this.isMarkerFormat)
// this.sync_MarkerFormatCallback(false);
}
};
asc_docs_api.prototype.put_TextPrBold = function(value)
{
if (editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
......@@ -6763,6 +6777,7 @@ background-repeat: no-repeat;\
asc_docs_api.prototype['sync_SearchEndCallback'] = asc_docs_api.prototype.sync_SearchEndCallback;
asc_docs_api.prototype['put_TextPrFontName'] = asc_docs_api.prototype.put_TextPrFontName;
asc_docs_api.prototype['put_TextPrFontSize'] = asc_docs_api.prototype.put_TextPrFontSize;
asc_docs_api.prototype['put_TextPrLang'] = asc_docs_api.prototype.put_TextPrLang;
asc_docs_api.prototype['put_TextPrBold'] = asc_docs_api.prototype.put_TextPrBold;
asc_docs_api.prototype['put_TextPrItalic'] = asc_docs_api.prototype.put_TextPrItalic;
asc_docs_api.prototype['put_TextPrUnderline'] = asc_docs_api.prototype.put_TextPrUnderline;
......
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