diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index d4d40886a..3fd6012ca 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -497,9 +497,9 @@ define([ } else { var value = ''; if (item.value == 'frozen') - value = this.api.asc_getFrozen(type=='top'); + value = this.api.asc_getPrintTitlesRange(Asc.c_oAscPrintTitlesRangeType.frozen, type=='left', panel.cmbSheet.getValue()); else if (item.value == 'first') - value = this.api.asc_getFirst(type=='top'); + value = this.api.asc_getPrintTitlesRange(Asc.c_oAscPrintTitlesRangeType.first, type=='left', panel.cmbSheet.getValue()); txtRange.setValue(value); txtRange.checkValidate(); if (type=='top') diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index adc795ea5..d9233389d 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -3461,6 +3461,7 @@ define([ me = this; win = new SSE.Views.PrintTitlesDialog({ api: me.api, + sheet: me.api.asc_getActiveWorksheetIndex(), handler: function(dlg, result) { if (result == 'ok') { props = dlg.getSettings(); diff --git a/apps/spreadsheeteditor/main/app/view/PrintTitlesDialog.js b/apps/spreadsheeteditor/main/app/view/PrintTitlesDialog.js index d1d0001c2..c9e61df6e 100644 --- a/apps/spreadsheeteditor/main/app/view/PrintTitlesDialog.js +++ b/apps/spreadsheeteditor/main/app/view/PrintTitlesDialog.js @@ -94,6 +94,7 @@ define([ this.options.tpl = _.template(this.template)(this.options); this.api = this.options.api; + this.sheet = this.options.sheet; Common.UI.Window.prototype.initialize.call(this, this.options); this.dataRangeTop = ''; this.dataRangeLeft = ''; @@ -260,9 +261,9 @@ define([ } else { var value = ''; if (item.value == 'frozen') - value = this.api.asc_getFrozen(type=='top'); + value = this.api.asc_getPrintTitlesRange(Asc.c_oAscPrintTitlesRangeType.frozen, type=='left', this.sheet); else if (item.value == 'first') - value = this.api.asc_getFirst(type=='top'); + value = this.api.asc_getPrintTitlesRange(Asc.c_oAscPrintTitlesRangeType.first, type=='left', this.sheet); txtRange.setValue(value); txtRange.checkValidate(); if (type=='top')