summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/reffact.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-04-16 17:17:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-04-17 22:21:54 +0200
commite54762baa8019d02cadd311e750f6ff0d276f67b (patch)
treecfc9596639edeab1a0f3d659c55be60dc138e145 /sc/source/ui/view/reffact.cxx
parent05a0c51ced86460b273a24f5884c99f46d8aae0d (diff)
weld ScTPValidationValue and ScValidationDlg
Change-Id: I74b1569fe378f42c1cc78ca8d9b758c6e585c979 Reviewed-on: https://gerrit.libreoffice.org/70845 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/view/reffact.cxx')
-rw-r--r--sc/source/ui/view/reffact.cxx31
1 files changed, 13 insertions, 18 deletions
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 02c89d153321..4ccce3e9f575 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -306,38 +306,33 @@ namespace
}
}
-ScValidityRefChildWin::ScValidityRefChildWin( vcl::Window* pParentP,
- sal_uInt16 nId,
- const SfxBindings* p,
+ScValidityRefChildWin::ScValidityRefChildWin(vcl::Window* pParentP,
+ sal_uInt16 nId,
+ const SfxBindings* p,
SAL_UNUSED_PARAMETER SfxChildWinInfo* /*pInfo*/ )
- : SfxChildWindow(pParentP, nId),
- m_bVisibleLock( false ),
- m_bFreeWindowLock( false ),
- m_pSavedWndParent( nullptr )
+ : SfxChildWindow(pParentP, nId)
+ , m_bVisibleLock(false)
+ , m_bFreeWindowLock(false)
{
SetWantsFocus( false );
- VclPtr<ScValidationDlg> pDlg = ScValidationDlg::Find1AliveObject( pParentP );
- SetWindow(pDlg);
+ std::shared_ptr<SfxDialogController> xDlg(ScValidationDlg::Find1AliveObject(pParentP->GetFrameWeld()));
+ SetController(xDlg);
ScTabViewShell* pViewShell;
- if (pDlg)
- pViewShell = static_cast<ScValidationDlg*>(GetWindow())->GetTabViewShell();
+ if (xDlg)
+ pViewShell = static_cast<ScValidationDlg*>(xDlg.get())->GetTabViewShell();
else
pViewShell = lcl_GetTabViewShell( p );
if (!pViewShell)
pViewShell = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() );
OSL_ENSURE( pViewShell, "missing view shell :-(" );
- if (pViewShell && !GetWindow())
+ if (pViewShell && !xDlg)
pViewShell->GetViewFrame()->SetChildWindow( nId, false );
-
- if( GetWindow() ) m_pSavedWndParent = GetWindow()->GetParent();
}
ScValidityRefChildWin::~ScValidityRefChildWin()
{
- if( GetWindow() ) GetWindow()->SetParent( m_pSavedWndParent );
-
- if( m_bFreeWindowLock )
- SetWindow(nullptr);
+ if (m_bFreeWindowLock)
+ SetController(nullptr);
}
IMPL_CHILD_CTOR( ScCondFormatDlgWrapper, WID_CONDFRMT_REF )