[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Thu Nov 20 02:24:38 PST 2014


 sc/source/core/data/table3.cxx |    7 +++++--
 sc/source/ui/undo/undosort.cxx |    3 +--
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 1f0bca308e677a3e7a75837f93f14b679f698846
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Sun Oct 26 14:43:14 2014 -0700

    fdo#85215: Don't adjust references wrt cell position when disabled.
    
    Change-Id: Ie1a12cc189bcb66fad59ea9901ac0dc95bb68788
    (cherry picked from commit 10fc138307afb4b39baddb0d56eb8e986e5d29ea)
    Signed-off-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index c36b4cd..d646678 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -864,8 +864,11 @@ void ScTable::SortReorderByRow(
                     ScAddress aOldPos = rCell.maCell.mpFormula->aPos;
 
                     ScFormulaCell* pNew = rCell.maCell.mpFormula->Clone( aCellPos, SC_CLONECELL_DEFAULT);
-                    pNew->CopyAllBroadcasters(*rCell.maCell.mpFormula);
-                    pNew->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, aCellPos);
+                    if (pArray->IsUpdateRefs())
+                    {
+                        pNew->CopyAllBroadcasters(*rCell.maCell.mpFormula);
+                        pNew->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, aCellPos);
+                    }
 
                     sc::CellStoreType::iterator itBlk = rCellStore.push_back(pNew);
                 }
diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx
index 36156fe..4a00707 100644
--- a/sc/source/ui/undo/undosort.cxx
+++ b/sc/source/ui/undo/undosort.cxx
@@ -46,8 +46,7 @@ void UndoSort::Execute( bool bUndo )
 
     ScUndoUtil::MarkSimpleBlock(pDocShell, maParam.maSortRange);
 
-    pDocShell->PostPaint(maParam.maSortRange, PAINT_GRID);
-    pDocShell->PostDataChanged();
+    rDoc.SetDirty(maParam.maSortRange);
     if (!aParam.mbUpdateRefs)
         rDoc.BroadcastCells(aParam.maSortRange, SC_HINT_DATACHANGED);
 }


More information about the Libreoffice-commits mailing list