ooo-build r14019 - in branches/ooo-build-3-0: . patches/dev300



Author: kyoshida
Date: Mon Sep 22 21:47:22 2008
New Revision: 14019
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14019&view=rev

Log:
2008-09-22  William S Fulton  <wsf fultondesigns co uk>

	* patches/dev300/calc-multiline-formula-ref.diff: Eike's unsigned char 
	suggestion added and removed warning introduced in 
	ScXMLExport::IsMultiLineFormulaCell.


Modified:
   branches/ooo-build-3-0/ChangeLog
   branches/ooo-build-3-0/patches/dev300/calc-multiline-formula-ref.diff

Modified: branches/ooo-build-3-0/patches/dev300/calc-multiline-formula-ref.diff
==============================================================================
--- branches/ooo-build-3-0/patches/dev300/calc-multiline-formula-ref.diff	(original)
+++ branches/ooo-build-3-0/patches/dev300/calc-multiline-formula-ref.diff	Mon Sep 22 21:47:22 2008
@@ -1,8 +1,8 @@
-diff --git sc/inc/cell.hxx sc/inc/cell.hxx
-index a56f8b0..a5aa3cf 100644
+diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
+index e3c6bed..e5d9fb6 100644
 --- sc/inc/cell.hxx
 +++ sc/inc/cell.hxx
-@@ -460,6 +460,9 @@ public:
+@@ -475,6 +475,9 @@ public:
  	inline BOOL		IsHyperLinkCell() const { return pCode && pCode->IsHyperLink(); }
  	EditTextObject*		CreateURLObject() ;
      void            GetURLResult( String& rURL, String& rCellText );
@@ -12,7 +12,7 @@
  };
  
  //			Iterator fuer Referenzen in einer Formelzelle
-diff --git sc/inc/editutil.hxx sc/inc/editutil.hxx
+diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
 index 8072f26..0838d6a 100644
 --- sc/inc/editutil.hxx
 +++ sc/inc/editutil.hxx
