ooo-build r13971 - in trunk: . patches/dev300



Author: kyoshida
Date: Fri Sep 19 21:23:03 2008
New Revision: 13971
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13971&view=rev

Log:
2008-09-19  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/chart-refresh-mark-range-dirty.diff: mark data range
	dirty to force full re-calculation on chart's data range (n#425617).

	* patches/dev300/apply: apply the new patch.


Added:
   trunk/patches/dev300/chart-refresh-mark-range-dirty.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri Sep 19 21:23:03 2008
@@ -1751,6 +1751,9 @@
 calc-external-defined-names-offapi.diff, i#3740, i#4385, n#355685, kohei
 calc-external-defined-names-officecfg.diff, i#3740, i#4385, n#355685, kohei
 
+# mark data range dirty to force full re-calculation.
+chart-refresh-mark-range-dirty.diff, n#425617, kohei
+
 [ CalcSolver ]
 SectionOwner => kohei
 

Added: trunk/patches/dev300/chart-refresh-mark-range-dirty.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/chart-refresh-mark-range-dirty.diff	Fri Sep 19 21:23:03 2008
@@ -0,0 +1,69 @@
+diff --git sc/inc/chart2uno.hxx sc/inc/chart2uno.hxx
+index aa13bef..519058a 100644
+--- sc/inc/chart2uno.hxx
++++ sc/inc/chart2uno.hxx
+@@ -387,6 +387,9 @@ public:
+     DECL_LINK( ValueListenerHdl, SfxHint* );
+ 
+ private:
++    void markRangeDirty(const ScRange& rRange) const;
++
++private:
+ 
+     // properties
+     ::com::sun::star::chart2::data::DataSequenceRole  m_aRole;
+diff --git sc/source/ui/unoobj/chart2uno.cxx sc/source/ui/unoobj/chart2uno.cxx
+index 28223a8..3c6979b 100644
+--- sc/source/ui/unoobj/chart2uno.cxx
++++ sc/source/ui/unoobj/chart2uno.cxx
+@@ -1886,7 +1886,11 @@ void SAL_CALL ScChart2DataSequence::addModifyListener( const uno::Reference< uti
+         {
+             ULONG nCount = m_xRanges->Count();
+             for (ULONG i=0; i<nCount; i++)
+-                m_pDocument->StartListeningArea( *m_xRanges->GetObject(i), m_pValueListener );
++            {
++                ScRange aRange = *m_xRanges->GetObject(i);    
++                m_pDocument->StartListeningArea( aRange, m_pValueListener );
++                markRangeDirty(aRange);
++            }
+         }
+ 
+ 		acquire();	// don't lose this object (one ref for all listeners)
+@@ -2027,6 +2031,37 @@ void SAL_CALL ScChart2DataSequence::removeVetoableChangeListener(
+     OSL_ENSURE( false, "Not yet implemented" );
+ }
+ 
++void ScChart2DataSequence::markRangeDirty(const ScRange& rRange) const
++{
++    if (!m_pDocument)
++        return;
++
++    const ScAddress &s = rRange.aStart, &e = rRange.aEnd;
++    SCTAB nTab1 = s.Tab(), nTab2 = e.Tab();
++    SCCOL nCol1 = s.Col(), nCol2 = e.Col();
++    SCROW nRow1 = s.Row(), nRow2 = e.Row();
++    for (SCTAB nTab = nTab1; nTab <= nTab2; ++nTab)
++    {
++        for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
++        {
++            for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
++            {
++                ScAddress aAddr(nCol, nRow, nTab);
++                ScBaseCell* pBaseCell = m_pDocument->GetCell(aAddr);
++                if (!pBaseCell || pBaseCell->GetCellType() != CELLTYPE_FORMULA)
++                    continue;
++
++                ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pBaseCell);
++                ScTokenArray* pArray = pFCell->GetCode();
++                if (!pArray)
++                    continue;
++
++                pFCell->SetDirty();
++            }
++        }
++    }
++}
++
+ // XUnoTunnel
+ 
+ // sal_Int64 SAL_CALL ScChart2DataSequence::getSomething(



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]