[Libreoffice-commits] core.git: sc/source
Stephan Bergmann
sbergman at redhat.com
Tue Oct 4 15:02:19 UTC 2016
sc/source/core/data/column.cxx | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
New commits:
commit d5c763f7b114aeebcb08254f26be718cd738d6b0
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Oct 4 16:58:15 2016 +0200
pNewPattern can never be null here
Change-Id: I87d66bca7b9399e0268eb2fb4c1dfa51d4461fa2
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 5abcb6e..6dfce01 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 )
More information about the Libreoffice-commits
mailing list