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

go through getParentXWindow

Change-Id: I1f52e1f9ff3fedf8996f72e671400c2549e74dfe
Reviewed-on: https://gerrit.libreoffice.org/54488Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst bf09cd79
......@@ -53,7 +53,7 @@ enum class MessageBoxStyle {
DialogMask
executeErrorDialog(
vcl::Window const * pParent,
weld::Window* pParent,
task::InteractionClassification eClassification,
OUString const & rContext,
OUString const & rMessage,
......@@ -72,19 +72,19 @@ executeErrorDialog(
switch (eClassification)
{
case task::InteractionClassification_ERROR:
xBox.reset(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr,
xBox.reset(Application::CreateMessageDialog(pParent,
VclMessageType::Error, VclButtonsType::NONE, aText.makeStringAndClear()));
break;
case task::InteractionClassification_WARNING:
xBox.reset(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr,
xBox.reset(Application::CreateMessageDialog(pParent,
VclMessageType::Warning, VclButtonsType::NONE, aText.makeStringAndClear()));
break;
case task::InteractionClassification_INFO:
xBox.reset(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr,
xBox.reset(Application::CreateMessageDialog(pParent,
VclMessageType::Info, VclButtonsType::NONE, aText.makeStringAndClear()));
break;
case task::InteractionClassification_QUERY:
xBox.reset(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr,
xBox.reset(Application::CreateMessageDialog(pParent,
VclMessageType::Question, VclButtonsType::NONE, aText.makeStringAndClear()));
break;
default:
......@@ -245,8 +245,9 @@ UUIInteractionHelper::handleErrorHandlerRequest(
}
}
DialogMask nResult = executeErrorDialog(
getParentProperty(), eClassification, aContext, aMessage, nButtonMask );
uno::Reference<awt::XWindow> xParent = getParentXWindow();
DialogMask nResult = executeErrorDialog(Application::GetFrameWeld(xParent),
eClassification, aContext, aMessage, nButtonMask );
switch (nResult)
{
......
......@@ -210,38 +210,38 @@ UUIInteractionHelper::handleLockedDocumentRequest(
document::LockedDocumentRequest aLockedDocumentRequest;
if (aAnyRequest >>= aLockedDocumentRequest )
{
vcl::Window* pWin = getParentProperty();
handleLockedDocumentRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
aLockedDocumentRequest.DocumentURL,
aLockedDocumentRequest.UserInfo,
rRequest->getContinuations(),
UUI_DOC_LOAD_LOCK );
uno::Reference<awt::XWindow> xParent = getParentXWindow();
handleLockedDocumentRequest_(Application::GetFrameWeld(xParent),
aLockedDocumentRequest.DocumentURL,
aLockedDocumentRequest.UserInfo,
rRequest->getContinuations(),
UUI_DOC_LOAD_LOCK);
return true;
}
document::OwnLockOnDocumentRequest aOwnLockOnDocumentRequest;
if (aAnyRequest >>= aOwnLockOnDocumentRequest )
{
vcl::Window* pWin = getParentProperty();
handleLockedDocumentRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
aOwnLockOnDocumentRequest.DocumentURL,
aOwnLockOnDocumentRequest.TimeInfo,
rRequest->getContinuations(),
aOwnLockOnDocumentRequest.IsStoring
? UUI_DOC_OWN_SAVE_LOCK
: UUI_DOC_OWN_LOAD_LOCK );
uno::Reference<awt::XWindow> xParent = getParentXWindow();
handleLockedDocumentRequest_(Application::GetFrameWeld(xParent),
aOwnLockOnDocumentRequest.DocumentURL,
aOwnLockOnDocumentRequest.TimeInfo,
rRequest->getContinuations(),
aOwnLockOnDocumentRequest.IsStoring
? UUI_DOC_OWN_SAVE_LOCK
: UUI_DOC_OWN_LOAD_LOCK);
return true;
}
document::LockedOnSavingRequest aLockedOnSavingRequest;
if (aAnyRequest >>= aLockedOnSavingRequest )
{
vcl::Window* pWin = getParentProperty();
handleLockedDocumentRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
aLockedOnSavingRequest.DocumentURL,
aLockedOnSavingRequest.UserInfo,
rRequest->getContinuations(),
UUI_DOC_SAVE_LOCK );
uno::Reference<awt::XWindow> xParent = getParentXWindow();
handleLockedDocumentRequest_(Application::GetFrameWeld(xParent),
aLockedOnSavingRequest.DocumentURL,
aLockedOnSavingRequest.UserInfo,
rRequest->getContinuations(),
UUI_DOC_SAVE_LOCK);
return true;
}
return false;
......@@ -256,9 +256,9 @@ UUIInteractionHelper::handleChangedByOthersRequest(
document::ChangedByOthersRequest aChangedByOthersRequest;
if (aAnyRequest >>= aChangedByOthersRequest )
{
vcl::Window* pWin = getParentProperty();
handleChangedByOthersRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
rRequest->getContinuations() );
uno::Reference<awt::XWindow> xParent = getParentXWindow();
handleChangedByOthersRequest_(Application::GetFrameWeld(xParent),
rRequest->getContinuations());
return true;
}
return false;
......@@ -274,18 +274,18 @@ UUIInteractionHelper::handleLockFileProblemRequest(
document::LockFileIgnoreRequest aLockFileIgnoreRequest;
if (aAnyRequest >>= aLockFileIgnoreRequest )
{
vcl::Window* pWin = getParentProperty();
handleLockFileProblemRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
rRequest->getContinuations(), UUI_DOC_CreateErrDlg );
uno::Reference<awt::XWindow> xParent = getParentXWindow();
handleLockFileProblemRequest_(Application::GetFrameWeld(xParent),
rRequest->getContinuations(), UUI_DOC_CreateErrDlg);
return true;
}
document::LockFileCorruptRequest aLockFileCorruptRequest;
if (aAnyRequest >>= aLockFileCorruptRequest )
{
vcl::Window* pWin = getParentProperty();
handleLockFileProblemRequest_( pWin ? pWin->GetFrameWeld() : nullptr,
rRequest->getContinuations(), UUI_DOC_CorruptErrDlg );
uno::Reference<awt::XWindow> xParent = getParentXWindow();
handleLockFileProblemRequest_(Application::GetFrameWeld(xParent),
rRequest->getContinuations(), UUI_DOC_CorruptErrDlg);
return true;
}
......
......@@ -348,8 +348,8 @@ UUIInteractionHelper::handleCertificateValidationRequest(
ucb::CertificateValidationRequest aCertificateValidationRequest;
if (aAnyRequest >>= aCertificateValidationRequest)
{
vcl::Window* pWindow = getParentProperty();
handleCertificateValidationRequest_(pWindow ? pWindow->GetFrameWeld() : nullptr,
uno::Reference<awt::XWindow> xParent = getParentXWindow();
handleCertificateValidationRequest_(Application::GetFrameWeld(xParent),
m_xContext,
aCertificateValidationRequest,
rRequest->getContinuations());
......
......@@ -1137,13 +1137,13 @@ UUIInteractionHelper::handleGenericErrorRequest(
aTitle += " - " ;
aTitle += aErrTitle;
vcl::Window* pWin = getParentProperty();
executeMessageBox(pWin ? pWin->GetFrameWeld() : nullptr, aTitle, aErrorString, VclMessageType::Error);
uno::Reference<awt::XWindow> xParent = getParentXWindow();
executeMessageBox(Application::GetFrameWeld(xParent), aTitle, aErrorString, VclMessageType::Error);
}
else
{
vcl::Window* pParent = getParentProperty();
ErrorHandler::HandleError(nErrorCode, pParent ? pParent->GetFrameWeld() : nullptr);
uno::Reference<awt::XWindow> xParent = getParentXWindow();
ErrorHandler::HandleError(nErrorCode, Application::GetFrameWeld(xParent));
}
if (xApprove.is() && bWarning)
......@@ -1169,8 +1169,8 @@ UUIInteractionHelper::handleMacroConfirmRequest(
bool bApprove = false;
bool bShowSignatures = aSignInfo.getLength() > 0;
vcl::Window* pWin = getParentProperty();
MacroWarning aWarning(pWin ? pWin->GetFrameWeld() : nullptr, bShowSignatures);
uno::Reference<awt::XWindow> xParent = getParentXWindow();
MacroWarning aWarning(Application::GetFrameWeld(xParent), bShowSignatures);
aWarning.SetDocumentURL(aDocumentURL);
if ( aSignInfo.getLength() > 1 )
......@@ -1252,8 +1252,8 @@ UUIInteractionHelper::handleBrokenPackageRequest(
" " +
utl::ConfigManager::getProductVersion() );
vcl::Window* pWin = getParentProperty();
switch (executeMessageBox(pWin ? pWin->GetFrameWeld() : nullptr, title, aMessage, eMessageType))
uno::Reference<awt::XWindow> xParent = getParentXWindow();
switch (executeMessageBox(Application::GetFrameWeld(xParent), title, aMessage, eMessageType))
{
case DialogMask::ButtonsOk:
OSL_ENSURE( xAbort.is(), "unexpected situation" );
......
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