summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-05-17 11:47:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-17 14:48:22 +0200
commitc38c6a12cc7e5c640d7dbc9f7374da3f5a0cc869 (patch)
tree21ae03e9bd7e9bc00e47eacfbb7cd5826be704d3 /sc
parent00ede35a5241925d7060dd44fb81b71f7b03091c (diff)
tdf#154114 Formatting active cell applies to entire cell range
regression from commit ac859a4c6a7fce4efee9cdd45821a0c9e40e9e9a Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Mon Oct 17 16:36:23 2022 +0200 tdf#147842 shrink selection to data area when applying to entire sheet Change-Id: I6fd8504d3995878fc9aedd461c0f374695d1f48e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151873 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/viewfunc.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 4924e0c8c64f..68fd587197a3 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1217,7 +1217,8 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, bool bCursor
ScDocShell* pDocSh = rViewData.GetDocShell();
ScDocument& rDoc = pDocSh->GetDocument();
ScMarkData aFuncMark( rViewData.GetMarkData() ); // local copy for UnmarkFiltered
- ShrinkToDataArea( aFuncMark, rDoc );
+ if (aFuncMark.IsMarked()) // do not make it marked if it is not already marked
+ ShrinkToDataArea( aFuncMark, rDoc );
ScViewUtil::UnmarkFiltered( aFuncMark, rDoc );
bool bRecord = true;