Commit 31e0ec90 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

use strict - режим строгой проверки (не включил, но прогнал проверку)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53549 954022d7-b5bf-4e40-9824-e11837661b57
parent 90027c1c
...@@ -1358,7 +1358,7 @@ NumFormat.prototype = ...@@ -1358,7 +1358,7 @@ NumFormat.prototype =
var sGeneral = DecodeGeneralFormat(number, nValType, dDigitsCount); var sGeneral = DecodeGeneralFormat(number, nValType, dDigitsCount);
if(null != sGeneral) if(null != sGeneral)
{ {
numFormat = oNumFormatCache.get(sGeneral); var numFormat = oNumFormatCache.get(sGeneral);
if(null != numFormat) if(null != numFormat)
return numFormat.format(number, nValType, dDigitsCount, oAdditionalResult) return numFormat.format(number, nValType, dDigitsCount, oAdditionalResult)
} }
...@@ -1449,7 +1449,7 @@ NumFormat.prototype = ...@@ -1449,7 +1449,7 @@ NumFormat.prototype =
var frac = oParsedNumber.frac; var frac = oParsedNumber.frac;
var fracExp = -frac.toString().length; var fracExp = -frac.toString().length;
if(oParsedNumber.exponent < 0) if(oParsedNumber.exponent < 0)
fracExp -= oParsedNumber.exponent fracExp -= oParsedNumber.exponent;
frac *= Math.pow(10, fracExp); frac *= Math.pow(10, fracExp);
var numerator; var numerator;
var denominator; var denominator;
...@@ -1470,7 +1470,7 @@ NumFormat.prototype = ...@@ -1470,7 +1470,7 @@ NumFormat.prototype =
} }
else else
{ {
var d = n = frac; var d = frac, n = frac;
var a0 = 0, a1 = 1; var a0 = 0, a1 = 1;
var b0 = 1, b1 = 0; var b0 = 1, b1 = 0;
var eps = Math.pow(10, -15), var eps = Math.pow(10, -15),
...@@ -1479,7 +1479,7 @@ NumFormat.prototype = ...@@ -1479,7 +1479,7 @@ NumFormat.prototype =
while( (b < arr) && (delta > eps) ) while( (b < arr) && (delta > eps) )
{ {
N = Math.floor(d); var N = Math.floor(d);
a = N * a1 + a0; a = N * a1 + a0;
b = N * b1 + b0; b = N * b1 + b0;
a0 = a1; a0 = a1;
......
...@@ -42,6 +42,6 @@ function FileHandler() { ...@@ -42,6 +42,6 @@ function FileHandler() {
} }
} }
function getFile( filePath ) { function getFile( filePath ) {
fh = new FileHandler() var fh = new FileHandler();
fh.get( filePath ); fh.get( filePath );
} }
\ No newline at end of file
...@@ -513,7 +513,7 @@ CopyProcessor.prototype = ...@@ -513,7 +513,7 @@ CopyProcessor.prototype =
{ {
var Run = document.createElement( "span" ); var Run = document.createElement( "span" );
//Run.setAttribute("xml:space", "preserve"); //Run.setAttribute("xml:space", "preserve");
var sStyle = ""; var sStyle = "", prop;
for(prop in this.orPr) for(prop in this.orPr)
sStyle += prop + ":" + this.orPr[prop] + ";"; sStyle += prop + ":" + this.orPr[prop] + ";";
if("" != sStyle) if("" != sStyle)
...@@ -801,7 +801,6 @@ CopyProcessor.prototype = ...@@ -801,7 +801,6 @@ CopyProcessor.prototype =
} }
if(null != oHyperlink) if(null != oHyperlink)
{ {
bReset = false;
this.CommitSpan(false); this.CommitSpan(false);
this.oCurHyperlink = oHyperlink; this.oCurHyperlink = oHyperlink;
this.oCurHyperlinkElem = document.createElement( "a" ); this.oCurHyperlinkElem = document.createElement( "a" );
...@@ -1013,7 +1012,6 @@ CopyProcessor.prototype = ...@@ -1013,7 +1012,6 @@ CopyProcessor.prototype =
res += name + ":none;"; res += name + ":none;";
else else
{ {
bBorder = true;
var size = 0.5; var size = 0.5;
var color = { r : 0, g : 0, b : 0 }; var color = { r : 0, g : 0, b : 0 };
if(null != border.Size) if(null != border.Size)
...@@ -3376,7 +3374,7 @@ PasteProcessor.prototype = ...@@ -3376,7 +3374,7 @@ PasteProcessor.prototype =
classNode = node.children[0].children[0].children[0].getAttribute("class"); classNode = node.children[0].children[0].children[0].getAttribute("class");
if( classNode != null ){ if( classNode != null ){
cL = classNode.split(" "); var cL = classNode.split(" ");
for (var i = 0; i < cL.length; i++){ for (var i = 0; i < cL.length; i++){
if(cL[i].indexOf("docData;") > -1) if(cL[i].indexOf("docData;") > -1)
{ {
...@@ -4287,7 +4285,7 @@ PasteProcessor.prototype = ...@@ -4287,7 +4285,7 @@ PasteProcessor.prototype =
this._Prepeare_recursive(node, true); this._Prepeare_recursive(node, true);
var aPrepeareFonts = new Array(); var aPrepeareFonts = new Array();
for(font_family in this.oFonts) for(var font_family in this.oFonts)
{ {
//todo ��������� �����, ������ �� �������� //todo ��������� �����, ������ �� ��������
var oFontItem = this.oFonts[font_family]; var oFontItem = this.oFonts[font_family];
...@@ -4305,7 +4303,7 @@ PasteProcessor.prototype = ...@@ -4305,7 +4303,7 @@ PasteProcessor.prototype =
} }
} }
var aImagesToDownload = new Array(); var aImagesToDownload = new Array();
for(image in this.oImages) for(var image in this.oImages)
{ {
var src = this.oImages[image]; var src = this.oImages[image];
if(0 == src.indexOf("file:")) if(0 == src.indexOf("file:"))
...@@ -4938,7 +4936,6 @@ PasteProcessor.prototype = ...@@ -4938,7 +4936,6 @@ PasteProcessor.prototype =
{ {
//������� ����� ������ //������� ����� ������
NumId = this.oLogicDocument.Numbering.Create_AbstractNum(); NumId = this.oLogicDocument.Numbering.Create_AbstractNum();
NumLvl = 0;
var AbstractNum = this.oLogicDocument.Numbering.Get_AbstractNum( NumId ); var AbstractNum = this.oLogicDocument.Numbering.Get_AbstractNum( NumId );
AbstractNum.Create_Default_Bullet(); AbstractNum.Create_Default_Bullet();
...@@ -5157,7 +5154,7 @@ PasteProcessor.prototype = ...@@ -5157,7 +5154,7 @@ PasteProcessor.prototype =
break; break;
if(null == underline || null == Strikeout) if(null == underline || null == Strikeout)
{ {
text_decoration = tempComputedStyle.getPropertyValue( "text-decoration" ); var text_decoration = tempComputedStyle.getPropertyValue( "text-decoration" );
if(text_decoration) if(text_decoration)
{ {
if(-1 != text_decoration.indexOf("underline")) if(-1 != text_decoration.indexOf("underline"))
...@@ -5536,7 +5533,7 @@ PasteProcessor.prototype = ...@@ -5536,7 +5533,7 @@ PasteProcessor.prototype =
sTableAlign = tableNode.align sTableAlign = tableNode.align
else if(null != tableNode.parentNode && this.oRootNode != tableNode.parentNode) else if(null != tableNode.parentNode && this.oRootNode != tableNode.parentNode)
{ {
computedStyleParent = this._getComputedStyle(tableNode.parentNode); var computedStyleParent = this._getComputedStyle(tableNode.parentNode);
if(null != computedStyleParent) if(null != computedStyleParent)
{ {
//����� ��������� -webkit-right //����� ��������� -webkit-right
...@@ -5609,7 +5606,7 @@ PasteProcessor.prototype = ...@@ -5609,7 +5606,7 @@ PasteProcessor.prototype =
if(margin_left && null != (margin_left = this._ValueToMm(margin_left)) && margin_left < Page_Width - X_Left_Margin) if(margin_left && null != (margin_left = this._ValueToMm(margin_left)) && margin_left < Page_Width - X_Left_Margin)
table.Set_TableInd(margin_left); table.Set_TableInd(margin_left);
} }
background_color = computedStyle.getPropertyValue( "background-color" ); var background_color = computedStyle.getPropertyValue( "background-color" );
if(null != background_color && (background_color = this._ParseColor(background_color))) if(null != background_color && (background_color = this._ParseColor(background_color)))
table.Set_TableShd(shd_Clear, background_color.r, background_color.g, background_color.b); table.Set_TableShd(shd_Clear, background_color.r, background_color.g, background_color.b);
var oLeftBorder = this._ExecuteBorder(computedStyle, tableNode, "left", "Left", false); var oLeftBorder = this._ExecuteBorder(computedStyle, tableNode, "left", "Left", false);
...@@ -5761,7 +5758,7 @@ PasteProcessor.prototype = ...@@ -5761,7 +5758,7 @@ PasteProcessor.prototype =
var computedStyle = this._getComputedStyle(node); var computedStyle = this._getComputedStyle(node);
if(null != computedStyle) if(null != computedStyle)
{ {
background_color = computedStyle.getPropertyValue( "background-color" ); var background_color = computedStyle.getPropertyValue( "background-color" );
if(null != background_color && (background_color = this._ParseColor(background_color))) if(null != background_color && (background_color = this._ParseColor(background_color)))
{ {
var Shd = new CDocumentShd(); var Shd = new CDocumentShd();
...@@ -6843,7 +6840,7 @@ PasteProcessor.prototype = ...@@ -6843,7 +6840,7 @@ PasteProcessor.prototype =
sTableAlign = tableNode.align sTableAlign = tableNode.align
else if(null != tableNode.parentNode && this.oRootNode != tableNode.parentNode) else if(null != tableNode.parentNode && this.oRootNode != tableNode.parentNode)
{ {
computedStyleParent = this._getComputedStyle(tableNode.parentNode); var computedStyleParent = this._getComputedStyle(tableNode.parentNode);
if(null != computedStyleParent) if(null != computedStyleParent)
{ {
//����� ��������� -webkit-right //����� ��������� -webkit-right
...@@ -6916,7 +6913,7 @@ PasteProcessor.prototype = ...@@ -6916,7 +6913,7 @@ PasteProcessor.prototype =
if(margin_left && null != (margin_left = this._ValueToMm(margin_left)) && margin_left < Page_Width - X_Left_Margin) if(margin_left && null != (margin_left = this._ValueToMm(margin_left)) && margin_left < Page_Width - X_Left_Margin)
table.Set_TableInd(margin_left); table.Set_TableInd(margin_left);
} }
background_color = computedStyle.getPropertyValue( "background-color" ); var background_color = computedStyle.getPropertyValue( "background-color" );
if(null != background_color && (background_color = this._ParseColor(background_color))) if(null != background_color && (background_color = this._ParseColor(background_color)))
table.Set_TableShd(shd_Clear, background_color.r, background_color.g, background_color.b); table.Set_TableShd(shd_Clear, background_color.r, background_color.g, background_color.b);
var oLeftBorder = this._ExecuteBorder(computedStyle, tableNode, "left", "Left", false); var oLeftBorder = this._ExecuteBorder(computedStyle, tableNode, "left", "Left", false);
...@@ -7068,7 +7065,7 @@ PasteProcessor.prototype = ...@@ -7068,7 +7065,7 @@ PasteProcessor.prototype =
var computedStyle = this._getComputedStyle(node); var computedStyle = this._getComputedStyle(node);
if(null != computedStyle) if(null != computedStyle)
{ {
background_color = computedStyle.getPropertyValue( "background-color" ); var background_color = computedStyle.getPropertyValue( "background-color" );
if(null != background_color && (background_color = this._ParseColor(background_color))) if(null != background_color && (background_color = this._ParseColor(background_color)))
{ {
var Shd = new CDocumentShd(); var Shd = new CDocumentShd();
......
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