@@ -30,32 +30,31 @@
  public:
  				ScEditUtil( ScDocument* pDocument, SCCOL nX, SCROW nY, SCTAB nZ,
  							const Point& rScrPosPixel,
-diff --git sc/inc/formularesult.hxx sc/inc/formularesult.hxx
-index 727476c..290b99d 100644
+diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx
+index 727476c..b91159f 100644
 --- sc/inc/formularesult.hxx
 +++ sc/inc/formularesult.hxx
-@@ -38,6 +38,12 @@
+@@ -38,6 +38,11 @@
      and memory consumption. */
  class ScFormulaResult
  {
-+    enum Multiline
-+    {
-+        MULTILINE_UNKNOWN = 0,
-+        MULTILINE_FALSE,
-+        MULTILINE_TRUE
-+    };
++    typedef unsigned char Multiline;
++    static const Multiline MULTILINE_UNKNOWN = 0;
++    static const Multiline MULTILINE_FALSE   = 1;
++    static const Multiline MULTILINE_TRUE    = 2;
++
      union
      {
          double          mfValue;    // double result direct for performance and memory consumption
-@@ -47,6 +53,7 @@ class ScFormulaResult
+@@ -47,6 +52,7 @@ class ScFormulaResult
      bool                mbToken :1; // whether content of union is a token
      bool                mbEmpty :1; // empty cell result
      bool                mbEmptyDisplayedAsString :1;    // only if mbEmpty
-+    Multiline           meMultiline; // result is multiline
++    Multiline           meMultiline :2; // result is multiline
  
      /** Reset mnError, mbEmpty and mbEmptyDisplayedAsString to their defaults
          prior to assigning other types */
-@@ -69,12 +76,14 @@ public:
+@@ -69,12 +75,14 @@ public:
                                  /** Effectively type svUnknown. */
                                  ScFormulaResult()
                                      : mpToken(NULL), mnError(0), mbToken(true),
@@ -72,7 +71,7 @@
                                  {
                                      if (mbToken)
                                      {
-@@ -99,7 +108,8 @@ public:
+@@ -99,7 +107,8 @@ public:
      /** Same comments as for SetToken() apply! */
      explicit                    ScFormulaResult( const ScToken* p )
                                      : mnError(0), mbToken(false),
@@ -82,7 +81,7 @@
                                  {
                                      SetToken( p);
                                  }
-@@ -153,6 +163,10 @@ public:
+@@ -153,6 +162,10 @@ public:
          details instead. */
      inline  bool                IsValue() const;
  
@@ -93,7 +92,7 @@
      /** Get error code if set or GetCellResultType() is svError or svUnknown,
          else 0. */
      inline  USHORT              GetResultError() const;
-@@ -211,6 +225,7 @@ inline void ScFormulaResult::ResetToDefaults()
+@@ -211,6 +224,7 @@ inline void ScFormulaResult::ResetToDefaults()
      mnError = 0;
      mbEmpty = false;
      mbEmptyDisplayedAsString = false;
@@ -101,7 +100,7 @@
  }
  
  
-@@ -232,10 +247,12 @@ inline void ScFormulaResult::ResolveToken( const ScToken * p )
+@@ -232,10 +246,12 @@ inline void ScFormulaResult::ResolveToken( const ScToken * p )
                  mbToken = false;
                  // set in case mnError is 0 now, which shouldn't happen but ...
                  mfValue = 0.0;
@@ -114,7 +113,7 @@
                  p->DecRef();
                  mbToken = false;
                  break;
-@@ -243,6 +260,7 @@ inline void ScFormulaResult::ResolveToken( const ScToken * p )
+@@ -243,6 +259,7 @@ inline void ScFormulaResult::ResolveToken( const ScToken * p )
                  mfValue = p->GetDouble();
                  p->DecRef();
                  mbToken = false;
@@ -122,7 +121,7 @@
                  break;
              default:
                  mpToken = p;
-@@ -270,6 +288,7 @@ inline void ScFormulaResult::Assign( const ScFormulaResult & r )
+@@ -270,6 +287,7 @@ inline void ScFormulaResult::Assign( const ScFormulaResult & r )
          mbToken = false;
          mbEmpty = true;
          mbEmptyDisplayedAsString = r.mbEmptyDisplayedAsString;
@@ -130,7 +129,7 @@
      }
      else if (r.mbToken)
      {
-@@ -352,6 +371,7 @@ inline void ScFormulaResult::SetDouble( double f )
+@@ -352,6 +370,7 @@ inline void ScFormulaResult::SetDouble( double f )
              mpToken->DecRef();
          mfValue = f;
          mbToken = false;
@@ -138,7 +137,7 @@
      }
  }
  
-@@ -404,6 +424,19 @@ inline bool ScFormulaResult::IsValue() const
+@@ -404,6 +423,19 @@ inline bool ScFormulaResult::IsValue() const
      return sv == svDouble || sv == svError || sv == svEmptyCell;
  }
  
@@ -158,7 +157,7 @@
  
  inline USHORT ScFormulaResult::GetResultError() const
  {
-@@ -537,6 +570,7 @@ inline void ScFormulaResult::SetHybridDouble( double f )
+@@ -537,6 +569,7 @@ inline void ScFormulaResult::SetHybridDouble( double f )
      {
          mfValue = f;
          mbToken = false;
@@ -166,11 +165,11 @@
      }
  }
  
-diff --git sc/source/core/data/cell.cxx sc/source/core/data/cell.cxx
-index 6a0ba53..c330826 100644
+diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
+index 6964b43..636f46e 100644
 --- sc/source/core/data/cell.cxx
 +++ sc/source/core/data/cell.cxx
-@@ -1805,6 +1805,13 @@ void ScFormulaCell::GetURLResult( String& rURL, String& rCellText )
+@@ -1818,6 +1818,13 @@ void ScFormulaCell::GetURLResult( String& rURL, String& rCellText )
      }
  }
  
