Revert "don't delete ScPatternAttr from doc pool for swap, i#118877"
This reverts commit 9020826566
.
This commit is contained in:
@@ -131,9 +131,6 @@ public:
|
||||
void SetPattern( SCROW nRow, const ScPatternAttr* pPattern, bool bPutToPool = false );
|
||||
void SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr* pPattern,
|
||||
bool bPutToPool = false, ScEditDataArray* pDataArray = NULL );
|
||||
|
||||
//swap two column patterns without adding and removing them from the pool
|
||||
void SwapPattern( ScAttrArray& pArray2, SCROW nRow1, SCROW nRow2, const ScPatternAttr* pPattern1, const ScPatternAttr* pPattern2 );
|
||||
void ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet* pStyle );
|
||||
void ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache* pCache,
|
||||
ScEditDataArray* pDataArray = NULL );
|
||||
|
@@ -307,7 +307,6 @@ public:
|
||||
ScEditDataArray* pDataArray = NULL );
|
||||
bool SetAttrEntries(ScAttrEntry* pData, SCSIZE nSize);
|
||||
void SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, bool bPutToPool = false );
|
||||
void SwapPattern( ScColumn& rCol, SCROW nRow1, SCROW nRow2, const ScPatternAttr& rPatAttr1, const ScPatternAttr& rPatAttr2 );
|
||||
void SetPatternArea( SCROW nStartRow, SCROW nEndRow,
|
||||
const ScPatternAttr& rPatAttr, bool bPutToPool = false );
|
||||
void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
|
||||
|
@@ -483,21 +483,6 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
|
||||
#endif
|
||||
}
|
||||
|
||||
void ScAttrArray::SwapPattern( ScAttrArray& rArray2, SCROW nRow1, SCROW nRow2, const ScPatternAttr* pPattern1, const ScPatternAttr* pPattern2)
|
||||
{
|
||||
if(!VALIDROW(nRow1) || !VALIDROW(nRow2))
|
||||
return;
|
||||
|
||||
SCSIZE nIndex1 = 0;
|
||||
SCSIZE nIndex2 = 0;
|
||||
Search(nRow1, nIndex1);
|
||||
rArray2.Search(nRow2, nIndex2);
|
||||
pData[nIndex1].pPattern = pPattern1;
|
||||
rArray2.pData[nIndex2].pPattern = pPattern2;
|
||||
|
||||
if (pDocument->IsStreamValid(nTab))
|
||||
pDocument->SetStreamValid(nTab, false);
|
||||
}
|
||||
|
||||
void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet* pStyle )
|
||||
{
|
||||
|
@@ -652,11 +652,6 @@ void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, bool bPutT
|
||||
pAttrArray->SetPattern( nRow, &rPatAttr, bPutToPool );
|
||||
}
|
||||
|
||||
void ScColumn::SwapPattern( ScColumn& rCol2, SCROW nRow1, SCROW nRow2, const ScPatternAttr& rPatAttr1, const ScPatternAttr& rPatAttr2 )
|
||||
{
|
||||
pAttrArray->SwapPattern( *rCol2.pAttrArray, nRow1, nRow2, &rPatAttr1, &rPatAttr2 );
|
||||
}
|
||||
|
||||
|
||||
void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow,
|
||||
const ScPatternAttr& rPatAttr, bool bPutToPool )
|
||||
|
@@ -571,7 +571,8 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2)
|
||||
const ScPatternAttr* pPat2 = GetPattern(nCol2, nRow);
|
||||
if (pPat1 != pPat2)
|
||||
{
|
||||
aCol[nCol1].SwapPattern(aCol[nCol2], nRow, nRow, *pPat1, *pPat2);
|
||||
SetPattern(nCol1, nRow, *pPat2, true);
|
||||
SetPattern(nCol2, nRow, *pPat1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -622,7 +623,8 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2)
|
||||
const ScPatternAttr* pPat2 = GetPattern(nCol, nRow2);
|
||||
if (pPat1 != pPat2)
|
||||
{
|
||||
aCol[nCol].SwapPattern(aCol[nCol], nRow1, nRow2, *pPat1, *pPat2);
|
||||
SetPattern(nCol, nRow1, *pPat2, true);
|
||||
SetPattern(nCol, nRow2, *pPat1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user