sc/source/ui/view/viewfunc.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c38c6a12cc7e5c640d7dbc9f7374da3f5a0cc869
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed May 17 11:47:41 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed May 17 14:48:22 2023 +0200

    tdf#154114 Formatting active cell applies to entire cell range
    
    regression from
        commit ac859a4c6a7fce4efee9cdd45821a0c9e40e9e9a
        Author: Noel Grandin <noel.gran...@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.gran...@collabora.co.uk>

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;

Reply via email to