Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello Stephan,

2011/9/28 Stephan Bergmann <sbergman@redhat.com>

On 09/28/2011 10:46 AM, Michael Meeks wrote:

       Incidentally, while trying to get some StarBasic / VBA unit tests
working with Moggi, it seemed that some of our hangs were down to
dialogs showing up that were simply not visible, and spinning the
mainloop waiting for a response.

static void aBasicErrorFunc( const String&rErr, const String&rAction )
{
    rtl::OStringBuffer aErr( "Unexpected dialog: " );
    aErr.append( rtl::OUStringToOString( rAction,
RTL_TEXTENCODING_ASCII_US ) );
    aErr.append( " Error: " );
    aErr.append( rtl::OUStringToOString( rErr, RTL_TEXTENCODING_ASCII_US )
);
    CPPUNIT_ASSERT_MESSAGE( aErr.getStr(), false);
}

void FiltersTest::setUp()
{
    ErrorHandler::RegisterDisplay( aBasicErrorFunc );
}

       Solves that rather pleasantly, with the added bonus that it might
help
improve the accuracy / helpfulness our basic error reporting over time.

       I suspect we should do this for all unit-tests above tools, and the
head-less smoketest too.


But isn't it the way that all dialogs are implicitly cancelled in headless
mode, anyway?

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.

Markus

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.