summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-03-20 13:23:34 +0100
committerNoel Power <noel.power@suse.com>2013-03-20 15:58:06 +0000
commitd96dd357715c3e9d376b1cf16667b17103bbcfa8 (patch)
tree7c26a96f4bb697637d32ff4bfc69297585d23905 /editeng
parent2c108a29d1ec53aa85cb5b508b8575b67b59628e (diff)
coverity#704628/704629/704630 Explicit null dereferenced
+ return early if no whichid or after default case Change-Id: I40f3ec310604ccde22022dd2e82984b0f3057307 Reviewed-on: https://gerrit.libreoffice.org/2869 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/rtf/rtfitem.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 462e688d3677..7fea3eb55086 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -148,10 +148,9 @@ void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet,
break;
}
-
if( DOUBLEBYTE_CHARTYPE == eType )
{
- if( bIsLeftToRightDef && *pCJK )
+ if( bIsLeftToRightDef && pCJK )
{
rItem.SetWhich( *pCJK );
rSet.Put( rItem );
@@ -159,7 +158,7 @@ void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet,
}
else if( !bIsLeftToRightDef )
{
- if( *pCTL )
+ if( pCTL )
{
rItem.SetWhich( *pCTL );
rSet.Put( rItem );
@@ -169,7 +168,7 @@ void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet,
{
if( LOW_CHARTYPE == eType )
{
- if( *pNormal )
+ if( pNormal )
{
rItem.SetWhich( *pNormal );
rSet.Put( rItem );
@@ -177,7 +176,7 @@ void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet,
}
else if( HIGH_CHARTYPE == eType )
{
- if( *pCTL )
+ if( pCTL )
{
rItem.SetWhich( *pCTL );
rSet.Put( rItem );
@@ -185,17 +184,17 @@ void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet,
}
else
{
- if( *pCJK )
+ if( pCJK )
{
rItem.SetWhich( *pCJK );
rSet.Put( rItem );
}
- if( *pCTL )
+ if( pCTL )
{
rItem.SetWhich( *pCTL );
rSet.Put( rItem );
}
- if( *pNormal )
+ if( pNormal )
{
rItem.SetWhich( *pNormal );
rSet.Put( rItem );