[ooo-build-commit] 3 commits - patches/dev300

Tor Lillqvist tml at kemper.freedesktop.org
Tue Aug 11 02:15:36 PDT 2009


 patches/dev300/apply                                 |    9 
 patches/dev300/calc-change-track-xls-export-fix.diff |  409 -------------------
 patches/dev300/chart-axis-multi-chart-types-sc.diff  |  121 ++---
 3 files changed, 55 insertions(+), 484 deletions(-)

New commits:
commit f76aa1df6a1b155cfe6d5201bf8a32a722a8ccfe
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Tue Aug 11 12:13:50 2009 +0300

    calc-change-track-xls-export-fix.diff is upstream
    
    * patches/dev300/calc-change-track-xls-export-fix.diff: Delete.
    * patches/dev300/apply: Remove it.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 6631ff6..1f80468 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -734,9 +734,6 @@ chart-axis-multi-chart-types-xmloff.diff, n#437322, i#95934, kohei
 # Don't use pShapeContext after deleting the instance.  Fixes SEGFAULT.
 calc-filter-xml-free-context.diff, n#467536, jonp
 
-# fixed change track export to xls files wrt cell change records.
-calc-change-track-xls-export-fix.diff, n#416045, i#93839, kohei
-
 # show COUNT and COUNTA results even if current range contains an error.
 calc-status-bar-func.diff, n#430655, i#94618, kohei
 
diff --git a/patches/dev300/calc-change-track-xls-export-fix.diff b/patches/dev300/calc-change-track-xls-export-fix.diff
deleted file mode 100644
index 1c092b6..0000000
--- a/patches/dev300/calc-change-track-xls-export-fix.diff
+++ /dev/null
@@ -1,409 +0,0 @@
-diff --git sc/inc/chgtrack.hxx sc/inc/chgtrack.hxx
-index 946b862..0735a8d 100644
---- sc/inc/chgtrack.hxx
-+++ sc/inc/chgtrack.hxx
-@@ -1398,8 +1398,6 @@ public:
- 			void				NotifyModified( ScChangeTrackMsgType eMsgType,
- 									ULONG nStartAction, ULONG nEndAction );
- 
--	SC_DLLPUBLIC		BOOL				Load( SvStream& rStrm, USHORT nVer );
--	SC_DLLPUBLIC		BOOL				Store( SvStream& rStrm );
- 			USHORT				GetLoadedFileFormatVersion() const
- 									{ return nLoadedFileFormatVersion; }
- 
-@@ -1423,7 +1423,7 @@ public:
-                                     { return bTime100thSeconds; }
- 
-             void                AppendCloned( ScChangeAction* pAppend );
--            ScChangeTrack*      Clone( ScDocument* pDocument ) const;
-+            SC_DLLPUBLIC ScChangeTrack* Clone( ScDocument* pDocument ) const;
-             void                MergeActionState( ScChangeAction* pAct, const ScChangeAction* pOtherAct );
- #if DEBUG_CHANGETRACK
-             String              ToString() const;
-diff --git sc/source/core/tool/chgtrack.cxx sc/source/core/tool/chgtrack.cxx
-index 86d81cc..830f397 100644
---- sc/source/core/tool/chgtrack.cxx
-+++ sc/source/core/tool/chgtrack.cxx
-@@ -2943,262 +2943,6 @@ void lcl_EnsureSorting( ScStrCollection& 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 9ec2351..75ab49d 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();
-+	SC_DLLPUBLIC 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 4318d4f..79563aa 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:;
- 	}
commit e2d40e1aff5568003e28f088d3d24eb28d8899ed
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Tue Aug 11 12:05:10 2009 +0300

    i#5550 is fixed in dev300
    
    * patches/dev300/apply: Move calc-autofill-increment-fix.diff to
      UnUsedButNotYetRemovedFromGit as the issue is marked as fixed and
      closed. Seems to be fixed in a different way than our patch, though.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index c34fa3c..6631ff6 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -734,9 +734,6 @@ chart-axis-multi-chart-types-xmloff.diff, n#437322, i#95934, kohei
 # Don't use pShapeContext after deleting the instance.  Fixes SEGFAULT.
 calc-filter-xml-free-context.diff, n#467536, jonp
 
