Issue 100671 - Missing tag "Since" for XDocumentPropertiesSupplier
Summary: Missing tag "Since" for XDocumentPropertiesSupplier
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P2 Trivial
Target Milestone: ---
Assignee: Frank Schönheit
QA Contact: issues@api
URL:
Keywords:
: 101932 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-03-30 10:19 UTC by eberlein
Modified: 2017-05-20 09:32 UTC (History)
7 users (show)

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


Attachments
patch (21.69 KB, patch)
2009-05-15 10:24 UTC, Frank Schönheit
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description eberlein 2009-03-30 10:19:33 UTC
Service DocumentInfo is deprecated. Please add the since tag for
XDocumentPropertiesSupplier, XDocumentProperties, DocumentProperties and publish
these interfaces/service.
Comment 1 jsc 2009-03-30 13:18:00 UTC
jsc -> mst: please take care of this. We should always add the since tags to new
API's, independent of published or unpublished. 
Comment 2 mst.ooo 2009-04-21 18:05:19 UTC
hmm... no idea what is going wrong here. the since tags are in all 3 files, and
have been since integration of CWS custommeta (DEV300m1).

see here:
http://svn.services.openoffice.org/opengrok/xref/DEV300_m46/offapi/com/sun/star/document/XDocumentPropertiesSupplier.idl

when i run autodoc manually on the css.document module, the generated HTML files
have the proper since annotation.
but on our API site, the since annotation is missing:

http://api.openoffice.org/docs/common/ref/com/sun/star/document/XDocumentPropertiesSupplier.html

as i really don't know what to do here, and i have no idea how the documentation
on our API site is generated, i assign this back to jsc.
Comment 3 Rainer Bielefeld 2009-04-24 07:17:06 UTC
Due to mst's comments (and own check) NEW
Comment 4 jsc 2009-04-24 09:30:31 UTC
jsc: it looks correct in the IDL, the same is true for XDocumentProperties where
the since tag is also missing.

jsc -> np: do you have an idea what's going wrong, it's your tool. I would
consider this issue as serious for the SDK product because we lost very
important information. And of course it's not only for the SDK but also the
public API reference docu online. For that reason i increased the prio and set a
target 3.2. The online docu will be updated asap when a fix will be available.
Comment 5 nikolai.pretzell 2009-04-24 13:23:15 UTC
np->jsc: I'll have a look. As there is nothing obvious and I am on vacation next
week, I'll look at beginning of May.

Comment 6 Frank Schönheit 2009-05-15 08:17:00 UTC
Perhaps caused by
http://svn.services.openoffice.org/ooo/tags/OOO310_m11/odk/pack/copying/apiref-autodoc.since?

That file contains the list of how to translate the short names used in the
@since tag to actual product names. I don't see anything like "OOo 3.0" here,
only "3.0". (Side note: I also don't see anything like "3.1" there, so everybody
using this in IDL will also lose this information in the generated docu.)

Sounds a little bit ... strange to me that autodoc silently drops the @since
tags it cannot substitue, instead of bailing out with an error. Finally, the IDL
author didn't add the @since tag for fun, but because it transports important
information, right?
Comment 7 Frank Schönheit 2009-05-15 08:42:54 UTC
Oh, much better than I thought ... apiref-autodoc.since doesn't need to contain
the "OOo", instead autodoc strips all non-numerical tokens from since's value.
So, if you write
  @since OOo 3.0
then autodoc completely ignores "3.0".

However, debugging this a little bit shows that for some reason, the token which
is actually looked up in the since file is "3.0 ", not "3.0" - note the
superfluous space. This token is not found, so "since" is ignored.

Not sure if this applies to *all* lost since tags, but the first incarnation
where the "return if do not find the token"-breakpoint had exactly this problem.
Comment 8 Frank Schönheit 2009-05-15 08:47:33 UTC
Sigh. If autodoc wouldn't use a hand-made String class from module cosv, but the
more feature one from rtl, then one could easily add a "trim" call to
http://svn.services.openoffice.org/opengrok/xref/DEV300_m47/autodoc/source/display/idl/hfi_tag.cxx#155,
to remove the superfluous whitespaces ...
Comment 9 Frank Schönheit 2009-05-15 10:24:05 UTC
Created attachment 62287 [details]
patch
Comment 10 Frank Schönheit 2009-05-15 10:25:16 UTC
*** Issue 101932 has been marked as a duplicate of this issue. ***
Comment 11 Frank Schönheit 2009-05-15 10:28:30 UTC
Attached is a three-stage patch:
- in module autodoc, an error handling is introduced which will let autodoc
  bail out if a "-sincefile" argument was provided, and a certain @since-value
  could not be found in that file.
  That part of the patch might not be optimal, actually "autodoc" is not really
  my playground ...
- in odk, the file containing the since-mappings is extended by all values
  currently (DEV300.m47) to be found in offapi/udkapi
- in offapi, invalid since-values are fixed

Note that a a consequence of the first item, the build in module odk now breaks
if somebody introduces an invalid/nonexistent since value without adjusting the
since-mappings file. I'd consider this breakage a Good Thing (TM).
Comment 12 eberlein 2009-05-15 10:43:18 UTC
Hey Frank, seems you're a Johnny-on-the-spot ;)
Comment 13 nikolai.pretzell 2009-05-15 15:28:38 UTC
Hi Frank, thanks for the debugging effort. The bug in autodoc seems to be
introducing the additional space. I could not see the space in the .since file.
Trimming spaces is a good idea, as it adds some robustness, if indeed .since
file entries would be wrong. 
I'll add those.
Comment 14 nikolai.pretzell 2009-09-10 09:10:40 UTC
Fixed autodoc, such that it complains, if 
1. since tags are to be "translated" AND 2. the given version number is unknown
in the translation table file.
Comment 15 nikolai.pretzell 2009-09-10 10:41:48 UTC
re-assign for verifying
Comment 16 Frank Schönheit 2009-09-11 09:15:21 UTC
looks good in CWS: autodoc now bails out if a since-file is given on the command
line, and an IDL files contains an unknown since-tag. Also, the three types
which originally triggered the issue also have a since tag with them (in module
odk, where the dev guide is created).