Issue 57097 - API: cannot create new empty form document using the public UNO API
Summary: API: cannot create new empty form document using the public UNO API
Status: CONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.0
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-01 08:17 UTC by Frank Schönheit
Modified: 2017-05-20 10:44 UTC (History)
1 user (show)

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


Attachments
document to reproduce the bug case (565 bytes, text/plain)
2005-11-01 08:19 UTC, Frank Schönheit
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2005-11-01 08:17:24 UTC
The Developer's Guide states that you can create a new form (or report, for that
matter) document in a database by using createInstanceWithArguments, and passing
arguments named "Name" and "ActiveConnection".
This does not work, as the attached macro proves.

There are several problems associated with trying to create a new empty form
document:
- API-wise, you need to pass a cryptic "ClassID" property to the
  createInstanceWithArguments method, else the document definition internally does
  not create an embedded object
- even if the proper class id is passed, the form does not yet exist. Instead,
it is only
  saved after it is opened in design mode, and then saved. This (opening an UI) is
  not acceptable for scripting.

We need a API mechanism to simply "create a new empty form with name 'foo'".
Comment 1 Frank Schönheit 2005-11-01 08:19:21 UTC
Created attachment 31069 [details]
document to reproduce the bug case
Comment 2 Frank Schönheit 2005-11-01 08:22:31 UTC
fs->oj: it's not as simple as defaulting the ClassId property ...
Comment 3 Frank Schönheit 2005-11-01 08:34:33 UTC
ah, wrong, it *is* as easy as defaulting this argument. An additional
insertByName persists the form, no need to explicitly save it ...
Comment 4 Frank Schönheit 2005-11-01 08:48:20 UTC
argh. insertByName shows the form document in the application window, but leaves
it unusable - opening just raises some useless error message :(
We have to think about the concepts in detail here ...
Comment 5 Marcus 2017-05-20 10:44:49 UTC
Reset the assignee to the default "issues@openoffice.apache.org".