incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 119411] [RDF] Read/write RDF support on ODS file format
Date Tue, 29 May 2012 15:21:38 GMT

--- Comment #5 from Ariel Constenla-Haile <> ---
(In reply to comment #0)
> Proposed patch to add rdf read/write support in ods
> AOO 3.4 supports RDF read/write and statement on some document element of
> Writer. 
> But on Calc ODS document does not support RDF. If it supports read/write of
> RDF in odf file filter at least, extensions can be use it to store data in
> it. 
> I wrote patch for ods filter according to filter of odt,
> main/sw/source/filter/xml/wrtxml.cxx and main/sw/source/filter/xml/swxml.cxx.

The patch works fine, it needs only to consider two points:
a) when only the styles are requested, RDF can be ignored
b) when loading/storing the metadata from/to the storage, the exceptions should
be taken into account for the function final return value

You can see both points in 

For (a), take into account the "OrganizerMode", and surround the code with an
if-statement ( if (!bStylesOnly) ). You can debug this "OrganizerMode":
- save a spreadsheet document as template
- go to the menu "File" - "Templates" - "Organize..."
- set a break point on ScXMLImportWrapper::Import
- double click on your template
This will try to import only the styles from the file, and will list them in
the  "Template Management" dialog. With the current patch, you'll see that
bStylesOnly is true, but the RDF metadata is read. See in
main/sw/source/filter/xml/swxml.cxx the 
if (!(IsOrganizerMode() || ...), this is there to save us from importing the
RDF metdata in this case where it isn't relevant.

For (b), we shouldn't ignore the exceptions thrown by
loadMetadataFromStorage/storeMetadataToStorage . Here too look at the code in
While the css::lang::WrappedTargetException can be marked as an ERROR with
SCERR_IMPORT_UNKNOWN, I'm not sure there is a flag  in sc/inc/scerrors.hxx to
mark a WARNING when losing the RDF metadata (I mean, to flag a data/feature
lost that is a WARNING, but not an ERROR). If you find that you need to add new
defines in that file, flag them with the proper WARNING flag

You are receiving this mail because:
You are the assignee for the bug.

View raw message