Commit 86507cd1 authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix presentation numbering bugs

parent 249b8741
......@@ -133,9 +133,17 @@
this.Start_Recalculate(fWidth, fHeight);
if(this.Pages.length > 1){
var fSummaryHeight = this.Get_SummaryHeight();
var fNeedHeight = fSummaryHeight;
if(this.Get_ColumnsCount() > 1){
var fLow = fHeight, fHigh = fSummaryHeight;
this.Start_Recalculate(fWidth, fHigh);
var nItCount = 0;
while(this.Pages.length > 1 && nItCount < 5){
fHigh += fSummaryHeight;
this.Start_Recalculate(fWidth, fHigh);
++nItCount;
}
var fNeedHeight = fHigh;
if(this.Get_ColumnsCount() > 1){
while((fHigh - fLow) > 0.1){
var fCheckHeight = fLow + (fHigh - fLow)/2;
this.Start_Recalculate(fWidth, fCheckHeight);
......
......@@ -8485,7 +8485,7 @@ CBullet.prototype =
function CBulletColor()
{
this.type = AscFormat.BULLET_TYPE_COLOR_NONE;
this.type = AscFormat.BULLET_TYPE_COLOR_CLRTX;
this.UniColor = null;
}
......
......@@ -7824,13 +7824,13 @@ function BinaryPPTYLoader()
}
case 3:
{
b_bullet = true;
bullet.bulletColor = new AscFormat.CBulletColor();
var cur_pos = s.cur;
var _len = s.GetULong();
if (0 != _len)
{
b_bullet = true;
bullet.bulletColor = new AscFormat.CBulletColor();
bullet.bulletColor.type = s.GetUChar();
if (bullet.bulletColor.type == AscFormat.BULLET_TYPE_COLOR_CLRTX)
......@@ -7849,13 +7849,13 @@ function BinaryPPTYLoader()
}
case 4:
{
b_bullet = true;
bullet.bulletSize = new AscFormat.CBulletSize();
var cur_pos = s.cur;
var _len = s.GetULong();
if (0 != _len)
{
b_bullet = true;
bullet.bulletSize = new AscFormat.CBulletSize();
bullet.bulletSize.type = s.GetUChar();
if (bullet.bulletSize.type == AscFormat.BULLET_TYPE_SIZE_TX)
......@@ -7865,7 +7865,7 @@ function BinaryPPTYLoader()
else
{
var _l = s.GetULong();
s.Skip2(2); // start attributes + type value (need 0)
s.Skip2(2); // start attributes + type
bullet.bulletSize.val = s.GetLong();
s.Skip2(1); // end attributes
}
......@@ -7875,13 +7875,13 @@ function BinaryPPTYLoader()
}
case 5:
{
b_bullet = true;
bullet.bulletTypeface = new AscFormat.CBulletTypeface();
var cur_pos = s.cur;
var _len = s.GetULong();
if (0 != _len)
{
b_bullet = true;
bullet.bulletTypeface = new AscFormat.CBulletTypeface();
bullet.bulletTypeface.type = s.GetUChar();
if (bullet.bulletTypeface.type == AscFormat.BULLET_TYPE_TYPEFACE_BUFONT)
......@@ -7898,13 +7898,13 @@ function BinaryPPTYLoader()
}
case 6:
{
b_bullet = true;
bullet.bulletType = new AscFormat.CBulletType();
var cur_pos = s.cur;
var _len = s.GetULong();
if (0 != _len)
{
b_bullet = true;
bullet.bulletType = new AscFormat.CBulletType();
bullet.bulletType.type = s.GetUChar();
if (bullet.bulletType.type == AscFormat.BULLET_TYPE_BULLET_NONE)
......
......@@ -3106,7 +3106,7 @@ CPresentation.prototype =
{
target_doc_content1 = this.Slides[this.CurPage].graphicObjects.getTargetDocContent();
}
this.AddToParagraph( new ParaText( String.fromCharCode( Code ) ), undefined, true );
this.AddToParagraph( new ParaText( String.fromCharCode( Code ) ), false, true );
if(this.Slides[this.CurPage])
{
target_doc_content2 = this.Slides[this.CurPage].graphicObjects.getTargetDocContent();
......
......@@ -687,7 +687,7 @@ CShape.prototype.recalculateContent2 = function()
}
content.Set_StartPage(0);
content.Reset(0, 0, w, 20000);
content.Recalculate_Page(content.StartPage, true);
content.RecalculateContent(this.txBody.contentWidth2, this.txBody.contentHeight2, 0);
var oTextWarpContent = this.checkTextWarp(content, body_pr, this.txBody.contentWidth2, this.txBody.contentHeight2, false, true);
this.txWarpStructParamarks2 = oTextWarpContent.oTxWarpStructParamarks;
......
......@@ -141,7 +141,7 @@ StartAddNewShape.prototype =
var shape = this.drawingObjects.arrTrackObjects[0].getShape(true, this.drawingObjects.drawingDocument);
var drawing = new ParaDrawing(shape.spPr.xfrm.extX, shape.spPr.xfrm.extY, shape, this.drawingObjects.drawingDocument, this.drawingObjects.document, null);
var nearest_pos = this.drawingObjects.document.Get_NearestPos(this.pageIndex, bounds.min_x, bounds.min_y, true, drawing);
if(false === editor.isViewMode && nearest_pos && false === this.drawingObjects.document.Document_Is_SelectionLocked(AscCommon.changestype_None, {Type : AscCommon.changestype_2_Element_and_Type , Element : nearest_pos.Paragraph, CheckType : AscCommon.changestype_Paragraph_Content} ) && false === editor.isViewMode)
if(nearest_pos && false === this.drawingObjects.document.Document_Is_SelectionLocked(AscCommon.changestype_None, {Type : AscCommon.changestype_2_Element_and_Type , Element : nearest_pos.Paragraph, CheckType : AscCommon.changestype_Paragraph_Content} ))
{
drawing.Set_DrawingType(drawing_Anchor);
drawing.Set_GraphicObject(shape);
......@@ -222,7 +222,7 @@ NullState.prototype =
{
if(wrap_polygon.relativeArrPoints.length > 3)
{
if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : AscCommon.changestype_2_Element_and_Type , Element : selection.wrapPolygonSelection.parent.Get_ParentParagraph(), CheckType : AscCommon.changestype_Paragraph_Content}))
if(false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : AscCommon.changestype_2_Element_and_Type , Element : selection.wrapPolygonSelection.parent.Get_ParentParagraph(), CheckType : AscCommon.changestype_Paragraph_Content}))
{
History.Create_NewPoint(AscDFH.historydescription_Document_EditWrapPolygon);
var new_rel_array = [].concat(wrap_polygon.relativeArrPoints);
......@@ -535,7 +535,7 @@ MoveInlineObject.prototype =
var new_check_paragraph = this.majorObject.parent.checkShapeChildAndGetTopParagraph(this.InlinePos.Paragraph);
if(parent_paragraph !== new_check_paragraph)
check_paragraphs.push(new_check_paragraph);
if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : check_paragraphs, CheckType : AscCommon.changestype_Paragraph_Content}, true))
if(false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : check_paragraphs, CheckType : AscCommon.changestype_Paragraph_Content}, true))
{
History.Create_NewPoint(AscDFH.historydescription_Document_MoveInlineObject);
this.majorObject.parent.OnEnd_MoveInline(this.InlinePos);
......@@ -544,7 +544,7 @@ MoveInlineObject.prototype =
else
{
check_paragraphs.push(this.majorObject.parent.checkShapeChildAndGetTopParagraph(this.InlinePos.Paragraph));
if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : check_paragraphs, CheckType : AscCommon.changestype_Paragraph_Content}, true))
if(false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : check_paragraphs, CheckType : AscCommon.changestype_Paragraph_Content}, true))
{
History.Create_NewPoint(AscDFH.historydescription_Document_CopyAndMoveInlineObject);
var new_para_drawing = new ParaDrawing(this.majorObject.parent.Extent.W, this.majorObject.parent.Extent.H, null, this.drawingObjects.drawingDocument, null, null);
......@@ -633,8 +633,6 @@ RotateState.prototype =
},
onMouseUp: function(e, x, y, pageIndex)
{
if(editor.isViewMode === false)
{
var bounds;
if(this.majorObject.parent.Is_Inline())
......@@ -673,7 +671,7 @@ RotateState.prototype =
else
AscFormat.checkObjectInArray(aCheckParagraphs, aParentParagraphs[i]);
}
if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : aCheckParagraphs, CheckType : AscCommon.changestype_Paragraph_Content}))
if(false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : aCheckParagraphs, CheckType : AscCommon.changestype_Paragraph_Content}))
{
this.drawingObjects.resetSelection();
History.Create_NewPoint(AscDFH.historydescription_Document_RotateFlowDrawingCtrl);
......@@ -715,7 +713,7 @@ RotateState.prototype =
}
}
}
if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : aCheckParagraphs, CheckType : AscCommon.changestype_Paragraph_Content}, bNoNeedCheck))
if(false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : aCheckParagraphs, CheckType : AscCommon.changestype_Paragraph_Content}, bNoNeedCheck))
{
History.Create_NewPoint(AscDFH.historydescription_Document_RotateFlowDrawingNoCtrl);
if(bMoveState){
......@@ -771,7 +769,6 @@ RotateState.prototype =
}
}
}
}
this.drawingObjects.changeCurrentState(new NullState(this.drawingObjects));
this.drawingObjects.clearTrackObjects();
this.drawingObjects.updateOverlay();
......@@ -1290,7 +1287,7 @@ MoveInGroupState.prototype =
this.group.parent.Set_XY(this.group.posX + posX, this.group.posY + posY, check_paragraphs[0], this.group.parent.pageIndex, false);
check_paragraphs.length = 0;
}
if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : check_paragraphs, CheckType : AscCommon.changestype_Paragraph_Content}))
if(false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : check_paragraphs, CheckType : AscCommon.changestype_Paragraph_Content}))
{
this.drawingObjects.document.Recalculate();
}
......@@ -1616,7 +1613,7 @@ ChangeWrapContour.prototype.onMouseMove = function(e, x, y, pageIndex)
};
ChangeWrapContour.prototype.onMouseUp = function(e, x, y, pageIndex)
{
if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props))
if(false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props))
{
History.Create_NewPoint(AscDFH.historydescription_Document_ChangeWrapContour);
var calc_points = [], calc_points2 = [], i;
......@@ -1711,7 +1708,7 @@ ChangeWrapContourAddPoint.prototype.onMouseMove = function(e, x, y, pageIndex)
};
ChangeWrapContourAddPoint.prototype.onMouseUp = function(e, x, y, pageIndex)
{
if(false === editor.isViewMode && false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props))
if(false === this.drawingObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props))
{
History.Create_NewPoint(AscDFH.historydescription_Document_ChangeWrapContourAddPoint);
var calc_points = [], calc_points2 = [], i;
......
......@@ -258,7 +258,7 @@ CGraphicObjects.prototype =
isViewMode: function()
{
return editor.isViewMode;
return this.document.IsViewMode();
},
convertPixToMM: function(v)
......@@ -2657,7 +2657,7 @@ CGraphicObjects.prototype =
unGroupSelectedObjects: function()
{
if(!(editor.isViewMode === false))
if(!(this.isViewMode() === false))
return;
var bTrackRevisions = false;
if(this.document.TrackRevisions){
......@@ -2784,11 +2784,6 @@ CGraphicObjects.prototype =
return false;
},
isViewMod: function()
{
return editor.isViewMode;
},
moveSelectedObjects: DrawingObjectsController.prototype.moveSelectedObjects,
cursorMoveLeft: DrawingObjectsController.prototype.cursorMoveLeft,
......
......@@ -1931,6 +1931,7 @@ function CPresentationBullet()
this.m_oColor = { r : 0, g : 0, b : 0, a: 255 }; // Цвет
this.m_bColorTx = true; // Использовать ли цвет первого рана в параграфе
this.Unifill = null;
this.m_sFont = "Arial"; // Шрифт
this.m_bFontTx = true; // Использовать ли шрифт первого рана в параграфе
......@@ -1942,19 +1943,22 @@ function CPresentationBullet()
this.m_oTextPr = null;
this.m_nNum = null;
this.m_sString = null;
}
this.Get_Type = function()
{
CPresentationBullet.prototype.Get_Type = function()
{
return this.m_nType;
};
};
this.Get_StartAt = function()
{
CPresentationBullet.prototype.Get_StartAt = function()
{
return this.m_nStartAt;
};
};
this.Measure = function(Context, FirstTextPr, _Num, Theme)
{
CPresentationBullet.prototype.Measure = function(Context, FirstTextPr, _Num, Theme, ColorMap)
{
var dFontSize = FirstTextPr.FontSize;
if ( false === this.m_bSizeTx )
{
......@@ -1998,10 +2002,22 @@ function CPresentationBullet()
FirstTextPr_.Underline = false;
}
if ( true === this.m_bColorTx || !this.Unifill)
{
if(FirstTextPr.Unifill)
{
this.Unifill = FirstTextPr_.Unifill;
}
else
{
this.Unifill = AscFormat.CreateUniColorRGB(FirstTextPr.Color.r, FirstTextPr.Color.g, FirstTextPr.Color.b);
}
}
var TextPr_ = new CTextPr();
TextPr_.Set_FromObject({
RFonts: RFonts,
Unifill: this.Unifill,
FontSize : dFontSize,
Bold : ( this.m_nType >= numbering_presentationnumfrmt_ArabicPeriod ? FirstTextPr.Bold : false ),
Italic : ( this.m_nType >= numbering_presentationnumfrmt_ArabicPeriod ? FirstTextPr.Italic : false )
......@@ -2015,6 +2031,8 @@ function CPresentationBullet()
var X = 0;
var OldTextPr = Context.GetTextPr();
......@@ -2100,10 +2118,10 @@ function CPresentationBullet()
Context.SetTextPr( OldTextPr, Theme );
}
return { Width : X };
};
};
this.Copy = function()
{
CPresentationBullet.prototype.Copy = function()
{
var Bullet = new CPresentationBullet();
Bullet.m_nType = this.m_nType;
......@@ -2123,31 +2141,13 @@ function CPresentationBullet()
Bullet.m_bSizePct = this.m_bSizePct;
return Bullet;
};
};
this.Draw = function(X, Y, Context, FirstTextPr, PDSE)
{
CPresentationBullet.prototype.Draw = function(X, Y, Context, FirstTextPr, PDSE)
{
if ( null === this.m_oTextPr || null === this.m_nNum || null == this.m_sString || this.m_sString.length == 0)
return;
var oColor = { r : this.m_oColor.r, g : this.m_oColor.g, b : this.m_oColor.b, a : this.m_oColor.a};
if ( true === this.m_bColorTx )
{
if(FirstTextPr.Unifill)
{
FirstTextPr.Unifill.check(PDSE.Theme, PDSE.ColorMap);
var RGBA = FirstTextPr.Unifill.getRGBAColor();
oColor.r = RGBA.R;
oColor.g = RGBA.G;
oColor.b = RGBA.B;
}
else
{
oColor.r = FirstTextPr.Color.r;
oColor.g = FirstTextPr.Color.g;
oColor.b = FirstTextPr.Color.b;
}
}
var OldTextPr = Context.GetTextPr();
......@@ -2160,18 +2160,21 @@ function CPresentationBullet()
var sT = this.m_sString;
var FontSlot = g_font_detector.Get_FontClass( sT.charCodeAt(0), Hint, lcid, bCS, bRTL );
var _OldUniFill = this.m_oTextPr.Unifill;
if(Context.Start_Command){
this.m_oTextPr.Unifill = AscFormat.CreateUnfilFromRGB(oColor.r, oColor.g, oColor.b);
if(this.m_oTextPr.Unifill){
this.m_oTextPr.Unifill.check(PDSE.Theme, PDSE.ColorMap);
}
Context.SetTextPr( this.m_oTextPr, PDSE.Theme );
Context.SetFontSlot( FontSlot );
if(!Context.Start_Command){
Context.p_color( oColor.r, oColor.g, oColor.b, 255 );
Context.b_color1( oColor.r, oColor.g, oColor.b, 255 );
if(this.m_oTextPr.Unifill){
var RGBA = this.m_oTextPr.Unifill.getRGBAColor();
this.m_oColor.r = RGBA.R;
this.m_oColor.g = RGBA.G;
this.m_oColor.b = RGBA.B;
}
else{
this.m_oTextPr.Unifill = _OldUniFill;
Context.p_color( this.m_oColor.r, this.m_oColor.g, this.m_oColor.b, 255 );
Context.b_color1( this.m_oColor.r, this.m_oColor.g, this.m_oColor.b, 255 );
}
g_oTextMeasurer.SetTextPr( this.m_oTextPr, PDSE.Theme );
g_oTextMeasurer.SetFontSlot( FontSlot );
......@@ -2192,72 +2195,7 @@ function CPresentationBullet()
{
g_oTextMeasurer.SetTextPr( OldTextPr2, PDSE.Theme );
}
};
this.Write_ToBinary = function(Writer)
{
// Long : m_nType
// Long : m_nStartAt (-1 == null)
// String : m_sChar ("" == null)
// Byte : m_oColor.r
// Byte : m_oColor.g
// Byte : m_oColor.b
// Bool : m_bColorTx
// String : m_sFont
// Bool : m_bFont
// Double : m_dSize
// Bool : m_bSizeTx
// Bool : m_bSizePct
Writer.WriteLong( this.m_nType );
Writer.WriteLong( ( null != this.m_nStartAt ? this.m_nStartAt : -1 ) );
Writer.WriteString2( ( null != this.m_sChar ? this.m_sChar : "" ) );
Writer.WriteByte( this.m_oColor.r );
Writer.WriteByte( this.m_oColor.g );
Writer.WriteByte( this.m_oColor.b );
Writer.WriteBool( this.m_bColorTx );
Writer.WriteString2( this.m_sFont );
Writer.WriteBool( this.m_bFontTx );
Writer.WriteDouble( this.m_dSize );
Writer.WriteBool( this.m_bSizeTx );
Writer.WriteBool( this.m_bSizePct );
};
this.Read_FromBinary = function(Reader)
{
// Long : m_nType
// Long : m_nStartAt (-1 == null)
// String : m_sChar ("" == null)
// Byte : m_oColor.r
// Byte : m_oColor.g
// Byte : m_oColor.b
// Bool : m_bColorTx
// String : m_sFont
// Bool : m_bFont
// Double : m_dSize
// Bool : m_bSizeTx
// Bool : m_bSizePct
this.m_nType = Reader.GetLong();
this.m_nStartAt = Reader.GetLong();
if ( -1 === this.m_nStartAt )
this.m_nStartAt = null;
this.m_sChar = Reader.GetString2();
if ( "" === this.m_sChar )
this.m_sChar = null;
this.m_oColor.r = Reader.GetByte();
this.m_oColor.g = Reader.GetByte();
this.m_oColor.b = Reader.GetByte();
this.m_bColorTx = Reader.GetBool();
this.m_sFont = Reader.GetString2();
this.m_bFontTx = Reader.GetBool();
this.m_dSize = Reader.GetDouble();
this.m_bSizeTx = Reader.GetBool();
this.m_bSizePct = Reader.GetBool();
};
}
};
function getNumInfoLvl(Lvl) {
var NumType = -1;
......
......@@ -2989,7 +2989,7 @@ CParagraphRecalculateStateWrap.prototype =
NumberingItem.Bullet = Bullet;
NumberingItem.BulletNum = BulletNum + 1;
NumberingItem.Measure(g_oTextMeasurer, FirstTextPr, Para.Get_Theme());
NumberingItem.Measure(g_oTextMeasurer, FirstTextPr, Para.Get_Theme(), Para.Get_ColorMap());
if ( numbering_presentationnumfrmt_None != Bullet.Get_Type() )
......
......@@ -9340,8 +9340,27 @@ CParaPr.prototype =
this.DefaultRunPr.Merge(ParaPr.DefaultRunPr);
}
if( undefined != ParaPr.Bullet && ParaPr.Bullet.isBullet())
if(undefined != ParaPr.Bullet)
{
if(ParaPr.Bullet.isBullet())
{
this.Bullet = ParaPr.Bullet.createDuplicate();
}
else
{
if(this.Bullet && this.Bullet.isBullet()){
if(ParaPr.Bullet.bulletColor){
this.Bullet.bulletColor = ParaPr.Bullet.bulletColor.createDuplicate();
}
if(ParaPr.Bullet.bulletSize){
this.Bullet.bulletSize = ParaPr.Bullet.bulletSize.createDuplicate();
}
if(ParaPr.Bullet.bulletTypeface){
this.Bullet.bulletTypeface = ParaPr.Bullet.bulletTypeface.createDuplicate();
}
}
}
}
if(undefined != ParaPr.Lvl)
this.Lvl = ParaPr.Lvl;
......@@ -9956,11 +9975,6 @@ CParaPr.prototype =
{
Bullet.m_sChar = "";
}
if(this.Bullet.bulletTypeface && this.Bullet.bulletTypeface.type == AscFormat.BULLET_TYPE_TYPEFACE_BUFONT)
{
Bullet.m_bFontTx = false;
Bullet.m_sFont = this.Bullet.bulletTypeface.typeface;
}
break;
}
......@@ -9968,11 +9982,6 @@ CParaPr.prototype =
{
Bullet.m_nType = g_NumberingArr[this.Bullet.bulletType.AutoNumType];
Bullet.m_nStartAt = this.Bullet.bulletType.startAt;
if(this.Bullet.bulletTypeface && this.Bullet.bulletTypeface.type == AscFormat.BULLET_TYPE_TYPEFACE_BUFONT)
{
Bullet.m_bFontTx = false;
Bullet.m_sFont = this.Bullet.bulletTypeface.typeface;
}
break;
}
case AscFormat.BULLET_TYPE_BULLET_NONE :
......@@ -9995,10 +10004,36 @@ CParaPr.prototype =
if(this.Bullet.bulletColor.type === AscFormat.BULLET_TYPE_COLOR_CLR){
if(this.Bullet.bulletColor.UniColor && this.Bullet.bulletColor.UniColor.color && theme && colorMap){
Bullet.m_bColorTx = false;
this.Bullet.bulletColor.UniColor.check(theme, colorMap);
Bullet.m_oColor.r = this.Bullet.bulletColor.UniColor.RGBA.R;
Bullet.m_oColor.g = this.Bullet.bulletColor.UniColor.RGBA.G;
Bullet.m_oColor.b = this.Bullet.bulletColor.UniColor.RGBA.B;
Bullet.Unifill = AscFormat.CreateUniFillByUniColor(this.Bullet.bulletColor.UniColor);
}
}
}
if(this.Bullet.bulletTypeface)
{
if(this.Bullet.bulletTypeface.type == AscFormat.BULLET_TYPE_TYPEFACE_BUFONT){
Bullet.m_bFontTx = false;
Bullet.m_sFont = this.Bullet.bulletTypeface.typeface;
}
}
if(this.Bullet.bulletSize)
{
switch (this.Bullet.bulletSize.type){
case AscFormat.BULLET_TYPE_SIZE_TX:{
Bullet.m_bSizeTx = true;
break;
}
case AscFormat.BULLET_TYPE_SIZE_PCT:{
Bullet.m_bSizeTx = false;
Bullet.m_bSizePct = true;
Bullet.m_dSize = this.Bullet.bulletSize.val/100000.0;
break;
}
case AscFormat.BULLET_TYPE_SIZE_PCT:{
Bullet.m_bSizeTx = false;
Bullet.m_bSizePct = false;
Bullet.m_dSize = this.Bullet.bulletSize.val/100000.0;
break;
}
}
}
......
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