@@ -184,11 +183,11 @@
  EditTextObject* ScFormulaCell::CreateURLObject()
  {
      String aCellText;
-diff --git sc/source/core/data/cell2.cxx sc/source/core/data/cell2.cxx
-index 5580b56..f770a60 100644
+diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
+index a4c9a1c..fc6df5f 100644
 --- sc/source/core/data/cell2.cxx
 +++ sc/source/core/data/cell2.cxx
-@@ -134,7 +134,7 @@ void ScEditCell::GetString( String& rString ) const
+@@ -163,7 +163,7 @@ void ScEditCell::GetString( String& rString ) const
          // auch Text von URL-Feldern, Doc-Engine ist eine ScFieldEditEngine
          EditEngine& rEngine = pDoc->GetEditEngine();
          rEngine.SetText( *pData );
@@ -197,11 +196,11 @@
          // kurze Strings fuer Formeln merken
          if ( rString.Len() < MAXSTRLEN )
              ((ScEditCell*)this)->pString = new String( rString );   //! non-const
-diff --git sc/source/core/data/column.cxx sc/source/core/data/column.cxx
-index b105a88..96c7377 100644
+diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
+index 1c80b6d..209dc77 100644
 --- sc/source/core/data/column.cxx
 +++ sc/source/core/data/column.cxx
-@@ -2239,8 +2239,10 @@ BOOL ScColumn::HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const
+@@ -2281,8 +2281,10 @@ BOOL ScColumn::HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const
  	while ( (nIndex < nCount) ? ((nRow=pItems[nIndex].nRow) <= nEndRow) : FALSE )
  	{
  		ScBaseCell* pCell = pItems[nIndex].pCell;
@@ -214,11 +213,11 @@
  		{
  			rFirst = nRow;
  			return TRUE;
-diff --git sc/source/core/data/column2.cxx sc/source/core/data/column2.cxx
-index eff0391..d81817d 100644
+diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
+index 8e75dcd..888a51e 100644
 --- sc/source/core/data/column2.cxx
 +++ sc/source/core/data/column2.cxx
-@@ -241,9 +241,12 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
+@@ -793,9 +793,12 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev,
  		}
  
  		BOOL bAddMargin = TRUE;
@@ -233,7 +232,7 @@
  
  		if (!bEditEngine)									// direkte Ausgabe
  		{
-diff --git sc/source/core/data/column3.cxx sc/source/core/data/column3.cxx
+diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
 index 1f5f531..76ddd16 100644
 --- sc/source/core/data/column3.cxx
 +++ sc/source/core/data/column3.cxx
@@ -257,7 +256,7 @@
  						}
  					}
  					if ( pNew && pSource->GetNotePtr() && ( nFlags & IDF_NOTE ) )
-diff --git sc/source/core/tool/editutil.cxx sc/source/core/tool/editutil.cxx
+diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
 index 65605ce..31dc996 100644
 --- sc/source/core/tool/editutil.cxx
 +++ sc/source/core/tool/editutil.cxx
@@ -293,11 +292,11 @@
  //------------------------------------------------------------------------
  
  Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, BOOL bForceToTop )
-diff --git sc/source/filter/excel/xestyle.cxx sc/source/filter/excel/xestyle.cxx
-index 3d548e2..647585b 100644
+diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
+index 55edbf1..0a5231e 100644
 --- sc/source/filter/excel/xestyle.cxx
 +++ sc/source/filter/excel/xestyle.cxx
-@@ -1921,9 +1921,9 @@ sal_uInt32 XclExpXFBuffer::InsertWithFont( const ScPatternAttr* pPattern, sal_In
+@@ -1963,9 +1963,9 @@ sal_uInt32 XclExpXFBuffer::InsertWithFont( const ScPatternAttr* pPattern, sal_In
      return InsertCellXF( pPattern, nScript, NUMBERFORMAT_ENTRY_NOT_FOUND, nForceXclFont, bForceLineBreak );
  }
  
@@ -309,7 +308,7 @@
  }
  
  sal_uInt32 XclExpXFBuffer::InsertStyle( const SfxStyleSheetBase* pStyleSheet )
