From 69ee24f112c4b8e4e4d69e9827a0366c6714a2b6 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 19 Jan 2018 16:41:40 +0300 Subject: [PATCH] [DE] Fix adding table of contents. --- apps/documenteditor/main/app/controller/Links.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Links.js b/apps/documenteditor/main/app/controller/Links.js index 2b9716d2a..1310227ac 100644 --- a/apps/documenteditor/main/app/controller/Links.js +++ b/apps/documenteditor/main/app/controller/Links.js @@ -214,7 +214,7 @@ define([ props.put_ShowPageNumbers(true); props.put_RightAlignTab(true); props.put_TabLeader( Asc.c_oAscTabLeader.Dot); - (hasTable) ? this.api.asc_SetTableOfContentsPr(props) : this.api.asc_AddTableOfContents(props); + (hasTable) ? this.api.asc_SetTableOfContentsPr(props) : this.api.asc_AddTableOfContents(null, props); break; case 1: var props = this.api.asc_GetTableOfContentsPr(), @@ -226,7 +226,7 @@ define([ props.put_Hyperlink(true); props.put_ShowPageNumbers(false); props.put_TabLeader( Asc.c_oAscTabLeader.None); - (hasTable) ? this.api.asc_SetTableOfContentsPr(props) : this.api.asc_AddTableOfContents(props); + (hasTable) ? this.api.asc_SetTableOfContentsPr(props) : this.api.asc_AddTableOfContents(null, props); break; case 'settings': var props = this.api.asc_GetTableOfContentsPr(), @@ -236,7 +236,7 @@ define([ props: props, handler: function(result, value) { if (result == 'ok') { - (props) ? me.api.asc_SetTableOfContentsPr(value) : me.api.asc_AddTableOfContents(value); + (props) ? me.api.asc_SetTableOfContentsPr(value) : me.api.asc_AddTableOfContents(null, value); } Common.NotificationCenter.trigger('edit:complete', me.toolbar); }