Issue 114162 - ODF : attribute "config:type" has a bad value.
Summary: ODF : attribute "config:type" has a bad value.
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: OOO330m5
Hardware: All All
: P3 Trivial (vote)
Target Milestone: 3.4.0
Assignee: Oliver Specht
QA Contact: issues@sw
URL:
Keywords: odf_validation
Depends on:
Blocks:
 
Reported: 2010-08-27 20:16 UTC by jbf.faure
Modified: 2017-05-20 10:22 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
not valid ODF file (17.38 KB, application/vnd.oasis.opendocument.text)
2010-08-27 20:17 UTC, jbf.faure
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jbf.faure 2010-08-27 20:16:26 UTC
The attached odt file does not contains text but styles. It is a file which has
been saved by several versions of OOo and from which I removed all the text.
ODF validator find this file not valid ODF with errors in settings.xml

Kind regards. JBF
Comment 1 jbf.faure 2010-08-27 20:17:15 UTC
Created attachment 71440 [details]
not valid ODF file
Comment 2 michael.ruess 2010-09-01 13:44:07 UTC
MRU->OS / OD: the config-items "PreviewPrintNumRows"and "PreviewPrintNumColumns"
in the settings.xml have wrong config-type "byte". I do not where these
config-items are geerated - maybe a relict from older times?
Comment 3 Oliver Specht 2010-09-01 14:39:29 UTC
At looks as if the preview print options are not in use anymore. 
->tl: With printerpullpages there is no special setting of page preview print
settings available anymore. Was that intended?
Comment 4 thomas.lange 2010-09-02 09:33:33 UTC
Removing the 'Print Options' from the print preview was done voluntarily by
printerpullpages. Thus for getting rid of the still existing old code I have
created issue 114267 now.

tl->mst: About the 'byte' thing can you have a look at this? Thanks!

Setting target to 3.4 since we like to know early if everything is right here.
Comment 5 mst.ooo 2010-09-06 18:12:24 UTC
the ODF schema indeed allows "short", "int", and "long", but not "byte".

(i'd guess the omission was an accident, maybe at the time there weren't any
"byte" items, so nobody noticed.)

because "byte" is already not allowed in ODF 1.1 i guess we'll have to do
something about it.

easiest thing would be to store these as "short" instead.
looking at the import code (xmloff/source/core/DocumentSettingsContext.cxx) this
would mean that on import an any with sal_Int16 instead of sal_Int8 would be
produced for such items.

would this cause any problems for the configuration?
would the configuration manager convert these back to sal_Int8?
or does the type not really matter?
Comment 6 Oliver Specht 2010-09-07 06:50:35 UTC
->mst: As the values PreviewPrintNumRows and PreviewPrintNumColumns are going to
be removed there is no 'byte' value anymore at the API. 

If at any time byte values are re-introduced then the xmloff code should assert
and not write them to the file. 
Comment 7 mst.ooo 2010-09-07 14:43:51 UTC
i agree with os' suggestion to disable the storing of "byte" config items
altogether.

@nn, cl:
i'm assuming that Calc/Impress also don't store config-items of type "byte" in
settings.xml currently.

unless one of you objects i'm going to disable storing them.
Comment 8 mst.ooo 2010-09-09 19:21:35 UTC
replaced the code that writes "byte" config-items with an assertion.

fixed in cws sw34bf01
http://hg.services.openoffice.org/hg/cws/sw34bf01/rev/b051d2edc3de
Comment 9 Oliver-Rainer Wittmann 2010-09-29 10:35:46 UTC
adding keyword
Comment 10 mst.ooo 2010-10-07 11:14:42 UTC
please verify
Comment 11 Oliver Specht 2010-10-07 12:07:18 UTC
verified