Kaydet (Commit) dc324bbf authored tarafından Markus Mohrhard's avatar Markus Mohrhard

uitest: fix small race condition when launching modeless dialogs

Change-Id: I44f7af1b44badce6ed09eeca0bb19760b5f22aa9
Reviewed-on: https://gerrit.libreoffice.org/49942Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 76aea63d
......@@ -176,6 +176,8 @@ class VCL_DLLPUBLIC ModelessDialog : public Dialog
public:
explicit ModelessDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription, Dialog::InitFlag eFlag = Dialog::InitFlag::Default );
void Activate() override;
};
class VCL_DLLPUBLIC ModalDialog : public Dialog
......
......@@ -731,17 +731,6 @@ void Dialog::StateChanged( StateChangedType nType )
ImplInitSettings();
Invalidate();
}
if (!mbModalMode && nType == StateChangedType::Visible)
{
css::uno::Reference< css::uno::XComponentContext > xContext(
comphelper::getProcessComponentContext() );
css::uno::Reference<css::frame::XGlobalEventBroadcaster> xEventBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_QUERY_THROW);
css::document::DocumentEvent aObject;
aObject.EventName = "ModelessDialogVisible";
xEventBroadcaster->documentEventOccured(aObject);
UITestLogger::getInstance().log("Modeless Dialog Visible");
}
}
void Dialog::DataChanged( const DataChangedEvent& rDCEvt )
......@@ -1302,4 +1291,16 @@ ModalDialog::ModalDialog( vcl::Window* pParent, const OUString& rID, const OUStr
{
}
void ModelessDialog::Activate()
{
css::uno::Reference< css::uno::XComponentContext > xContext(
comphelper::getProcessComponentContext() );
css::uno::Reference<css::frame::XGlobalEventBroadcaster> xEventBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_QUERY_THROW);
css::document::DocumentEvent aObject;
aObject.EventName = "ModelessDialogVisible";
xEventBroadcaster->documentEventOccured(aObject);
UITestLogger::getInstance().log("Modeless Dialog Visible");
Dialog::Activate();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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