-# modify the autofill behavior to bring it a little closer to Excel's.
-calc-autofill-increment-fix.diff, i#5550, kohei
-
 # fixed change track export to xls files wrt cell change records.
 calc-change-track-xls-export-fix.diff, n#416045, i#93839, kohei
 
@@ -2273,6 +2270,9 @@ chart-skip-hidden-cells-oox.diff, n#404190, i#81209, n#425617, kohei
 chart-skip-hidden-cells-xmloff.diff, n#404190, i#81209, n#425617, kohei
 chart-skip-hidden-cells-sc.diff, n#404190, i#81209, n#425617, kohei
 
+# modify the autofill behavior to bring it a little closer to Excel's.
+calc-autofill-increment-fix.diff, i#5550, kohei
+
 [ Store ]
 SectionOwner => rodo
 SectionIssue => i#75399
commit c0d2178027f3803732942acf86985cc10857d5c5
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Tue Aug 11 12:02:13 2009 +0300

    Adapt chart-axis-multi-chart-types-sc.diff for dev300
    
    * patches/dev300/chart-axis-multi-chart-types-sc.diff: Adapt for
      dev300-m54.

diff --git a/patches/dev300/chart-axis-multi-chart-types-sc.diff b/patches/dev300/chart-axis-multi-chart-types-sc.diff
index 39feeda..cc4c89f 100644
--- a/patches/dev300/chart-axis-multi-chart-types-sc.diff
+++ b/patches/dev300/chart-axis-multi-chart-types-sc.diff
@@ -1,5 +1,3 @@
-diff --git sc/source/filter/excel/xechart.cxx sc/source/filter/excel/xechart.cxx
-index 7fff80d..96bcaa6 100644
 --- sc/source/filter/excel/xechart.cxx
 +++ sc/source/filter/excel/xechart.cxx
 @@ -124,16 +124,27 @@ void lclSaveRecord( XclExpStream& rStrm, XclExpRecordRef xRec, sal_uInt16 nRecId
@@ -23,13 +21,13 @@ index 7fff80d..96bcaa6 100644
 +        return true;
  }
  
--bool lclIsAutoAnyOrGetScaledValue( double& rfValue, const Any& rAny, Reference< XScaling > xScaling )
+-bool lclIsAutoAnyOrGetScaledValue( double& rfValue, const Any& rAny, bool bLogScale )
 +bool lclIsAutoAnyOrGetScaledValue( double& rfValue, const Any& rAny, Reference< XScaling > xScaling, bool bPercent )
  {
 -    bool bIsAuto = lclIsAutoAnyOrGetValue( rfValue, rAny );
 +    bool bIsAuto = lclIsAutoAnyOrGetValue( rfValue, rAny, bPercent );
-     if( !bIsAuto && xScaling.is() )
-         rfValue = xScaling->doScaling( rfValue );
+     if( !bIsAuto && bLogScale )
+         rfValue = log( rfValue ) / log( 10.0 );
 +
      return bIsAuto;
  }
@@ -40,7 +38,7 @@ index 7fff80d..96bcaa6 100644
      double fOrigin = 0.0;
 -    if( !lclIsAutoAnyOrGetValue( fOrigin, rScaleData.Origin ) )
 +    if( !lclIsAutoAnyOrGetValue( fOrigin, rScaleData.Origin, false ) )
-         maData.mnCross = limit_cast< sal_uInt16 >( fOrigin, 1, 32767 );
+         maData.mnCross = limit_cast< sal_uInt16 >( fOrigin, 1, 31999 );
  
      // reverse order
 @@ -2171,7 +2182,7 @@ XclExpChValueRange::XclExpChValueRange( const XclExpChRoot& rRoot ) :
