[Libreoffice-commits] core.git: editeng/source
Julien Nabet
serval2412 at yahoo.fr
Wed Mar 20 08:58:26 PDT 2013
editeng/source/rtf/rtfitem.cxx | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
New commits:
commit d96dd357715c3e9d376b1cf16667b17103bbcfa8
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Mar 20 13:23:34 2013 +0100
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 at suse.com>
Tested-by: Noel Power <noel.power at suse.com>
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 462e688..7fea3eb 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 );
More information about the Libreoffice-commits
mailing list