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

weld MappingDialog

Change-Id: Ie4c6ef0f75384e1fbd68905cf4c70ed6d7ab88fe
Reviewed-on: https://gerrit.libreoffice.org/73003
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst f46ece54
...@@ -187,7 +187,7 @@ namespace bib ...@@ -187,7 +187,7 @@ namespace bib
IMPL_LINK_NOARG( BibView, CallMappingHdl, void*, void) IMPL_LINK_NOARG( BibView, CallMappingHdl, void*, void)
{ {
m_pDatMan->CreateMappingDialog( this ); m_pDatMan->CreateMappingDialog(GetFrameWeld());
} }
void BibView::Resize() void BibView::Resize()
......
...@@ -148,7 +148,7 @@ public: ...@@ -148,7 +148,7 @@ public:
css::uno::Reference< css::awt::XControlModel > loadControlModel(const OUString& rName, css::uno::Reference< css::awt::XControlModel > loadControlModel(const OUString& rName,
bool bForceListBox); bool bForceListBox);
void CreateMappingDialog(vcl::Window* pParent); void CreateMappingDialog(weld::Window* pParent);
OUString CreateDBChangeDialog(weld::Window* pParent); OUString CreateDBChangeDialog(weld::Window* pParent);
void DispatchDBChangeDialog(); void DispatchDBChangeDialog();
......
...@@ -371,8 +371,8 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen ...@@ -371,8 +371,8 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
if ( !bDisposing ) if ( !bDisposing )
{ {
::SolarMutexGuard aGuard; ::SolarMutexGuard aGuard;
VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow( xWindow ); weld::Window* pParent = Application::GetFrameWeld(xWindow);
WaitObject aWaitObject( pParent ); weld::WaitObject aWaitObject(pParent);
OUString aCommand( _rURL.Path); OUString aCommand( _rURL.Path);
if(aCommand == "Bib/Mapping") if(aCommand == "Bib/Mapping")
...@@ -385,7 +385,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen ...@@ -385,7 +385,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
} }
else if(aCommand == "Bib/sdbsource") else if(aCommand == "Bib/sdbsource")
{ {
OUString aURL = m_xDatMan->CreateDBChangeDialog(pParent ? pParent->GetFrameWeld() : nullptr); OUString aURL = m_xDatMan->CreateDBChangeDialog(pParent);
if(!aURL.isEmpty()) if(!aURL.isEmpty())
{ {
try try
......
...@@ -363,19 +363,20 @@ void BibToolBar::Click() ...@@ -363,19 +363,20 @@ void BibToolBar::Click()
{ {
sal_uInt16 nId = GetCurItemId(); sal_uInt16 nId = GetCurItemId();
vcl::Window* pWin = GetParent();
if (nId == nTBC_BT_COL_ASSIGN ) if (nId == nTBC_BT_COL_ASSIGN )
{ {
if(pDatMan) if (pDatMan)
pDatMan->CreateMappingDialog(GetParent()); pDatMan->CreateMappingDialog(pWin ? pWin->GetFrameWeld() : nullptr);
CheckItem( nId, false ); CheckItem( nId, false );
} }
else if (nId == nTBC_BT_CHANGESOURCE) else if (nId == nTBC_BT_CHANGESOURCE)
{ {
if(pDatMan) if (pDatMan)
{ {
vcl::Window* pWin = GetParent();
OUString sNew = pDatMan->CreateDBChangeDialog(pWin ? pWin->GetFrameWeld() : nullptr); OUString sNew = pDatMan->CreateDBChangeDialog(pWin ? pWin->GetFrameWeld() : nullptr);
if(!sNew.isEmpty()) if (!sNew.isEmpty())
pDatMan->setActiveDataSource(sNew); pDatMan->setActiveDataSource(sNew);
} }
CheckItem( nId, false ); CheckItem( nId, false );
......
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