summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/scmod.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/app/scmod.cxx')
-rw-r--r--sc/source/ui/app/scmod.cxx32
1 files changed, 31 insertions, 1 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index fe71ab45b6b3..599e6e9a99b3 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1563,6 +1563,14 @@ bool ScModule::IsModalMode(SfxObjectShell* pDocSh)
!( pRefDlg->IsRefInputMode() && pRefDlg->IsDocAllowed(pDocSh) );
}
}
+ else if ( pDocSh && comphelper::LibreOfficeKit::isActive() )
+ {
+ // m_nCurRefDlgId is not deglobalized so it can be set by other view
+ // in LOK case when no ChildWindow for this view was detected -> fallback
+ ScInputHandler* pHdl = GetInputHdl();
+ if ( pHdl )
+ bIsModal = pHdl->IsModalMode(pDocSh);
+ }
}
else if (pDocSh)
{
@@ -1644,6 +1652,14 @@ bool ScModule::IsFormulaMode()
bIsFormula = pChildWnd->IsVisible() && pRefDlg && pRefDlg->IsRefInputMode();
}
}
+ else if ( comphelper::LibreOfficeKit::isActive() )
+ {
+ // m_nCurRefDlgId is not deglobalized so it can be set by other view
+ // in LOK case when no ChildWindow for this view was detected -> fallback
+ ScInputHandler* pHdl = GetInputHdl();
+ if ( pHdl )
+ bIsFormula = pHdl->IsFormulaMode();
+ }
}
else
{
@@ -1679,7 +1695,13 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc,
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 )
{
@@ -1705,6 +1727,14 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc,
}
}
}
+ else if ( comphelper::LibreOfficeKit::isActive() )
+ {
+ // m_nCurRefDlgId is not deglobalized so it can be set by other view
+ // in LOK case when no ChildWindow for this view was detected -> fallback
+ ScInputHandler* pHdl = GetInputHdl();
+ if (pHdl)
+ pHdl->SetReference( aNew, pDoc );
+ }
}
else
{