Kaydet (Commit) 67fe0b50 authored tarafından Caolán McNamara's avatar Caolán McNamara

the real bug behind so many apparent crashtest discoveries

the tests are done headless with dbgutil enabled and
this dialog contents dumped in dbgutil mode tries to
spit out the contents of the various "file format
not known", "file busted" dialogs with some bad casts
and falls over and dies

Change-Id: I353619f0209902d4c099b42064fd48c3c547f846
üst b3b0ecbf
...@@ -57,15 +57,22 @@ static OString ImplGetDialogText( Dialog* pDialog ) ...@@ -57,15 +57,22 @@ static OString ImplGetDialogText( Dialog* pDialog )
{ {
OStringBuffer aErrorStr(OUStringToOString( OStringBuffer aErrorStr(OUStringToOString(
pDialog->GetText(), RTL_TEXTENCODING_UTF8)); pDialog->GetText(), RTL_TEXTENCODING_UTF8));
if ( (pDialog->GetType() == WINDOW_MESSBOX) ||
(pDialog->GetType() == WINDOW_INFOBOX) || OUString sMessage;
(pDialog->GetType() == WINDOW_WARNINGBOX) || if (MessBox* pMessBox = dynamic_cast<MessBox*>(pDialog))
(pDialog->GetType() == WINDOW_ERRORBOX) || {
(pDialog->GetType() == WINDOW_QUERYBOX) ) sMessage = pMessBox->GetMessText();
}
else if (MessageDialog* pMessDialog = dynamic_cast<MessageDialog*>(pDialog))
{
sMessage = pMessDialog->get_primary_text();
}
if (!sMessage.isEmpty())
{ {
aErrorStr.append(", "); aErrorStr.append(", ");
aErrorStr.append(OUStringToOString( aErrorStr.append(OUStringToOString(
static_cast<MessBox*>(pDialog)->GetMessText(), RTL_TEXTENCODING_UTF8)); sMessage, RTL_TEXTENCODING_UTF8));
} }
return aErrorStr.makeStringAndClear(); return aErrorStr.makeStringAndClear();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment