Commit 512a5a54 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55640 954022d7-b5bf-4e40-9824-e11837661b57
parent 6d68bfc2
var g_fontManager2 = null;
function CGrRFonts()
{
this.Ascii = {Name: "Empty", Index: -1};
this.EastAsia = {Name: "Empty", Index: -1};
this.HAnsi = {Name: "Empty", Index: -1};
this.CS = {Name: "Empty", Index: -1};
}
CGrRFonts.prototype =
{
checkFromTheme : function(fontScheme, rFonts)
{
this.Ascii.Name = fontScheme.checkFont(rFonts.Ascii.Name);
this.EastAsia.Name = fontScheme.checkFont(rFonts.EastAsia.Name);
this.HAnsi.Name = fontScheme.checkFont(rFonts.HAnsi.Name);
this.CS.Name = fontScheme.checkFont(rFonts.CS.Name);
this.Ascii.Index = -1;
this.EastAsia.Index = -1;
this.HAnsi.Index = -1;
this.CS.Index = -1;
}
};
function CClipManager()
{
this.clipRects = [];
......@@ -482,6 +505,7 @@ function CGraphics()
// RFonts
this.m_oTextPr = null;
this.m_oGrFonts = new CGrRFonts();
this.m_oLastFont = new CFontSetup();
this.m_bIntegerGrid = true;
......@@ -1180,18 +1204,16 @@ CGraphics.prototype =
SetTextPr : function(textPr, theme)
{
this.m_oTextPr = textPr.Copy();
this.theme = theme;
var FontScheme = theme.themeElements.fontScheme;
this.m_oTextPr.RFonts.Ascii = {Name: FontScheme.checkFont(this.m_oTextPr.RFonts.Ascii.Name), Index: -1};
this.m_oTextPr.RFonts.EastAsia = {Name: FontScheme.checkFont(this.m_oTextPr.RFonts.EastAsia.Name), Index: -1};
this.m_oTextPr.RFonts.HAnsi = {Name: FontScheme.checkFont(this.m_oTextPr.RFonts.HAnsi.Name), Index: -1};
this.m_oTextPr.RFonts.CS = {Name: FontScheme.checkFont(this.m_oTextPr.RFonts.CS.Name), Index: -1};
this.m_oTextPr = textPr;
if (theme)
this.m_oGrFonts.checkFromTheme(theme.themeElements.fontScheme, this.m_oTextPr.RFonts);
else
this.m_oGrFonts = this.m_oTextPr.RFonts;
},
SetFontSlot : function(slot, fontSizeKoef)
{
var _rfonts = this.m_oTextPr.RFonts;
var _rfonts = this.m_oGrFonts;
var _lastFont = this.IsUseFonts2 ? this.m_oLastFont2 : this.m_oLastFont;
switch (slot)
......
......@@ -804,6 +804,7 @@ function CMetafile(width, height)
// RFonts
this.m_oTextPr = null;
this.m_oGrFonts = new CGrRFonts();
this.m_oLastFont = new CFontSetup();
}
......@@ -1308,7 +1309,7 @@ CMetafile.prototype =
SetFontSlot : function(slot, fontSizeKoef)
{
var _rfonts = this.m_oTextPr.RFonts;
var _rfonts = this.m_oGrFonts;
var _lastFont = this.m_oLastFont;
switch (slot)
......@@ -2064,10 +2065,18 @@ CDocumentRenderer.prototype =
this.m_arrayPages[this.m_lPagesCount - 1].endCommand(32);
},
SetTextPr : function(textPr)
SetTextPr : function(textPr, theme)
{
if (0 != this.m_lPagesCount)
this.m_arrayPages[this.m_lPagesCount - 1].m_oTextPr = textPr.Copy();
{
var _page = this.m_arrayPages[this.m_lPagesCount - 1];
_page.m_oTextPr = textPr;
if (theme)
_page.m_oGrFonts.checkFromTheme(theme.themeElements.fontScheme, _page.m_oTextPr.RFonts);
else
_page.m_oGrFonts = _page.m_oTextPr.RFonts;
}
},
SetFontSlot : function(slot, fontSizeKoef)
......
......@@ -184,9 +184,6 @@
<!--Drawings -->
<!-- -->
<script type="text/javascript" src="../../../../OfficeWeb/Word/Drawing/Metafile.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Editor/CollaborativeEditing.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Editor/Comments.js"></script>
......@@ -243,38 +240,6 @@
<!--for charts-->
<script type="text/javascript" src="../../../../OfficeWeb/Excel/graphics/DrawingContextWord.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Math/mathTypes.js"></script>
<!--<script type="text/javascript" src="Math/print.js"></script>-->
<script type="text/javascript" src="../../../../OfficeWeb/Word/Math/mathText.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Math/mathContent.js"></script>
<!--<script type="text/javascript" src="Math/actions.js"></script>-->
<script type="text/javascript" src="../../../../OfficeWeb/Word/Math/base.js"></script>
<!--<script type="text/javascript" src="Math/subBase.js"></script>-->
<script type="text/javascript" src="Math/fraction.js"></script>
<script type="text/javascript" src="Math/degree.js"></script>
<script type="text/javascript" src="Math/matrix.js"></script>
<script type="text/javascript" src="Math/limit.js"></script>
<script type="text/javascript" src="Math/nary.js"></script>
<script type="text/javascript" src="Math/radical.js"></script>
<script type="text/javascript" src="Math/operators.js"></script>
<script type="text/javascript" src="Math/accent.js"></script>
<!--<script type="text/javascript" src="Math/drawingUnion.js"></script>-->
<script type="text/javascript" src="Math/borderBox.js"></script>
<!--script type="text/javascript" src="Math/test_composition.js"></script>-->
<script type="text/javascript" src="../../api/documents/api.js"></script>
<script type="text/javascript" src="../../common/Analytics.js"></script>
<script type="text/javascript" src="../../common/Gateway.js"></script>
<script type="text/javascript" src="../../common/IrregularStack.js"></script>
<script type="text/javascript" src="../../common/main/loader.js"></script>
<script type="text/javascript" src="../../common/main/lib/component/util/MetricSettings.js"></script>
<script type="text/javascript" src="app.js"></script>
<script type="text/javascript" src="restrictions.js"></script>
<script type="text/javascript" src="environment.js"></script>
<script type="text/javascript" src="../../common/locale.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Math/mathTypes.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Math/print.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Math/mathText.js"></script>
......@@ -293,5 +258,17 @@
<script type="text/javascript" src="../../../../OfficeWeb/Word/Math/drawingUnion.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Math/borderBox.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Math/test_composition.js"></script>
<script type="text/javascript" src="../../api/documents/api.js"></script>
<script type="text/javascript" src="../../common/Analytics.js"></script>
<script type="text/javascript" src="../../common/Gateway.js"></script>
<script type="text/javascript" src="../../common/IrregularStack.js"></script>
<script type="text/javascript" src="../../common/main/loader.js"></script>
<script type="text/javascript" src="../../common/main/lib/component/util/MetricSettings.js"></script>
<script type="text/javascript" src="app.js"></script>
<script type="text/javascript" src="restrictions.js"></script>
<script type="text/javascript" src="environment.js"></script>
<script type="text/javascript" src="../../common/locale.js"></script>
</body>
</html>
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