drop intermediate vcl::Window
Change-Id: If06902f0308511fb40b031899c912c36da0b610e
Reviewed-on: https://gerrit.libreoffice.org/72167
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 8d10df6..945e980 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -763,9 +763,8 @@ void ScDocShell::Execute( SfxRequest& rReq )
m_pImpl->pDocInserter.reset();
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
vcl::Window* pParent = pViewSh ? pViewSh->GetDialogParent() : nullptr;
m_pImpl->pDocInserter.reset( new ::sfx2::DocumentInserter(pParent ? pParent->GetFrameWeld() : nullptr,
weld::Window* pParent = pViewSh ? pViewSh->GetFrameWeld() : nullptr;
m_pImpl->pDocInserter.reset( new ::sfx2::DocumentInserter(pParent,
ScDocShell::Factory().GetFactoryName(), mode ) );
m_pImpl->pDocInserter->StartExecuteModal( LINK( this, ScDocShell, DialogClosedHdl ) );
return ;
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 76e8f68..c510d68 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -409,9 +409,9 @@ void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq )
pView->MergeAttrFromMarked( aNewAttr, false );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
vcl::Window* pWin = pViewData->GetDialogParent();
weld::Window* pWin = pViewData->GetFrameWeld();
ScopedVclPtr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog(
pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr,
pWin, &aNewAttr,
pViewData->GetDocument()->GetDrawLayer(), true));
if ( pDlg->Execute() == RET_OK )
@@ -436,8 +436,8 @@ void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq )
pView->MergeAttrFromMarked( aNewAttr, false );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
vcl::Window* pWin = pViewData->GetDialogParent();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr, pView));
weld::Window* pWin = pViewData->GetFrameWeld();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(pWin, &aNewAttr, pView));
sal_uInt16 nResult = pDlg->Execute();
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 87777cf..1100de6 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -866,8 +866,7 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
case SID_DRAWTEXT_ATTR_DLG:
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
vcl::Window* pWin = pViewData->GetDialogParent();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( pWin ? pWin->GetFrameWeld() : nullptr, &aEditAttr, pView ));
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(pViewData->GetFrameWeld(), &aEditAttr, pView));
bDone = ( RET_OK == pDlg->Execute() );
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
index 183362c..401c954 100644
--- a/sc/source/ui/drawfunc/drtxtob1.cxx
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -102,8 +102,7 @@ void ScDrawTextObjectBar::ExecutePasteContents( SfxRequest & /* rReq */ )
SdrView* pView = pViewData->GetScDrawView();
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
vcl::Window* pWin = pViewData->GetDialogParent();
ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(pWin ? pWin->GetFrameWeld() : nullptr));
ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(pViewData->GetFrameWeld()));
pDlg->Insert( SotClipboardFormatId::STRING, EMPTY_OUSTRING );
pDlg->Insert( SotClipboardFormatId::RTF, EMPTY_OUSTRING );
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index e1c39b3..61c3899 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -199,8 +199,7 @@ void ScGraphicShell::ExecuteCompressGraphic( SAL_UNUSED_PARAMETER SfxRequest& )
if( dynamic_cast<const SdrGrafObj*>( pObj) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap )
{
SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(pObj);
vcl::Window* pWin = GetViewData()->GetDialogParent();
CompressGraphicsDialog dialog(pWin ? pWin->GetFrameWeld() : nullptr, pGraphicObj, GetViewData()->GetBindings());
CompressGraphicsDialog dialog(GetViewData()->GetFrameWeld(), pGraphicObj, GetViewData()->GetBindings());
if (dialog.run() == RET_OK)
{
SdrGrafObj* pNewObject = dialog.GetCompressedSdrGrafObj();
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 1d5ab96..a738669 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -224,7 +224,7 @@ public:
virtual ~ScTabViewShell() override;
vcl::Window* GetDialogParent();
vcl::Window* GetDialogParent();
bool IsRefInputMode() const;
void ExecuteInputDirect();
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 791716a..bd751a4 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2022,8 +2022,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
// or should create a new overlapping conditional format
if(bContainsCondFormat && !bCondFormatDlg && bContainsExistingCondFormat)
{
vcl::Window* pWin = pTabViewShell->GetDialogParent();
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pTabViewShell->GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
ScResId(STR_EDIT_EXISTING_COND_FORMATS)));
xQueryBox->set_default_response(RET_YES);
@@ -2541,9 +2540,8 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if (!pList)
pList = pDoc->GetCondFormList( aPos.Tab() );
vcl::Window* pWin = pTabViewShell->GetDialogParent();
VclPtr<AbstractScCondFormatManagerDlg> pDlg(pFact->CreateScCondFormatMgrDlg(
pWin ? pWin->GetFrameWeld() : nullptr, pDoc, pList));
pTabViewShell->GetFrameWeld(), pDoc, pList));
if (pDlgItem)
pDlg->SetModified();
@@ -2918,8 +2916,7 @@ void ScCellShell::ExecuteDataPilotDialog()
if ( pDoc->HasSubTotalCells( aRange ) )
{
// confirm selection if it contains SubTotal cells
vcl::Window* pWin = pTabViewShell->GetDialogParent();
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pTabViewShell->GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
ScResId(STR_DATAPILOT_SUBTOTAL)));
xQueryBox->set_default_response(RET_YES);
@@ -2950,8 +2947,7 @@ void ScCellShell::ExecuteDataPilotDialog()
if (pSrcErrorId)
{
// Error occurred during data creation. Launch an error and bail out.
vcl::Window* pWin = pTabViewShell->GetDialogParent();
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pTabViewShell->GetFrameWeld(),
VclMessageType::Info, VclButtonsType::Ok,
ScResId(pSrcErrorId)));
xInfoBox->run();
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 3f1569b..621427d 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -423,8 +423,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
bool bExtend = rReq.IsAPI();
if (!bExtend)
{
vcl::Window* pWin = pTabViewShell->GetDialogParent();
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pTabViewShell->GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
ScResId(STR_UPDATE_SCENARIO)));
xQueryBox->set_default_response(RET_YES);
@@ -439,8 +438,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
else if( ! rReq.IsAPI() )
{
vcl::Window* pWin = pTabViewShell->GetDialogParent();
std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pTabViewShell->GetFrameWeld(),
VclMessageType::Warning, VclButtonsType::Ok,
ScResId(STR_NOAREASELECTED)));
xErrorBox->run();
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index d5064b4..b82762b 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -342,8 +342,7 @@ void ScDBFunc::ToggleAutoFilter()
{
if (!bHeader)
{
vcl::Window* pWin = GetViewData().GetDialogParent();
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetViewData().GetFrameWeld(),
VclMessageType::Question,
VclButtonsType::YesNo, ScResId(STR_MSSG_MAKEAUTOFILTER_0))); // header from first row?
xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0)); // "StarCalc"
@@ -372,8 +371,7 @@ void ScDBFunc::ToggleAutoFilter()
}
else
{
vcl::Window* pWin = GetViewData().GetDialogParent();
std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(GetViewData().GetFrameWeld(),
VclMessageType::Warning, VclButtonsType::Ok,
ScResId(STR_ERR_AUTOFILTER)));
xErrorBox->run();
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 40bd881..7a7946b 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -418,14 +418,13 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord,
return;
}
WaitObject aWait( GetViewData().GetDialogParent() );
weld::WaitObject aWait(GetViewData().GetFrameWeld());
bool bOk = true;
if (rParam.bReplace)
{
if (rDoc.TestRemoveSubTotals( nTab, rParam ))
{
vcl::Window* pWin = GetViewData().GetDialogParent();
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetViewData().GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
ScResId(STR_MSSG_DOSUBTOTALS_1))); // "delete data?"
xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0)); // "StarCalc"
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 1005928..05ad3a5 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -270,8 +270,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_PASTE_SPECIAL:
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
vcl::Window* pWin = pViewData->GetDialogParent();
ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(pWin ? pWin->GetFrameWeld() : nullptr));
ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(pViewData->GetFrameWeld()));
SotClipboardFormatId nFormat = SotClipboardFormatId::NONE;
pDlg->Insert( SotClipboardFormatId::STRING, EMPTY_OUSTRING );
pDlg->Insert( SotClipboardFormatId::RTF, EMPTY_OUSTRING );
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 002a846..f55d280 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -732,8 +732,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
aZoomItem.SetValueSet( nBtnFlags );
aSet.Put( aZoomItem );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
vcl::Window* pWin = GetDialogParent();
pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(pWin ? pWin->GetFrameWeld() : nullptr, aSet));
pDlg.disposeAndReset(pFact->CreateSvxZoomDialog(GetFrameWeld(), aSet));
pDlg->SetLimits( MINZOOM, MAXZOOM );
bCancel = ( RET_CANCEL == pDlg->Execute() );
@@ -1050,7 +1049,6 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
}
}
vcl::Window* pWin = GetDialogParent();
ScDocProtection* pProtect = pDoc->GetDocProtection();
if (pProtect && pProtect->isProtected())
{
@@ -1061,7 +1059,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
OUString aText(ScResId(SCSTR_PASSWORD));
SfxPasswordDialog aDlg(pWin ? pWin->GetFrameWeld() : nullptr, &aText);
SfxPasswordDialog aDlg(GetFrameWeld(), &aText);
aDlg.set_title(ScResId(SCSTR_UNPROTECTDOC));
aDlg.SetMinLen(0);
aDlg.set_help_id(GetStaticInterface()->GetSlot(FID_PROTECT_DOC)->GetCommand());
@@ -1083,7 +1081,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
OUString aText(ScResId(SCSTR_PASSWORDOPT));
SfxPasswordDialog aDlg(pWin ? pWin->GetFrameWeld() : nullptr, &aText);
SfxPasswordDialog aDlg(GetFrameWeld(), &aText);
aDlg.set_title(ScResId(SCSTR_PROTECTDOC));
aDlg.SetMinLen( 0 );
aDlg.set_help_id(GetStaticInterface()->GetSlot(FID_PROTECT_DOC)->GetCommand());
@@ -1130,8 +1128,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if (pProtect && pProtect->isProtectedWithPass())
{
OUString aText( ScResId(SCSTR_PASSWORDOPT) );
vcl::Window* pWin = GetDialogParent();
SfxPasswordDialog aDlg(pWin ? pWin->GetFrameWeld() : nullptr, &aText);
SfxPasswordDialog aDlg(GetFrameWeld(), &aText);
aDlg.set_title(ScResId(SCSTR_UNPROTECTTAB));
aDlg.SetMinLen(0);
aDlg.set_help_id(GetStaticInterface()->GetSlot(FID_PROTECT_TABLE)->GetCommand());
@@ -1157,8 +1154,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
// Protect a current sheet.
vcl::Window* pWin = GetDialogParent();
ScTableProtectionDlg aDlg(pWin ? pWin->GetFrameWeld() : nullptr);
ScTableProtectionDlg aDlg(GetFrameWeld());
ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
if (pProtect)
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 03e7e7f..fadba4a 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -392,9 +392,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
vcl::Window* pWin = GetDialogParent();
ScopedVclPtr<AbstractScStringInputDlg> pDlg(pFact->CreateScStringInputDlg(
pWin ? pWin->GetFrameWeld() : nullptr, aDlgTitle, ScResId(SCSTR_NAME),
GetFrameWeld(), aDlgTitle, ScResId(SCSTR_NAME),
aName, GetStaticInterface()->GetSlot(nSlot)->GetCommand(),
pHelpId));
@@ -432,7 +431,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
else
{
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(),
VclMessageType::Warning, VclButtonsType::Ok, aErrMsg));
nRet = xBox->run();
}
@@ -621,10 +620,9 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
}
vcl::Window* pWin = GetDialogParent();
if (bTabWithPivotTable)
{
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
ScResId(STR_QUERY_PIVOTTABLE_DELTAB)));
xQueryBox->set_default_response(RET_NO);
@@ -634,7 +632,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
else
{
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
ScResId(STR_QUERY_DELTAB)));
xQueryBox->set_default_response(RET_YES);
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index bc8a055..7cc06cd 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1182,8 +1182,7 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bCenter )
bool bShowDialog = officecfg::Office::Calc::Compatibility::MergeCells::ShowDialog::get();
if (!bApi && bShowDialog)
{
vcl::Window* pWin = GetViewData().GetDialogParent();
ScMergeCellsDialog aBox(pWin ? pWin->GetFrameWeld() : nullptr);
ScMergeCellsDialog aBox(GetViewData().GetFrameWeld());
sal_uInt16 nRetVal = aBox.run();
if ( nRetVal == RET_OK )
@@ -2122,8 +2121,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
aMsgStr += ScResId( STR_MSSG_SOLVE_4 );
}
vcl::Window* pWin = GetViewData().GetDialogParent();
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetViewData().GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo, aMsgStr));
xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0));
xBox->set_default_response(RET_NO);
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 84cbdcf..2dbc3e9 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1062,8 +1062,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
ScWaitCursorOff aWaitOff( GetFrameWin() );
OUString aMessage = ScResId( STR_PASTE_BIGGER );
vcl::Window* pWin = GetViewData().GetDialogParent();
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetViewData().GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
aMessage));
xQueryBox->set_default_response(RET_NO);
@@ -1151,8 +1150,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
if ( bAskIfNotEmpty )
{
ScRangeList aTestRanges(aUserRange);
vcl::Window* pWin = GetViewData().GetDialogParent();
if (!checkDestRangeForOverwrite(aTestRanges, pDoc, aFilteredMark, pWin ? pWin->GetFrameWeld() : nullptr))
if (!checkDestRangeForOverwrite(aTestRanges, pDoc, aFilteredMark, GetViewData().GetFrameWeld()))
return false;
}
}
@@ -1519,8 +1517,7 @@ bool ScViewFunc::PasteMultiRangesFromClip(
if (bAskIfNotEmpty)
{
ScRangeList aTestRanges(aMarkedRange);
vcl::Window* pWin = GetViewData().GetDialogParent();
if (!checkDestRangeForOverwrite(aTestRanges, pDoc, aMark, pWin ? pWin->GetFrameWeld() : nullptr))
if (!checkDestRangeForOverwrite(aTestRanges, pDoc, aMark, GetViewData().GetFrameWeld()))
return false;
}
@@ -1682,8 +1679,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
if (bAskIfNotEmpty)
{
vcl::Window* pWin = GetViewData().GetDialogParent();
if (!checkDestRangeForOverwrite(aRanges, pDoc, aMark, pWin ? pWin->GetFrameWeld() : nullptr))
if (!checkDestRangeForOverwrite(aRanges, pDoc, aMark, GetViewData().GetFrameWeld()))
return false;
}
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 7c34c1b..dbae345 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -398,8 +398,7 @@ void ScViewFunc::DoThesaurus()
OUString aErr = SvtLanguageTable::GetLanguageString(eLnge);
aErr += ScResId( STR_SPELLING_NO_LANG );
vcl::Window* pWin = GetViewData().GetDialogParent();
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetViewData().GetFrameWeld(),
VclMessageType::Info, VclButtonsType::Ok,
aErr));
xInfoBox->run();
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 894259d..991e363 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -447,8 +447,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
OUString aMessage( ScResId( SCSTR_FORMULA_AUTOCORRECTION ) );
aMessage += aCorrectedFormula;
vcl::Window* pWin = GetViewData().GetDialogParent();
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetViewData().GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
aMessage));
xQueryBox->set_default_response(RET_YES);