Apache OpenOffice (AOO) Bugzilla – Issue 83963
creating a dialog without title crashes openoffice when executing the dialog
Last modified: 2013-02-24 21:06:36 UTC
Hello, I tried to create a dialog using openoffice basic. I designed the dialog, and set no title to my dialog. In fact i set a title but i had set the flag "Avec barre de titre" to false. (I'm sorry but i use a french version). When i load my dialog, it crash openoffice. But if i set "Avec barre de titre" to true, it works. It may be usefull to check this for other programmers, because i lost two hours to find why my dialog produced a crash. Thanks
I just had the same problem on OOo 2.3.1 release (regular English version) on Windows XP, running OOoBasic code like: DialogLibraries.loadLibrary("Standard") oDialog = createUnoDialog(DialogLibraries.Standard.NoTitleDialog) '* OOo crashes when creating the dialog, but will work fine again if you set the dialog to show the title bar.
jsc -> ab: seems to be one for you or for cd?
STARTED, OOo 2.4, -> cws ab42
The problem is that this "No title" property has only been designed to create tab pages in the Dialog Editor to be used as option pages for extensions. Maybe this is not documented sufficiently, I will check this. Anyway it makes no sense at all to disable the title bar if the de- signed dialog should really be used as a dialog. Of course disabling the title bar shouldn't lead to a crash anyway but a dialog cannot be displayed without a title respectively a parent window in any case. I fixed the problem for now by overriding the "no title" property in case of usage with CreateUnoDialog and DialogProvider service: oDlgProv = CreateUnoService("com.sun.star.awt.DialogProvider") oDialog = oDlgProv.createDialog( "vnd.sun.star.script:Standard.NoTitleDialog?location=application") Only when using the ContainerWindowProvider to instantiate the Dialog respectively TabPage the property will be used.
ab->jsk: Please verify: 1. Open Dialog Editor in App/Standard lib and create a dialog Dialog1 2. Set dialog property "with title bar" to No 3. Paste the following test macro into Module1 and run it: Sub Main oDlgProv = CreateUnoService("com.sun.star.awt.DialogProvider") oDialog = oDlgProv.createDialog( "vnd.sun.star.script:Standard.Dialog1?location=application") oDialog.execute oDialog2 = createUnoDialog(DialogLibraries.Standard.Dialog1) '* oDialog2.execute End Sub This shouldn't crash any more. The dialogs are displayed with an empty title bar, even if a title is set. It's not possible to display a dialog completely without title.
It does not crash anymore. Verified with a few modifications and additional test cases.
Closed, seen good im ooh680m10