@@ -53,19 +51,19 @@ index 7fff80d..96bcaa6 100644
      // scaling algorithm
      bool bLogScale = ScfApiHelper::GetServiceName( rScaleData.Scaling ) == SERVICE_CHART2_LOGSCALING;
 @@ -2181,24 +2192,24 @@ void XclExpChValueRange::Convert( const ScaleData& rScaleData )
-         xLogScaling = rScaleData.Scaling;
+     ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE, bLogScale );
  
      // min/max
--    bool bAutoMin = lclIsAutoAnyOrGetScaledValue( maData.mfMin, rScaleData.Minimum, xLogScaling );
-+    bool bAutoMin = lclIsAutoAnyOrGetScaledValue( maData.mfMin, rScaleData.Minimum, xLogScaling, bPercent );
+-    bool bAutoMin = lclIsAutoAnyOrGetScaledValue( maData.mfMin, rScaleData.Minimum, bLogScale );
++    bool bAutoMin = lclIsAutoAnyOrGetScaledValue( maData.mfMin, rScaleData.Minimum, bLogScale, bPercent );
      ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMIN, bAutoMin );
--    bool bAutoMax = lclIsAutoAnyOrGetScaledValue( maData.mfMax, rScaleData.Maximum, xLogScaling );
-+    bool bAutoMax = lclIsAutoAnyOrGetScaledValue( maData.mfMax, rScaleData.Maximum, xLogScaling, bPercent );
+-    bool bAutoMax = lclIsAutoAnyOrGetScaledValue( maData.mfMax, rScaleData.Maximum, bLogScale );
++    bool bAutoMax = lclIsAutoAnyOrGetScaledValue( maData.mfMax, rScaleData.Maximum, bLogScale, bPercent );
      ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMAX, bAutoMax );
  
      // origin
--    bool bAutoCross = lclIsAutoAnyOrGetScaledValue( maData.mfCross, rScaleData.Origin, xLogScaling );
-+    bool bAutoCross = lclIsAutoAnyOrGetScaledValue( maData.mfCross, rScaleData.Origin, xLogScaling, bPercent );
+-    bool bAutoCross = lclIsAutoAnyOrGetScaledValue( maData.mfCross, rScaleData.Origin, bLogScale );
++    bool bAutoCross = lclIsAutoAnyOrGetScaledValue( maData.mfCross, rScaleData.Origin, bLogScale, bPercent );
      ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOCROSS, bAutoCross );
  
      // major increment
@@ -76,19 +74,18 @@ index 7fff80d..96bcaa6 100644
      // minor increment
      const Sequence< SubIncrement >& rSubIncrementSeq = rIncrementData.SubIncrements;
      sal_Int32 nCount = 0;
-     bool bAutoMinor = bAutoMajor || (rSubIncrementSeq.getLength() < 1) ||
+     bool bAutoMinor = bLogScale || bAutoMajor || (rSubIncrementSeq.getLength() < 1) ||
 -        lclIsAutoAnyOrGetValue( nCount, rSubIncrementSeq[ 0 ].IntervalCount ) || (nCount < 1);
 +        lclIsAutoAnyOrGetValue( nCount, rSubIncrementSeq[ 0 ].IntervalCount, false ) || (nCount < 1);
      if( !bAutoMinor )
          maData.mfMinorStep = maData.mfMajorStep / nCount;
      ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMINOR, bAutoMinor );
-@@ -2320,7 +2331,8 @@ void XclExpChAxis::SetRotation( sal_uInt16 nRotation )
+@@ -2320,7 +2331,7 @@ void XclExpChAxis::SetRotation( sal_uInt16 nRotation )
          mxTick->SetRotation( nRotation );
  }
  
