From fb21bd00085a8920e3315113e67851943a8569f9 Mon Sep 17 00:00:00 2001
From: Julia Radzhabova <Julia.Radzhabova@onlyoffice.com>
Date: Wed, 15 Feb 2017 12:34:14 +0300
Subject: [PATCH] [SSE] Fix Bug 34065.

---
 .../main/app/view/FormatSettingsDialog.js      | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js b/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js
index 37678959c..ceab4c64c 100644
--- a/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js
+++ b/apps/spreadsheeteditor/main/app/view/FormatSettingsDialog.js
@@ -275,6 +275,24 @@ define([
                 if (this._state.hasSymbols)
                     this.cmbSymbols.setValue(props.formatInfo.asc_getSymbol());
 
+                if (props.format) {
+                    if (this._state.hasNegative) {
+                        var selectedItem = this.cmbNegative.store.findWhere({value: props.format});
+                        if (selectedItem)
+                            this.cmbNegative.selectRecord(selectedItem);
+                        else
+                            this.cmbNegative.setValue(this.api.asc_getLocaleExample(props.format));
+                    } else if (this._state.hasType) {
+                        var selectedItem = this.cmbType.store.findWhere({value: props.format});
+                        if (selectedItem)
+                            this.cmbType.selectRecord(selectedItem);
+                        else if (props.formatInfo.asc_getType() == Asc.c_oAscNumFormatType.Fraction)
+                            this.cmbType.setValue(this.txtCustom);
+                        else
+                            this.cmbType.setValue(this.api.asc_getLocaleExample(props.format), 37973);
+                    }
+                    this.Format = props.format;
+                }
                 // for fraction - if props.format not in cmbType - setValue(this.txtCustom)
                 // for date/time - if props.format not in cmbType - setValue(this.api.asc_getLocaleExample(props.format, 37973))
                 // for cmbNegative - if props.format not in cmbNegative - setValue(this.api.asc_getLocaleExample(props.format))