-diff --git sc/source/filter/excel/xetable.cxx sc/source/filter/excel/xetable.cxx
+diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
 index 91f4736..9323d86 100644
 --- sc/source/filter/excel/xetable.cxx
 +++ sc/source/filter/excel/xetable.cxx
@@ -330,11 +329,11 @@
      }
  
      // *** Convert the formula token array *** --------------------------------
-diff --git sc/source/filter/inc/xestyle.hxx sc/source/filter/inc/xestyle.hxx
-index 0ad3898..a43c173 100644
+diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
+index 16bd7ed..810e301 100644
 --- sc/source/filter/inc/xestyle.hxx
 +++ sc/source/filter/inc/xestyle.hxx
-@@ -602,10 +602,13 @@ public:
+@@ -617,10 +617,13 @@ public:
          @param nXFFlags  Additional flags allowing to control the creation of an XF.
          @param nForceScNumFmt  The number format to be exported, e.g. formula
              result type. This format will always overwrite the cell's number format.
@@ -349,7 +348,7 @@
      /** Inserts the passed cell style. Creates a style XF record and a STYLE record.
          @return  A unique XF record ID. */
      sal_uInt32          InsertStyle( const SfxStyleSheetBase* pStyleSheet );
-diff --git sc/source/filter/xml/XMLExportIterator.cxx sc/source/filter/xml/XMLExportIterator.cxx
+diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx
 index 8ba7cad..8a7e52b 100644
 --- sc/source/filter/xml/XMLExportIterator.cxx
 +++ sc/source/filter/xml/XMLExportIterator.cxx
@@ -361,7 +360,7 @@
  	bIsAutoStyle( sal_False ),
  	bHasShape( sal_False ),
  	bIsMergedBase( sal_False ),
-diff --git sc/source/filter/xml/XMLExportIterator.hxx sc/source/filter/xml/XMLExportIterator.hxx
+diff --git a/sc/source/filter/xml/XMLExportIterator.hxx b/sc/source/filter/xml/XMLExportIterator.hxx
 index abe9185..0b0d51c 100644
 --- sc/source/filter/xml/XMLExportIterator.hxx
 +++ sc/source/filter/xml/XMLExportIterator.hxx
@@ -382,11 +381,11 @@
  	sal_Bool					bIsAutoStyle;
  
  	sal_Bool					bHasShape;
-diff --git sc/source/filter/xml/xmlexprt.cxx sc/source/filter/xml/xmlexprt.cxx
-index 18b2bd1..7a3679a 100644
+diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
+index 52f5145..fcf3e8b 100644
 --- sc/source/filter/xml/xmlexprt.cxx
 +++ sc/source/filter/xml/xmlexprt.cxx
