ooo-build r13361 - in branches/ooo-build-2-4-1: . patches/src680



Author: kyoshida
Date: Wed Jul 23 03:26:27 2008
New Revision: 13361
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13361&view=rev

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

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


Modified:
   branches/ooo-build-2-4-1/ChangeLog
   branches/ooo-build-2-4-1/patches/src680/sc-overwrite-char-font-attrs.diff

Modified: branches/ooo-build-2-4-1/patches/src680/sc-overwrite-char-font-attrs.diff
==============================================================================
--- branches/ooo-build-2-4-1/patches/src680/sc-overwrite-char-font-attrs.diff	(original)
+++ branches/ooo-build-2-4-1/patches/src680/sc-overwrite-char-font-attrs.diff	Wed Jul 23 03:26:27 2008
@@ -1,6 +1,7 @@
-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
+diff --git sc/inc/attarray.hxx sc/inc/attarray.hxx
+index 69b50e7..1378b0d 100644
+--- sc/inc/attarray.hxx
++++ sc/inc/attarray.hxx
 @@ -45,6 +45,7 @@
  #endif
  
@@ -9,7 +10,17 @@
  class ScMarkArray;
  class ScPatternAttr;
  class ScStyleSheet;
-@@ -135,9 +136,11 @@ public:
+@@ -114,6 +115,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();
+@@ -135,9 +139,11 @@ public:
  							SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight );
  
  	void	SetPattern( SCROW nRow, const ScPatternAttr* pPattern, BOOL bPutToPool = FALSE );
@@ -23,27 +34,20 @@
  	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,7 @@
+diff --git sc/inc/cell.hxx sc/inc/cell.hxx
+index ce293fe..a737251 100644
+--- sc/inc/cell.hxx
++++ sc/inc/cell.hxx
+@@ -39,6 +39,8 @@
  #include <stddef.h>
  
  #include <set>
 +#include <vector>
++#include <boost/shared_ptr.hpp>
  
  #ifndef _SVMEMPOOL_HXX //autogen
  #include <tools/mempool.hxx>
-@@ -61,6 +62,8 @@
- #include <vcl/fontcvt.hxx>
- #endif
- 
-+#include <boost/shared_ptr.hpp>
-+
- #define USE_MEMPOOL
- #define TEXTWIDTH_DIRTY		0xffff
- 
-@@ -76,6 +79,7 @@ class ScCodeArray;
+@@ -76,6 +78,7 @@ class ScCodeArray;
  class ScTokenArray;
  class ScProgress;
  class ScPostIt;
@@ -51,7 +55,7 @@
  
  class ScMultipleReadHeader;
  class ScMultipleWriteHeader;
-@@ -230,8 +234,57 @@ public:
+@@ -230,8 +233,57 @@ public:
  	const EditTextObject* GetData() const	{ return pData; }
  
  	void			Save( SvStream& rStream ) const;
@@ -109,9 +113,10 @@
  enum ScMatrixMode {
  	MM_NONE		 = 0,					// keine Matrixformel
  	MM_FORMULA	 = 1,					// Matrixformel
-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
+diff --git sc/inc/column.hxx sc/inc/column.hxx
+index cf3ff76..6b1efa7 100644
+--- sc/inc/column.hxx
++++ sc/inc/column.hxx
 @@ -73,6 +73,7 @@ class ScAttrIterator;
  class ScAttrArray;
  class ScBaseCell;
@@ -139,10 +144,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 f079d7a..98a6d71 100644
+--- sc/inc/document.hxx
++++ sc/inc/document.hxx
+@@ -382,6 +382,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
+@@ -1130,7 +1131,8 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollection() const;
  									const ScPatternAttr& rAttr );
  	void			ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
  										SCCOL nEndCol, SCROW nEndRow,
@@ -152,7 +166,7 @@
  	void			ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
  											SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
  											const ScPatternAttr& rAttr );
-@@ -1197,7 +1198,8 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollec
+@@ -1197,7 +1199,8 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollection() const;
  							SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
  							const String& sValStr, double& nX);
  
@@ -162,9 +176,19 @@
  	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
+@@ -1467,6 +1470,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 a698737..2563eb1 100644
+--- sc/inc/table.hxx
++++ sc/inc/table.hxx
 @@ -77,6 +77,7 @@ class ScAutoFormatData;
  class ScBaseCell;
  class ScDocument;
