summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-sheet/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-sheet/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/mainwindow.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp
index 7394623..3095142 100644
--- a/noncore/apps/opie-sheet/mainwindow.cpp
+++ b/noncore/apps/opie-sheet/mainwindow.cpp
@@ -879,3 +879,6 @@ void MainWindow::slotImportExcel(const DocLnk &lnkDoc)
ExcelBook file1;
- file1.ParseBook((char *)lnkDoc.file().ascii());
+ if ( !file1.ParseBook((char *)lnkDoc.file().ascii()) ){
+ QMessageBox::critical(this, tr("Error"), tr("<td>Unable to open or parse file!</td>"));
+ return;
+ }
int NumOfSheets=file1.Sheets.count();
@@ -895,3 +898,3 @@ void MainWindow::slotImportExcel(const DocLnk &lnkDoc)
sh1=file1.Sheets[w1-1];
- printf("OpieSheet:newSheet:%x,r=%d,c=%d\r\n",sh1,sh1->rows,sh1->cols);
+ // printf("OpieSheet:newSheet:%x,r=%d,c=%d\r\n",sh1, sh1->rows,sh1->cols);
newSheet=new typeSheet;