diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-08-07 11:06:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-08-07 11:06:41 +0200 |
commit | 58f837d2267e002a6a323b6b37c9e62eb6ca711b (patch) | |
tree | 2e5852d3bac2b6c983c9950aaf2895967718a4f2 /sw/source/core/docnode/ndsect.cxx | |
parent | ca16ec4346cec871163c0b9ff361c7ad8bc74c16 (diff) |
Avoid unnecessary illegal downcasts from SwFrmFmt to SwSectionFmt
Change-Id: I2ca8d57a09b6f8c6d760b5fb6a3d2f94ad22ada3
Diffstat (limited to 'sw/source/core/docnode/ndsect.cxx')
-rw-r--r-- | sw/source/core/docnode/ndsect.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 067c7f5b4971..e622c4066b8c 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -504,9 +504,8 @@ SwSection* SwDoc::GetCurrSection( const SwPosition& rPos ) const SwSectionFmt* SwDoc::MakeSectionFmt( SwSectionFmt *pDerivedFrom ) { - if( !pDerivedFrom ) - pDerivedFrom = (SwSectionFmt*)mpDfltFrmFmt; - SwSectionFmt* pNew = new SwSectionFmt( pDerivedFrom, this ); + SwSectionFmt* pNew = new SwSectionFmt( + pDerivedFrom == 0 ? mpDfltFrmFmt : pDerivedFrom, this ); mpSectionFmtTbl->push_back( pNew ); return pNew; } |