Commit cef62b94 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Пренес инициализацию asc_CPageOptions

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64167 954022d7-b5bf-4e40-9824-e11837661b57
parent 3df5aaa4
...@@ -3086,7 +3086,7 @@ Woorksheet.prototype.initPostOpen = function(handlers){ ...@@ -3086,7 +3086,7 @@ Woorksheet.prototype.initPostOpen = function(handlers){
first:r.first first:r.first
}; };
}(this) }(this)
} };
formulaShared[oFormulaExt.si].fVal.parse(); formulaShared[oFormulaExt.si].fVal.parse();
} }
else{ else{
...@@ -3134,41 +3134,7 @@ Woorksheet.prototype.initPostOpen = function(handlers){ ...@@ -3134,41 +3134,7 @@ Woorksheet.prototype.initPostOpen = function(handlers){
// Даже если не было, создадим // Даже если не было, создадим
this.PagePrintOptions = new Asc.asc_CPageOptions(); this.PagePrintOptions = new Asc.asc_CPageOptions();
} }
if(null != this.PagePrintOptions) this.PagePrintOptions.init();
{
var oPageMargins = this.PagePrintOptions.asc_getPageMargins();
if(null == oPageMargins)
{
oPageMargins = new Asc.asc_CPageMargins ();
this.PagePrintOptions.asc_setPageMargins(oPageMargins);
}
if(null == oPageMargins.asc_getLeft())
oPageMargins.asc_setLeft(c_oAscPrintDefaultSettings.PageLeftField);
if(null == oPageMargins.asc_getTop())
oPageMargins.asc_setTop(c_oAscPrintDefaultSettings.PageTopField);
if(null == oPageMargins.asc_getRight())
oPageMargins.asc_setRight(c_oAscPrintDefaultSettings.PageRightField);
if(null == oPageMargins.asc_getBottom())
oPageMargins.asc_setBottom(c_oAscPrintDefaultSettings.PageBottomField);
var oPageSetup = this.PagePrintOptions.asc_getPageSetup();
if(null == oPageSetup)
{
oPageSetup = new Asc.asc_CPageSetup ();
this.PagePrintOptions.asc_setPageSetup(oPageSetup);
}
if(null == oPageSetup.asc_getOrientation())
oPageSetup.asc_setOrientation(c_oAscPrintDefaultSettings.PageOrientation);
if(null == oPageSetup.asc_getWidth())
oPageSetup.asc_setWidth(c_oAscPrintDefaultSettings.PageWidth);
if(null == oPageSetup.asc_getHeight())
oPageSetup.asc_setHeight(c_oAscPrintDefaultSettings.PageHeight);
if(null == this.PagePrintOptions.asc_getGridLines())
this.PagePrintOptions.asc_setGridLines(c_oAscPrintDefaultSettings.PageGridLines);
if(null == this.PagePrintOptions.asc_getHeadings())
this.PagePrintOptions.asc_setHeadings(c_oAscPrintDefaultSettings.PageHeadings);
}
// Sheet Views // Sheet Views
if (0 === this.sheetViews.length) { if (0 === this.sheetViews.length) {
......
...@@ -1013,16 +1013,24 @@ ...@@ -1013,16 +1013,24 @@
return this; return this;
} }
asc_CPageMargins.prototype = { asc_CPageMargins.prototype.init = function () {
asc_getLeft: function () { return this.left; }, if (null == this.left)
asc_getRight: function () { return this.right; }, this.left = c_oAscPrintDefaultSettings.PageLeftField;
asc_getTop: function () { return this.top; }, if (null == this.top)
asc_getBottom: function () { return this.bottom; }, this.top = c_oAscPrintDefaultSettings.PageTopField;
asc_setLeft: function (val) { this.left = val; }, if (null == this.right)
asc_setRight: function (val) { this.right = val; }, this.right = c_oAscPrintDefaultSettings.PageRightField;
asc_setTop: function (val) { this.top = val; }, if (null == this.bottom)
asc_setBottom: function (val) { this.bottom = val; } this.bottom = c_oAscPrintDefaultSettings.PageBottomField;
}; };
asc_CPageMargins.prototype.asc_getLeft = function () { return this.left; };
asc_CPageMargins.prototype.asc_getRight = function () { return this.right; };
asc_CPageMargins.prototype.asc_getTop = function () { return this.top; };
asc_CPageMargins.prototype.asc_getBottom = function () { return this.bottom; };
asc_CPageMargins.prototype.asc_setLeft = function (val) { this.left = val; };
asc_CPageMargins.prototype.asc_setRight = function (val) { this.right = val; };
asc_CPageMargins.prototype.asc_setTop = function (val) { this.top = val; };
asc_CPageMargins.prototype.asc_setBottom = function (val) { this.bottom = val; };
/** @constructor */ /** @constructor */
function asc_CPageSetup (obj) { function asc_CPageSetup (obj) {
if ( !(this instanceof asc_CPageSetup) ) { if ( !(this instanceof asc_CPageSetup) ) {
...@@ -1037,14 +1045,21 @@ ...@@ -1037,14 +1045,21 @@
return this; return this;
} }
asc_CPageSetup.prototype = { asc_CPageSetup.prototype.init = function () {
asc_getOrientation: function () { return this.orientation; }, if (null == this.orientation)
asc_getWidth: function () { return this.width; }, this.orientation = c_oAscPrintDefaultSettings.PageOrientation;
asc_getHeight: function () { return this.height; }, if (null == this.width)
asc_setOrientation: function (val) { this.orientation = val; }, this.width = c_oAscPrintDefaultSettings.PageWidth;
asc_setWidth: function (val) { this.width = val; }, if (null == this.height)
asc_setHeight: function (val) { this.height = val; } this.height = c_oAscPrintDefaultSettings.PageHeight;
}; };
asc_CPageSetup.prototype.asc_getOrientation = function () { return this.orientation; };
asc_CPageSetup.prototype.asc_getWidth = function () { return this.width; };
asc_CPageSetup.prototype.asc_getHeight = function () { return this.height; };
asc_CPageSetup.prototype.asc_setOrientation = function (val) { this.orientation = val; };
asc_CPageSetup.prototype.asc_setWidth = function (val) { this.width = val; };
asc_CPageSetup.prototype.asc_setHeight = function (val) { this.height = val; };
/** @constructor */ /** @constructor */
function asc_CPageOptions (obj) { function asc_CPageOptions (obj) {
if ( !(this instanceof asc_CPageOptions) ) { if ( !(this instanceof asc_CPageOptions) ) {
...@@ -1060,16 +1075,29 @@ ...@@ -1060,16 +1075,29 @@
return this; return this;
} }
asc_CPageOptions.prototype = { asc_CPageOptions.prototype.init = function () {
asc_getPageMargins: function () { return this.pageMargins; }, if (!this.pageMargins)
asc_getPageSetup: function () { return this.pageSetup; }, this.pageMargins = new asc_CPageMargins();
asc_getGridLines: function () { return this.gridLines; }, this.pageMargins.init();
asc_getHeadings: function () { return this.headings; },
asc_setPageMargins: function (val) { this.pageMargins = val; }, if (!this.pageSetup)
asc_setPageSetup: function (val) { this.pageSetup = val; }, this.pageSetup = new asc_CPageSetup();
asc_setGridLines: function (val) { this.gridLines = val; }, this.pageSetup.init();
asc_setHeadings: function (val) { this.headings = val; }
if (null == this.gridLines)
this.gridLines = c_oAscPrintDefaultSettings.PageGridLines;
if (null == this.headings)
this.headings = c_oAscPrintDefaultSettings.PageHeadings;
}; };
asc_CPageOptions.prototype.asc_getPageMargins = function () { return this.pageMargins; };
asc_CPageOptions.prototype.asc_getPageSetup = function () { return this.pageSetup; };
asc_CPageOptions.prototype.asc_getGridLines = function () { return this.gridLines; };
asc_CPageOptions.prototype.asc_getHeadings = function () { return this.headings; };
asc_CPageOptions.prototype.asc_setPageMargins = function (val) { this.pageMargins = val; };
asc_CPageOptions.prototype.asc_setPageSetup = function (val) { this.pageSetup = val; };
asc_CPageOptions.prototype.asc_setGridLines = function (val) { this.gridLines = val; };
asc_CPageOptions.prototype.asc_setHeadings = function (val) { this.headings = val; };
function CPagePrint () { function CPagePrint () {
if ( !(this instanceof CPagePrint) ) { if ( !(this instanceof CPagePrint) ) {
return new CPagePrint(); return new CPagePrint();
...@@ -1106,7 +1134,6 @@ ...@@ -1106,7 +1134,6 @@
} }
this.arrPages = null; this.arrPages = null;
this.currentIndex = 0; this.currentIndex = 0;
this.c_maxPagesCount = 10;
return this; return this;
} }
...@@ -1122,13 +1149,10 @@ ...@@ -1122,13 +1149,10 @@
return this; return this;
} }
asc_CAdjustPrint.prototype = { asc_CAdjustPrint.prototype.asc_getPrintType = function () { return this.printType; };
constructor: asc_CAdjustPrint, asc_CAdjustPrint.prototype.asc_getLayoutPageType = function () { return this.layoutPageType; };
asc_getPrintType: function () { return this.printType; }, asc_CAdjustPrint.prototype.asc_setPrintType = function (val) { this.printType = val; };
asc_getLayoutPageType: function () { return this.layoutPageType; }, asc_CAdjustPrint.prototype.asc_setLayoutPageType = function (val) { this.layoutPageType = val; };
asc_setPrintType: function (val) { this.printType = val; },
asc_setLayoutPageType: function (val) { this.layoutPageType = val; }
};
/** @constructor */ /** @constructor */
function asc_CLockInfo () { function asc_CLockInfo () {
......
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