Commit e874f403 authored by GoshaZotov's avatar GoshaZotov

fix bug 32834

parent a86ec2a8
...@@ -2324,7 +2324,7 @@ ...@@ -2324,7 +2324,7 @@
} }
var cell = this.aResult.getCell(row + this.maxLengthRowCount, col); var cell = this.aResult.getCell(row + this.maxLengthRowCount, col);
if(cell && cell.length === 0 && (cell.borders || cell.rowSpan != null)) if(cell && cell.content && cell.content.length === 0 && (cell.borders || cell.rowSpan != null))
{ {
if(cell.borders) if(cell.borders)
{ {
......
...@@ -9596,15 +9596,17 @@ ...@@ -9596,15 +9596,17 @@
if ( undefined !== pasteContent.content[r][c] ) { if ( undefined !== pasteContent.content[r][c] ) {
var range = t.model.getRange3( r + autoR * plRow, c + autoC * plCol, r + autoR * plRow, c + autoC * plCol ); var range = t.model.getRange3( r + autoR * plRow, c + autoC * plCol, r + autoR * plRow, c + autoC * plCol );
var currentObj = pasteContent.content[r][c].content; var currentObj = pasteContent.content[r][c];
if ( currentObj.length === 1 ) var contentCurrentObj = currentObj.content;
if ( contentCurrentObj.length === 1 )
{ {
var valFormat = currentObj[0].text; var onlyChild = contentCurrentObj[0];
var valFormat = onlyChild.text;
var nameFormat = false; var nameFormat = false;
if ( currentObj[0].cellFrom ) if ( onlyChild.cellFrom )
{ {
var offset = range.getCells()[0].getOffset2( currentObj[0].cellFrom ), assemb, _p_ = new AscCommonExcel.parserFormula( currentObj[0].text.substring( 1 ), "", range.worksheet ); var offset = range.getCells()[0].getOffset2( onlyChild.cellFrom ), assemb, _p_ = new AscCommonExcel.parserFormula( onlyChild.text.substring( 1 ), "", range.worksheet );
if ( _p_.parse() ) if ( _p_.parse() )
{ {
...@@ -9625,27 +9627,27 @@ ...@@ -9625,27 +9627,27 @@
{ {
range.setNumFormat( nameFormat ); range.setNumFormat( nameFormat );
} }
range.setBold( currentObj[0].format.b ); range.setBold( onlyChild.format.b );
range.setItalic( currentObj[0].format.i ); range.setItalic( onlyChild.format.i );
range.setStrikeout( currentObj[0].format.s ); range.setStrikeout( onlyChild.format.s );
if ( !isOneMerge && currentObj[0].format && currentObj[0].format.c != null && currentObj[0].format.c != undefined ) if ( !isOneMerge && onlyChild.format && onlyChild.format.c != null && onlyChild.format.c != undefined )
{ {
range.setFontcolor( currentObj[0].format.c ); range.setFontcolor( onlyChild.format.c );
} }
range.setUnderline( currentObj[0].format.u ); range.setUnderline( onlyChild.format.u );
range.setAlignVertical( currentObj.va ); range.setAlignVertical( contentCurrentObj.va );
range.setFontname( currentObj[0].format.fn ); range.setFontname( onlyChild.format.fn );
range.setFontsize( currentObj[0].format.fs ); range.setFontsize( onlyChild.format.fs );
} }
else else
{ {
range.setValue2( currentObj ); range.setValue2( contentCurrentObj );
range.setAlignVertical( currentObj.va ); range.setAlignVertical( currentObj.va );
} }
if ( currentObj.length === 1 && currentObj[0].format.fs !== '' && currentObj[0].format.fs !== null && currentObj[0].format.fs !== undefined ) if ( contentCurrentObj.length === 1 && contentCurrentObj[0].format.fs !== '' && contentCurrentObj[0].format.fs !== null && contentCurrentObj[0].format.fs !== undefined )
{ {
range.setFontsize( currentObj[0].format.fs ); range.setFontsize( contentCurrentObj[0].format.fs );
} }
if ( !isOneMerge ) if ( !isOneMerge )
{ {
......
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