[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Thu Jan 26 12:49:47 PST 2012


 sc/source/core/data/column3.cxx  |    7 +++++++
 sc/source/core/data/dpoutput.cxx |    5 -----
 2 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit af70bc00c6714eb8695babdf5af07416552f7034
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Thu Jan 26 15:47:52 2012 -0500

    fdo#44143: Keep cells with broadcasters alive during deletion.
    
    Or else it would partially break formula reference chain.

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 73c0bbb..8bd0a45 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -35,6 +35,7 @@
 #include <sfx2/objsh.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/zformat.hxx>
+#include <svl/broadcast.hxx>
 
 #include "scitems.hxx"
 #include "column.hxx"
@@ -414,6 +415,12 @@ void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, sal_uInt16 nDe
                     if( pNote || pBC )
                         pNoteCell = new ScNoteCell( pNote, pBC );
                 }
+                else
+                {
+                    SvtBroadcaster* pBC = pOldCell->GetBroadcaster();
+                    if (pBC && pBC->HasListeners())
+                        pNoteCell = new ScNoteCell(pOldCell->ReleaseNote(), pBC);
+                }
 
                 // remove cell entry in cell item list
                 SCROW nOldRow = maItems[nIdx].nRow;
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 32179e3..ccec280 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -973,11 +973,6 @@ void ScDPOutput::Output()
     if ( bSizeOverflow || bResultsError )   // does output area exceed sheet limits?
         return;                             // nothing
 
-    //  clear whole (new) output area
-    //! when modifying table, clear old area
-    //! include IDF_OBJECTS ???
-    pDoc->DeleteAreaTab( aStartPos.Col(), aStartPos.Row(), nTabEndCol, nTabEndRow, nTab, IDF_ALL );
-
     if ( bDoFilter )
         lcl_DoFilterButton( pDoc, aStartPos.Col(), aStartPos.Row(), nTab );
 


More information about the Libreoffice-commits mailing list