--void XclExpChAxis::Convert( Reference< XAxis > xAxis, const XclChExtTypeInfo& rTypeInfo, sal_Int32 nApiAxesSetIdx )
-+void XclExpChAxis::Convert( Reference< XAxis > xAxis, const XclChExtTypeInfo& rTypeInfo, sal_Int32 nApiAxesSetIdx,
-+                            bool bPercent )
+-void XclExpChAxis::Convert( Reference< XAxis > xAxis, Reference< XAxis > xCrossingAxis, const XclChExtTypeInfo& rTypeInfo )
++void XclExpChAxis::Convert( Reference< XAxis > xAxis, Reference< XAxis > xCrossingAxis, const XclChExtTypeInfo& rTypeInfo, bool bPercent )
  {
      ScfPropertySet aAxisProp( xAxis );
      bool bCategoryAxis = ((GetAxisType() == EXC_CHAXIS_X) && rTypeInfo.mbCategoryAxis) || (GetAxisType() == EXC_CHAXIS_Z);
@@ -98,29 +95,29 @@ index 7fff80d..96bcaa6 100644
          if( xAxis.is() )
 -            mxValueRange->Convert( xAxis->getScaleData() );
 +            mxValueRange->Convert( xAxis->getScaleData(), bPercent );
-     }
- 
-     // axis caption text ------------------------------------------------------
+         // get position of crossing axis on this axis from passed axis object
+         if( aCrossingProp.Is() )
+             mxValueRange->ConvertAxisPosition( aCrossingProp );
 @@ -2523,10 +2535,10 @@ sal_uInt16 XclExpChAxesSet::Convert( Reference< XDiagram > xDiagram, sal_uInt16
                  // create axes according to chart type (no axes for pie and donut charts)
                  if( rTypeInfo.meTypeCateg != EXC_CHTYPECATEG_PIE )
                  {
--                    ConvertAxis( mxXAxis, EXC_CHAXIS_X, mxXAxisTitle, EXC_CHOBJLINK_XAXIS, xCoordSystem, rTypeInfo );
--                    ConvertAxis( mxYAxis, EXC_CHAXIS_Y, mxYAxisTitle, EXC_CHOBJLINK_YAXIS, xCoordSystem, rTypeInfo );
-+                    ConvertAxis( mxXAxis, EXC_CHAXIS_X, mxXAxisTitle, EXC_CHOBJLINK_XAXIS, xCoordSystem, rTypeInfo, bPercent );
-+                    ConvertAxis( mxYAxis, EXC_CHAXIS_Y, mxYAxisTitle, EXC_CHOBJLINK_YAXIS, xCoordSystem, rTypeInfo, bPercent );
+-                    ConvertAxis( mxXAxis, EXC_CHAXIS_X, mxXAxisTitle, EXC_CHOBJLINK_XAXIS, xCoordSystem, rTypeInfo, EXC_CHART_AXIS_Y );
+-                    ConvertAxis( mxYAxis, EXC_CHAXIS_Y, mxYAxisTitle, EXC_CHOBJLINK_YAXIS, xCoordSystem, rTypeInfo, EXC_CHART_AXIS_X );
++                    ConvertAxis( mxXAxis, EXC_CHAXIS_X, mxXAxisTitle, EXC_CHOBJLINK_XAXIS, xCoordSystem, rTypeInfo, EXC_CHART_AXIS_Y, bPercent );
++                    ConvertAxis( mxYAxis, EXC_CHAXIS_Y, mxYAxisTitle, EXC_CHOBJLINK_YAXIS, xCoordSystem, rTypeInfo, EXC_CHART_AXIS_X, bPercent );
                      if( pGroup->Is3dDeepChart() )
--                        ConvertAxis( mxZAxis, EXC_CHAXIS_Z, mxZAxisTitle, EXC_CHOBJLINK_ZAXIS, xCoordSystem, rTypeInfo );
-+                        ConvertAxis( mxZAxis, EXC_CHAXIS_Z, mxZAxisTitle, EXC_CHOBJLINK_ZAXIS, xCoordSystem, rTypeInfo, bPercent );
+-                        ConvertAxis( mxZAxis, EXC_CHAXIS_Z, mxZAxisTitle, EXC_CHOBJLINK_ZAXIS, xCoordSystem, rTypeInfo, EXC_CHART_AXIS_NONE );
++                        ConvertAxis( mxZAxis, EXC_CHAXIS_Z, mxZAxisTitle, EXC_CHOBJLINK_ZAXIS, xCoordSystem, rTypeInfo, EXC_CHART_AXIS_NONE, bPercent );
                  }
  
                  // X axis category ranges
-@@ -2610,14 +2622,15 @@ XclExpChTypeGroupRef XclExpChAxesSet::GetLastTypeGroup() const
- void XclExpChAxesSet::ConvertAxis(
+@@ -2610,15 +2622,16 @@ XclExpChTypeGroupRef XclExpChAxesSet::GetLastTypeGroup() const
          XclExpChAxisRef& rxChAxis, sal_uInt16 nAxisType,
          XclExpChTextRef& rxChAxisTitle, sal_uInt16 nTitleTarget,
--        Reference< XCoordinateSystem > xCoordSystem, const XclChExtTypeInfo& rTypeInfo )
-+        Reference< XCoordinateSystem > xCoordSystem, const XclChExtTypeInfo& rTypeInfo,
+         Reference< XCoordinateSystem > xCoordSystem, const XclChExtTypeInfo& rTypeInfo,
+-        sal_Int32 nCrossingAxisDim )
++        sal_Int32 nCrossingAxisDim,
 +        bool bPercent )
  {
      // create and convert axis object
@@ -128,13 +125,12 @@ index 7fff80d..96bcaa6 100644
      sal_Int32 nApiAxisDim = rxChAxis->GetApiAxisDimension();
      sal_Int32 nApiAxesSetIdx = GetApiAxesSetIndex();
      Reference< XAxis > xAxis = lclGetApiAxis( xCoordSystem, nApiAxisDim, nApiAxesSetIdx );
--    rxChAxis->Convert( xAxis, rTypeInfo, nApiAxesSetIdx );
-+    rxChAxis->Convert( xAxis, rTypeInfo, nApiAxesSetIdx, bPercent );
+     Reference< XAxis > xCrossingAxis = lclGetApiAxis( xCoordSystem, nCrossingAxisDim, nApiAxesSetIdx );
+-    rxChAxis->Convert( xAxis, xCrossingAxis, rTypeInfo );
++    rxChAxis->Convert( xAxis, xCrossingAxis, rTypeInfo, bPercent );
  
      // create and convert axis title
      Reference< XTitled > xTitled( xAxis, UNO_QUERY );
-diff --git sc/source/filter/excel/xichart.cxx sc/source/filter/excel/xichart.cxx
-index 441f699..1bddb08 100644
 --- sc/source/filter/excel/xichart.cxx
 +++ sc/source/filter/excel/xichart.cxx
 @@ -1988,6 +1988,15 @@ Reference< XChartType > XclImpChType::CreateChartType( Reference< XDiagram > xDi
@@ -173,22 +169,16 @@ index 441f699..1bddb08 100644
  {
      // scaling algorithm
      bool bLogScale = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE );
-@@ -2557,19 +2570,23 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co
-     }
+@@ -2557,15 +2570,18 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co
+     rScaleData.Scaling.set( ScfApiHelper::CreateInstance( aScalingService ), UNO_QUERY );
  
      // min/max
--    lclSetScaledValueOrClearAny( rScaleData.Minimum, maData.mfMin, xLogScaling, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMIN ) );
--    lclSetScaledValueOrClearAny( rScaleData.Maximum, maData.mfMax, xLogScaling, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMAX ) );
+-    lclSetExpValueOrClearAny( rScaleData.Minimum, maData.mfMin, bLogScale, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMIN ) );
+-    lclSetExpValueOrClearAny( rScaleData.Maximum, maData.mfMax, bLogScale, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMAX ) );
 +    double fMinVal = bPercent ? maData.mfMin/100.0 : maData.mfMin;
 +    double fMaxVal = bPercent ? maData.mfMax/100.0 : maData.mfMax;
