summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfunc.cxx
diff options
context:
space:
mode:
authorJody Goldberg <jody@gnome.org>2010-09-15 11:44:06 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2010-09-15 14:09:37 +0200
commit164aca5f32927cc2ad42e16d7b9a9089c3bdfc8b (patch)
treed1ac70253bbeff7d92695abf4f2e1b285c4a3d45 /sc/source/ui/view/viewfunc.cxx
parent38ec0c1814d9fda19611d42df1cc7a663456d171 (diff)
sc-read-only-colrow-resize.diff: Allow resizing Cols/Rows if document is R/O
n#165980
Diffstat (limited to 'sc/source/ui/view/viewfunc.cxx')
-rw-r--r--sc/source/ui/view/viewfunc.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 231eb4e67562..12fc573973dd 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2111,7 +2111,10 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
bOnlyMatrix;
}
}
- if ( !bAllowed )
+
+ // Allow users to resize cols/rows in readonly docs despite the r/o state.
+ // It is frustrating to be unable to see content in mis-sized cells.
+ if( !bAllowed && !pDocSh->IsReadOnly() )
{
ErrorMessage(STR_PROTECTIONERR);
return;
@@ -2328,6 +2331,7 @@ void ScViewFunc::SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pR
}
pDocSh->UpdateOle(GetViewData());
+ if( !pDocSh->IsReadOnly() )
aModificator.SetDocumentModified();
ShowCursor();