Bug 67929 - Graphics lists not saved
Summary: Graphics lists not saved
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Save
  Show dependency treegraph
 
Reported: 2013-08-09 00:55 UTC by Olivier Hallot
Modified: 2023-12-29 12:40 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Hallot 2013-08-09 00:55:40 UTC
Saving Bitmap/Hatch/Arrowhead etc... list in invlaid storage does not warn user and does not save.

Steps to reproduce, for Arrowheads (same for other graphics objects)

1) Draw a line in any document. 

2) Select Line, open context menu, click on Line

3) Select Arrow Styles tab. Click the Save button. The save dialog opens to define path and filename.

4) Select an invalid path, e.g. / or /home or /sbin (non-writable folder)

Results: File is not saved. No warning for user.

Expected result: A warning message telling the user that the save operation failed.

The issue is in 

bool SvxXMLXTableExportComponent::save(

found in

/svx/source/xml/xmlxtexp.cxx

that does not return false on unsuccessful save operation.
Comment 1 Olivier Hallot 2013-08-11 23:15:14 UTC
Correction: The illegal path save list error works with the bitmap list but does not return error with hatch lists, color lists, arrow lists, gradient lists and line styles lists.

The issue is in an uncatched error provoked by bSaveAsStorage 

 bool bSaveAsStorage = xTable->getElementType() == ::getCppuType((const OUString*)0);

in /svx/source/xml/xmlxtexp.cxx (line 223)

It should be catched in lines 

if( bSaveAsStorage )
  xSubStorage = ::comphelper::OStorageHelper::GetStorageFromURL( rURL, eCreate );

when GetStorageFromURL returns an error. (lines 243,244)

In that case, xTable->getElementType() seems to vary from bitmap to the other lists and makes bSaveAsStorage change.
Comment 2 Owen Genat (retired) 2013-12-08 05:13:18 UTC
(From comment #1)
> The illegal path save list error works with the bitmap list but does not return 
> error with hatch lists, color lists, arrow lists, gradient lists and line 
> styles lists.

Confirmed. Status set to NEW. Platform set to All/All. Tested under Ubuntu 10.04 x86_64 running Draw from:

- v3.3.0.4 OOO330m19 Build: 6
- v4.1.3.2 Build ID: 70feb7d99726f064edab4605a8ab840c50ec57a

Version set to Inherited From OOo, which seem consistent with the OpenGrok history of the indicated file.
Comment 3 QA Administrators 2015-04-19 03:23:01 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2016-09-20 09:24:30 UTC Comment hidden (obsolete)
Comment 5 eisa01 2018-03-31 19:54:44 UTC
Still present, saving to root drive does not work and does not throw error

Version: 6.1.0.0.alpha0+
Build ID: a488c7ad2763b944713997911c1ddb0315d8c93f
CPU threads: 2; OS: Mac OS X 10.12.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2018-03-26_00:38:29
Locale: en-US (en_US.UTF-8); Calc: group
Comment 6 QA Administrators 2019-04-01 03:25:21 UTC Comment hidden (obsolete)
Comment 7 eisa01 2019-04-20 18:12:15 UTC
Still present

Version: 6.3.0.0.alpha0+
Build ID: ea9c13be02ba731074fa4207944ff7df40a0fb5c
CPU threads: 2; OS: Mac OS X 10.13.6; UI render: default; VCL: osx; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2019-04-10_20:43:17
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 8 QA Administrators 2021-04-20 03:54:49 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2023-04-21 03:27:27 UTC Comment hidden (obsolete)
Comment 10 eisa01 2023-12-29 12:40:26 UTC
I do get a warning on macOS now, is it also fixed on Windows/Linux?

Version: 24.2.0.0.beta1 (AARCH64) / LibreOffice Community
Build ID: 5f390384195b7264c6e52add9e90a39790285249
CPU threads: 10; OS: macOS 14.2; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded