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



Author: kyoshida
Date: Wed Jul 23 02:50:39 2008
New Revision: 13360
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13360&view=rev

Log:
2008-07-22  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/sc-overwrite-char-font-attrs.diff: fixed a regression
	where a cell with mixed font content was loaded incorrectly (n#409448). 


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/sc-overwrite-char-font-attrs.diff

Modified: trunk/patches/dev300/sc-overwrite-char-font-attrs.diff
==============================================================================
--- trunk/patches/dev300/sc-overwrite-char-font-attrs.diff	(original)
+++ trunk/patches/dev300/sc-overwrite-char-font-attrs.diff	Wed Jul 23 02:50:39 2008
@@ -1,15 +1,26 @@
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/inc/attarray.hxx sc/inc/attarray.hxx
---- sc.clean/inc/attarray.hxx	2008-05-18 01:44:42.000000000 -0400
-+++ sc/inc/attarray.hxx	2008-05-18 01:44:58.000000000 -0400
-@@ -45,6 +45,7 @@
- #endif
+diff --git sc/inc/attarray.hxx sc/inc/attarray.hxx
+index f123276..5bfa8cd 100644
+--- sc/inc/attarray.hxx
++++ sc/inc/attarray.hxx
+@@ -35,6 +35,7 @@
+ #include "attrib.hxx"
  
  class ScDocument;
 +class ScEditDataArray;
  class ScMarkArray;
  class ScPatternAttr;
  class ScStyleSheet;
-@@ -135,9 +136,11 @@ public:
+@@ -104,6 +105,9 @@ friend void lcl_IterGetNumberFormat( ULONG& nFormat,
+ 							SCROW nStartRow, SCROW nEndRow,
+ 							BOOL bLeft, SCCOL nDistRight, BOOL bTop, SCROW nDistBottom );
+ 
++    void RemoveCellCharAttribs( SCROW nStartRow, SCROW nEndRow, 
++                              const ScPatternAttr* pPattern, ScEditDataArray* pDataArray );
++
+ public:
+ 			ScAttrArray( SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc );
+ 			~ScAttrArray();
+@@ -125,9 +129,11 @@ public:
  							SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight );
  
  	void	SetPattern( SCROW nRow, const ScPatternAttr* pPattern, BOOL bPutToPool = FALSE );
@@ -23,10 +34,11 @@
  	void	ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
  								const SvxBorderLine* pLine, BOOL bColorOnly );
  
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/inc/cell.hxx sc/inc/cell.hxx
---- sc.clean/inc/cell.hxx	2008-05-18 01:44:42.000000000 -0400
-+++ sc/inc/cell.hxx	2008-05-18 01:44:58.000000000 -0400
-@@ -39,6 +39,9 @@
+diff --git sc/inc/cell.hxx sc/inc/cell.hxx
+index 8484278..ac35dc6 100644
+--- sc/inc/cell.hxx
++++ sc/inc/cell.hxx
+@@ -34,6 +34,9 @@
  #include <stddef.h>
  
  #include <set>
@@ -36,7 +48,7 @@
  #include <tools/mempool.hxx>
  #include <svtools/listener.hxx>
  #include "global.hxx"
-@@ -76,6 +79,7 @@ class ScCodeArray;
+@@ -58,6 +61,7 @@ class ScCodeArray;
  class ScTokenArray;
  class ScProgress;
  class ScPostIt;
@@ -44,15 +56,15 @@
  
  class ScMultipleReadHeader;
  class ScMultipleWriteHeader;
-@@ -230,8 +234,57 @@ public:
+@@ -217,8 +221,57 @@ public:
  	const EditTextObject* GetData() const	{ return pData; }
  
  	void			Save( SvStream& rStream ) const;
 +
 +    /** Removes character attribute based on new pattern attributes. */
 +    void            RemoveCharAttribs( const ScPatternAttr& rAttr );
- };
- 
++};
++
 +// ----------------------------------------------------------------------------
 +
 +class ScEditDataArray
@@ -95,17 +107,18 @@
 +private:
 +    ::std::vector<Item>::const_iterator maIter;
 +    ::std::vector<Item> maArray;
-+};
-+
+ };
+ 
 +// ----------------------------------------------------------------------------
 +
  enum ScMatrixMode {
      MM_NONE      = 0,                   // No matrix formula
      MM_FORMULA   = 1,                   // Upper left matrix formula cell
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/inc/column.hxx sc/inc/column.hxx
---- sc.clean/inc/column.hxx	2008-05-18 01:44:42.000000000 -0400
-+++ sc/inc/column.hxx	2008-05-18 01:44:58.000000000 -0400
-@@ -73,6 +73,7 @@ class ScAttrIterator;
+diff --git sc/inc/column.hxx sc/inc/column.hxx
+index 388ad6c..3621d78 100644
+--- sc/inc/column.hxx
++++ sc/inc/column.hxx
+@@ -56,6 +56,7 @@ class ScAttrIterator;
  class ScAttrArray;
  class ScBaseCell;
  class ScDocument;
@@ -113,7 +126,7 @@
  class ScFormulaCell;
  class ScMarkData;
  class ScMultipleReadHeader;
-@@ -333,7 +334,8 @@ public:
+@@ -316,7 +317,8 @@ public:
  
  	void		ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr );
  	void		ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr );
@@ -123,7 +136,7 @@
  	void		SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, BOOL bPutToPool = FALSE );
  	void		SetPatternArea( SCROW nStartRow, SCROW nEndRow,
  								const ScPatternAttr& rPatAttr, BOOL bPutToPool = FALSE );
-@@ -365,7 +367,7 @@ public:
+@@ -348,7 +350,7 @@ public:
  
  	void		RemoveProtected( SCROW nStartRow, SCROW nEndRow );
  
@@ -132,10 +145,19 @@
  	void		DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark );
  
  	void		ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark );
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/inc/document.hxx sc/inc/document.hxx
---- sc.clean/inc/document.hxx	2008-05-18 01:44:42.000000000 -0400
-+++ sc/inc/document.hxx	2008-05-18 01:44:58.000000000 -0400
-@@ -1130,7 +1130,8 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollec
+diff --git sc/inc/document.hxx sc/inc/document.hxx
+index 2bf4393..6d361ae 100644
+--- sc/inc/document.hxx
++++ sc/inc/document.hxx
+@@ -368,6 +368,7 @@ private:
+ 	// kein Broadcast, keine Listener aufbauen waehrend aus einem anderen
+ 	// Doc (per Filter o.ae.) inserted wird, erst bei CompileAll / CalcAfterLoad
+ 	BOOL				bInsertingFromOtherDoc;
++    bool                bLoadingMedium;
+ 	BOOL				bImportingXML;		// special handling of formula text
+     BOOL                bXMLFromWrapper;    // distinguish ScXMLImportWrapper from external component
+ 	BOOL				bCalcingAfterLoad;				// in CalcAfterLoad TRUE
+@@ -1140,7 +1141,8 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollection() const;
  									const ScPatternAttr& rAttr );
  	void			ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
  										SCCOL nEndCol, SCROW nEndRow,
@@ -145,7 +167,7 @@
  	void			ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
  											SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
  											const ScPatternAttr& rAttr );
-@@ -1197,7 +1198,8 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollec
+@@ -1207,7 +1209,8 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollection() const;
  							SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
  							const String& sValStr, double& nX);
  
@@ -155,10 +177,20 @@
  	void			DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark );
  	void			DeleteSelectionTab( SCTAB nTab, USHORT nDelFlag, const ScMarkData& rMark );
  
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/inc/table.hxx sc/inc/table.hxx
---- sc.clean/inc/table.hxx	2008-05-18 01:44:42.000000000 -0400
-+++ sc/inc/table.hxx	2008-05-18 01:44:58.000000000 -0400
-@@ -77,6 +77,7 @@ class ScAutoFormatData;
+@@ -1477,6 +1480,8 @@ SC_DLLPUBLIC	SvNumberFormatter*	GetFormatTable() const;
+ 	BOOL			GetNoSetDirty() const { return bNoSetDirty; }
+ 	void			SetInsertingFromOtherDoc( BOOL bVal ) { bInsertingFromOtherDoc = bVal; }
+ 	BOOL			IsInsertingFromOtherDoc() const { return bInsertingFromOtherDoc; }
++    void            SetLoadingMedium( bool bVal );
++    bool            IsLoadingMedium() const;
+ 	void			SetImportingXML( BOOL bVal );
+ 	BOOL			IsImportingXML() const { return bImportingXML; }
+ 	void			SetXMLFromWrapper( BOOL bVal );
+diff --git sc/inc/table.hxx sc/inc/table.hxx
+index c9f6603..570bdd3 100644
+--- sc/inc/table.hxx
++++ sc/inc/table.hxx
+@@ -57,6 +57,7 @@ class ScAutoFormatData;
  class ScBaseCell;
  class ScDocument;
  class ScDrawLayer;
@@ -166,7 +198,7 @@
  class ScFormulaCell;
  class ScOutlineTable;
  class ScPostIt;
-@@ -472,7 +473,8 @@ public:
+@@ -454,7 +455,8 @@ public:
  
  	void		ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr );
  	void		ApplyPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
@@ -176,7 +208,7 @@
  	void		SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr, BOOL bPutToPool = FALSE )
  					{ aCol[rPos.Col()].SetPattern( rPos.Row(), rAttr, bPutToPool ); }
  	void		SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr, BOOL bPutToPool = FALSE );
-@@ -500,7 +502,7 @@ public:
+@@ -482,7 +484,7 @@ public:
  	BOOL		ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, INT16 nFlags );
  	BOOL		RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, INT16 nFlags );
  
@@ -185,18 +217,19 @@
  	void		DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark );
  
  	void		ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark );
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/core/data/attarray.cxx sc/source/core/data/attarray.cxx
---- sc.clean/source/core/data/attarray.cxx	2008-05-18 01:44:46.000000000 -0400
-+++ sc/source/core/data/attarray.cxx	2008-05-18 01:52:28.000000000 -0400
-@@ -46,6 +46,7 @@
+diff --git sc/source/core/data/attarray.cxx sc/source/core/data/attarray.cxx
+index 19e7684..6102796 100644
+--- sc/source/core/data/attarray.cxx
++++ sc/source/core/data/attarray.cxx
+@@ -41,6 +41,7 @@
  #include <svx/bolnitem.hxx>
  #include <svx/frmdiritem.hxx>
  #include <svx/shaditem.hxx>
 +#include <svx/editobj.hxx>
  #include <svtools/poolcach.hxx>
- 
- #ifndef _SVX_FONTITEM_HXX
-@@ -65,7 +66,7 @@
+ #include <svx/fontitem.hxx>
+ #include <vcl/fontcvt.hxx>
+@@ -55,7 +56,7 @@
  #include "markarr.hxx"
  #include "rechead.hxx"
  #include "globstr.hrc"
@@ -205,9 +238,32 @@
  
  #undef DBG_INVALIDATE
  #define DBGOUTPUT(s) \
-@@ -310,7 +311,8 @@ void ScAttrArray::SetPattern( SCROW nRow
+@@ -299,8 +300,31 @@ void ScAttrArray::SetPattern( SCROW nRow, const ScPatternAttr* pPattern, BOOL bP
+ 	SetPatternArea( nRow, nRow, pPattern, bPutToPool );
  }
  
++void ScAttrArray::RemoveCellCharAttribs( SCROW nStartRow, SCROW nEndRow, 
++                                       const ScPatternAttr* pPattern, ScEditDataArray* pDataArray )
++{
++    for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
++    {
++        ScBaseCell* pCell;
++        pDocument->GetCell(nCol, nRow, nTab, pCell);
++        if (pCell && pCell->GetCellType() == CELLTYPE_EDIT)
++        {
++            EditTextObject* pOldData = NULL;
++            ScEditCell* pEditCell = static_cast<ScEditCell*>(pCell);
++            if (pDataArray)
++                pOldData = pEditCell->GetData()->Clone();
++            pEditCell->RemoveCharAttribs(*pPattern);
++            if (pDataArray)
++            {
++                EditTextObject* pNewData = pEditCell->GetData()->Clone();
++                pDataArray->AddItem(nTab, nCol, nRow, pOldData, pNewData);
++            }
++        }
++    }
++}
  
 -void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, BOOL bPutToPool )
 +void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, 
@@ -215,7 +271,7 @@
  {
  	if (ValidRow(nStartRow) && ValidRow(nEndRow))
  	{
-@@ -480,6 +482,32 @@ void ScAttrArray::SetPatternArea(SCROW n
+@@ -470,6 +494,13 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
                      pData[nInsert-1].nRow = nStartRow - 1;
                  pData[nInsert].nRow = nEndRow;
                  pData[nInsert].pPattern = pPattern;
@@ -223,32 +279,13 @@
 +                // Remove character attributes from these cells if the pattern
 +                // is applied during normal session.  We don't want to do this
 +                // while importing document.
-+                if (!pDocument->IsImportingXML())
-+                {
-+                    for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
-+                    {
-+                        ScBaseCell* pCell;
-+                        pDocument->GetCell(nCol, nRow, nTab, pCell);
-+                        if (pCell && pCell->GetCellType() == CELLTYPE_EDIT)
-+                        {
-+                            EditTextObject* pOldData = NULL;
-+                            ScEditCell* pEditCell = static_cast<ScEditCell*>(pCell);
-+                            if (pDataArray)
-+                                pOldData = pEditCell->GetData()->Clone();
-+                            pEditCell->RemoveCharAttribs(*pPattern);
-+                            if (pDataArray)
-+                            {
-+                                EditTextObject* pNewData = pEditCell->GetData()->Clone();
-+                                pDataArray->AddItem(nTab, nCol, nRow, pOldData, pNewData);
-+                            }
-+                        }
-+                    }
-+                }
++                if (!pDocument->IsLoadingMedium())
++                    RemoveCellCharAttribs(nStartRow, nEndRow, pPattern ,pDataArray);
 +
                  nCount++;
              }
  		}
-@@ -715,7 +743,7 @@ void ScAttrArray::ApplyLineStyleArea( SC
+@@ -705,7 +736,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
  #undef SET_LINE
  
  
@@ -257,7 +294,7 @@
  {
  #ifdef DBG_UTIL
  	TestData();
-@@ -750,7 +778,7 @@ void ScAttrArray::ApplyCacheArea( SCROW 
+@@ -740,7 +771,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
  				{
  					if (nY1 < nStartRow) nY1=nStartRow;
  					if (nY2 > nEndRow) nY2=nEndRow;
@@ -266,10 +303,11 @@
  					Search( nStart, nPos );
  				}
  				else
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/core/data/cell2.cxx sc/source/core/data/cell2.cxx
---- sc.clean/source/core/data/cell2.cxx	2008-05-18 01:44:46.000000000 -0400
-+++ sc/source/core/data/cell2.cxx	2008-05-18 01:44:58.000000000 -0400
-@@ -61,7 +61,8 @@
+diff --git sc/source/core/data/cell2.cxx sc/source/core/data/cell2.cxx
+index 3357180..a4c9a1c 100644
+--- sc/source/core/data/cell2.cxx
++++ sc/source/core/data/cell2.cxx
+@@ -49,7 +49,8 @@
  #include "editutil.hxx"
  #include "chgtrack.hxx"
  #include "indexmap.hxx"
@@ -279,7 +317,7 @@
  
  // STATIC DATA -----------------------------------------------------------
  
-@@ -201,6 +202,27 @@ void ScEditCell::Save( SvStream& rStream
+@@ -189,6 +190,27 @@ void ScEditCell::Save( SvStream& rStream ) const
          pData->Store( rStream );
  }
  
@@ -307,7 +345,7 @@
  void ScEditCell::SetTextObject( const EditTextObject* pObject,
              const SfxItemPool* pFromPool )
  {
-@@ -236,6 +258,76 @@ void ScEditCell::SetTextObject( const Ed
+@@ -224,6 +246,76 @@ void ScEditCell::SetTextObject( const EditTextObject* pObject,
          pData = NULL;
  }
  
@@ -383,11 +421,12 @@
 +
  //---------------------------------------------------------------------
  
- void ScFormulaCell::GetEnglishFormula( String& rFormula, BOOL bCompileXML,
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/core/data/column.cxx sc/source/core/data/column.cxx
---- sc.clean/source/core/data/column.cxx	2008-05-18 01:44:46.000000000 -0400
-+++ sc/source/core/data/column.cxx	2008-05-18 01:44:58.000000000 -0400
-@@ -370,7 +370,7 @@ ULONG ScColumn::GetNumberFormat( SCROW n
+ BOOL ScFormulaCell::IsEmpty()
+diff --git sc/source/core/data/column.cxx sc/source/core/data/column.cxx
+index fc848b1..67f0b70 100644
+--- sc/source/core/data/column.cxx
++++ sc/source/core/data/column.cxx
+@@ -369,7 +369,7 @@ ULONG ScColumn::GetNumberFormat( SCROW nRow ) const
  }
  
  
@@ -396,7 +435,7 @@
  {
      SCROW nTop = 0;
      SCROW nBottom = 0;
-@@ -381,7 +381,7 @@ SCsROW ScColumn::ApplySelectionCache( Sf
+@@ -380,7 +380,7 @@ SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData
  		ScMarkArrayIter aMarkIter( rMark.GetArray() + nCol );
  		while (aMarkIter.Next( nTop, nBottom ))
  		{
@@ -405,7 +444,7 @@
  			bFound = TRUE;
  		}
  	}
-@@ -455,11 +455,12 @@ void ScColumn::ApplyPattern( SCROW nRow,
+@@ -454,11 +454,12 @@ void ScColumn::ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr )
  }
  
  
@@ -420,10 +459,44 @@
  }
  
  
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/core/data/document.cxx sc/source/core/data/document.cxx
---- sc.clean/source/core/data/document.cxx	2008-05-18 01:44:46.000000000 -0400
-+++ sc/source/core/data/document.cxx	2008-05-18 01:44:58.000000000 -0400
-@@ -3049,12 +3049,13 @@ void ScDocument::ApplyPattern( SCCOL nCo
+diff --git sc/source/core/data/documen2.cxx sc/source/core/data/documen2.cxx
+index cbf19d4..08912c2 100644
+--- sc/source/core/data/documen2.cxx
++++ sc/source/core/data/documen2.cxx
+@@ -187,6 +187,7 @@ ScDocument::ScDocument( ScDocumentMode	eMode,
+ //		bNoSetDirty( TRUE ),
+ 		bNoSetDirty( FALSE ),
+ 		bInsertingFromOtherDoc( FALSE ),
++        bLoadingMedium(false),
+ 		bImportingXML( FALSE ),
+         bXMLFromWrapper( FALSE ),
+ 		bCalcingAfterLoad( FALSE ),
+diff --git sc/source/core/data/documen9.cxx sc/source/core/data/documen9.cxx
+index 2b3c3f7..c29607d 100644
+--- sc/source/core/data/documen9.cxx
++++ sc/source/core/data/documen9.cxx
+@@ -885,6 +885,16 @@ void ScDocument::UpdateFontCharSet()
+ 	}
+ }
+ 
++void ScDocument::SetLoadingMedium( bool bVal )
++{
++    bLoadingMedium = bVal;
++}
++
++bool ScDocument::IsLoadingMedium() const
++{
++    return bLoadingMedium;
++}
++
+ void ScDocument::SetImportingXML( BOOL bVal )
+ {
+ 	bImportingXML = bVal;
+diff --git sc/source/core/data/document.cxx sc/source/core/data/document.cxx
+index 3f6030c..c5dc8b8 100644
+--- sc/source/core/data/document.cxx
++++ sc/source/core/data/document.cxx
+@@ -3117,12 +3117,13 @@ void ScDocument::ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatte
  void ScDocument::ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
  						SCCOL nEndCol, SCROW nEndRow,
  						const ScMarkData& rMark,
@@ -439,7 +512,7 @@
  }
  
  
-@@ -4143,7 +4144,7 @@ void ScDocument::ApplyFrameAreaTab( cons
+@@ -4211,7 +4212,7 @@ void ScDocument::ApplyFrameAreaTab( const ScRange& rRange,
  }
  
  
@@ -448,7 +521,7 @@
  {
  	const SfxItemSet* pSet = &rAttr.GetItemSet();
  	BOOL bSet = FALSE;
-@@ -4160,7 +4161,7 @@ void ScDocument::ApplySelectionPattern( 
+@@ -4228,7 +4229,7 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark
  			ScRange aRange;
  			rMark.GetMarkArea( aRange );
  			ApplyPatternArea( aRange.aStart.Col(), aRange.aStart.Row(),
@@ -457,7 +530,7 @@
  		}
  		else
  		{
-@@ -4168,7 +4169,7 @@ void ScDocument::ApplySelectionPattern( 
+@@ -4236,7 +4237,7 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark
              for (SCTAB nTab=0; nTab<=MAXTAB; nTab++)
                  if (pTab[nTab])
                      if (rMark.GetTableSelect(nTab))
@@ -466,10 +539,11 @@
  		}
  	}
  }
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/core/data/table2.cxx sc/source/core/data/table2.cxx
---- sc.clean/source/core/data/table2.cxx	2008-05-18 01:44:46.000000000 -0400
-+++ sc/source/core/data/table2.cxx	2008-05-18 01:44:58.000000000 -0400
-@@ -1657,14 +1657,14 @@ void ScTable::ApplyPattern( SCCOL nCol, 
+diff --git sc/source/core/data/table2.cxx sc/source/core/data/table2.cxx
+index 0ae2d0b..6a55cb5 100644
+--- sc/source/core/data/table2.cxx
++++ sc/source/core/data/table2.cxx
+@@ -1648,14 +1648,14 @@ void ScTable::ApplyPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr )
  
  
  void ScTable::ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
@@ -486,7 +560,7 @@
  	}
  }
  
-@@ -1872,10 +1872,11 @@ void ScTable::ApplyAttr( SCCOL nCol, SCR
+@@ -1863,10 +1863,11 @@ void ScTable::ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr )
  }
  
  
@@ -500,12 +574,67 @@
  }
  
  
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/ui/inc/undoblk.hxx sc/source/ui/inc/undoblk.hxx
---- sc.clean/source/ui/inc/undoblk.hxx	2008-05-18 01:44:43.000000000 -0400
-+++ sc/source/ui/inc/undoblk.hxx	2008-05-18 01:44:58.000000000 -0400
-@@ -48,6 +48,10 @@
+diff --git sc/source/ui/docshell/docsh.cxx sc/source/ui/docshell/docsh.cxx
+index 9bcc078..c702954 100644
+--- sc/source/ui/docshell/docsh.cxx
++++ sc/source/ui/docshell/docsh.cxx
+@@ -680,10 +680,31 @@ BOOL ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::R
+     return bRet;
+ }
+ 
++namespace {
++
++class DocLoadChecker
++{
++public:
++    explicit DocLoadChecker(ScDocument* pDoc) :
++        mpDoc(pDoc)
++    {
++        mpDoc->SetLoadingMedium(true);
++    }
++
++    ~DocLoadChecker()
++    {
++        mpDoc->SetLoadingMedium(false);
++    }
++private:
++    ScDocument* mpDoc;
++};
++
++}
++
+ BOOL __EXPORT ScDocShell::Load( SfxMedium& rMedium )
+ {
+ 	RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::Load" );
+-
++    DocLoadChecker aChecker(&aDocument);
+ 	ScRefreshTimerProtector( aDocument.GetRefreshTimerControlAddress() );
+ 
+ 	//	only the latin script language is loaded
+@@ -1048,7 +1069,7 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
+ BOOL __EXPORT ScDocShell::LoadFrom( SfxMedium& rMedium )
+ {
+ 	RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::LoadFrom" );
+-
++    DocLoadChecker aChecker(&aDocument);
+ 	ScRefreshTimerProtector( aDocument.GetRefreshTimerControlAddress() );
+ 
+ 	WaitObject aWait( GetActiveDialogParent() );
+@@ -1075,6 +1096,7 @@ BOOL __EXPORT ScDocShell::LoadFrom( SfxMedium& rMedium )
+ BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
+ {
+ 	RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::ConvertFrom" );
++    DocLoadChecker aChecker(&aDocument);
+ 
+ 	BOOL bRet = FALSE;				// FALSE heisst Benutzerabbruch !!
+ 									// bei Fehler: Fehler am Stream setzen!!
+diff --git sc/source/ui/inc/undoblk.hxx sc/source/ui/inc/undoblk.hxx
+index cfa37e2..6f7c526 100644
+--- sc/source/ui/inc/undoblk.hxx
++++ sc/source/ui/inc/undoblk.hxx
+@@ -35,6 +35,10 @@
+ #include "viewutil.hxx"
  #include "spellparam.hxx"
- #endif
  
 +#include "cell.hxx"
 +
@@ -514,7 +643,7 @@
  class ScDocShell;
  class ScDocument;
  class ScOutlineTable;
-@@ -360,9 +364,11 @@ public:
+@@ -347,9 +351,11 @@ public:
  
  	virtual String	GetComment() const;
  
@@ -526,7 +655,7 @@
  	ScDocument*		pUndoDoc;
  	BOOL			bMulti;
  	ScPatternAttr*	pApplyPattern;
-@@ -370,6 +376,7 @@ private:
+@@ -357,6 +363,7 @@ private:
  	SvxBoxInfoItem*	pLineInner;
  
  	void			DoChange( const BOOL bUndo );
@@ -534,19 +663,20 @@
  };
  
  
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/ui/inc/undocell.hxx sc/source/ui/inc/undocell.hxx
---- sc.clean/source/ui/inc/undocell.hxx	2008-05-18 01:44:43.000000000 -0400
-+++ sc/source/ui/inc/undocell.hxx	2008-05-18 01:44:58.000000000 -0400
-@@ -43,6 +43,8 @@
+diff --git sc/source/ui/inc/undocell.hxx sc/source/ui/inc/undocell.hxx
+index b811744..c5aba91 100644
+--- sc/source/ui/inc/undocell.hxx
++++ sc/source/ui/inc/undocell.hxx
+@@ -34,6 +34,8 @@
+ #include "undobase.hxx"
  #include "postit.hxx"
- #endif
  
 +#include <boost/shared_ptr.hpp>
 +
  class ScDocShell;
  class ScBaseCell;
  class ScPatternAttr;
-@@ -71,6 +73,11 @@ public:
+@@ -62,6 +64,11 @@ public:
  
  	virtual String	GetComment() const;
  
@@ -558,7 +688,7 @@
  private:
  	SCCOL			nCol;
  	SCROW			nRow;
-@@ -78,9 +85,11 @@ private:
+@@ -69,9 +76,11 @@ private:
  	ScPatternAttr*	pOldPattern;
  	ScPatternAttr*	pNewPattern;
  	ScPatternAttr*	pApplyPattern;
@@ -571,10 +701,11 @@
  };
  
  
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/ui/undo/makefile.mk sc/source/ui/undo/makefile.mk
---- sc.clean/source/ui/undo/makefile.mk	2008-05-18 01:44:43.000000000 -0400
-+++ sc/source/ui/undo/makefile.mk	2008-05-18 01:44:58.000000000 -0400
-@@ -89,6 +89,7 @@ SLOFILES =  \
+diff --git sc/source/ui/undo/makefile.mk sc/source/ui/undo/makefile.mk
+index 7c4d29a..bd35af7 100644
+--- sc/source/ui/undo/makefile.mk
++++ sc/source/ui/undo/makefile.mk
+@@ -78,6 +78,7 @@ SLOFILES =  \
  		$(SLO)$/undotab.obj
  
  EXCEPTIONSFILES= \
@@ -582,10 +713,11 @@
      $(SLO)$/undostyl.obj
  
  # --- Tagets -------------------------------------------------------
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/ui/undo/undoblk3.cxx sc/source/ui/undo/undoblk3.cxx
---- sc.clean/source/ui/undo/undoblk3.cxx	2008-05-18 01:44:43.000000000 -0400
-+++ sc/source/ui/undo/undoblk3.cxx	2008-05-18 01:44:58.000000000 -0400
-@@ -473,6 +473,12 @@ String __EXPORT ScUndoSelectionAttr::Get
+diff --git sc/source/ui/undo/undoblk3.cxx sc/source/ui/undo/undoblk3.cxx
+index 9cabbd7..5cf9b92 100644
+--- sc/source/ui/undo/undoblk3.cxx
++++ sc/source/ui/undo/undoblk3.cxx
+@@ -474,6 +474,12 @@ String __EXPORT ScUndoSelectionAttr::GetComment() const
  	return ScGlobal::GetRscString( pLineOuter ? STR_UNDO_SELATTRLINES : STR_UNDO_SELATTR );
  }
  
@@ -598,7 +730,7 @@
  
  //----------------------------------------------------------------------------
  
-@@ -495,6 +501,8 @@ void ScUndoSelectionAttr::DoChange( cons
+@@ -492,6 +498,8 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
  	USHORT nExtFlags = 0;
  	pDocShell->UpdatePaintExt( nExtFlags, aEffRange );
  
@@ -607,7 +739,7 @@
  	if (bUndo)	// nur bei Undo
  	{
  		ScRange aCopyRange = aRange;
-@@ -519,6 +527,24 @@ void ScUndoSelectionAttr::DoChange( cons
+@@ -516,6 +524,24 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
  	ShowTable( aRange );
  }
  
@@ -632,10 +764,11 @@
  
  //----------------------------------------------------------------------------
  
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/ui/undo/undocell.cxx sc/source/ui/undo/undocell.cxx
---- sc.clean/source/ui/undo/undocell.cxx	2008-05-18 01:44:43.000000000 -0400
-+++ sc/source/ui/undo/undocell.cxx	2008-05-18 01:44:58.000000000 -0400
-@@ -66,6 +66,8 @@
+diff --git sc/source/ui/undo/undocell.cxx sc/source/ui/undo/undocell.cxx
+index 5a8d9fa..9ff33fe 100644
+--- sc/source/ui/undo/undocell.cxx
++++ sc/source/ui/undo/undocell.cxx
+@@ -61,6 +61,8 @@
  #include "chgtrack.hxx"
  #include "sc.hrc"
  
@@ -644,7 +777,7 @@
  // STATIC DATA -----------------------------------------------------------
  
  TYPEINIT1(ScUndoCursorAttr, ScSimpleUndo);
-@@ -94,6 +96,8 @@ ScUndoCursorAttr::ScUndoCursorAttr( ScDo
+@@ -89,6 +91,8 @@ ScUndoCursorAttr::ScUndoCursorAttr( ScDocShell* pNewDocShell,
  	nCol( nNewCol ),
  	nRow( nNewRow ),
  	nTab( nNewTab ),
@@ -653,7 +786,7 @@
  	bIsAutomatic( bAutomatic )
  {
  	ScDocumentPool* pPool = pDocShell->GetDocument()->GetPool();
-@@ -118,9 +122,21 @@ String __EXPORT ScUndoCursorAttr::GetCom
+@@ -113,9 +117,21 @@ String __EXPORT ScUndoCursorAttr::GetComment() const
  	return ScGlobal::GetRscString( nId );
  }
  
@@ -677,7 +810,7 @@
  
  	ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
  	if (pViewShell)
-@@ -146,7 +162,7 @@ void ScUndoCursorAttr::DoChange( const S
+@@ -141,7 +157,7 @@ void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern ) const
  void __EXPORT ScUndoCursorAttr::Undo()
  {
  	BeginUndo();
@@ -686,7 +819,7 @@
  
  	if ( bIsAutomatic )
  	{
-@@ -164,7 +180,7 @@ void __EXPORT ScUndoCursorAttr::Undo()
+@@ -159,7 +175,7 @@ void __EXPORT ScUndoCursorAttr::Undo()
  void __EXPORT ScUndoCursorAttr::Redo()
  {
  	BeginRedo();
@@ -695,10 +828,11 @@
  	EndRedo();
  }
  
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj --exclude='*.orig' sc.clean/source/ui/view/viewfunc.cxx sc/source/ui/view/viewfunc.cxx
---- sc.clean/source/ui/view/viewfunc.cxx	2008-05-18 01:44:43.000000000 -0400
-+++ sc/source/ui/view/viewfunc.cxx	2008-05-18 01:44:58.000000000 -0400
-@@ -1294,6 +1294,8 @@ void ScViewFunc::ApplySelectionPattern( 
+diff --git sc/source/ui/view/viewfunc.cxx sc/source/ui/view/viewfunc.cxx
+index 666b939..d262883 100644
+--- sc/source/ui/view/viewfunc.cxx
++++ sc/source/ui/view/viewfunc.cxx
+@@ -1293,6 +1293,8 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
  		SCROW nEndRow = aMarkRange.aEnd.Row();
  		SCTAB nEndTab = aMarkRange.aEnd.Tab();
  
@@ -707,7 +841,7 @@
  		if (bRecord)
  		{
  			ScRange aCopyRange = aMarkRange;
-@@ -1310,15 +1312,14 @@ void ScViewFunc::ApplySelectionPattern( 
+@@ -1309,15 +1311,14 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
  
  			aFuncMark.MarkToMulti();
  
@@ -729,7 +863,7 @@
  
  		pDocSh->PostPaint( nStartCol, nStartRow, nStartTab,
  						   nEndCol,   nEndRow,   nEndTab,
-@@ -1332,6 +1333,19 @@ void ScViewFunc::ApplySelectionPattern( 
+@@ -1331,6 +1332,19 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
  		SCCOL nCol = pViewData->GetCurX();
  		SCROW nRow = pViewData->GetCurY();
  		SCTAB nTab = pViewData->GetTabNo();
@@ -748,8 +882,8 @@
 +
  		ScPatternAttr* pOldPat = new ScPatternAttr(*pDoc->GetPattern( nCol, nRow, nTab ));
  
- 		pDoc->ApplyPattern( nCol, nRow, nTab, rAttr );
-@@ -1341,11 +1355,10 @@ void ScViewFunc::ApplySelectionPattern( 
+ 		if (!bCursorOnly)
+@@ -1340,11 +1354,10 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
  
  		if (bRecord)
  		{



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