rpms/openoffice.org/F-11 openoffice.org-3.1.0.ooo99250.sc.autooutline-reflists.patch, 1.2, 1.3 openoffice.org.spec, 1.1913, 1.1914

David Tardon dtardon at fedoraproject.org
Fri Jun 12 08:01:35 UTC 2009


Author: dtardon

Update of /cvs/extras/rpms/openoffice.org/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23796

Modified Files:
	openoffice.org-3.1.0.ooo99250.sc.autooutline-reflists.patch 
	openoffice.org.spec 
Log Message:
Related: rhbz#472853 openoffice.org-3.1.0.ooo99250.sc.autooutline-reflists.patch

openoffice.org-3.1.0.ooo99250.sc.autooutline-reflists.patch:

Index: openoffice.org-3.1.0.ooo99250.sc.autooutline-reflists.patch
===================================================================
RCS file: /cvs/extras/rpms/openoffice.org/F-11/openoffice.org-3.1.0.ooo99250.sc.autooutline-reflists.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- openoffice.org-3.1.0.ooo99250.sc.autooutline-reflists.patch	20 Feb 2009 15:08:19 -0000	1.2
+++ openoffice.org-3.1.0.ooo99250.sc.autooutline-reflists.patch	12 Jun 2009 08:01:33 -0000	1.3
@@ -1,8 +1,8 @@
 Index: sc/source/core/data/table2.cxx
 ===================================================================
---- sc/source/core/data/table2.cxx	(revision 266950)
+--- sc/source/core/data/table2.cxx	(revision 272843)
 +++ sc/source/core/data/table2.cxx	(working copy)
-@@ -2630,7 +2630,7 @@
+@@ -2667,7 +2667,7 @@
  					pCell = aCol[nCol].GetCell( nRow );
  					if (pCell)
  						if ( pCell->GetCellType() == CELLTYPE_FORMULA )
