View | Details | Raw Unified | Return to issue 118877
Collapse All | Expand All

(-)sc/source/core/data/table3.cxx (-12 / +11 lines)
Lines 421-432 Link Here
421
			const ScPatternAttr* pPat2 = GetPattern(nCol2, nRow);
421
			const ScPatternAttr* pPat2 = GetPattern(nCol2, nRow);
422
			if (pPat1 != pPat2)
422
			if (pPat1 != pPat2)
423
			{
423
			{
424
				//maybe the content is the same
424
				//Add Reference to avoid pPat1 to be deleted by merge same cell attributes for adjacent cells
425
				if (!(*pPat1 == *pPat2))
425
				if( IsPooledItem( pPat1 ) ) pPat1->AddRef();
426
				{
426
				SetPattern(nCol1, nRow, *pPat2, sal_True);
427
					SetPattern(nCol1, nRow, *pPat2, sal_True);
427
				SetPattern(nCol2, nRow, *pPat1, sal_True);
428
					SetPattern(nCol2, nRow, *pPat1, sal_True);
428
				if( IsPooledItem( pPat1 ) ) pPat1->ReleaseRef();
429
				}
429
				
430
			}
430
			}
431
		}
431
		}
432
	}
432
	}
Lines 443-454 Link Here
443
			const ScPatternAttr* pPat2 = GetPattern(nCol, nRow2);
443
			const ScPatternAttr* pPat2 = GetPattern(nCol, nRow2);
444
			if (pPat1 != pPat2)
444
			if (pPat1 != pPat2)
445
			{
445
			{
446
				//maybe the content is the same
446
				//Add Reference to avoid pPat1 to be deleted by merge same cell attributes for adjacent cells
447
				if (!(*pPat1 == *pPat2))
447
				if( IsPooledItem( pPat1 ) ) pPat1->AddRef();
448
				{
448
				SetPattern(nCol, nRow1, *pPat2, sal_True);
449
					SetPattern(nCol, nRow1, *pPat2, sal_True);
449
				SetPattern(nCol, nRow2, *pPat1, sal_True);
450
					SetPattern(nCol, nRow2, *pPat1, sal_True);
450
				if( IsPooledItem( pPat1 ) ) pPat1->ReleaseRef();
451
				}
452
			}
451
			}
453
		}
452
		}
454
	}
453
	}
(-)svl/inc/svl/poolitem.hxx (-1 / +1 lines)
Lines 188-195 Link Here
188
	inline void				 SetKind( sal_uInt16 n );
188
	inline void				 SetKind( sal_uInt16 n );
189
public:
189
public:
190
	inline sal_uLong             AddRef( sal_uLong n = 1 ) const;
190
	inline sal_uLong             AddRef( sal_uLong n = 1 ) const;
191
	inline sal_uLong             ReleaseRef( sal_uLong n = 1 ) const;
191
private:
192
private:
192
	inline sal_uLong             ReleaseRef( sal_uLong n = 1 ) const;
193
	SVL_DLLPRIVATE long      Delete_Impl(void*);
193
	SVL_DLLPRIVATE long      Delete_Impl(void*);
194
194
195
#if 0
195
#if 0

Return to issue 118877