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



Author: kyoshida
Date: Wed Dec 24 17:24:58 2008
New Revision: 14922
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14922&view=rev

Log:
2008-12-24  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/calc-change-track-xls-export-fix.diff:
	* patches/dev300/calc-dp-pivotcache-fix.diff:
	* patches/dev300/chart-maximum-minimum-typo.diff: backported these 
	patches from the opensuse-11-1 branch.  These patches are generally low
	risk.

	* patches/dev300/apply: add these patches.


Added:
   branches/ooo-build-3-0-1/patches/dev300/calc-change-track-xls-export-fix.diff
   branches/ooo-build-3-0-1/patches/dev300/calc-dp-pivotcache-fix.diff
   branches/ooo-build-3-0-1/patches/dev300/chart-maximum-minimum-typo.diff
Modified:
   branches/ooo-build-3-0-1/ChangeLog
   branches/ooo-build-3-0-1/patches/dev300/apply

Modified: branches/ooo-build-3-0-1/patches/dev300/apply
==============================================================================
--- branches/ooo-build-3-0-1/patches/dev300/apply	(original)
+++ branches/ooo-build-3-0-1/patches/dev300/apply	Wed Dec 24 17:24:58 2008
@@ -786,6 +786,9 @@
 # fixed chart wizard failure when the formula syntax is set to Excel A1/R1C1.
 chart-wizard-xls-address-convention-fix.diff, n#411450, i#94696, kohei
 
+# fixed change track export to xls files wrt cell change records.
+calc-change-track-xls-export-fix.diff, n#416045, i#93839, kohei
+
 # fix regression that prevents data pilot from being created on a filtered range.
 calc-dp-filtered-range-fix.diff, i#94281, kohei
 
@@ -795,6 +798,13 @@
 # Don't insert drill-down sheet in read-only mode.
 calc-dp-no-drilldown-when-readonly.diff, i#90402, kohei
 
+# Fix a typo in chart2 that causes incorrect scaling under certain conditions.
+chart-maximum-minimum-typo.diff, i#95714, kohei
+
+# Pivot cache field import fix.
+calc-dp-pivotcache-fix.diff, n#433658, i#96326, kohei
+
+
 [ LinuxOnly ]
 # accelerate linking, by extreme cunning i#63927
 # this is an increasingly marginal win ...

