diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-04 16:58:15 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-04 16:58:15 +0200 |
commit | d5c763f7b114aeebcb08254f26be718cd738d6b0 (patch) | |
tree | 8dd4c8e0c6a17f2178d429f93e09afd21720f3c7 /sc | |
parent | Actually delegate to Bitmap's move assign op (diff) | |
download | core-d5c763f7b114aeebcb08254f26be718cd738d6b0.tar.gz core-d5c763f7b114aeebcb08254f26be718cd738d6b0.zip |
pNewPattern can never be null here
Change-Id: I87d66bca7b9399e0268eb2fb4c1dfa51d4461fa2
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 ) |