@@ -11,7 +11,7 @@ Index: sc/source/core/data/table2.cxx
  								if ( aRef.aStart.Col() == nCol && aRef.aEnd.Col() == nCol &&
  									 aRef.aStart.Tab() == nTab && aRef.aEnd.Tab() == nTab &&
  									 DiffSign( aRef.aStart.Row(), nRow ) ==
-@@ -2661,7 +2661,7 @@
+@@ -2698,7 +2698,7 @@
  			while ( aIter.Next( nRow, pCell ) && !bFound )
  			{
  				if ( pCell->GetCellType() == CELLTYPE_FORMULA )
@@ -22,7 +22,7 @@ Index: sc/source/core/data/table2.cxx
  							 DiffSign( aRef.aStart.Col(), nCol ) ==
 Index: sc/source/core/data/cell2.cxx
 ===================================================================
---- sc/source/core/data/cell2.cxx	(revision 266950)
+--- sc/source/core/data/cell2.cxx	(revision 272843)
 +++ sc/source/core/data/cell2.cxx	(working copy)
 @@ -34,6 +34,11 @@
  
@@ -36,7 +36,7 @@ Index: sc/source/core/data/cell2.cxx
  #include <vcl/mapmod.hxx>
  #include <svx/editobj.hxx>
  #include <svx/editstat.hxx>
-@@ -175,6 +180,186 @@
+@@ -175,6 +180,222 @@
  
  // ============================================================================
  
@@ -45,22 +45,22 @@ Index: sc/source/core/data/cell2.cxx
 +
 +using std::deque;
 +
-+typedef SCCOLROW(*DimensionSelector)(ScSingleRefData const&);
++typedef SCCOLROW(*DimensionSelector)(const ScSingleRefData&);
 +
 +
-+static SCCOLROW lcl_GetCol(ScSingleRefData const& rData)
++static SCCOLROW lcl_GetCol(const ScSingleRefData& rData)
 +{
 +    return rData.nCol;
 +}
 +
 +
-+static SCCOLROW lcl_GetRow(ScSingleRefData const& rData)
++static SCCOLROW lcl_GetRow(const ScSingleRefData& rData)
 +{
 +    return rData.nRow;
 +}
 +
 +
-+static SCCOLROW lcl_GetTab(ScSingleRefData const& rData)
++static SCCOLROW lcl_GetTab(const ScSingleRefData& rData)
 +{
 +    return rData.nTab;
 +}
@@ -70,9 +70,9 @@ Index: sc/source/core/data/cell2.cxx
 + */
 +static bool
 +lcl_checkRangeDimension(
-+        SingleDoubleRefProvider const& rRef1,
-+        SingleDoubleRefProvider const& rRef2,
-+        DimensionSelector aWhich)
++        const SingleDoubleRefProvider& rRef1,
++        const SingleDoubleRefProvider& rRef2,
++        const DimensionSelector aWhich)
 +{
 +    return
 +        aWhich(rRef1.Ref1) == aWhich(rRef2.Ref1)
@@ -80,20 +80,17 @@ Index: sc/source/core/data/cell2.cxx
 +}
 +
 +
-+/** Check if the two given ranges (represented by tokens) can possibly
-+    form a range. To do that, two of their dimensions must be the same.
-+ */
 +static bool
 +lcl_checkRangeDimensions(
-+        ScToken const* const pRef1, ScToken const* const pRef2,
++        const SingleDoubleRefProvider& rRef1,
++        const SingleDoubleRefProvider& rRef2,
 +        bool& bCol, bool& bRow, bool& bTab)
 +{
-+    SingleDoubleRefProvider const rRef1(*pRef1);
-+    SingleDoubleRefProvider const rRef2(*pRef2);
-+    bool const bSameCols(lcl_checkRangeDimension(rRef1, rRef2, lcl_GetCol));
-+    bool const bSameRows(lcl_checkRangeDimension(rRef1, rRef2, lcl_GetRow));
-+    bool const bSameTabs(lcl_checkRangeDimension(rRef1, rRef2, lcl_GetTab));
-+    // Just two of the bSameX variables can be true
++    const bool bSameCols(lcl_checkRangeDimension(rRef1, rRef2, lcl_GetCol));
++    const bool bSameRows(lcl_checkRangeDimension(rRef1, rRef2, lcl_GetRow));
++    const bool bSameTabs(lcl_checkRangeDimension(rRef1, rRef2, lcl_GetTab));
++        
++    // Test if exactly two dimensions are equal
 +    if (!(bSameCols ^ bSameRows ^ bSameTabs)
 +            && (bSameCols || bSameRows || bSameTabs))
 +    {
@@ -106,13 +103,52 @@ Index: sc/source/core/data/cell2.cxx
 +}
 +
 +
++/** Check if references in given reference list can possibly
++    form a range. To do that, two of their dimensions must be the same.
++ */
++static bool
++lcl_checkRangeDimensions(
++        const deque<ScToken*>::const_iterator aBegin,
++        const deque<ScToken*>::const_iterator aEnd,
++        bool& bCol, bool& bRow, bool& bTab)
++{
++    deque<ScToken*>::const_iterator aCur(aBegin);
++    ++aCur;
++    const SingleDoubleRefProvider aRef(**aBegin);
++    bool bOk(false);
++    {
++        const SingleDoubleRefProvider aRefCur(**aCur);
++        bOk = lcl_checkRangeDimensions(aRef, aRefCur, bCol, bRow, bTab);
++    }
++    while (bOk && aCur != aEnd)
++    {
++        const SingleDoubleRefProvider aRefCur(**aCur);
++        bool bColTmp(false);
++        bool bRowTmp(false);
++        bool bTabTmp(false);
++        bOk = lcl_checkRangeDimensions(aRef, aRefCur, bColTmp, bRowTmp, bTabTmp);
++        bOk = bOk && (bCol == bColTmp && bRow == bRowTmp && bTab == bTabTmp);
++        ++aCur;
++    }
++
++    if (bOk && aCur == aEnd)
++    {
++        bCol = bCol;
++        bRow = bRow;
++        bTab = bTab;
++        return true;
++    }
++    return false;
++}
++
++
 +bool
 +lcl_lessReferenceBy(
-+        ScToken const* const pRef1, ScToken const* const pRef2,
-+        DimensionSelector aWhich)
++        const ScToken* const pRef1, const ScToken* const pRef2,
++        const DimensionSelector aWhich)
 +{
-+    SingleDoubleRefProvider const rRef1(*pRef1);
-+    SingleDoubleRefProvider const rRef2(*pRef2);
++    const SingleDoubleRefProvider rRef1(*pRef1);
++    const SingleDoubleRefProvider rRef2(*pRef2);
 +    return aWhich(rRef1.Ref1) < aWhich(rRef2.Ref1);
 +}
 +
@@ -123,19 +159,19 @@ Index: sc/source/core/data/cell2.cxx
 + */
 +bool
 +lcl_isImmediatelyFollowing(
-+        ScToken const* const pRef1, ScToken const* const pRef2,
-+        DimensionSelector aWhich)
++        const ScToken* const pRef1, const ScToken* const pRef2,
++        const DimensionSelector aWhich)
 +{
-+    SingleDoubleRefProvider const rRef1(*pRef1);
-+    SingleDoubleRefProvider const rRef2(*pRef2);
++    const SingleDoubleRefProvider rRef1(*pRef1);
++    const SingleDoubleRefProvider rRef2(*pRef2);
 +    return aWhich(rRef2.Ref1) - aWhich(rRef1.Ref2) == 1;
 +}
 +
 +
 +static bool
 +lcl_checkIfAdjacent(
-+        deque<ScToken*> const& rReferences,
-+        DimensionSelector aWhich)
++        const deque<ScToken*>& rReferences,
++        const DimensionSelector aWhich)
 +{
 +    typedef deque<ScToken*>::const_iterator Iter;
 +    Iter aBegin(rReferences.begin());
@@ -150,12 +186,12 @@ Index: sc/source/core/data/cell2.cxx
 +
 +static void
 +lcl_fillRangeFromRefList(
-+        deque<ScToken*> const& rReferences, ScRange& rRange)
++        const deque<ScToken*>& rReferences, ScRange& rRange)
 +{
-+    ScSingleRefData const aStart(
++    const ScSingleRefData aStart(
 +            SingleDoubleRefProvider(*rReferences.front()).Ref1);
 +    rRange.aStart.Set(aStart.nCol, aStart.nRow, aStart.nTab);
-+    ScSingleRefData const aEnd(
++    const ScSingleRefData aEnd(
 +            SingleDoubleRefProvider(*rReferences.back()).Ref2);
 +    rRange.aEnd.Set(aEnd.nCol, aEnd.nRow, aEnd.nTab);
 +}
@@ -163,7 +199,7 @@ Index: sc/source/core/data/cell2.cxx
 +
 +static bool
 +lcl_refListFormsOneRange(
-+        ScAddress const& aPos, deque<ScToken*>& rReferences,
++        const ScAddress& aPos, deque<ScToken*>& rReferences,
 +        ScRange& rRange)
 +{
 +    std::for_each(
@@ -175,10 +211,10 @@ Index: sc/source/core/data/cell2.cxx
 +        return true;
 +    }
 +
-+    bool bCell;
-+    bool bRow;
-+    bool bTab;
-+    if (lcl_checkRangeDimensions(rReferences.front(), rReferences.back(),
++    bool bCell(false);
++    bool bRow(false);
++    bool bTab(false);
++    if (lcl_checkRangeDimensions(rReferences.begin(), rReferences.end(),
 +            bCell, bRow, bTab))
 +    {
 +        DimensionSelector aWhich;
@@ -211,7 +247,7 @@ Index: sc/source/core/data/cell2.cxx
 +}
 +
 +
-+bool lcl_isReference(FormulaToken const& rToken)
++bool lcl_isReference(const FormulaToken& rToken)
 +{
 +    return
 +        rToken.GetType() == svSingleRef ||
@@ -223,38 +259,7 @@ Index: sc/source/core/data/cell2.cxx
  BOOL ScFormulaCell::IsEmpty()
  {
      if (IsDirtyOrInTableOpDirty() && pDocument->GetAutoCalc())
-@@ -303,7 +488,7 @@
-                     pFCell = this;      // this MM_FORMULA
-                 // this gibt's nur einmal, kein Vergleich auf pFCell==this
-                 if ( pFCell && pFCell->GetCellType() == CELLTYPE_FORMULA
--                  && pFCell->cMatrixFlag == MM_FORMULA )
-+                && pFCell->cMatrixFlag == MM_FORMULA )
-                 {
-                     pFCell->GetMatColsRows( nC, nR );
-                     if ( nC == 0 || nR == 0 )
-@@ -319,8 +504,8 @@
-                         {
-                             pCell = pDocument->GetCell( aAdr );
-                             if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA
--                              && ((ScFormulaCell*)pCell)->cMatrixFlag == MM_REFERENCE
--                              && GetMatrixOrigin( aTmpOrg ) && aTmpOrg == aOrg )
-+                            && ((ScFormulaCell*)pCell)->cMatrixFlag == MM_REFERENCE
-+                            && GetMatrixOrigin( aTmpOrg ) && aTmpOrg == aOrg )
-                             {
-                                 nC++;
-                                 aAdr.IncCol();
-@@ -335,8 +520,8 @@
-                         {
-                             pCell = pDocument->GetCell( aAdr );
-                             if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA
--                              && ((ScFormulaCell*)pCell)->cMatrixFlag == MM_REFERENCE
--                              && GetMatrixOrigin( aTmpOrg ) && aTmpOrg == aOrg )
-+                            && ((ScFormulaCell*)pCell)->cMatrixFlag == MM_REFERENCE
-+                            && GetMatrixOrigin( aTmpOrg ) && aTmpOrg == aOrg )
-                             {
-                                 nR++;
-                                 aAdr.IncRow();
-@@ -449,6 +634,52 @@
+@@ -449,6 +670,52 @@
          return FALSE;
  }
  
@@ -309,9 +314,9 @@ Index: sc/source/core/data/cell2.cxx
      pCode->Reset();
 Index: sc/inc/cell.hxx
 ===================================================================
---- sc/inc/cell.hxx	(revision 266950)
+--- sc/inc/cell.hxx	(revision 272843)
 +++ sc/inc/cell.hxx	(working copy)
-@@ -309,6 +309,15 @@
+@@ -387,6 +387,15 @@
      inline USHORT   GetSeenInIteration() const { return nSeenInIteration; }
  
  	BOOL			HasOneReference( ScRange& r ) const;
@@ -329,7 +334,7 @@ Index: sc/inc/cell.hxx
  
 Index: sc/inc/pch/precompiled_sc.hxx
 ===================================================================
---- sc/inc/pch/precompiled_sc.hxx	(revision 266950)
+--- sc/inc/pch/precompiled_sc.hxx	(revision 272843)
 +++ sc/inc/pch/precompiled_sc.hxx	(working copy)
 @@ -36,6 +36,7 @@
  


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/extras/rpms/openoffice.org/F-11/openoffice.org.spec,v
retrieving revision 1.1913
retrieving revision 1.1914
diff -u -p -r1.1913 -r1.1914
--- openoffice.org.spec	9 Jun 2009 10:33:53 -0000	1.1913
+++ openoffice.org.spec	12 Jun 2009 08:01:34 -0000	1.1914
@@ -4147,6 +4147,7 @@ fi
 * Tue Jun 09 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.0-11.4.UNRELEASED
 - Resolves: rhbz#503003 silence warnings on updates
 - Resolves: rhbz#504419  openoffice.org-3.1.0.ooo102566.sc.less.frenetic.progress.patch
+- Related: rhbz#472853 openoffice.org-3.1.0.ooo99250.sc.autooutline-reflists.patch
 
 * Mon May 25 2009 Caolán McNamara <caolanm at redhat.com> - 1:3.1.0-11.3
 - add in the ia64 and arm fixes for the secondary arch people




More information about the fedora-extras-commits mailing list