Hello Stephan,<br><br><div class="gmail_quote">2011/9/28 Stephan Bergmann <span dir="ltr"><<a href="mailto:sbergman@redhat.com">sbergman@redhat.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 09/28/2011 10:46 AM, Michael Meeks wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Incidentally, while trying to get some StarBasic / VBA unit tests<br>
working with Moggi, it seemed that some of our hangs were down to<br>
dialogs showing up that were simply not visible, and spinning the<br>
mainloop waiting for a response.<br>
<br>
static void aBasicErrorFunc( const String&rErr, const String&rAction )<br>
{<br>
rtl::OStringBuffer aErr( "Unexpected dialog: " );<br>
aErr.append( rtl::OUStringToOString( rAction, RTL_TEXTENCODING_ASCII_US ) );<br>
aErr.append( " Error: " );<br>
aErr.append( rtl::OUStringToOString( rErr, RTL_TEXTENCODING_ASCII_US ) );<br>
CPPUNIT_ASSERT_MESSAGE( aErr.getStr(), false);<br>
}<br>
<br>
void FiltersTest::setUp()<br>
{<br>
ErrorHandler::RegisterDisplay( aBasicErrorFunc );<br>
}<br>
<br>
Solves that rather pleasantly, with the added bonus that it might help<br>
improve the accuracy / helpfulness our basic error reporting over time.<br>
<br>
I suspect we should do this for all unit-tests above tools, and the<br>
head-less smoketest too.<br>
</blockquote>
<br></div>
But isn't it the way that all dialogs are implicitly cancelled in headless mode, anyway?<br><font color="#888888">
</font><br></blockquote></div>The Basic Error Dialog seems to be the only dialog at the moment that still tries to show up and results in a loop while waiting for user input. Micheal's patch fixed that problem for me and makes it possible to try to run basic code in unit tests.<br>
<br>Markus<br>