summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewdata.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/viewdata.cxx')
-rw-r--r--sc/source/ui/view/viewdata.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index d188643b660c..d07f711c28be 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -854,6 +854,18 @@ bool ScViewData::IsMultiMarked()
return (eType & SC_MARK_SIMPLE) != SC_MARK_SIMPLE;
}
+bool ScViewData::SelectionForbidsPaste()
+{
+ SCCOL nCol1, nCol2;
+ SCROW nRow1, nRow2;
+ SCTAB nTab1, nTab2;
+ ScMarkType eMarkType = GetSimpleArea( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
+ /* TODO: it is still possible to select one row less than the entire sheet
+ * and fool around. We could narrow this down to some "sane" value, just
+ * what would be sane? At least this helps against the Ctrl+A cases. */
+ return eMarkType != SC_MARK_MULTI && nCol1 == 0 && nCol2 == MAXCOL && nRow1 == 0 && nRow2 == MAXROW;
+}
+
void ScViewData::SetFillMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow )
{
nFillMode = ScFillMode::FILL;