Added: branches/ooo-build-3-0-1/patches/dev300/calc-change-track-xls-export-fix.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-3-0-1/patches/dev300/calc-change-track-xls-export-fix.diff	Wed Dec 24 17:24:58 2008
@@ -0,0 +1,400 @@
+diff --git sc/inc/chgtrack.hxx sc/inc/chgtrack.hxx
+index fc078cf..b607124 100644
+--- sc/inc/chgtrack.hxx
++++ sc/inc/chgtrack.hxx
+@@ -1397,8 +1397,6 @@ public:
+ 			void				NotifyModified( ScChangeTrackMsgType eMsgType,
+ 									ULONG nStartAction, ULONG nEndAction );
+ 
+-			BOOL				Load( SvStream& rStrm, USHORT nVer );
+-			BOOL				Store( SvStream& rStrm );
+ 			USHORT				GetLoadedFileFormatVersion() const
+ 									{ return nLoadedFileFormatVersion; }
+ 
+diff --git sc/source/core/tool/chgtrack.cxx sc/source/core/tool/chgtrack.cxx
+index 7a62176..fc03ddd 100644
+--- sc/source/core/tool/chgtrack.cxx
++++ sc/source/core/tool/chgtrack.cxx
+@@ -2943,262 +2943,6 @@ void lcl_EnsureSorting( StrCollection& rCollection )
+ 	}
+ }
+ 
+-
+-BOOL ScChangeTrack::Load( SvStream& rStrm, USHORT nVer )
+-{
+-	BOOL bOk = TRUE;
+-	SetLoadSave( TRUE );
+-
+-	ScReadHeader aGlobalHdr( rStrm );
+-
+-	BYTE n8;
+-	UINT16 n16;
+-	UINT32 n32;
+-
+-	rStrm >> n16; nLoadedFileFormatVersion = n16;
+-	if ( (nLoadedFileFormatVersion & 0xFF00) > (SC_CHGTRACK_FILEFORMAT & 0xFF00) )
+-	{	// inkompatible neuere Version
+-		Clear();
+-		rStrm.SetError( SCWARN_IMPORT_INFOLOST );
+-		return FALSE;
+-	}
+-
+-	aUserCollection.Load( rStrm );
+-
+-	ULONG nCount, nLastAction, nGeneratedCount;
+-	rStrm >> n32; nCount = n32;
+-	rStrm >> n32; nActionMax = n32;
+-	rStrm >> n32; nLastAction = n32;
+-
+-	rStrm >> n32; nGeneratedCount = n32;
+-
+-	// GeneratedDelContents laden
+-	{
+-		ScMultipleReadHeader aHdr( rStrm );
+-		for ( ULONG j = 0; j < nGeneratedCount && bOk; j++ )
+-		{
+-			ScChangeActionContent* pAct;
+-
+-			aHdr.StartEntry();
+-
+-			ScChangeActionType eType;
+-			rStrm >> n8; eType = (ScChangeActionType) n8;
+-
+-			switch ( eType )
+-			{
+-				case SC_CAT_CONTENT :
+-					pAct = new ScChangeActionContent( rStrm, aHdr, pDoc, nVer, this );
+-				break;
+-				default:
+-					DBG_ERROR( "ScChangeTrack::Load: unknown GeneratedType" );
+-					pAct = NULL;
+-					bOk = FALSE;
+-			}
+-
+-			aHdr.EndEntry();
+-
+-			if ( pAct )
+-			{
+-				pAct->SetType( eType );
+-				if ( pFirstGeneratedDelContent )
+-					pFirstGeneratedDelContent->pPrev = pAct;
+-				pAct->pNext = pFirstGeneratedDelContent;
+-				pFirstGeneratedDelContent = pAct;
+-				aGeneratedTable.Insert( pAct->GetActionNumber(), pAct );
+-			}
+-		}
+-		rStrm >> n32; nGeneratedMin = n32;
+-	}
+-
+-	if ( bOk )
+-		bOk = ( nGeneratedCount == aGeneratedTable.Count() );
+-	DBG_ASSERT( bOk, "ScChangeTrack::Load: Generated failed" );
+-
+-
+-	// erste Runde: Actions laden
+-	{
+-		ScMultipleReadHeader aHdr( rStrm );
+-		for ( ULONG j = 0; j < nCount && bOk; j++ )
+-		{
+-			ScChangeAction* pAct;
+-
+-			aHdr.StartEntry();
+-
+-			USHORT nUserIndex;
+-			rStrm >> n16; nUserIndex = n16;
+-
+-			ScChangeActionType eType;
+-			rStrm >> n8; eType = (ScChangeActionType) n8;
+-
+-			switch ( eType )
+-			{
+-				case SC_CAT_INSERT_COLS :
+-				case SC_CAT_INSERT_ROWS :
+-				case SC_CAT_INSERT_TABS :
+-					pAct = new ScChangeActionIns( rStrm, aHdr, this );
+-				break;
+-				case SC_CAT_DELETE_COLS :
+-				case SC_CAT_DELETE_ROWS :
+-				case SC_CAT_DELETE_TABS :
+-					pAct = new ScChangeActionDel( rStrm, aHdr, pDoc, nVer, this );
+-				break;
+-				case SC_CAT_MOVE :
+-					pAct = new ScChangeActionMove( rStrm, aHdr, this );
+-				break;
+-				case SC_CAT_CONTENT :
+-					pAct = new ScChangeActionContent( rStrm, aHdr, pDoc, nVer, this );
+-				break;
+-				case SC_CAT_REJECT :
+-					pAct = new ScChangeActionReject( rStrm, aHdr, this );
+-				break;
+-				default:
+-					DBG_ERROR( "ScChangeTrack::Load: unknown ScChangeActionType" );
+-					pAct = NULL;
+-					bOk = FALSE;
+-			}
+-
+-			aHdr.EndEntry();
+-
+-			if ( pAct )
+-			{
+-				pAct->SetType( eType );
+-				if ( nUserIndex != 0xffff )
+-				{
+-					StrData* pUser = (StrData*) aUserCollection.At( nUserIndex );
+-					if ( pUser )
+-						pAct->SetUser( pUser->GetString() );
+-				}
+-				AppendLoaded( pAct );
+-			}
+-		}
+-	}
+-
+-	if ( pLast )
+-		nMarkLastSaved = pLast->GetActionNumber();
+-
+-	if ( bOk )
+-		bOk = ( nMarkLastSaved == nLastAction && nCount == aTable.Count() );
+-	DBG_ASSERT( bOk, "ScChangeTrack::Load: failed" );
+-
+-	// zweite Runde: Links laden und alles verpointern
+-	{
+-		ScMultipleReadHeader aHdr( rStrm );
+-		for ( ScChangeAction* p = GetFirst(); p && bOk; p = p->GetNext() )
+-		{
+-			aHdr.StartEntry();
+-			bOk = p->LoadLinks( rStrm, this );
+-			aHdr.EndEntry();
+-		}
+-	}
+-
+-	SetLoadSave( FALSE );
+-
+-	// versions between 583 and 633 had the sorting wrong -> correct (after loading the actions)
+-	lcl_EnsureSorting( aUserCollection );
+-
+-	// den aktuellen User erst einfuegen, wenn die Actions bereits ihre User haben
+-	SetUser( aUser );
+-
+-	if ( !bOk )
+-	{
+-		Clear();		// eindeutiger Zustand
+-		rStrm.SetError( SCWARN_IMPORT_INFOLOST );
+-	}
+-
+-	return bOk;
+-}
+-
+-
+-BOOL ScChangeTrack::Store( SvStream& rStrm )
+-{
+-	BOOL bOk = TRUE;
+-	SetLoadSave( TRUE );
+-
+-	ScWriteHeader aGlobalHdr( rStrm );
+-
+-	rStrm << (UINT16) SC_CHGTRACK_FILEFORMAT;
+-
+-	aUserCollection.Store( rStrm );
+-
+-	ULONG nCount = aTable.Count();
+-	ULONG nLastAction = ( pLast ? pLast->GetActionNumber() : 0 );
+-	ULONG nGeneratedCount = aGeneratedTable.Count();
+-	rStrm << (UINT32) nCount << (UINT32) nActionMax << (UINT32) nLastAction;
+-	rStrm << (UINT32) nGeneratedCount;
+-
+-	// GeneratedDelContents speichern
+-	ULONG nSave = 0;
+-	{
+-		ScMultipleWriteHeader aHdr( rStrm );
+-		ULONG nNewGeneratedMin = SC_CHGTRACK_GENERATED_START;
+-		for ( ScChangeAction* p = pFirstGeneratedDelContent; p && bOk;
+-				p = p->GetNext() )
+-		{
+-			++nSave;
+-			aHdr.StartEntry();
+-			rStrm << (BYTE) p->GetType();
+-			bOk = p->Store( rStrm, aHdr );
+-			aHdr.EndEntry();
+-			ULONG nAct = p->GetActionNumber();
+-			if ( nNewGeneratedMin > nAct )
+-				nNewGeneratedMin = nAct;
+-		}
+-		nGeneratedMin = nNewGeneratedMin;	// evtl. unbenutzten Bereich freigeben
+-		rStrm << (UINT32) nGeneratedMin;
+-	}
+-
+-	if ( bOk )
+-		bOk = ( nGeneratedCount == nSave );
+-	DBG_ASSERT( bOk, "ScChangeTrack::Store: failed" );
+-
+-	// erste Runde: Actions speichern
+-	nSave = 0;
+-	{
+-		ScMultipleWriteHeader aHdr( rStrm );
+-		StrData* pUserSearch = new StrData( aUser );
+-		USHORT nUserIndex;
+-		for ( ScChangeAction* p = GetFirst(); p && bOk; p = p->GetNext() )
+-		{
+-			++nSave;
+-			aHdr.StartEntry();
+-
+-			pUserSearch->SetString( p->GetUser() );
+-			if ( aUserCollection.Search( pUserSearch, nUserIndex ) )
+-				rStrm << (UINT16) nUserIndex;
+-			else
+-				rStrm << (UINT16) 0xffff;
+-			rStrm << (BYTE) p->GetType();
+-
+-			bOk = p->Store( rStrm, aHdr );
+-
+-			aHdr.EndEntry();
+-		}
+-		delete pUserSearch;
+-	}
+-
+-	if ( pLast )
+-		nMarkLastSaved = pLast->GetActionNumber();
+-
+-	if ( bOk )
+-		bOk = ( nCount == nSave );
+-	DBG_ASSERT( bOk, "ScChangeTrack::Store: failed" );
+-
+-	// zweite Runde: Links speichern
+-	{
+-		ScMultipleWriteHeader aHdr( rStrm );
+-		for ( ScChangeAction* p = GetFirst(); p && bOk; p = p->GetNext() )
+-		{
+-			aHdr.StartEntry();
+-			bOk = p->StoreLinks( rStrm );
+-			aHdr.EndEntry();
+-		}
+-	}
+-
+-	SetLoadSave( FALSE );
+-	return bOk;
+-}
+-
+-
+ void ScChangeTrack::MasterLinks( ScChangeAction* pAppend )
+ {
+ 	ScChangeActionType eType = pAppend->GetType();
+diff --git sc/source/filter/inc/XclExpChangeTrack.hxx sc/source/filter/inc/XclExpChangeTrack.hxx
+index 9326ca9..eb980ae 100644
+--- sc/source/filter/inc/XclExpChangeTrack.hxx
++++ sc/source/filter/inc/XclExpChangeTrack.hxx
+@@ -620,14 +620,13 @@ private:
+ 	XclExpChTrTabIdBuffer*		pTabIdBuffer;
+ 
+ 	ScDocument*					pTempDoc;			// empty document
+-	ScChangeTrack*				pTempChangeTrack;	// copy of <pOrigChangeTrack>
+ 
+ 	sal_uInt32					nNewAction;			// action number, 1-based
+ 	XclExpChTrHeader*			pHeader;			// header record for last GUID
+ 	sal_uInt8					aGUID[ 16 ];		// GUID for action info records
+ 	sal_Bool					bValidGUID;
+ 
+-	sal_Bool					CreateTempChangeTrack();
++	ScChangeTrack*			    CreateTempChangeTrack();
+ 	void						PushActionRecord( const ScChangeAction& rAction );
+ 
+ 	sal_Bool					WriteUserNamesStream();
+diff --git sc/source/filter/xcl97/XclExpChangeTrack.cxx sc/source/filter/xcl97/XclExpChangeTrack.cxx
+index 5b90f44..ab9750d 100644
+--- sc/source/filter/xcl97/XclExpChangeTrack.cxx
++++ sc/source/filter/xcl97/XclExpChangeTrack.cxx
+@@ -1073,7 +1073,6 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
+ 	aTabIdBufferList(),
+ 	pTabIdBuffer( NULL ),
+ 	pTempDoc( NULL ),
+-	pTempChangeTrack( NULL ),
+ 	nNewAction( 1 ),
+ 	pHeader( NULL ),
+ 	bValidGUID( sal_False )
+@@ -1082,7 +1081,8 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
+     if( !GetOldRoot().pTabId )
+ 		return;
+ 
+-	if( !CreateTempChangeTrack() )
++    ScChangeTrack* pTempChangeTrack = CreateTempChangeTrack();
++	if (!pTempChangeTrack)
+ 		return;
+ 
+     pTabIdBuffer = new XclExpChTrTabIdBuffer( GetTabInfo().GetXclTabCount() );
+@@ -1144,25 +1144,23 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
+ 
+ XclExpChangeTrack::~XclExpChangeTrack()
+ {
+-	if( pTempChangeTrack )
+-		delete pTempChangeTrack;
+ 	if( pTempDoc )
+ 		delete pTempDoc;
+ }
+ 
+-sal_Bool XclExpChangeTrack::CreateTempChangeTrack()
++ScChangeTrack* XclExpChangeTrack::CreateTempChangeTrack()
+ {
+ 	// get original change track
+     ScChangeTrack* pOrigChangeTrack = GetDoc().GetChangeTrack();
+ 	DBG_ASSERT( pOrigChangeTrack, "XclExpChangeTrack::CreateTempChangeTrack - no change track data" );
+ 	if( !pOrigChangeTrack )
+-		return sal_False;
++		return NULL;
+ 
+ 	// create empty document
+ 	pTempDoc = new ScDocument;
+ 	DBG_ASSERT( pTempDoc, "XclExpChangeTrack::CreateTempChangeTrack - no temp document" );
+ 	if( !pTempDoc )
+-		return sal_False;
++		return NULL;
+ 
+ 	// adjust table count
+     SCTAB nOrigCount = GetDoc().GetTableCount();
+@@ -1177,26 +1175,13 @@ sal_Bool XclExpChangeTrack::CreateTempChangeTrack()
+ 	if( nOrigCount != pTempDoc->GetTableCount() )
+ 		return sal_False;
+ 
+-	// create empty change track
+-	pTempChangeTrack = new ScChangeTrack( pTempDoc );
+-	DBG_ASSERT( pTempChangeTrack, "XclExpChangeTrack::CreateTempChangeTrack - no temp change track" );
+-	if( !pTempChangeTrack )
+-		return sal_False;
+-
+-	// copy original change track
+-	SvMemoryStream aMemStrm;
+-	if( !pOrigChangeTrack->Store( aMemStrm ) )
+-		return sal_False;
+-	aMemStrm.Seek( STREAM_SEEK_TO_BEGIN );
+-	if( !pTempChangeTrack->Load( aMemStrm, (USHORT) pTempDoc->GetSrcVersion() ) )
+-		return sal_False;
+-
+-	return sal_True;
++    return pOrigChangeTrack->Clone(pTempDoc);
+ }
+ 
+ void XclExpChangeTrack::PushActionRecord( const ScChangeAction& rAction )
+ {
+ 	XclExpChTrAction* pXclAction = NULL;
++    ScChangeTrack* pTempChangeTrack = pTempDoc->GetChangeTrack();
+ 	switch( rAction.GetType() )
+ 	{
+ 		case SC_CAT_CONTENT:
+@@ -1206,7 +1191,8 @@ void XclExpChangeTrack::PushActionRecord( const ScChangeAction& rAction )
+ 		case SC_CAT_INSERT_COLS:
+ 		case SC_CAT_DELETE_ROWS:
+ 		case SC_CAT_DELETE_COLS:
+-            pXclAction = new XclExpChTrInsert( rAction, GetRoot(), *pTabIdBuffer, *pTempChangeTrack );
++            if (pTempChangeTrack)
++                pXclAction = new XclExpChTrInsert( rAction, GetRoot(), *pTabIdBuffer, *pTempChangeTrack );
+ 		break;
+ 		case SC_CAT_INSERT_TABS:
+ 		{
+@@ -1218,7 +1204,8 @@ void XclExpChangeTrack::PushActionRecord( const ScChangeAction& rAction )
+ 		}
+ 		break;
+ 		case SC_CAT_MOVE:
+-            pXclAction = new XclExpChTrMoveRange( (const ScChangeActionMove&) rAction, GetRoot(), *pTabIdBuffer, *pTempChangeTrack );
++            if (pTempChangeTrack)
++                pXclAction = new XclExpChTrMoveRange( (const ScChangeActionMove&) rAction, GetRoot(), *pTabIdBuffer, *pTempChangeTrack );
+ 		break;
+         default:;
+ 	}

Added: branches/ooo-build-3-0-1/patches/dev300/calc-dp-pivotcache-fix.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-3-0-1/patches/dev300/calc-dp-pivotcache-fix.diff	Wed Dec 24 17:24:58 2008
@@ -0,0 +1,15 @@
+diff --git sc/source/filter/excel/xipivot.cxx sc/source/filter/excel/xipivot.cxx
+index 49d35d1..90a5667 100644
+--- sc/source/filter/excel/xipivot.cxx
++++ sc/source/filter/excel/xipivot.cxx
+@@ -286,9 +286,8 @@ void XclImpPCField::ReadSxfield( XclImpStream& rStrm )
+     // for now, ignore data type of calculated fields
+     DBG_ASSERT( bCalced || bType || bTypeNone, "XclImpPCField::ReadSxfield - unknown item data type" );
+ 
+-    if( nVisC > 0 )
++    if( nVisC > 0 || bPostp )
+     {
+-        DBG_ASSERT( !bItems || !bPostp, "XclImpPCField::ReadSxfield - postponed field with inline items" );
+         if( bItems && !bPostp )
+         {
+             if( !bCalced )

Added: branches/ooo-build-3-0-1/patches/dev300/chart-maximum-minimum-typo.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-3-0-1/patches/dev300/chart-maximum-minimum-typo.diff	Wed Dec 24 17:24:58 2008
@@ -0,0 +1,22 @@
+diff --git chart2/source/view/axes/ScaleAutomatism.cxx chart2/source/view/axes/ScaleAutomatism.cxx
+index 3525843..711a911 100644
+--- chart2/source/view/axes/ScaleAutomatism.cxx
++++ chart2/source/view/axes/ScaleAutomatism.cxx
+@@ -134,7 +134,7 @@ void ScaleAutomatism::calculateExplicitScaleAndIncrement(
+         if( m_aSourceScale.AxisType==AxisType::PERCENT )
+             rExplicitScale.Minimum = 0.0;
+         else if( ::rtl::math::isNan( m_fValueMinimum ) )
+-            rExplicitScale.Minimum = 0.0;   //@todo get Minimum from scsaling or from plotter????
++            rExplicitScale.Minimum = 0.0;   //@todo get Minimum from scaling or from plotter????
+         else
+             rExplicitScale.Minimum = m_fValueMinimum;
+     }
+@@ -143,7 +143,7 @@ void ScaleAutomatism::calculateExplicitScaleAndIncrement(
+     if( bAutoMaximum )
+     {
+         if( m_aSourceScale.AxisType==AxisType::PERCENT )
+-            rExplicitScale.Minimum = 1.0;
++            rExplicitScale.Maximum = 1.0;
+         else if( ::rtl::math::isNan( m_fValueMaximum ) )
+             rExplicitScale.Maximum = 10.0;  //@todo get Maximum from scaling or from plotter????
+         else



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