Bug 332293 - Crash on exporting report to a spreadsheet/text doc in a non-writable dir
Summary: Crash on exporting report to a spreadsheet/text doc in a non-writable dir
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: Reports and Printouts (show other bugs)
Version: 2.8.0
Platform: unspecified All
: NOR crash
Target Milestone: ---
Assignee: Adam Pigg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-18 22:58 UTC by Jarosław Staniek
Modified: 2014-05-09 23:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jarosław Staniek 2014-03-18 22:58:45 UTC
Crash when attempting to export report to a spreadsheet in a non-writable dir.



Reproducible: Always

Steps to Reproduce:
1. Open report in data view
2. Select Export to spreadsheet
3. Select non-writable directory
Actual Results:  
Crash

Expected Results:  
Error should be displayed and user should be able to change the directory selection.

Fixes would involve KoOdfWriteStore.
Comment 1 Jarosław Staniek 2014-03-19 10:24:14 UTC
The same issue when exporting to a ODT text document.
Comment 2 Jarosław Staniek 2014-03-19 21:50:45 UTC
Git commit 74ee314a15a047e63d06deee497cf713491b383f by Jaroslaw Staniek.
Committed on 19/03/2014 at 15:25.
Pushed by staniek into branch 'master'.

Fix crash on exporting report to a spreadsheet/text doc in a non-writable dir
REVIEW:116904

Depends on https://git.reviewboard.kde.org/r/116893/

M  +33   -27   libs/koreport/renderer/ods/KoSimpleOdsDocument.cpp

http://commits.kde.org/calligra/74ee314a15a047e63d06deee497cf713491b383f
Comment 3 Jarosław Staniek 2014-03-19 21:50:46 UTC
Git commit 0b29857b0459ff9c1653a7397de8a7bf51c7c97f by Jaroslaw Staniek.
Committed on 19/03/2014 at 10:23.
Pushed by staniek into branch 'master'.

On closing the content writer do not expect it to be allocated

This fixes assertion in KoSimpleOdsDocument::createContent() where content stays unallocated if the filepath points to a nonwritable directory. Manifest and body are both allocated so I left the relevant assertions and conditions intact.
REVIEW:116893

M  +9    -5    libs/odf/KoOdfWriteStore.cpp

http://commits.kde.org/calligra/0b29857b0459ff9c1653a7397de8a7bf51c7c97f
Comment 4 Jarosław Staniek 2014-03-19 21:56:13 UTC
Git commit 8cef87fde082f4b5e3105a834911bdb1d8037dff by Jaroslaw Staniek.
Committed on 19/03/2014 at 15:25.
Pushed by staniek into branch 'calligra/2.8'.

Fix crash on exporting report to a spreadsheet/text doc in a non-writable dir
REVIEW:116904

Depends on https://git.reviewboard.kde.org/r/116893/

M  +33   -27   libs/koreport/renderer/ods/KoSimpleOdsDocument.cpp

http://commits.kde.org/calligra/8cef87fde082f4b5e3105a834911bdb1d8037dff
Comment 5 Jarosław Staniek 2014-03-19 21:56:14 UTC
Git commit 6c53d6fc56bde869071382c143eb278e4d1380ee by Jaroslaw Staniek.
Committed on 19/03/2014 at 10:23.
Pushed by staniek into branch 'calligra/2.8'.

On closing the content writer do not expect it to be allocated

This fixes assertion in KoSimpleOdsDocument::createContent() where content stays unallocated if the filepath points to a nonwritable directory. Manifest and body are both allocated so I left the relevant assertions and conditions intact.
REVIEW:116893

M  +9    -5    libs/odf/KoOdfWriteStore.cpp

http://commits.kde.org/calligra/6c53d6fc56bde869071382c143eb278e4d1380ee