incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject svn commit: r1383822 - in /incubator/ooo/trunk/main/sc: inc/dptablecache.hxx source/core/data/column3.cxx source/core/data/dptablecache.cxx
Date Wed, 12 Sep 2012 07:54:19 GMT
Author: leiw
Date: Wed Sep 12 07:54:18 2012
New Revision: 1383822

URL: http://svn.apache.org/viewvc?rev=1383822&view=rev
Log:
#i120847 Resubmit to take back some codes which is roll back to fix a build break bug 120854

          Patch by: Tan Li(litan.test@gmail.com)
          Review by: Wang Lei

Modified:
    incubator/ooo/trunk/main/sc/inc/dptablecache.hxx
    incubator/ooo/trunk/main/sc/source/core/data/column3.cxx
    incubator/ooo/trunk/main/sc/source/core/data/dptablecache.cxx

Modified: incubator/ooo/trunk/main/sc/inc/dptablecache.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/inc/dptablecache.hxx?rev=1383822&r1=1383821&r2=1383822&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/inc/dptablecache.hxx (original)
+++ incubator/ooo/trunk/main/sc/inc/dptablecache.hxx Wed Sep 12 07:54:18 2012
@@ -109,7 +109,7 @@ protected:
 private:
 public:
 	void		AddLabel( ScDPItemData* pData);
-    sal_Bool	AddData( long nDim, ScDPItemData* itemData );
+    sal_Bool	AddData( long nDim, ScDPItemData* itemData, bool bCheckDate = true );
 };
 
 #endif //DPTABLECACHE_HXX

Modified: incubator/ooo/trunk/main/sc/source/core/data/column3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/core/data/column3.cxx?rev=1383822&r1=1383821&r2=1383822&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/core/data/column3.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/core/data/column3.cxx Wed Sep 12 07:54:18 2012
@@ -1730,7 +1730,7 @@ void ScColumn::GetString( SCROW nRow, St
 }
 
 template<>
-void  ScColumn::FillDPCacheT( long nDim, SCROW nStartRow, SCROW nEndRow, const boost::function<void(ScDPItemData*)>
& rAddLabel, const boost::function<sal_Bool(long,ScDPItemData*)> & rAddData
)
+void  ScColumn::FillDPCacheT( long nDim, SCROW nStartRow, SCROW nEndRow, const boost::function<void(ScDPItemData*)>
& rAddLabel, const boost::function<sal_Bool(long,ScDPItemData*, bool)> & rAddData
)
 {
     SCROW nPattenRowStart = -1, nPatternRowEnd = -1;
     SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
@@ -1749,7 +1749,7 @@ void  ScColumn::FillDPCacheT( long nDim,
                 if( nCurRow == nStartRow )
                     rAddLabel( new ScDPItemData() );
                 else
-                    rAddData( nDim, new ScDPItemData() );
+                    rAddData( nDim, new ScDPItemData(), false); 
 
             if( nCurRow > nPatternRowEnd )
                 if( const ScPatternAttr* pPattern = pAttrArray ? pAttrArray->GetPatternRange(
nPattenRowStart, nPatternRowEnd, nCurRow ) : NULL )
@@ -1781,7 +1781,7 @@ void  ScColumn::FillDPCacheT( long nDim,
             if( nCurRow == nStartRow )
                 rAddLabel( pDPItemData );
             else
-                rAddData( nDim, pDPItemData );
+                rAddData( nDim, pDPItemData, false );
         }
     }
 
@@ -1789,11 +1789,11 @@ void  ScColumn::FillDPCacheT( long nDim,
         if( nCurRow == nStartRow )
             rAddLabel( new ScDPItemData() );
         else
-            rAddData( nDim, new ScDPItemData() );
+            rAddData( nDim, new ScDPItemData(), false );
 }
 void  ScColumn::FillDPCache( ScDPTableDataCache * pCache, long nDim, SCROW nStartRow, SCROW
nEndRow )
 {
-    FillDPCacheT<boost::function<void(ScDPItemData*)>, boost::function<sal_Bool(long,ScDPItemData*)>
>( nDim, nStartRow, nEndRow, boost::bind( &ScDPTableDataCache::AddLabel, pCache, _1
), boost::bind( &ScDPTableDataCache::AddData, pCache, _1, _2 ) );
+    FillDPCacheT<boost::function<void(ScDPItemData*)>, boost::function<sal_Bool(long,ScDPItemData*,
bool)> >( nDim, nStartRow, nEndRow, boost::bind( &ScDPTableDataCache::AddLabel,
pCache, _1 ), boost::bind( &ScDPTableDataCache::AddData, pCache, _1, _2, _3 ) );
 }
 
 void ScColumn::GetInputString( SCROW nRow, String& rString ) const

Modified: incubator/ooo/trunk/main/sc/source/core/data/dptablecache.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/core/data/dptablecache.cxx?rev=1383822&r1=1383821&r2=1383822&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/core/data/dptablecache.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/core/data/dptablecache.cxx Wed Sep 12 07:54:18 2012
@@ -863,16 +863,15 @@ bool ScDPTableDataCache::IsEmptyMember( 
 	return !GetItemDataById( nColumn, GetItemDataId( nColumn, nRow, sal_False ) )->IsHasData();
 }
 
-sal_Bool ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData)
+sal_Bool ScDPTableDataCache::AddData(long nDim, ScDPItemData* pitemData, bool bCheckDate
)
 {
 	DBG_ASSERT( IsValid(), "  IsValid() == false " );
 	DBG_ASSERT( nDim < mnColumnCount && nDim >=0 , "dimension out of bound" );
 	SCROW nIndex = 0; 
 
 	sal_Bool	bInserted = sal_False;
-	
+	if( true == bCheckDate)	
 	pitemData->SetDate( lcl_isDate( GetNumType( pitemData->nNumFormat ) ) );
-	
 	if ( !lcl_Search( mpTableDataValues[nDim], mpGlobalOrder[nDim], *pitemData, nIndex ) )
 	{
 		mpTableDataValues[nDim].push_back( pitemData );



Mime
View raw message