@@ -192,9 +216,10 @@
  	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
+diff --git sc/source/core/data/attarray.cxx sc/source/core/data/attarray.cxx
+index d48df06..479aee2 100644
+--- sc/source/core/data/attarray.cxx
++++ sc/source/core/data/attarray.cxx
 @@ -46,6 +46,7 @@
  #include <svx/bolnitem.hxx>
  #include <svx/frmdiritem.hxx>
@@ -212,9 +237,32 @@
  
  #undef DBG_INVALIDATE
  #define DBGOUTPUT(s) \
-@@ -310,7 +311,8 @@ void ScAttrArray::SetPattern( SCROW nRow
+@@ -309,8 +310,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, 
@@ -222,7 +270,7 @@
  {
  	if (ValidRow(nStartRow) && ValidRow(nEndRow))
  	{
-@@ -480,6 +482,32 @@ void ScAttrArray::SetPatternArea(SCROW n
+@@ -480,6 +504,13 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
                      pData[nInsert-1].nRow = nStartRow - 1;
                  pData[nInsert].nRow = nEndRow;
                  pData[nInsert].pPattern = pPattern;
@@ -230,32 +278,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
+@@ -715,7 +746,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
  #undef SET_LINE
  
  
@@ -264,7 +293,7 @@
  {
  #ifdef DBG_UTIL
  	TestData();
-@@ -750,7 +778,7 @@ void ScAttrArray::ApplyCacheArea( SCROW 
+@@ -750,7 +781,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
  				{
  					if (nY1 < nStartRow) nY1=nStartRow;
  					if (nY2 > nEndRow) nY2=nEndRow;
@@ -273,9 +302,10 @@
  					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
+diff --git sc/source/core/data/cell2.cxx sc/source/core/data/cell2.cxx
+index cd2622a..4acf571 100644
+--- sc/source/core/data/cell2.cxx
++++ sc/source/core/data/cell2.cxx
 @@ -61,7 +61,8 @@
  #include "editutil.hxx"
  #include "chgtrack.hxx"
@@ -286,7 +316,7 @@
  
  // STATIC DATA -----------------------------------------------------------
  
-@@ -201,6 +202,27 @@ void ScEditCell::Save( SvStream& rStream
+@@ -201,6 +202,27 @@ void ScEditCell::Save( SvStream& rStream ) const
          pData->Store( rStream );
  }
  
@@ -314,7 +344,7 @@
  void ScEditCell::SetTextObject( const EditTextObject* pObject,
              const SfxItemPool* pFromPool )
  {
-@@ -236,6 +258,76 @@ void ScEditCell::SetTextObject( const Ed
+@@ -236,6 +258,76 @@ void ScEditCell::SetTextObject( const EditTextObject* pObject,
          pData = NULL;
  }
  
@@ -391,10 +421,11 @@
  //---------------------------------------------------------------------
  
  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
+diff --git sc/source/core/data/column.cxx sc/source/core/data/column.cxx
+index 900fc42..f41d5d1 100644
+--- sc/source/core/data/column.cxx
++++ sc/source/core/data/column.cxx
+@@ -370,7 +370,7 @@ ULONG ScColumn::GetNumberFormat( SCROW nRow ) const
  }
  
  
@@ -403,7 +434,7 @@
  {
      SCROW nTop = 0;
      SCROW nBottom = 0;
-@@ -381,7 +381,7 @@ SCsROW ScColumn::ApplySelectionCache( Sf
+@@ -381,7 +381,7 @@ SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData
  		ScMarkArrayIter aMarkIter( rMark.GetArray() + nCol );
  		while (aMarkIter.Next( nTop, nBottom ))
  		{
@@ -412,7 +443,7 @@
  			bFound = TRUE;
  		}
  	}
-@@ -455,11 +455,12 @@ void ScColumn::ApplyPattern( SCROW nRow,
+@@ -455,11 +455,12 @@ void ScColumn::ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr )
  }
  
  
@@ -427,10 +458,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 bb42d4b..a876419 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 2e3b096..063eb49 100644
+--- sc/source/core/data/documen9.cxx
++++ sc/source/core/data/documen9.cxx
+@@ -884,6 +884,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 7272794..0d35712 100644
+--- sc/source/core/data/document.cxx
++++ sc/source/core/data/document.cxx
+@@ -3066,12 +3066,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,
@@ -446,7 +511,7 @@
  }
  
  
-@@ -4143,7 +4144,7 @@ void ScDocument::ApplyFrameAreaTab( cons
+@@ -4160,7 +4161,7 @@ void ScDocument::ApplyFrameAreaTab( const ScRange& rRange,
  }
  
  
@@ -455,7 +520,7 @@
  {
  	const SfxItemSet* pSet = &rAttr.GetItemSet();
  	BOOL bSet = FALSE;
-@@ -4160,7 +4161,7 @@ void ScDocument::ApplySelectionPattern( 
+@@ -4177,7 +4178,7 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark
  			ScRange aRange;
  			rMark.GetMarkArea( aRange );
  			ApplyPatternArea( aRange.aStart.Col(), aRange.aStart.Row(),
@@ -464,7 +529,7 @@
  		}
  		else
  		{
-@@ -4168,7 +4169,7 @@ void ScDocument::ApplySelectionPattern( 
+@@ -4185,7 +4186,7 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark
              for (SCTAB nTab=0; nTab<=MAXTAB; nTab++)
                  if (pTab[nTab])
                      if (rMark.GetTableSelect(nTab))
@@ -473,10 +538,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 a274aeb..87c17c7 100644
+--- sc/source/core/data/table2.cxx
++++ sc/source/core/data/table2.cxx
+@@ -1657,14 +1657,14 @@ void ScTable::ApplyPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr )
  
  
  void ScTable::ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
@@ -493,7 +559,7 @@
  	}
  }
  
-@@ -1872,10 +1872,11 @@ void ScTable::ApplyAttr( SCCOL nCol, SCR
+@@ -1872,10 +1872,11 @@ void ScTable::ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr )
  }
  
  
@@ -507,9 +573,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
+diff --git sc/source/ui/docshell/docsh.cxx sc/source/ui/docshell/docsh.cxx
+index a5f964d..f3419d8 100644
+--- sc/source/ui/docshell/docsh.cxx
++++ sc/source/ui/docshell/docsh.cxx
+@@ -837,6 +837,27 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
+     aDocument.DisableIdle( FALSE );
+ }
+ 
++namespace {
++
++class DocLoadChecker
++{
++public:
++    explicit DocLoadChecker(ScDocument* pDoc) :
++        mpDoc(pDoc)
++    {
++        mpDoc->SetLoadingMedium(true);
++    }
++
++    ~DocLoadChecker()
++    {
++        mpDoc->SetLoadingMedium(false);
++    }
++private:
++    ScDocument* mpDoc;
++};
++
++}
++
+ BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor )
+ {
+     RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "sb99857", "ScDocShell::LoadXML" );
+@@ -893,6 +914,7 @@ BOOL ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::R
+ 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
+@@ -986,7 +1008,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() );
+@@ -1013,6 +1035,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 b1fdf37..06c1feb 100644
+--- sc/source/ui/inc/undoblk.hxx
++++ sc/source/ui/inc/undoblk.hxx
 @@ -48,6 +48,10 @@
  #include "spellparam.hxx"
  #endif
@@ -541,9 +665,10 @@
  };
  
  
-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
+diff --git sc/source/ui/inc/undocell.hxx sc/source/ui/inc/undocell.hxx
+index 76bf55b..1da1bb3 100644
+--- sc/source/ui/inc/undocell.hxx
++++ sc/source/ui/inc/undocell.hxx
 @@ -43,6 +43,8 @@
  #include "postit.hxx"
  #endif
@@ -578,9 +703,10 @@
  };
  
  
-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
+diff --git sc/source/ui/undo/makefile.mk sc/source/ui/undo/makefile.mk
+index 2b4b4af..2e83724 100644
+--- sc/source/ui/undo/makefile.mk
++++ sc/source/ui/undo/makefile.mk
 @@ -89,6 +89,7 @@ SLOFILES =  \
  		$(SLO)$/undotab.obj
  
@@ -589,10 +715,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 2afbc4a..8e35362 100644
+--- sc/source/ui/undo/undoblk3.cxx
++++ sc/source/ui/undo/undoblk3.cxx
+@@ -487,6 +487,12 @@ String __EXPORT ScUndoSelectionAttr::GetComment() const
  	return ScGlobal::GetRscString( pLineOuter ? STR_UNDO_SELATTRLINES : STR_UNDO_SELATTR );
  }
  
@@ -605,7 +732,7 @@
  
  //----------------------------------------------------------------------------
  
-@@ -495,6 +501,8 @@ void ScUndoSelectionAttr::DoChange( cons
+@@ -509,6 +515,8 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
  	USHORT nExtFlags = 0;
  	pDocShell->UpdatePaintExt( nExtFlags, aEffRange );
  
@@ -614,7 +741,7 @@
  	if (bUndo)	// nur bei Undo
  	{
  		ScRange aCopyRange = aRange;
-@@ -519,6 +527,24 @@ void ScUndoSelectionAttr::DoChange( cons
+@@ -533,6 +541,24 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
  	ShowTable( aRange );
  }
  
@@ -639,9 +766,10 @@
  
  //----------------------------------------------------------------------------
  
-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
+diff --git sc/source/ui/undo/undocell.cxx sc/source/ui/undo/undocell.cxx
+index 78de4df..f8fa2e2 100644
+--- sc/source/ui/undo/undocell.cxx
++++ sc/source/ui/undo/undocell.cxx
 @@ -66,6 +66,8 @@
  #include "chgtrack.hxx"
  #include "sc.hrc"
@@ -651,7 +779,7 @@
  // STATIC DATA -----------------------------------------------------------
  
  TYPEINIT1(ScUndoCursorAttr, ScSimpleUndo);
-@@ -94,6 +96,8 @@ ScUndoCursorAttr::ScUndoCursorAttr( ScDo
+@@ -94,6 +96,8 @@ ScUndoCursorAttr::ScUndoCursorAttr( ScDocShell* pNewDocShell,
  	nCol( nNewCol ),
  	nRow( nNewRow ),
  	nTab( nNewTab ),
@@ -660,7 +788,7 @@
  	bIsAutomatic( bAutomatic )
  {
  	ScDocumentPool* pPool = pDocShell->GetDocument()->GetPool();
-@@ -118,9 +122,21 @@ String __EXPORT ScUndoCursorAttr::GetCom
+@@ -118,9 +122,21 @@ String __EXPORT ScUndoCursorAttr::GetComment() const
  	return ScGlobal::GetRscString( nId );
  }
  
@@ -684,7 +812,7 @@
  
  	ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
  	if (pViewShell)
-@@ -146,7 +162,7 @@ void ScUndoCursorAttr::DoChange( const S
+@@ -146,7 +162,7 @@ void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern ) const
  void __EXPORT ScUndoCursorAttr::Undo()
  {
  	BeginUndo();
@@ -702,10 +830,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 10394d8..0c882c6 100644
+--- sc/source/ui/view/viewfunc.cxx
++++ sc/source/ui/view/viewfunc.cxx
+@@ -1294,6 +1294,8 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
  		SCROW nEndRow = aMarkRange.aEnd.Row();
  		SCTAB nEndTab = aMarkRange.aEnd.Tab();
  
@@ -714,7 +843,7 @@
  		if (bRecord)
  		{
  			ScRange aCopyRange = aMarkRange;
-@@ -1310,15 +1312,14 @@ void ScViewFunc::ApplySelectionPattern( 
+@@ -1310,15 +1312,14 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
  
  			aFuncMark.MarkToMulti();
  
@@ -736,7 +865,7 @@
  
  		pDocSh->PostPaint( nStartCol, nStartRow, nStartTab,
  						   nEndCol,   nEndRow,   nEndTab,
-@@ -1332,6 +1333,19 @@ void ScViewFunc::ApplySelectionPattern( 
+@@ -1332,6 +1333,19 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
  		SCCOL nCol = pViewData->GetCurX();
  		SCROW nRow = pViewData->GetCurY();
  		SCTAB nTab = pViewData->GetTabNo();
@@ -756,7 +885,7 @@
  		ScPatternAttr* pOldPat = new ScPatternAttr(*pDoc->GetPattern( nCol, nRow, nTab ));
  
  		if (!bCursorOnly)
-@@ -1341,11 +1355,10 @@ void ScViewFunc::ApplySelectionPattern( 
+@@ -1341,11 +1355,10 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
  
  		if (bRecord)
  		{



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