diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/column.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 5abcb6e29de9..6dfce01b2617 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -552,11 +552,8 @@ void ScColumn::ApplyStyle( SCROW nRow, const ScStyleSheet* rStyle ) { const ScPatternAttr* pPattern = pAttrArray->GetPattern(nRow); std::unique_ptr<ScPatternAttr> pNewPattern(new ScPatternAttr(*pPattern)); - if (pNewPattern) - { - pNewPattern->SetStyleSheet(const_cast<ScStyleSheet*>(rStyle)); - pAttrArray->SetPattern(nRow, pNewPattern.get(), true); - } + pNewPattern->SetStyleSheet(const_cast<ScStyleSheet*>(rStyle)); + pAttrArray->SetPattern(nRow, pNewPattern.get(), true); } void ScColumn::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, const ScStyleSheet& rStyle ) |