Commit ca761146 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баг с изменением шрифта внутри буквицы (баг 20333).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49692 954022d7-b5bf-4e40-9824-e11837661b57
parent 813e7d78
......@@ -138,6 +138,9 @@ var ASC_DOCS_API_USE_OPEN_SOURCE_FONTS_ONLY = false;
this.bIsLoadDocumentFirst = false;
this.currentInfoLoaded = null;
this.loadFontCallBack = null;
this.loadFontCallBackArgs = null;
// embedded_cut_fonts
this.embedded_cut_manager = new CEmbeddedCutFontsLoader();
......@@ -437,7 +440,7 @@ var ASC_DOCS_API_USE_OPEN_SOURCE_FONTS_ONLY = false;
}
}
this.LoadFont = function(fontinfo)
this.LoadFont = function(fontinfo, loadFontCallBack, loadFontCallBackArgs)
{
this.currentInfoLoaded = fontinfo;
......@@ -446,6 +449,17 @@ var ASC_DOCS_API_USE_OPEN_SOURCE_FONTS_ONLY = false;
var IsNeed = this.currentInfoLoaded.CheckFontLoadStyles(this);
if ( undefined === loadFontCallBack )
{
this.loadFontCallBack = this.Api.asyncFontEndLoaded;
this.loadFontCallBackArgs = this.currentInfoLoaded;
}
else
{
this.loadFontCallBack = loadFontCallBack;
this.loadFontCallBackArgs = loadFontCallBackArgs;
}
if (IsNeed)
{
this.Api.asyncFontStartLoaded();
......@@ -472,7 +486,7 @@ var ASC_DOCS_API_USE_OPEN_SOURCE_FONTS_ONLY = false;
}
else
{
oThis.Api.asyncFontEndLoaded(oThis.currentInfoLoaded);
oThis.loadFontCallBack.call( oThis.Api, oThis.loadFontCallBackArgs );
oThis.currentInfoLoaded = null;
}
}
......
......@@ -1796,11 +1796,44 @@ CParagraphFrame.prototype.put_FromDropCapMenu = function (v) { this.FromDropCapM
asc_docs_api.prototype.put_FramePr = function(Obj)
{
if ( undefined != Obj.FontFamily )
{
var name = Obj.FontFamily;
Obj.FontFamily = new CTextFontFamily( { Name : Obj.FontFamily, Index : -1 } );
var loader = window.g_font_loader;
var nIndex = loader.map_font_index[name];
var fontinfo = loader.fontInfos[nIndex];
var isasync = loader.LoadFont(fontinfo, editor.asyncFontEndLoaded_DropCap, Obj);
if (false === isasync)
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Properties) )
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Set_ParagraphFramePr( Obj );
}
}
}
else
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Properties) )
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Set_ParagraphFramePr( Obj );
}
}
}
asc_docs_api.prototype.asyncFontEndLoaded_DropCap = function(Obj)
{
this.sync_EndAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadFont);
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Properties) )
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Set_ParagraphFramePr( Obj );
}
// отжать заморозку меню
}
asc_docs_api.prototype.asc_addDropCap = function(bInText)
......
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