Issue 70919 - Example code in developer guide wrong
Summary: Example code in developer guide wrong
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: sdk (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: chne
QA Contact: issues@api
URL:
Keywords: needmoreinfo
Depends on:
Blocks:
 
Reported: 2006-10-26 22:51 UTC by unlord
Modified: 2013-02-24 20:54 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description unlord 2006-10-26 22:51:25 UTC
If you look at section 9.3.1 in the developers guide found here:

http://api.openoffice.org/docs/DevelopersGuide/Drawing/Drawing.xhtml

The following example code is incorrect:

  XDrawPage xDrawPage = (XDrawPage)xDrawPages.getByIndex(nIndex);

and should be:

  XDrawPage xDrawPage =
(XDrawPage)UnoRuntime.queryInterface(XDrawPage.class,xDrawPages.getByIndex(nIndex));


This type of problem can be found everywhere in the docs.  For example, on the
same page under the section:

Glue Points and Connectors

The 3rd line of code reads:

  XPage xDrawPages.getByIndex( 0 );

which won't even compile.
Comment 1 grsingleton 2006-10-26 23:11:59 UTC
Please provide source for document so the doc project can correct the error.
Comment 2 unlord 2006-10-26 23:14:13 UTC
I thought I did, this document is currently online at the following URL:

http://api.openoffice.org/docs/DevelopersGuide/Drawing/Drawing.xhtml

What additional information do you need?
Comment 3 grsingleton 2006-10-26 23:18:31 UTC
Does http://api.openoffice.org/docs/ equal
http://documentation.openoffice.org/manuals/ ? I think you want another
component don't you?
Comment 4 Uwe Fischer 2006-10-27 11:46:08 UTC
api component
Comment 5 Uwe Fischer 2006-10-27 11:46:49 UTC
reassigned to default owner of api
Comment 6 jsc 2006-10-30 11:08:16 UTC
accepted
Comment 7 jsc 2006-11-06 08:28:04 UTC
set target
Comment 8 jsc 2007-02-15 13:53:22 UTC
fixed for OO.org 2.3
Comment 9 chne 2007-07-04 15:04:42 UTC
change owner to cn
Comment 10 chne 2007-07-04 15:05:36 UTC
ok in cws => verified
Comment 11 chne 2007-07-18 13:13:32 UTC
ok in master