-+    lclSetScaledValueOrClearAny( rScaleData.Minimum, fMinVal, xLogScaling, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMIN ) );
-+    lclSetScaledValueOrClearAny( rScaleData.Maximum, fMaxVal, xLogScaling, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMAX ) );
- 
-     // origin (max-cross overrides crossing settings, fall back to auto-cross)
-     const sal_uInt16 nAutoCrossFlags = EXC_CHVALUERANGE_AUTOCROSS | EXC_CHVALUERANGE_MAXCROSS;
--    lclSetScaledValueOrClearAny( rScaleData.Origin, maData.mfCross, xLogScaling, ::get_flag( maData.mnFlags, nAutoCrossFlags ) );
-+    double fCross = bPercent ? maData.mfCross/100.0 : maData.mfCross;
-+    lclSetScaledValueOrClearAny( rScaleData.Origin, fCross, xLogScaling, ::get_flag( maData.mnFlags, nAutoCrossFlags ) );
++    lclSetExpValueOrClearAny( rScaleData.Minimum, fMinVal, bLogScale, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMIN ) );
++    lclSetExpValueOrClearAny( rScaleData.Maximum, fMaxVal, bLogScale, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMAX ) );
  
      // increment
      bool bAutoMajor = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMAJOR );
@@ -203,8 +193,8 @@ index 441f699..1bddb08 100644
      rSubIncrementSeq.realloc( 1 );
 @@ -2809,8 +2826,11 @@ Reference< XAxis > XclImpChAxis::CreateAxis( const XclImpChTypeGroup& rTypeGroup
              break;
-             case ApiAxisType::REALNUMBER:
-             case ApiAxisType::PERCENT:
+             case cssc2::AxisType::REALNUMBER:
+             case cssc2::AxisType::PERCENT:
 +            {
 +                bool bPercent = aScaleData.AxisType == ApiAxisType::PERCENT;
                  // #i85167# pie/donut charts have reversed rotation direction (at Y axis!)
@@ -214,41 +204,36 @@ index 441f699..1bddb08 100644
              break;
              default:
                  DBG_ERRORFILE( "XclImpChAxis::CreateAxis - unknown axis type" );
-diff --git sc/source/filter/inc/xechart.hxx sc/source/filter/inc/xechart.hxx
-index 6ad5595..4fa788e 100644
 --- sc/source/filter/inc/xechart.hxx
 +++ sc/source/filter/inc/xechart.hxx
 @@ -944,7 +944,7 @@ public:
      explicit            XclExpChValueRange( const XclExpChRoot& rRoot );
  
      /** Converts value axis scaling settings. */
--    void                Convert( const ScaleData& rScaleData );
-+    void                Convert( const ScaleData& rScaleData, bool bPercent );
+-    void                Convert( const ::com::sun::star::chart2::ScaleData& rScaleData );
++    void                Convert( const ::com::sun::star::chart2::ScaleData& rScaleData, bool bPercent );
+     /** Converts position settings of a crossing axis at this axis. */
+     void                ConvertAxisPosition( const ScfPropertySet& rPropSet );
  
- private:
-     virtual void        WriteBody( XclExpStream& rStrm );
-@@ -1004,7 +1004,8 @@ public:
+@@ -1004,7 +1004,7 @@ public:
      virtual void        SetRotation( sal_uInt16 nRotation );
  
      /** Converts formatting and scaling settings from the passed axis. */
--    void                Convert( XAxisRef xAxis, const XclChExtTypeInfo& rTypeInfo, sal_Int32 nApiAxesSetIdx );
-+    void                Convert( XAxisRef xAxis, const XclChExtTypeInfo& rTypeInfo, sal_Int32 nApiAxesSetIdx, 
-+                                 bool bPercent );
+-    void                Convert( XAxisRef xAxis, XAxisRef xCrossingAxis, const XclChExtTypeInfo& rTypeInfo );
++    void                Convert( XAxisRef xAxis, XAxisRef xCrossingAxis, const XclChExtTypeInfo& rTypeInfo, bool bPercent );
      /** Converts and writes 3D wall/floor properties from the passed diagram. */
      void                ConvertWall( XDiagramRef xDiagram );
  
 @@ -1076,7 +1077,8 @@ private:
-     /** Converts a complete axis object including axis title. */
      void                ConvertAxis( XclExpChAxisRef& rxChAxis, sal_uInt16 nAxisType,
                              XclExpChTextRef& rxChAxisTitle, sal_uInt16 nTitleTarget,
--                            XCoordSystemRef xCoordSystem, const XclChExtTypeInfo& rTypeInfo );
-+                            XCoordSystemRef xCoordSystem, const XclChExtTypeInfo& rTypeInfo,
+                             XCoordSystemRef xCoordSystem, const XclChExtTypeInfo& rTypeInfo,
+-                            sal_Int32 nCrossingAxisDim );
++                            sal_Int32 nCrossingAxisDim,
 +                            bool bPercent );
  
      virtual void        WriteBody( XclExpStream& rStrm );
  
