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

настройки вордартов для меню.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@63458 954022d7-b5bf-4e40-9824-e11837661b57
parent 7fa4c2cf
...@@ -4786,6 +4786,7 @@ DrawingObjectsController.prototype = ...@@ -4786,6 +4786,7 @@ DrawingObjectsController.prototype =
} }
else else
{ {
nPageNum1 = 0;
chart_selection.addToRecalculate(); chart_selection.addToRecalculate();
} }
chart_selection.recalcInfo.bRecalculatedTitle = false; chart_selection.recalcInfo.bRecalculatedTitle = false;
...@@ -4856,6 +4857,7 @@ DrawingObjectsController.prototype = ...@@ -4856,6 +4857,7 @@ DrawingObjectsController.prototype =
} }
else else
{ {
nPageNum2 = 0;
oTargetTextObject.addToRecalculate(); oTargetTextObject.addToRecalculate();
} }
} }
...@@ -5448,7 +5450,8 @@ DrawingObjectsController.prototype = ...@@ -5448,7 +5450,8 @@ DrawingObjectsController.prototype =
h: drawing.extY , h: drawing.extY ,
canChangeArrows: drawing.canChangeArrows(), canChangeArrows: drawing.canChangeArrows(),
bFromChart: false, bFromChart: false,
locked: locked locked: locked,
textArtProperties: drawing.getTextArtProperties()
}; };
if(!shape_props) if(!shape_props)
shape_props = new_shape_props; shape_props = new_shape_props;
...@@ -5544,7 +5547,8 @@ DrawingObjectsController.prototype = ...@@ -5544,7 +5547,8 @@ DrawingObjectsController.prototype =
h: drawing.extY , h: drawing.extY ,
canChangeArrows: false, canChangeArrows: false,
bFromChart: true, bFromChart: true,
locked: locked locked: locked,
textArtProperties: null
}; };
if(!shape_props) if(!shape_props)
shape_props = new_shape_props; shape_props = new_shape_props;
......
...@@ -5177,13 +5177,34 @@ function CompareShapeProperties(shapeProp1, shapeProp2) ...@@ -5177,13 +5177,34 @@ function CompareShapeProperties(shapeProp1, shapeProp2)
_result_shape_prop.bFromChart = false; _result_shape_prop.bFromChart = false;
} }
if(shapeProp1.locked || shapeProp1.locked) if(shapeProp1.locked || shapeProp2.locked)
{ {
_result_shape_prop.locked = true; _result_shape_prop.locked = true;
} }
_result_shape_prop.textArtProperties = CompareTextArtProperties(shapeProp1.textArtProperties, shapeProp2.textArtProperties)
return _result_shape_prop; return _result_shape_prop;
} }
function CompareTextArtProperties(oProps1, oProps2)
{
if(!oProps1 || !oProps2)
return null;
var oRet = {Fill: undefined, Line: undefined, Form: undefined};
if(oProps1.Form === oProps2.Form)
{
oRet.From = oProps1.Form;
}
if(oProps1.Fill && oProps2.Fill)
{
oRet.Fill = CompareUniFill(oProps1.Fill, oProps2.Fill);
}
if(oProps1.Line && oProps2.Line)
{
oRet.Line = oProps1.Line.compare(oProps2.Line);
}
return oRet;
}
// LN -------------------------- // LN --------------------------
// размеры стрелок; // размеры стрелок;
var lg=500, mid=300, sm=200; var lg=500, mid=300, sm=200;
...@@ -12680,6 +12701,7 @@ var PARRUN_TYPE_NONE = 0; ...@@ -12680,6 +12701,7 @@ var PARRUN_TYPE_NONE = 0;
var PARRUN_TYPE_RUN = 1; var PARRUN_TYPE_RUN = 1;
var PARRUN_TYPE_FLD = 2; var PARRUN_TYPE_FLD = 2;
var PARRUN_TYPE_BR = 3; var PARRUN_TYPE_BR = 3;
var PARRUN_TYPE_TEXT_MATH = 4;
// DEFAULT OBJECTS // DEFAULT OBJECTS
......
...@@ -3754,6 +3754,42 @@ CShape.prototype = ...@@ -3754,6 +3754,42 @@ CShape.prototype =
return false; return false;
}, },
getTextArtProperties: function()
{
var oContent = this.getDocContent(), oTextPr, oRet = null;
if(oContent)
{
oRet = {Fill: undefined, Line: undefined, Form: undefined};
var oController = this.getDrawingObjectsController();
if(oController)
{
var oTargetDocContent = oController.getTargetDocContent();
if(oTargetDocContent === oContent)
{
oTextPr = oContent.Get_Paragraph_TextPr();
}
else
{
oContent.Set_ApplyToAll(true);
oTextPr = oContent.Get_Paragraph_TextPr();
oContent.Set_ApplyToAll(false);
}
oRet.Fill = oTextPr.TextFill;
oRet.Line = oTextPr.TextOutline;
var oBodyPr = this.getBodyPr();
if(oBodyPr && oBodyPr.prstTxWarp)
{
oRet.Form = oBodyPr.prstTxWarp.preset;
}
else
{
oRet.Form = "textNoShape";
}
}
}
return oRet;
},
getParagraphParaPr: function () { getParagraphParaPr: function () {
if (this.txBody && this.txBody.content) { if (this.txBody && this.txBody.content) {
var _result; var _result;
......
...@@ -1792,7 +1792,8 @@ ...@@ -1792,7 +1792,8 @@
this.w = null; this.w = null;
this.h = null; this.h = null;
this.vert = null; this.vert = null;
this.verticalTextAlign = null this.verticalTextAlign = null;
this.textArtProperties = null;
} }
asc_CShapeProperty.prototype = { asc_CShapeProperty.prototype = {
...@@ -1821,7 +1822,9 @@ ...@@ -1821,7 +1822,9 @@
asc_getVerticalTextAlign: function(){return this.verticalTextAlign}, asc_getVerticalTextAlign: function(){return this.verticalTextAlign},
asc_putVerticalTextAlign: function(v){this.verticalTextAlign = v;}, asc_putVerticalTextAlign: function(v){this.verticalTextAlign = v;},
asc_getVert: function(){return this.vert}, asc_getVert: function(){return this.vert},
asc_putVert: function(v){this.vert = v;} asc_putVert: function(v){this.vert = v;},
asc_getTextArtProperties: function(){return this.textArtProperties},
asc_putTextArtProperties: function(v){this.textArtProperties = v;}
}; };
//{ asc_CShapeProperty export //{ asc_CShapeProperty export
...@@ -1852,10 +1855,61 @@ ...@@ -1852,10 +1855,61 @@
prot["put_VerticalTextAlign"] = prot["asc_putVerticalTextAlign"] = prot.asc_putVerticalTextAlign; prot["put_VerticalTextAlign"] = prot["asc_putVerticalTextAlign"] = prot.asc_putVerticalTextAlign;
prot["get_Vert"] = prot["asc_getVert"] = prot.asc_getVert; prot["get_Vert"] = prot["asc_getVert"] = prot.asc_getVert;
prot["put_Vert"] = prot["asc_putVert"] = prot.asc_putVert; prot["put_Vert"] = prot["asc_putVert"] = prot.asc_putVert;
prot["get_TextArtProperties"] = prot["asc_getTextArtProperties"] = prot.asc_getTextArtProperties;
prot["put_TextArtProperties"] = prot["asc_putTextArtProperties"] = prot.asc_putTextArtProperties;
// --------------------------------------------------------------- // ---------------------------------------------------------------
function asc_TextArtProperties(obj)
{
if(obj)
{
this.Fill = obj.Fill;//asc_Fill
this.Line = obj.Line;//asc_Stroke
this.Form = obj.Form;//srting
}
else
{
this.Fill = undefined;
this.Line = undefined;
this.Form = undefined;
}
}
asc_TextArtProperties.prototype["asc_putFill"] = asc_TextArtProperties.prototype.asc_putFill = function(oAscFill)
{
this.Fill = oAscFill;
};
asc_TextArtProperties.prototype["asc_getFill"] = asc_TextArtProperties.prototype.asc_getFill = function()
{
return this.Fill;
};
asc_TextArtProperties.prototype["asc_putLine"] = asc_TextArtProperties.prototype.asc_putLine = function(oAscStroke)
{
this.Line = oAscStroke;
};
asc_TextArtProperties.prototype["asc_getLine"] = asc_TextArtProperties.prototype.asc_getLine = function()
{
return this.Line;
};
asc_TextArtProperties.prototype["asc_putForm"] = asc_TextArtProperties.prototype.asc_putForm = function(sForm)
{
this.Form = sForm;
};
asc_TextArtProperties.prototype["asc_getForm"] = asc_TextArtProperties.prototype.asc_getForm = function()
{
return this.Form;
};
window["asc_TextArtProperties"] = window["Asc"]["asc_TextArtProperties"] = window["asc_TextArtProperties"] = asc_TextArtProperties;
// CImgProperty // CImgProperty
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
/** @constructor */ /** @constructor */
...@@ -3225,6 +3279,10 @@ function CreateAscShapePropFromProp(shapeProp) ...@@ -3225,6 +3279,10 @@ function CreateAscShapePropFromProp(shapeProp)
obj.h = shapeProp.h; obj.h = shapeProp.h;
obj.vert = shapeProp.vert; obj.vert = shapeProp.vert;
obj.verticalTextAlign = shapeProp.verticalTextAlign; obj.verticalTextAlign = shapeProp.verticalTextAlign;
if(shapeProp.textArtProperties)
{
obj.textArtProperties = CreateAscTextArtProps(shapeProp.textArtProperties);
}
return obj; return obj;
} }
...@@ -3237,6 +3295,25 @@ function CorrectShapeProp(asc_shape_prop, shape) ...@@ -3237,6 +3295,25 @@ function CorrectShapeProp(asc_shape_prop, shape)
shape.spPr.ln = CorrectUniFill(asc_shape_prop.asc_getStroke(), shape.spPr.ln); shape.spPr.ln = CorrectUniFill(asc_shape_prop.asc_getStroke(), shape.spPr.ln);
} }
function CreateAscTextArtProps(oTextArtProps)
{
if(!oTextArtProps)
{
return undefined;
}
var oRet = new asc_TextArtProperties();
if(oTextArtProps.Fill)
{
oRet.asc_putFill(CreateAscFill(oTextArtProps.Fill));
}
if(oTextArtProps.Line)
{
oRet.asc_putLine(CreateAscStroke(oTextArtProps.Line, false));
}
oRet.asc_putForm(oTextArtProps.Form);
return oRet;
}
// эта функция ДОЛЖНА минимизироваться // эта функция ДОЛЖНА минимизироваться
function CreateAscColorCustom(r, g, b, auto) function CreateAscColorCustom(r, g, b, auto)
......
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