[DE] Change style for existing table in contents from toolbar presets.
This commit is contained in:
parent
23c0294722
commit
c154b154e9
|
@ -204,20 +204,30 @@ define([
|
|||
onTableContents: function(type){
|
||||
switch (type) {
|
||||
case 0:
|
||||
var props = new Asc.CTableOfContentsPr();
|
||||
var props = this.api.asc_GetTableOfContentsPr(),
|
||||
hasTable = !!props;
|
||||
if (!props) {
|
||||
props = new Asc.CTableOfContentsPr();
|
||||
props.put_OutlineRange(1, 9);
|
||||
}
|
||||
props.put_Hyperlink(true);
|
||||
props.put_ShowPageNumbers(true);
|
||||
props.put_RightAlignTab(true);
|
||||
props.put_TabLeader( Asc.c_oAscTabLeader.Dot);
|
||||
props.put_OutlineRange(1, 9);
|
||||
this.api.asc_AddTableOfContents(props); break;
|
||||
(hasTable) ? this.api.asc_SetTableOfContentsPr(props) : this.api.asc_AddTableOfContents(props);
|
||||
break;
|
||||
case 1:
|
||||
var props = new Asc.CTableOfContentsPr();
|
||||
var props = this.api.asc_GetTableOfContentsPr(),
|
||||
hasTable = !!props;
|
||||
if (!props) {
|
||||
props = new Asc.CTableOfContentsPr();
|
||||
props.put_OutlineRange(1, 9);
|
||||
}
|
||||
props.put_Hyperlink(true);
|
||||
props.put_ShowPageNumbers(false);
|
||||
props.put_TabLeader( Asc.c_oAscTabLeader.None);
|
||||
props.put_OutlineRange(1, 9);
|
||||
this.api.asc_AddTableOfContents(props); break;
|
||||
(hasTable) ? this.api.asc_SetTableOfContentsPr(props) : this.api.asc_AddTableOfContents(props);
|
||||
break;
|
||||
case 'settings':
|
||||
var props = this.api.asc_GetTableOfContentsPr(),
|
||||
me = this;
|
||||
|
|
|
@ -449,9 +449,10 @@ define([
|
|||
|
||||
props.put_Hyperlink(this.chLinks.getValue() == 'checked');
|
||||
props.put_ShowPageNumbers(this.chPages.getValue() == 'checked');
|
||||
if (this.chPages.getValue() == 'checked')
|
||||
if (this.chPages.getValue() == 'checked') {
|
||||
props.put_RightAlignTab(this.chAlign.getValue() == 'checked');
|
||||
props.put_TabLeader(this.cmbLeader.getValue());
|
||||
props.put_TabLeader(this.cmbLeader.getValue());
|
||||
}
|
||||
props.put_StylesType(this.cmbStyles.getValue());
|
||||
|
||||
props.clear_Styles();
|
||||
|
|
Loading…
Reference in a new issue