Alberto1202 / zkspreadsheet

Automatically exported from code.google.com/p/zkspreadsheet
0 stars 0 forks source link

Copy and paste between different workbooks #209

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The current implementation of Utils.pasteSpecial(....)  assumes that both 
sheets are in the same workbook.
This means I can't open 2 spreadsheets/files  side-by-side and copy-and-paste 
between them. I get NullPointerException because it is assuming that the 
workbook is the same for both source-sheet and dest-sheet.

This would be a very nice enhancement to have, as our application allows for 
multiple spreadsheets open at a time.

What steps will reproduce the problem?
1. Open 2 windows, each with a different xls file
2. Copy from one
3. Paste to the other, using the utils.pasteSpecial

What is the expected output? What do you see instead?
copied content. Instead, I get a NPE.

What version of the product are you using? On what operating system?
v2 RC2

Please provide any additional information below.

java.lang.NullPointerException
    at org.zkoss.zss.model.impl.BookHelper.getSheet(BookHelper.java:231)
    at org.zkoss.zss.model.impl.RangeImpl.copyRef(RangeImpl.java:925)
    at org.zkoss.zss.model.impl.RangeImpl.copy(RangeImpl.java:882)
    at org.zkoss.zss.model.impl.RangeImpl.paste0(RangeImpl.java:733)
    at org.zkoss.zss.model.impl.RangeImpl.pasteSpecial(RangeImpl.java:645)
    at org.zkoss.zss.ui.impl.Utils.pasteSpecial(Utils.java:161)
    at com.sl.surveyor.ui.spreadsheet.SpreadsheetPanel.onPaste(SpreadsheetPanel.java:194)
    at ...........(SpreadsheetPanel.java:110)

29-Nov-2010 09:45:07 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1253
SEVERE: >>java.lang.NullPointerException
>>  at org.zkoss.zss.model.impl.BookHelper.getSheet(BookHelper.java:231)
>>  at org.zkoss.zss.model.impl.RangeImpl.copyRef(RangeImpl.java:925)
>>  at org.zkoss.zss.model.impl.RangeImpl.copy(RangeImpl.java:882)
>>  at org.zkoss.zss.model.impl.RangeImpl.paste0(RangeImpl.java:733)
>>  at org.zkoss.zss.model.impl.RangeImpl.pasteSpecial(RangeImpl.java:645)
>>  at org.zkoss.zss.ui.impl.Utils.pasteSpecial(Utils.java:161)

Original issue reported on code.google.com by Chris.Th...@googlemail.com on 29 Nov 2010 at 9:47

GoogleCodeExporter commented 9 years ago
http://tracker.zkoss.org/browse/ZSS-7

    ---------
The ZK Spreadsheet team has moved the issue tracker from here to our own new 
system at http://tracker.zkoss.org/secure/IssueNavigator.jspa. Please remember 
to adopt to the new system.

Users are able to log into the new system using their ZK forum account. If you 
do not already have one, please register at http://www.zkoss.org/forum/

Our new system on Jira introduces a new and very powerful voting system 
enabling users to vote up for a desired new feature or a bug that other users 
also have problem encountering.

Original comment by chenhe...@gmail.com on 15 Jul 2011 at 7:41