Commit 50e955f7 authored by konovalovsergey's avatar konovalovsergey

fix bug 33332

parent e8774787
......@@ -12,16 +12,12 @@
<script type="text/javascript" src="../../../web-apps/vendor/xregexp/xregexp-all-min.js"></script>
<script type="text/javascript" src="../utils/utils.js"></script>
<script type="text/javascript" src="../model/Workbook.js"></script>
<script type="text/javascript" src="../model/WorkbookElems.js"></script>
<script type="text/javascript" src="../model/Serialize.js"></script>
<script type="text/javascript" >
AscCommonExcel.g_oDefaultFormat.FontAbs = {};
</script>
<script type="text/javascript" src="../model/FormulaObjects/parserFormula.js"></script>
<script type="text/javascript" src="../../Common/commonDefines.js"></script>
<script type="text/javascript" src="../../Common/NumFormat.js"></script>
<script type="text/javascript" src="../../../web-apps/apps/spreadsheeteditor/sdk_dev_scripts.js"></script>
<script>
window.sdk_dev_scrpipts.forEach(function(item){
document.write('<script type="text/javascript" src="' + item + '"><\/script>');
});
</script>
<script type="text/javascript" src="testsForFWB.html.js"></script>
......
......@@ -384,4 +384,19 @@ $(function(){
});
test(";;;", function test_empty() {
var numbers = [1, -1, 0, "q"];
var form = new CellFormat(";;;");
strictEqual(fGetFormatedText(form.format(1)), "", "format: ;;;, number: 1");
strictEqual(fGetFormatedText(form.format(-1)), "", "format: ;;;, number: -1");
strictEqual(fGetFormatedText(form.format(0)), "", "format: ;;;, number: 0");
strictEqual(fGetFormatedText(form.format("q")), "", "format: ;;;, number: q");
var form = new CellFormat(";;");
strictEqual(fGetFormatedText(form.format(1)), "", "format: ;;, number: 1");
strictEqual(fGetFormatedText(form.format(-1)), "", "format: ;;, number: -1");
strictEqual(fGetFormatedText(form.format(0)), "", "format: ;;, number: 0");
strictEqual(fGetFormatedText(form.format("q")), "q", "format: ;;, number: q");
});
});
\ No newline at end of file
......@@ -2163,6 +2163,8 @@ function CellFormat(format)
this.oNegativeFormat = aParsedFormats[1];
this.oNullFormat = aParsedFormats[2];
this.oTextFormat = aParsedFormats[3];
//for ';;;' format, if 4 formats exist fourth always used for text
this.oTextFormat.bTextFormat = true;
}
else if(3 == nFormatsLength)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment