diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-03 21:40:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-04 18:08:37 +0100 |
commit | c7a071b064695fdb93fedf37d4ed4ea99d83e99b (patch) | |
tree | 1f9bfda67dc156c2c6e951d44cc4c03d494892e2 /sd | |
parent | a77b493392ecdfe2e58bb0fcfa7363a8583dffe4 (diff) |
weld SvxNameDialog
Change-Id: Iac7bdf9c998e611b56473a685aee276a56adf996
Reviewed-on: https://gerrit.libreoffice.org/50702
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/docshell/docshel2.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/DrawDocShell.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview2.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/tabcontr.cxx | 2 |
6 files changed, 9 insertions, 8 deletions
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index d25c6c0abb94..a0958eb1ef0e 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -275,7 +275,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage) * name. * @return sal_False if the user cancels the action. */ -bool DrawDocShell::CheckPageName (vcl::Window* pWin, OUString& rName ) +bool DrawDocShell::CheckPageName(weld::Window* pWin, OUString& rName) { const OUString aStrForDlg( rName ); bool bIsNameValid = IsNewPageNameValid( rName, true ); @@ -286,7 +286,7 @@ bool DrawDocShell::CheckPageName (vcl::Window* pWin, OUString& rName ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if( pFact ) { - ScopedVclPtr<AbstractSvxNameDialog> aNameDlg( pFact->CreateSvxNameDialog( pWin, aStrForDlg, aDesc ) ); + ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog(pWin, aStrForDlg, aDesc)); aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE ); aNameDlg->SetCheckNameHdl( LINK( this, DrawDocShell, RenameSlideHdl ) ); diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index 7638d35b61b2..3645b27f22d4 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -148,7 +148,7 @@ public: a default name of a not-yet-existing slide (e.g. 'Slide 17'), sal_True is returned, but rName is set to an empty string. */ - bool CheckPageName(vcl::Window* pWin, OUString& rName ); + bool CheckPageName(weld::Window* pWin, OUString& rName ); void SetSlotFilter(bool bEnable = false, o3tl::array_view<sal_uInt16 const> pSIDs = o3tl::array_view<sal_uInt16 const>()) { mbFilterEnable = bEnable; mpFilterSIDs = pSIDs; } void ApplySlotFilter() const; diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 36876957064e..9f302fdd8f7c 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -881,8 +881,9 @@ void SlotManager::RenameSlide(const SfxRequest& rRequest) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialog creation failed!"); + vcl::Window* pWin = mrSlideSorter.GetContentWindow(); ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog( - mrSlideSorter.GetContentWindow(), + pWin ? pWin->GetFrameWeld() : nullptr, aPageName, aDescr)); DBG_ASSERT(aNameDlg, "Dialog creation failed!"); aNameDlg->SetText( aTitle ); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index df48f77d5642..f3bbb1ee5117 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -786,7 +786,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialog creation failed!"); - ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog( GetActiveWindow(), aPageName, aDescr )); + ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aPageName, aDescr)); DBG_ASSERT(aNameDlg, "Dialog creation failed!"); aNameDlg->SetText( aTitle ); aNameDlg->SetCheckNameHdl( LINK( this, DrawViewShell, RenameSlideHdl ), true ); diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 7a042c44623a..81aff44869e2 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -870,7 +870,7 @@ bool View::GetExchangeList (std::vector<OUString> &rExchangeList, OUString aNewName = *pIter; if( nType == 0 || nType == 2 ) - bNameOK = mpDocSh->CheckPageName(mpViewSh->GetActiveWindow(), aNewName); + bNameOK = mpDocSh->CheckPageName(mpViewSh->GetFrameWeld(), aNewName); if( bNameOK && ( nType == 1 || nType == 2 ) ) { @@ -880,7 +880,7 @@ bool View::GetExchangeList (std::vector<OUString> &rExchangeList, OUString aDesc(SdResId(STR_DESC_NAMEGROUP)); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact ? pFact->CreateSvxNameDialog(mpViewSh->GetActiveWindow(), aNewName, aDesc) : nullptr); + ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact ? pFact->CreateSvxNameDialog(mpViewSh->GetFrameWeld(), aNewName, aDesc) : nullptr); if (pDlg) { diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx index c1d9398d77a8..7f71c3e1a05c 100644 --- a/sd/source/ui/view/tabcontr.cxx +++ b/sd/source/ui/view/tabcontr.cxx @@ -319,7 +319,7 @@ TabBarAllowRenamingReturnCode TabControl::AllowRenaming() if( aCompareName != aNewName ) { // rename page - if( pDrViewSh->GetDocSh()->CheckPageName( this, aNewName ) ) + if (pDrViewSh->GetDocSh()->CheckPageName(GetFrameWeld(), aNewName)) { SetEditText( aNewName ); EndRenaming(); |