diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/drawview.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 51 | ||||
-rw-r--r-- | sd/source/ui/view/drviews4.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 19 | ||||
-rw-r--r-- | sd/source/ui/view/sdview4.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 3 |
7 files changed, 30 insertions, 55 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index f70554442f34..c89213c5880d 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1282,8 +1282,7 @@ public: // Show warning that the orientation could not be set. if (pViewShell) { - vcl::Window* pWin = pViewShell->GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pViewShell->GetFrameWeld(), VclMessageType::Warning, VclButtonsType::OkCancel, SdResId(STR_WARN_PRINTFORMAT_FAILURE))); xWarn->set_default_response(RET_CANCEL); diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index d1b2832c2cc4..56a07fdb6486 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -433,8 +433,7 @@ bool DrawView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAtt { if (IsPresObjSelected(false)) { - vcl::Window* pWin = mpDrawViewShell->GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(mpDrawViewShell->GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 940ac082849e..6ba5d833ee9b 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -954,8 +954,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -1002,8 +1001,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -1033,8 +1031,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(true,true,true) ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -1556,8 +1553,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { if ( mpDrawView->IsPresObjSelected(false) ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -1738,8 +1734,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if( !bDone ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, #ifndef UNX SdResId(STR_TWAIN_NO_SOURCE) @@ -1816,8 +1811,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) || aLayerName.isEmpty() ) { // name already exists - vcl::Window* pWin = GetParentWindow(); - std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Warning, VclButtonsType::Ok, SdResId(STR_WARN_NAME_DUPLICATE))); xWarn->run(); @@ -1985,8 +1979,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) aLayerName != aOldLayerName) || aLayerName.isEmpty() ) { // name already exists - vcl::Window* pWin = GetParentWindow(); - std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Warning, VclButtonsType::Ok, SdResId(STR_WARN_NAME_DUPLICATE))); xWarn->run(); @@ -2468,8 +2461,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { if ( mpDrawView->IsPresObjSelected( true, true, true ) ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -2504,8 +2496,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); - ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, aName)); + ScopedVclPtr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(GetFrameWeld(), aName)); OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->SetCheckNameHdl(LINK(this, DrawViewShell, NameObjectHdl)); @@ -2538,7 +2529,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); - ScopedVclPtr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(aTitle, aDescription)); + ScopedVclPtr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog( + GetFrameWeld(), aTitle, aDescription)); OSL_ENSURE(pDlg, "Dialog creation failed!"); if(RET_OK == pDlg->Execute()) @@ -2591,8 +2583,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -2611,8 +2602,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { if ( mpDrawView->IsPresObjSelected() ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -2634,8 +2624,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -2658,8 +2647,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -2682,8 +2670,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -2727,8 +2714,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { if ( mpDrawView->IsPresObjSelected() ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -2822,8 +2808,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { if ( mpDrawView->IsPresObjSelected() ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 5638ab8e3bdf..a8e2621a1834 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -105,8 +105,7 @@ void DrawViewShell::DeleteActualLayer() // replace placeholder aString = aString.replaceFirst("$", rName); - vcl::Window* pWin = GetActiveWindow(); - 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, aString)); if (xQueryBox->run() == RET_YES) diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 42f4f12e4d19..2c917163ace7 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -324,17 +324,16 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if ( mpDrawView->GetMarkedObjectList().GetMarkCount() > 0 && !mpDrawView->IsCrookAllowed( mpDrawView->IsCrookNoContortion() ) ) { - ::sd::Window* pWindow = GetActiveWindow(); if ( mpDrawView->IsPresObjSelected() ) { - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); } else { - std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Question, VclButtonsType::YesNo, SdResId(STR_ASK_FOR_CONVERT_TO_BEZIER))); if (xQueryBox->run() == RET_YES ) @@ -368,17 +367,16 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if ( nMarkCnt > 0 && !b3DObjMarked && (!mpDrawView->IsShearAllowed() || !mpDrawView->IsDistortAllowed()) ) { - ::sd::Window* pWindow = GetActiveWindow(); if ( mpDrawView->IsPresObjSelected() ) { - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); } else { - std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Question, VclButtonsType::YesNo, SdResId(STR_ASK_FOR_CONVERT_TO_BEZIER))); if (xQueryBox->run() == RET_YES) @@ -683,8 +681,7 @@ void DrawViewShell::FuDeleteSelectedObjects() // placeholders which cannot be deleted selected if (mpDrawView->IsPresObjSelected(false, true, false, true)) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -796,8 +793,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { if ( mpDrawView->IsPresObjSelected(false, true, false, true) ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); @@ -821,8 +817,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { if ( mpDrawView->IsPresObjSelected(false, true, false, true) ) { - ::sd::Window* pWindow = GetActiveWindow(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWindow ? pWindow->GetFrameWeld() : nullptr, + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SdResId(STR_ACTION_NOTPOSSIBLE))); xInfoBox->run(); diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 1fa41a3485dc..a3368f593acc 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -377,8 +377,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Timer *, void) if( !mpViewSh ) return; - vcl::Window* pWindow = mpViewSh->GetActiveWindow(); - SfxErrorContext aEc( ERRCTX_ERROR, pWindow ? pWindow->GetFrameWeld() : nullptr, RID_SO_ERRCTX ); + SfxErrorContext aEc( ERRCTX_ERROR, mpViewSh->GetFrameWeld(), RID_SO_ERRCTX ); ErrCode nError = ERRCODE_NONE; ::std::vector< OUString >::const_iterator aIter( maDropFileVector.begin() ); diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 6a2d2eec54e2..b7fe8861223e 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -717,8 +717,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) { ErrCode aErrCode = ERRCODE_NONE; - vcl::Window* pWindow = GetActiveWindow(); - SfxErrorContext aEC(ERRCTX_SO_DOVERB, pWindow ? pWindow->GetFrameWeld() : nullptr, RID_SO_ERRCTX); + SfxErrorContext aEC(ERRCTX_SO_DOVERB, GetFrameWeld(), RID_SO_ERRCTX); bool bAbort = false; GetDocSh()->SetWaitCursor( true ); SfxViewShell* pViewShell = GetViewShell(); |