Issue 57097

Summary: API: cannot create new empty form document using the public UNO API
Product: Base Reporter: Frank Schönheit <frank.schoenheit>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
document to reproduce the bug case none

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
- 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 "".