Fix inserting special characters

This commit is contained in:
Julia Radzhabova 2020-08-27 18:54:14 +03:00
parent 758f683e03
commit 1188155f15
4 changed files with 10 additions and 10 deletions

View file

@ -719,10 +719,10 @@ define([
this.updateView(undefined, undefined, undefined, true);
// special
var data = [{symbol: '—', description: this.textEmDash, shortcutKey: 'Alt+Ctrl+-', code: '2014'},
var data = [{symbol: '—', description: this.textEmDash, shortcutKey: 'Alt+Ctrl+Num -', code: '2014'},
{symbol: '', description: this.textEnDash, shortcutKey: '', code: '2013'},
{symbol: '', description: this.textNBHyphen, shortcutKey: 'Ctrl+Shift+_', code: '2011'},
{symbol: '', description: this.textSHyphen, shortcutKey: 'Alt+-', code: '00AD'},
{symbol: '', description: this.textNBHyphen, shortcutKey: 'Ctrl+Shift+_', code: '002D', special: true},
// {symbol: '', description: this.textSHyphen, shortcutKey: 'Alt+-', code: '00AD'},
{symbol: '', description: this.textEmSpace, shortcutKey: '', code: '2003'},
{symbol: '', description: this.textEnSpace, shortcutKey: '', code: '2002'},
{symbol: '', description: this.textQEmSpace, shortcutKey: '', code: '2005'},
@ -803,7 +803,7 @@ define([
getSpecialSymbol: function() {
var rec = this.specialList.getSelectedRec();
return {font: undefined, symbol: this.encodeSurrogateChar(rec.get('code')), code: parseInt(rec.get('code'), 16)};
return {font: undefined, symbol: this.encodeSurrogateChar(rec.get('code')), code: parseInt(rec.get('code'), 16), special: rec.get('special')};
},
onBtnClick: function(event) {

View file

@ -2595,14 +2595,14 @@ define([
buttons: [{value: 'ok', caption: this.textInsert}, 'close'],
handler: function(dlg, result, settings) {
if (result == 'ok') {
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), settings.code);
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), settings.code, settings.special);
} else
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
});
me.dlgSymbolTable.show();
me.dlgSymbolTable.on('symbol:dblclick', function(cmp, result, settings) {
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), settings.code);
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), settings.code, settings.special);
});
}
},

View file

@ -1874,14 +1874,14 @@ define([
buttons: [{value: 'ok', caption: this.textInsert}, 'close'],
handler: function(dlg, result, settings) {
if (result == 'ok') {
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), settings.code);
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), settings.code, settings.special);
} else
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
});
win.show();
win.on('symbol:dblclick', function(cmp, result, settings) {
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), settings.code);
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.get_TextProps().get_TextPr().get_FontFamily().get_Name(), settings.code, settings.special);
});
}
},

View file

@ -2829,14 +2829,14 @@ define([
buttons: [{value: 'ok', caption: this.textInsert}, 'close'],
handler: function(dlg, result, settings) {
if (result == 'ok') {
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.asc_getCellInfo().asc_getXfs().asc_getFontName(), settings.code);
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.asc_getCellInfo().asc_getXfs().asc_getFontName(), settings.code, settings.special);
} else
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
}
});
win.show();
win.on('symbol:dblclick', function(cmp, result, settings) {
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.asc_getCellInfo().asc_getXfs().asc_getFontName(), settings.code);
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.asc_getCellInfo().asc_getXfs().asc_getFontName(), settings.code, settings.special);
});
}
},