summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/app/inputhdl.cxx6
-rw-r--r--sc/source/ui/view/gridwin.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 285e1dab8f6f..a580ec911550 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2517,7 +2517,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
aTester.TestSelectedBlock(
rDoc, aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Col(), aCursorPos.Row(), rMark );
- bool bStartInputMode = true;
+ bool bStartInputMode = !(pActiveViewSh->GetViewShell() && pActiveViewSh->GetViewShell()->IsLokReadOnlyView());
if (!aTester.IsEditable())
{
@@ -3953,7 +3953,7 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false
UpdateActiveView();
bool bNewView = DataChanging( nChar );
- if (bProtected) // Protected cell?
+ if (bProtected || (pActiveViewSh->GetViewShell() && pActiveViewSh->GetViewShell()->IsLokReadOnlyView())) // Protected cell?
bUsed = true; // Don't forward KeyEvent
else // Changes allowed
{
@@ -4187,7 +4187,7 @@ void ScInputHandler::InputCommand( const CommandEvent& rCEvt )
UpdateActiveView();
bool bNewView = DataChanging( 0, true );
- if (!bProtected) // changes allowed
+ if (!bProtected && !(pActiveViewSh->GetViewShell() && pActiveViewSh->GetViewShell()->IsLokReadOnlyView())) // changes allowed
{
if (bNewView) // create new edit view
{
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 426e0d88cf58..88d64a526e9e 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1716,7 +1716,7 @@ bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, bool bAction )
SfxInPlaceClient* pClient = mrViewData.GetViewShell()->GetIPClient();
bool bOleActive = ( pClient && pClient->IsObjectInPlaceActive() );
- if ( mrViewData.IsActive() && !bOleActive )
+ if ( mrViewData.IsActive() && !bOleActive && !mrViewData.GetViewShell()->IsLokReadOnlyView())
{
ScDocument& rDoc = mrViewData.GetDocument();
SCTAB nTab = mrViewData.GetTabNo();