-@@ -2348,7 +2348,8 @@ void ScXMLExport::WriteCell (ScMyCell& aCell)
+@@ -2390,7 +2390,8 @@ void ScXMLExport::WriteCell (ScMyCell& aCell)
  
  	if (!bIsEmpty)
  	{
@@ -396,7 +395,7 @@
  		{
              bEditCell = sal_True;
              uno::Reference<text::XText> xText(xCurrentTableCellRange->getCellByPosition(aCell.aCellAddress.Column, aCell.aCellAddress.Row), uno::UNO_QUERY);
-@@ -2814,12 +2814,15 @@ sal_Bool ScXMLExport::IsCellTypeEqual (const ScMyCell& aCell1, const ScMyCell& a
+@@ -2856,12 +2857,15 @@ sal_Bool ScXMLExport::IsCellTypeEqual (const ScMyCell& aCell1, const ScMyCell& a
  	return (aCell1.nType == aCell2.nType);
  }
  
@@ -413,7 +412,7 @@
  	if (pBaseCell)
  		return (pBaseCell->GetCellType() == CELLTYPE_EDIT);
  	return sal_False;
-@@ -2832,12 +2835,37 @@ sal_Bool ScXMLExport::IsEditCell(ScMyCell& rCell) const
+@@ -2881,12 +2885,36 @@ sal_Bool ScXMLExport::IsEditCell(ScMyCell& rCell) const
  		return rCell.bIsEditCell;
  	else
  	{
@@ -434,7 +433,6 @@
 +        return static_cast<ScFormulaCell*>(rCell.pBaseCell)->IsMultilineResult();
 +    }
 +
-+    ScDocument* pDoc = GetDocument();
 +    ScAddress aAddr(static_cast<SCCOL>(rCell.aCellAddress.Column), 
 +                    static_cast<SCROW>(rCell.aCellAddress.Row),
 +                    static_cast<SCTAB>(rCell.aCellAddress.Sheet));
@@ -452,8 +450,8 @@
  sal_Bool ScXMLExport::IsAnnotationEqual(const uno::Reference<table::XCell>& /* xCell1 */,
                                          const uno::Reference<table::XCell>& /* xCell2 */)
  {
-diff --git sc/source/filter/xml/xmlexprt.hxx sc/source/filter/xml/xmlexprt.hxx
-index 8415096..af8d34f 100644
+diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
+index 779f94e..e4fcc10 100644
 --- sc/source/filter/xml/xmlexprt.hxx
 +++ sc/source/filter/xml/xmlexprt.hxx
 @@ -60,6 +60,7 @@ class XMLNumberFormatAttributesExportHelper;
@@ -464,7 +462,7 @@
  
  typedef std::vector< com::sun::star::uno::Reference < com::sun::star::drawing::XShapes > > ScMyXShapesVec;
  
-@@ -180,9 +181,10 @@ class ScXMLExport : public SvXMLExport
+@@ -181,9 +182,10 @@ class ScXMLExport : public SvXMLExport
  	void SetRepeatAttribute (const sal_Int32 nEqualCellCount);
  
  	sal_Bool IsCellTypeEqual (const ScMyCell& aCell1, const ScMyCell& aCell2) const;
@@ -476,7 +474,7 @@
  	sal_Bool IsAnnotationEqual(const com::sun::star::uno::Reference<com::sun::star::table::XCell>& xCell1,
  								const com::sun::star::uno::Reference<com::sun::star::table::XCell>& xCell2);
  	sal_Bool IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2);
-diff --git sc/source/ui/app/transobj.cxx sc/source/ui/app/transobj.cxx
+diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
 index d13e4b9..d324b1b 100644
 --- sc/source/ui/app/transobj.cxx
 +++ sc/source/ui/app/transobj.cxx
@@ -492,7 +490,7 @@
  				}
  				pDestDoc->PutCell( nCol,nRow,nDestTab, pNew );
  
-diff --git sc/source/ui/docshell/impex.cxx sc/source/ui/docshell/impex.cxx
+diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
 index 5ecaa46..7c21c4a 100644
 --- sc/source/ui/docshell/impex.cxx
 +++ sc/source/ui/docshell/impex.cxx
@@ -512,11 +510,11 @@
  
  					aBufStr.AssignAscii(RTL_CONSTASCII_STRINGPARAM( "C;X" ));
  					aBufStr += String::CreateFromInt32( c );
-diff --git sc/source/ui/view/output2.cxx sc/source/ui/view/output2.cxx
-index 6425234..1375df6 100644
+diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
+index c472906..c92818e 100644
 --- sc/source/ui/view/output2.cxx
 +++ sc/source/ui/view/output2.cxx
-@@ -1352,11 +1352,13 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
+@@ -1427,11 +1427,13 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic )
  				}
  				if (bDoCell && !bNeedEdit)
  				{



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