Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||API: cannot create new empty form document using the public UNO API|
|Product:||Base||Reporter:||Frank Schönheit <frank.schoenheit>|
|Component:||code||Assignee:||AOO issues mailing list <issues>|
|Status:||CONFIRMED ---||QA Contact:|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
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 ...