summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx4
-rw-r--r--sc/source/ui/inc/docfunc.hxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx10
3 files changed, 10 insertions, 6 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index c016d3083b63..3a135d9d0042 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -658,7 +658,7 @@ bool ScDocFunc::DeleteContents(
}
bool ScDocFunc::DeleteCell(
- const ScAddress& rPos, const ScMarkData& rMark, InsertDeleteFlags nFlags, bool bRecord )
+ const ScAddress& rPos, const ScMarkData& rMark, InsertDeleteFlags nFlags, bool bRecord, bool bApi )
{
ScDocShellModificator aModificator(rDocShell);
@@ -714,7 +714,7 @@ bool ScDocFunc::DeleteCell(
nFlags, pDataSpans, false, bDrawUndo);
}
- if (!AdjustRowHeight(rPos, true, true))
+ if (!AdjustRowHeight(rPos, true, bApi))
rDocShell.PostPaint(
rPos.Col(), rPos.Row(), rPos.Tab(), rPos.Col(), rPos.Row(), rPos.Tab(),
PaintPartFlags::Grid, nExtFlags);
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index af8e23fc3124..8ca4c445cca7 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -91,7 +91,7 @@ public:
const ScMarkData& rMark, InsertDeleteFlags nFlags, bool bRecord, bool bApi );
bool DeleteCell(
- const ScAddress& rPos, const ScMarkData& rMark, InsertDeleteFlags nFlags, bool bRecord );
+ const ScAddress& rPos, const ScMarkData& rMark, InsertDeleteFlags nFlags, bool bRecord, bool bApi );
bool TransliterateText( const ScMarkData& rMark, TransliterationFlags nType,
bool bApi );
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 06241ecb4cf7..e5b1da40162c 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -1987,10 +1987,14 @@ void ScViewFunc::DeleteContents( InsertDeleteFlags nFlags )
HideAllCursors(); // for if summary is cancelled
ScDocFunc& rDocFunc = pDocSh->GetDocFunc();
+
+ // Can we really be sure that we can pass the bApi parameter as false to DeleteCell() and
+ // DeleteContents() here? (Meaning that this is interactive use.) Is this never invoked from
+ // scripting and whatnot?
if (bSimple)
- rDocFunc.DeleteCell(aMarkRange.aStart, aFuncMark, nFlags, bRecord);
+ rDocFunc.DeleteCell(aMarkRange.aStart, aFuncMark, nFlags, bRecord, /*bApi=*/ false);
else
- rDocFunc.DeleteContents(aFuncMark, nFlags, bRecord, false);
+ rDocFunc.DeleteContents(aFuncMark, nFlags, bRecord, /*bApi=*/ false);
pDocSh->UpdateOle(&GetViewData());