diff options
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index d8eb515e8eda..e21a83310256 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1483,7 +1483,16 @@ void ScModule::SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm ) //if ( pViewFrm ) // pViewFrm->GetBindings().Update(); // to avoid trouble in LockDispatcher - m_nCurRefDlgId = bVis ? nId : 0 ; // before SetChildWindow + // before SetChildWindow + if ( comphelper::LibreOfficeKit::isActive() ) + { + if ( bVis ) + m_nCurRefDlgId = nId; + } + else + { + m_nCurRefDlgId = bVis ? nId : 0; + } if ( pViewFrm ) { @@ -1753,7 +1762,13 @@ void ScModule::EndReference() //FIXME: ShowRefFrame at InputHdl, if the Function AutoPilot is open? if ( m_nCurRefDlgId ) { - SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( m_nCurRefDlgId ); + SfxChildWindow* pChildWnd = nullptr; + + if ( comphelper::LibreOfficeKit::isActive() ) + pChildWnd = lcl_GetChildWinFromCurrentView( m_nCurRefDlgId ); + else + pChildWnd = lcl_GetChildWinFromAnyView( m_nCurRefDlgId ); + OSL_ENSURE( pChildWnd, "NoChildWin" ); if ( pChildWnd ) { |