Hello Ariel,
Note that I answer your mail in [email protected] (which I don't
need to introduce to you :), which is the better place for reasons of
scaling.
Full quote to allow new readers to know what this is about ...
> Hi everybody,
> Hi Frank,
Not sure who else you address, the mail has been sent to my personally
only, at least it seems. Anyway.
> I'll try to be knapp und klar :)
>
> I was asked how to open a form that OOo couldn't open after rename it.
> The problem was that the user renamed it (main app. window, right mouse
> click) using a slash "xxx/yyy" character.
> Obviously OOo tries to open it by hierarchical name, looking for a
> folder with the name before the slash "xxx/" and a form (doc.
> definition) named "yyy".
>
> After some testing, I've realize that
>
> * when we create a form in design view, and try to store it, if we use a
> slash in its name [a] if the folder does not exists, OOo shows a message
> that there is no folder with this name; [b] if the folder exists, OOo
> saves the form named by the user "xxx/yyy" in the folder xxx under the
> name yyy
>
> * when we rename a form in the application main window, with a right
> mouse button click: option "Rename", the dialog "Rename to" DOES NOT
> prevent the user from renaming it with a slash "/". So, if the folder
> does not exist: [a] OOo can't open the form (message: "the document
> "xxx/yyy" could not be open"), [b] it is IMPOSSIBLE to rename again in
> order to fix the problem, OOo shows in this case no explanation
>
>
> Of course, with a little macro using com.sun.star.sdbcx.XRename ::
> rename( NewName string)(*), the problem is fixed in a second; BUT the
> common user who has no OOoBasic/API knowledge at all should be prevent from
> renaming a form with a slash character.
>
> I hope I was knapp und klar, if not, please check the ODB. I send you a
> copy of this mailed to your personal email
>
> Should I suggest a fix?
>
> Thanks
> Ariel Constenla-Haile.
>
>
> (*)
> Sub Rename_a_Doc_Def
> oDBContext = createUNOService("com.sun.star.sdb.DatabaseContext")
> oDataSource = oDBContext.getByName(convertToURL(( "E:\mydb.odb" ))
> oDatabaseDocument = oDataSource.DatabaseDocument
> oDocumentContainer = oDocBASE.getFormDocuments()
> oDocumentDefinition = oDocumentContainer.getByName("form/name")
> oDocumentDefinition.rename("form_name")
> End Sub
This is knwon as issue 73074, and fixed in CWS dba23a, which will
hopefully be part of 680m212. With this fix integrated, you will by no
means be allowed to create a form (or report, for that matter) which
contains a slash in its name.
I agree that Joe average will have a problem fixing this himself, but
unfortunately there is no other repair possibility except the API way
you suggested.
Ciao
Frank
--
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems http://www.sun.com/staroffice -
- OpenOffice.org Base http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]