-diff --git sc/source/filter/inc/xichart.hxx sc/source/filter/inc/xichart.hxx
-index 2e79767..da91cd5 100644
 --- sc/source/filter/inc/xichart.hxx
 +++ sc/source/filter/inc/xichart.hxx
 @@ -1109,7 +1109,7 @@ public:
@@ -257,11 +242,9 @@ index 2e79767..da91cd5 100644
      /** Converts value axis scaling settings. */
 -    void                Convert( ScaleData& rScaleData, bool bMirrorOrient ) const;
 +    void                Convert( ScaleData& rScaleData, bool bMirrorOrient, bool bPercent ) const;
+     /** Converts position settings of this axis at a crossing axis. */
+     void                ConvertAxisPosition( ScfPropertySet& rPropSet ) const;
  
- private:
-     XclChValueRange     maData;             /// Contents of the CHVALUERANGE record.
-diff --git sc/source/filter/inc/xlchart.hxx sc/source/filter/inc/xlchart.hxx
-index 5e3b3f5..1a580ed 100644
 --- sc/source/filter/inc/xlchart.hxx
 +++ sc/source/filter/inc/xlchart.hxx
 @@ -107,6 +107,7 @@ namespace com { namespace sun { namespace star {
@@ -277,6 +260,6 @@ index 5e3b3f5..1a580ed 100644
  #define EXC_CHPROP_SHOWNEGATIVEERROR        CREATE_OUSTRING( "ShowNegativeError" )
  #define EXC_CHPROP_SHOWPOSITIVEERROR        CREATE_OUSTRING( "ShowPositiveError" )
 +#define EXC_CHPROP_STACKED                  CREATE_OUSTRING( "Stacked" )
+ #define EXC_CHPROP_STACKCHARACTERS          CREATE_OUSTRING( "StackCharacters" )
  #define EXC_CHPROP_STACKINGDIR              CREATE_OUSTRING( "StackingDirection" )
  #define EXC_CHPROP_STARTINGANGLE            CREATE_OUSTRING( "StartingAngle" )
- #define EXC_CHPROP_SWAPXANDYAXIS            CREATE_OUSTRING( "SwapXAndYAxis" )


More information about the ooo-build-commit mailing list