Commit 390f264b authored by Alexey.Golubev's avatar Alexey.Golubev Committed by Alexander.Trofimov

Исправлена проблема разночтения свойств и объектов возникающая при минимизации.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52123 954022d7-b5bf-4e40-9824-e11837661b57
parent 7c09a278
...@@ -684,22 +684,22 @@ function CDefaultFont() ...@@ -684,22 +684,22 @@ function CDefaultFont()
this.m_arrDefaultFont = new Array(4); this.m_arrDefaultFont = new Array(4);
this.SetDefaultFont = function(sFamilyName) this.SetDefaultFont = function(sFamilyName)
{ {
var fontInfo = g_font_infos[map_font_index[sFamilyName]]; var fontInfo = window.g_font_infos[map_font_index[sFamilyName]];
var font = null; var font = null;
font = g_font_infos[fontInfo.indexR]; font = window.g_font_infos[fontInfo.indexR];
this.m_arrDefaultFont[0] = this.m_oLibrary.LoadFont(font.stream_index, font.id, fontInfo.faceIndexR); this.m_arrDefaultFont[0] = this.m_oLibrary.LoadFont(font.stream_index, font.id, fontInfo.faceIndexR);
this.m_arrDefaultFont[0].UpdateStyles(false, false); this.m_arrDefaultFont[0].UpdateStyles(false, false);
font = g_font_infos[fontInfo.indexB]; font = window.g_font_infos[fontInfo.indexB];
this.m_arrDefaultFont[1] = this.m_oLibrary.LoadFont(font.stream_index, font.id, fontInfo.faceIndexB); this.m_arrDefaultFont[1] = this.m_oLibrary.LoadFont(font.stream_index, font.id, fontInfo.faceIndexB);
this.m_arrDefaultFont[1].UpdateStyles(true, false); this.m_arrDefaultFont[1].UpdateStyles(true, false);
font = g_font_infos[fontInfo.indexI]; font = window.g_font_infos[fontInfo.indexI];
this.m_arrDefaultFont[2] = this.m_oLibrary.LoadFont(font.stream_index, font.id, fontInfo.faceIndexI); this.m_arrDefaultFont[2] = this.m_oLibrary.LoadFont(font.stream_index, font.id, fontInfo.faceIndexI);
this.m_arrDefaultFont[2].UpdateStyles(false, true); this.m_arrDefaultFont[2].UpdateStyles(false, true);
font = g_font_infos[fontInfo.indexBI]; font = window.g_font_infos[fontInfo.indexBI];
this.m_arrDefaultFont[3] = this.m_oLibrary.LoadFont(font.stream_index, font.id, fontInfo.faceIndexBI); this.m_arrDefaultFont[3] = this.m_oLibrary.LoadFont(font.stream_index, font.id, fontInfo.faceIndexBI);
this.m_arrDefaultFont[3].UpdateStyles(true, true); this.m_arrDefaultFont[3].UpdateStyles(true, true);
} }
......
...@@ -867,7 +867,7 @@ DrawingContext.prototype = { ...@@ -867,7 +867,7 @@ DrawingContext.prototype = {
if (font.FontFamily.Index === undefined || if (font.FontFamily.Index === undefined ||
font.FontFamily.Index === null || font.FontFamily.Index === null ||
font.FontFamily.Index === -1) { font.FontFamily.Index === -1) {
font.FontFamily.Index = g_map_font_index[font.FontFamily.Name]; font.FontFamily.Index = window.g_map_font_index[font.FontFamily.Name];
} }
this.font.copyFrom(font); this.font.copyFrom(font);
...@@ -884,14 +884,14 @@ DrawingContext.prototype = { ...@@ -884,14 +884,14 @@ DrawingContext.prototype = {
fontStyle = FontStyle.FontStyleBoldItalic; fontStyle = FontStyle.FontStyleBoldItalic;
if (angle && 0 != angle) { if (angle && 0 != angle) {
r = g_font_infos[ font.FontFamily.Index ].LoadFont( r = window.g_font_infos[ font.FontFamily.Index ].LoadFont(
g_font_loader, this.fmgrGraphics[1], font.FontSize, fontStyle, this.ppiX, this.ppiY); window.g_font_loader, this.fmgrGraphics[1], font.FontSize, fontStyle, this.ppiX, this.ppiY);
this.fmgrGraphics[1].SetTextMatrix( this.fmgrGraphics[1].SetTextMatrix(
this._mt.sx, this._mt.shy, this._mt.shx, this._mt.sy, this._mt.tx, this._mt.ty); this._mt.sx, this._mt.shy, this._mt.shx, this._mt.sy, this._mt.tx, this._mt.ty);
} else { } else {
r = g_font_infos[ font.FontFamily.Index ].LoadFont( r = window.g_font_infos[ font.FontFamily.Index ].LoadFont(
g_font_loader, this.fmgrGraphics[0], font.FontSize, fontStyle, this.ppiX, this.ppiY); window.g_font_loader, this.fmgrGraphics[0], font.FontSize, fontStyle, this.ppiX, this.ppiY);
} }
if (r === false) { if (r === false) {
......
...@@ -107,7 +107,7 @@ CDrawingContextWord.prototype = ...@@ -107,7 +107,7 @@ CDrawingContextWord.prototype =
if (font.FontFamily.Index === undefined || if (font.FontFamily.Index === undefined ||
font.FontFamily.Index === null || font.FontFamily.Index === null ||
font.FontFamily.Index === -1) { font.FontFamily.Index === -1) {
font.FontFamily.Index = g_map_font_index[font.FontFamily.Name]; font.FontFamily.Index = window.g_map_font_index[font.FontFamily.Name];
} }
italic = true === font.Italic; italic = true === font.Italic;
...@@ -127,14 +127,14 @@ CDrawingContextWord.prototype = ...@@ -127,14 +127,14 @@ CDrawingContextWord.prototype =
if (angle && 0 != angle) if (angle && 0 != angle)
{ {
r = g_font_infos[ font.FontFamily.Index ].LoadFont( r = window.g_font_infos[ font.FontFamily.Index ].LoadFont(
g_font_loader, fm, font.FontSize, fontStyle, this.Graphics.m_dDpiX, this.Graphics.m_dDpiY, this.Graphics.m_oTransform); window.g_font_loader, fm, font.FontSize, fontStyle, this.Graphics.m_dDpiX, this.Graphics.m_dDpiY, this.Graphics.m_oTransform);
} }
else else
{ {
r = g_font_infos[ font.FontFamily.Index ].LoadFont( r = window.g_font_infos[ font.FontFamily.Index ].LoadFont(
g_font_loader, fm, font.FontSize, fontStyle, this.Graphics.m_dDpiX, this.Graphics.m_dDpiY); window.g_font_loader, fm, font.FontSize, fontStyle, this.Graphics.m_dDpiX, this.Graphics.m_dDpiY);
} }
if (r === false) { if (r === false) {
......
...@@ -162,7 +162,7 @@ function CTextMeasurer() ...@@ -162,7 +162,7 @@ function CTextMeasurer()
this.m_oFont = font; this.m_oFont = font;
if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index) if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index)
font.FontFamily.Index = g_map_font_index[font.FontFamily.Name]; font.FontFamily.Index = window.g_map_font_index[font.FontFamily.Name];
if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1) if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1)
return; return;
...@@ -185,7 +185,7 @@ function CTextMeasurer() ...@@ -185,7 +185,7 @@ function CTextMeasurer()
_lastSetUp.SetUpSize = font.FontSize; _lastSetUp.SetUpSize = font.FontSize;
_lastSetUp.SetUpStyle = oFontStyle; _lastSetUp.SetUpStyle = oFontStyle;
g_font_infos[_lastSetUp.SetUpIndex].LoadFont(g_font_loader, this.m_oManager, _lastSetUp.SetUpSize, _lastSetUp.SetUpStyle, 72, 72); window.g_font_infos[_lastSetUp.SetUpIndex].LoadFont(window.g_font_loader, this.m_oManager, _lastSetUp.SetUpSize, _lastSetUp.SetUpStyle, 72, 72);
} }
} }
...@@ -208,7 +208,7 @@ function CTextMeasurer() ...@@ -208,7 +208,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -224,7 +224,7 @@ function CTextMeasurer() ...@@ -224,7 +224,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSizeCS; _lastFont.Size = this.m_oTextPr.FontSizeCS;
...@@ -240,7 +240,7 @@ function CTextMeasurer() ...@@ -240,7 +240,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -257,7 +257,7 @@ function CTextMeasurer() ...@@ -257,7 +257,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -283,7 +283,7 @@ function CTextMeasurer() ...@@ -283,7 +283,7 @@ function CTextMeasurer()
_lastFont.SetUpSize = _lastFont.Size; _lastFont.SetUpSize = _lastFont.Size;
_lastFont.SetUpStyle = _style; _lastFont.SetUpStyle = _style;
g_font_infos[_lastFont.SetUpIndex].LoadFont(g_font_loader, this.m_oManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, 72, 72); window.g_font_infos[_lastFont.SetUpIndex].LoadFont(window.g_font_loader, this.m_oManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, 72, 72);
} }
} }
......
...@@ -1056,7 +1056,7 @@ CGraphics.prototype = ...@@ -1056,7 +1056,7 @@ CGraphics.prototype =
}, },
font : function(font_id,font_size,matrix) font : function(font_id,font_size,matrix)
{ {
g_font_infos[g_map_font_index[font_id]].LoadFont(editor.FontLoader, this.m_oFontManager, font_size, 0, this.m_dDpiX, this.m_dDpiY, /*matrix*/undefined); window.g_font_infos[window.g_map_font_index[font_id]].LoadFont(editor.FontLoader, this.m_oFontManager, font_size, 0, this.m_dDpiX, this.m_dDpiY, /*matrix*/undefined);
}, },
SetFont : function(font) SetFont : function(font)
{ {
...@@ -1077,7 +1077,7 @@ CGraphics.prototype = ...@@ -1077,7 +1077,7 @@ CGraphics.prototype =
}; };
if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index) if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index)
font.FontFamily.Index = g_map_font_index[font.FontFamily.Name]; font.FontFamily.Index = window.g_map_font_index[font.FontFamily.Name];
if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1) if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1)
return; return;
...@@ -1097,7 +1097,7 @@ CGraphics.prototype = ...@@ -1097,7 +1097,7 @@ CGraphics.prototype =
this.m_oLastFont.SetUpSize = font.FontSize; this.m_oLastFont.SetUpSize = font.FontSize;
this.m_oLastFont.SetUpStyle = oFontStyle; this.m_oLastFont.SetUpStyle = oFontStyle;
g_font_infos[font.FontFamily.Index].LoadFont(g_font_loader, this.m_oFontManager, font.FontSize, oFontStyle, this.m_dDpiX, this.m_dDpiY, this.m_oTransform); window.g_font_infos[font.FontFamily.Index].LoadFont(window.g_font_loader, this.m_oFontManager, font.FontSize, oFontStyle, this.m_dDpiX, this.m_dDpiY, this.m_oTransform);
var _mD = this.m_oLastFont.SetUpMatrix; var _mD = this.m_oLastFont.SetUpMatrix;
var _mS = this.m_oTransform; var _mS = this.m_oTransform;
...@@ -1132,7 +1132,7 @@ CGraphics.prototype = ...@@ -1132,7 +1132,7 @@ CGraphics.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -1148,7 +1148,7 @@ CGraphics.prototype = ...@@ -1148,7 +1148,7 @@ CGraphics.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSizeCS; _lastFont.Size = this.m_oTextPr.FontSizeCS;
...@@ -1164,7 +1164,7 @@ CGraphics.prototype = ...@@ -1164,7 +1164,7 @@ CGraphics.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -1181,7 +1181,7 @@ CGraphics.prototype = ...@@ -1181,7 +1181,7 @@ CGraphics.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -1207,7 +1207,7 @@ CGraphics.prototype = ...@@ -1207,7 +1207,7 @@ CGraphics.prototype =
_lastFont.SetUpSize = _lastFont.Size; _lastFont.SetUpSize = _lastFont.Size;
_lastFont.SetUpStyle = _style; _lastFont.SetUpStyle = _style;
g_font_infos[_lastFont.SetUpIndex].LoadFont(g_font_loader, this.m_oFontManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, this.m_dDpiX, this.m_dDpiY, this.m_oTransform); window.g_font_infos[_lastFont.SetUpIndex].LoadFont(window.g_font_loader, this.m_oFontManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, this.m_dDpiX, this.m_dDpiY, this.m_oTransform);
} }
else else
{ {
......
...@@ -118,7 +118,7 @@ CTextMeasurer.prototype = ...@@ -118,7 +118,7 @@ CTextMeasurer.prototype =
this.m_oFont = font; this.m_oFont = font;
if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index) if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index)
font.FontFamily.Index = g_map_font_index[font.FontFamily.Name]; font.FontFamily.Index = window.g_map_font_index[font.FontFamily.Name];
if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1) if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1)
return; return;
...@@ -134,7 +134,7 @@ CTextMeasurer.prototype = ...@@ -134,7 +134,7 @@ CTextMeasurer.prototype =
else if ( bItalic && bBold ) else if ( bItalic && bBold )
oFontStyle = FontStyle.FontStyleBoldItalic; oFontStyle = FontStyle.FontStyleBoldItalic;
g_font_infos[font.FontFamily.Index].LoadFont(g_font_loader, this.m_oManager, font.FontSize, oFontStyle, 72, 72); window.g_font_infos[font.FontFamily.Index].LoadFont(window.g_font_loader, this.m_oManager, font.FontSize, oFontStyle, 72, 72);
}, },
SetTextPr: function(textPr) SetTextPr: function(textPr)
...@@ -156,7 +156,7 @@ CTextMeasurer.prototype = ...@@ -156,7 +156,7 @@ CTextMeasurer.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -172,7 +172,7 @@ CTextMeasurer.prototype = ...@@ -172,7 +172,7 @@ CTextMeasurer.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSizeCS; _lastFont.Size = this.m_oTextPr.FontSizeCS;
...@@ -188,7 +188,7 @@ CTextMeasurer.prototype = ...@@ -188,7 +188,7 @@ CTextMeasurer.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -205,7 +205,7 @@ CTextMeasurer.prototype = ...@@ -205,7 +205,7 @@ CTextMeasurer.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -231,7 +231,7 @@ CTextMeasurer.prototype = ...@@ -231,7 +231,7 @@ CTextMeasurer.prototype =
_lastFont.SetUpSize = _lastFont.Size; _lastFont.SetUpSize = _lastFont.Size;
_lastFont.SetUpStyle = _style; _lastFont.SetUpStyle = _style;
g_font_infos[_lastFont.SetUpIndex].LoadFont(g_font_loader, this.m_oManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, 72, 72); window.g_font_infos[_lastFont.SetUpIndex].LoadFont(window.g_font_loader, this.m_oManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, 72, 72);
} }
}, },
...@@ -299,7 +299,7 @@ function CTextMeasurer() ...@@ -299,7 +299,7 @@ function CTextMeasurer()
this.m_oFont = font; this.m_oFont = font;
if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index) if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index)
font.FontFamily.Index = g_map_font_index[font.FontFamily.Name]; font.FontFamily.Index = window.g_map_font_index[font.FontFamily.Name];
if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1) if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1)
return; return;
...@@ -322,7 +322,7 @@ function CTextMeasurer() ...@@ -322,7 +322,7 @@ function CTextMeasurer()
_lastSetUp.SetUpSize = font.FontSize; _lastSetUp.SetUpSize = font.FontSize;
_lastSetUp.SetUpStyle = oFontStyle; _lastSetUp.SetUpStyle = oFontStyle;
g_font_infos[_lastSetUp.SetUpIndex].LoadFont(g_font_loader, this.m_oManager, _lastSetUp.SetUpSize, _lastSetUp.SetUpStyle, 72, 72); window.g_font_infos[_lastSetUp.SetUpIndex].LoadFont(window.g_font_loader, this.m_oManager, _lastSetUp.SetUpSize, _lastSetUp.SetUpStyle, 72, 72);
} }
} }
...@@ -345,7 +345,7 @@ function CTextMeasurer() ...@@ -345,7 +345,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -361,7 +361,7 @@ function CTextMeasurer() ...@@ -361,7 +361,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSizeCS; _lastFont.Size = this.m_oTextPr.FontSizeCS;
...@@ -377,7 +377,7 @@ function CTextMeasurer() ...@@ -377,7 +377,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -394,7 +394,7 @@ function CTextMeasurer() ...@@ -394,7 +394,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -420,7 +420,7 @@ function CTextMeasurer() ...@@ -420,7 +420,7 @@ function CTextMeasurer()
_lastFont.SetUpSize = _lastFont.Size; _lastFont.SetUpSize = _lastFont.Size;
_lastFont.SetUpStyle = _style; _lastFont.SetUpStyle = _style;
g_font_infos[_lastFont.SetUpIndex].LoadFont(g_font_loader, this.m_oManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, 72, 72); window.g_font_infos[_lastFont.SetUpIndex].LoadFont(window.g_font_loader, this.m_oManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, 72, 72);
} }
} }
...@@ -3765,7 +3765,7 @@ function CThumbnailsManager() ...@@ -3765,7 +3765,7 @@ function CThumbnailsManager()
this.SetFont = function(font) this.SetFont = function(font)
{ {
if (-1 == font.FontFamily.Index) if (-1 == font.FontFamily.Index)
font.FontFamily.Index = g_map_font_index[font.FontFamily.Name]; font.FontFamily.Index = window.g_map_font_index[font.FontFamily.Name];
if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1) if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1)
return; return;
...@@ -3781,7 +3781,7 @@ function CThumbnailsManager() ...@@ -3781,7 +3781,7 @@ function CThumbnailsManager()
else if ( bItalic && bBold ) else if ( bItalic && bBold )
oFontStyle = FontStyle.FontStyleBoldItalic; oFontStyle = FontStyle.FontStyleBoldItalic;
g_font_infos[font.FontFamily.Index].LoadFont(g_font_loader, this.m_oFontManager, font.FontSize, oFontStyle, 96, 96); window.g_font_infos[font.FontFamily.Index].LoadFont(window.g_font_loader, this.m_oFontManager, font.FontSize, oFontStyle, 96, 96);
} }
this.Init = function() this.Init = function()
......
...@@ -155,7 +155,7 @@ function CTextMeasurer() ...@@ -155,7 +155,7 @@ function CTextMeasurer()
this.m_oFont = font; this.m_oFont = font;
if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index) if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index)
font.FontFamily.Index = g_map_font_index[font.FontFamily.Name]; font.FontFamily.Index = window.g_map_font_index[font.FontFamily.Name];
if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1) if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1)
return; return;
...@@ -178,7 +178,7 @@ function CTextMeasurer() ...@@ -178,7 +178,7 @@ function CTextMeasurer()
_lastSetUp.SetUpSize = font.FontSize; _lastSetUp.SetUpSize = font.FontSize;
_lastSetUp.SetUpStyle = oFontStyle; _lastSetUp.SetUpStyle = oFontStyle;
g_font_infos[_lastSetUp.SetUpIndex].LoadFont(g_font_loader, this.m_oManager, _lastSetUp.SetUpSize, _lastSetUp.SetUpStyle, 72, 72); window.g_font_infos[_lastSetUp.SetUpIndex].LoadFont(window.g_font_loader, this.m_oManager, _lastSetUp.SetUpSize, _lastSetUp.SetUpStyle, 72, 72);
} }
} }
...@@ -201,7 +201,7 @@ function CTextMeasurer() ...@@ -201,7 +201,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -217,7 +217,7 @@ function CTextMeasurer() ...@@ -217,7 +217,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSizeCS; _lastFont.Size = this.m_oTextPr.FontSizeCS;
...@@ -233,7 +233,7 @@ function CTextMeasurer() ...@@ -233,7 +233,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -250,7 +250,7 @@ function CTextMeasurer() ...@@ -250,7 +250,7 @@ function CTextMeasurer()
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -276,7 +276,7 @@ function CTextMeasurer() ...@@ -276,7 +276,7 @@ function CTextMeasurer()
_lastFont.SetUpSize = _lastFont.Size; _lastFont.SetUpSize = _lastFont.Size;
_lastFont.SetUpStyle = _style; _lastFont.SetUpStyle = _style;
g_font_infos[_lastFont.SetUpIndex].LoadFont(g_font_loader, this.m_oManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, 72, 72); window.g_font_infos[_lastFont.SetUpIndex].LoadFont(window.g_font_loader, this.m_oManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, 72, 72);
} }
} }
......
...@@ -585,7 +585,7 @@ CFontInfo.prototype = ...@@ -585,7 +585,7 @@ CFontInfo.prototype =
LoadFont : function(font_loader, fontManager, fEmSize, lStyle, dHorDpi, dVerDpi, transform) LoadFont : function(font_loader, fontManager, fEmSize, lStyle, dHorDpi, dVerDpi, transform)
{ {
// сначала нужно проверить на обрезанный шрифт // сначала нужно проверить на обрезанный шрифт
var _embedded_cur = g_font_loader.embedded_cut_manager; var _embedded_cur = window.g_font_loader.embedded_cut_manager;
if (_embedded_cur.bIsCutFontsUse) if (_embedded_cur.bIsCutFontsUse)
{ {
if (this.Type != FONT_TYPE_ADDITIONAL_CUT) if (this.Type != FONT_TYPE_ADDITIONAL_CUT)
...@@ -594,7 +594,7 @@ CFontInfo.prototype = ...@@ -594,7 +594,7 @@ CFontInfo.prototype =
if (_font_info !== undefined) if (_font_info !== undefined)
{ {
return _font_info.LoadFont(g_font_loader, fontManager, fEmSize, lStyle, dHorDpi, dVerDpi, transform); return _font_info.LoadFont(window.g_font_loader, fontManager, fEmSize, lStyle, dHorDpi, dVerDpi, transform);
} }
} }
} }
...@@ -749,7 +749,7 @@ CFontInfo.prototype = ...@@ -749,7 +749,7 @@ CFontInfo.prototype =
if (_font_info !== undefined) if (_font_info !== undefined)
{ {
return _font_info.LoadFont(g_font_loader, fontManager, fEmSize, lStyle, dHorDpi, dVerDpi, transform); return _font_info.LoadFont(window.g_font_loader, fontManager, fEmSize, lStyle, dHorDpi, dVerDpi, transform);
} }
} }
......
...@@ -1117,7 +1117,7 @@ CGraphics.prototype = ...@@ -1117,7 +1117,7 @@ CGraphics.prototype =
}, },
font : function(font_id,font_size) font : function(font_id,font_size)
{ {
g_font_infos[g_map_font_index[font_id]].LoadFont(editor.FontLoader, this.IsUseFonts2 ? this.m_oFontManager2 : this.m_oFontManager, window.g_font_infos[window.g_map_font_index[font_id]].LoadFont(editor.FontLoader, this.IsUseFonts2 ? this.m_oFontManager2 : this.m_oFontManager,
Math.max(font_size, 1), 0, this.m_dDpiX, this.m_dDpiY, this.m_oTransform); Math.max(font_size, 1), 0, this.m_dDpiX, this.m_dDpiY, this.m_oTransform);
}, },
SetFont : function(font) SetFont : function(font)
...@@ -1139,7 +1139,7 @@ CGraphics.prototype = ...@@ -1139,7 +1139,7 @@ CGraphics.prototype =
}; };
if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index) if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index)
font.FontFamily.Index = g_map_font_index[font.FontFamily.Name]; font.FontFamily.Index = window.g_map_font_index[font.FontFamily.Name];
if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1) if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1)
return; return;
...@@ -1162,7 +1162,7 @@ CGraphics.prototype = ...@@ -1162,7 +1162,7 @@ CGraphics.prototype =
_last_font.SetUpSize = font.FontSize; _last_font.SetUpSize = font.FontSize;
_last_font.SetUpStyle = oFontStyle; _last_font.SetUpStyle = oFontStyle;
g_font_infos[font.FontFamily.Index].LoadFont(g_font_loader, _font_manager, font.FontSize, oFontStyle, this.m_dDpiX, this.m_dDpiY, this.m_oTransform); window.g_font_infos[font.FontFamily.Index].LoadFont(window.g_font_loader, _font_manager, font.FontSize, oFontStyle, this.m_dDpiX, this.m_dDpiY, this.m_oTransform);
var _mD = _last_font.SetUpMatrix; var _mD = _last_font.SetUpMatrix;
var _mS = this.m_oTransform; var _mS = this.m_oTransform;
...@@ -1197,7 +1197,7 @@ CGraphics.prototype = ...@@ -1197,7 +1197,7 @@ CGraphics.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -1213,7 +1213,7 @@ CGraphics.prototype = ...@@ -1213,7 +1213,7 @@ CGraphics.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSizeCS; _lastFont.Size = this.m_oTextPr.FontSizeCS;
...@@ -1229,7 +1229,7 @@ CGraphics.prototype = ...@@ -1229,7 +1229,7 @@ CGraphics.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -1246,7 +1246,7 @@ CGraphics.prototype = ...@@ -1246,7 +1246,7 @@ CGraphics.prototype =
if (_lastFont.Index == -1 || _lastFont.Index === undefined) if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{ {
_lastFont.Index = g_map_font_index[_lastFont.Name]; _lastFont.Index = window.g_map_font_index[_lastFont.Name];
} }
_lastFont.Size = this.m_oTextPr.FontSize; _lastFont.Size = this.m_oTextPr.FontSize;
...@@ -1274,7 +1274,7 @@ CGraphics.prototype = ...@@ -1274,7 +1274,7 @@ CGraphics.prototype =
_lastFont.SetUpSize = _lastFont.Size; _lastFont.SetUpSize = _lastFont.Size;
_lastFont.SetUpStyle = _style; _lastFont.SetUpStyle = _style;
g_font_infos[_lastFont.SetUpIndex].LoadFont(g_font_loader, _font_manager, _lastFont.SetUpSize, _lastFont.SetUpStyle, this.m_dDpiX, this.m_dDpiY, this.m_oTransform); window.g_font_infos[_lastFont.SetUpIndex].LoadFont(window.g_font_loader, _font_manager, _lastFont.SetUpSize, _lastFont.SetUpStyle, this.m_dDpiX, this.m_dDpiY, this.m_oTransform);
var _mD = _lastFont.SetUpMatrix; var _mD = _lastFont.SetUpMatrix;
var _mS = this.m_oTransform; var _mS = this.m_oTransform;
......
...@@ -1186,7 +1186,7 @@ CMetafile.prototype = ...@@ -1186,7 +1186,7 @@ CMetafile.prototype =
return; return;
if (font.FontFamily.Name == "" && 0 <= font.FontFamily.Index) if (font.FontFamily.Name == "" && 0 <= font.FontFamily.Index)
font.FontFamily.Name = g_font_infos[font.FontFamily.Index].Name; font.FontFamily.Name = window.g_font_infos[font.FontFamily.Index].Name;
var style = 0; var style = 0;
if (font.Italic == true) if (font.Italic == true)
......
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