Kaydet (Commit) 95fc4bdb authored tarafından Matteo Casalin's avatar Matteo Casalin

Remove unneeded 'else' and fix 'else if' style

Change-Id: I774af9ca0631e931ddc8c5025981dabca557e325
üst 52ad6005
...@@ -127,7 +127,7 @@ static SfxBindings* getBindings( ViewShellBase& rBase ) ...@@ -127,7 +127,7 @@ static SfxBindings* getBindings( ViewShellBase& rBase )
{ {
if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() ) if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
return &rBase.GetMainViewShell()->GetViewFrame()->GetBindings(); return &rBase.GetMainViewShell()->GetViewFrame()->GetBindings();
else
return 0; return 0;
} }
...@@ -137,7 +137,7 @@ static SfxDispatcher* getDispatcher( ViewShellBase& rBase ) ...@@ -137,7 +137,7 @@ static SfxDispatcher* getDispatcher( ViewShellBase& rBase )
{ {
if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() ) if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
return rBase.GetMainViewShell()->GetViewFrame()->GetDispatcher(); return rBase.GetMainViewShell()->GetViewFrame()->GetDispatcher();
else
return 0; return 0;
} }
...@@ -161,11 +161,9 @@ OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotatio ...@@ -161,11 +161,9 @@ OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotatio
Date aDate = Date( aDateTime.Day, aDateTime.Month, aDateTime.Year ); Date aDate = Date( aDateTime.Day, aDateTime.Month, aDateTime.Year );
if (aDate==aSysDate) if (aDate==aSysDate)
sRet = sRet + String(SdResId(STR_ANNOTATION_TODAY)); sRet = sRet + String(SdResId(STR_ANNOTATION_TODAY));
else else if (aDate == Date(aSysDate-1))
if (aDate == Date(aSysDate-1))
sRet = sRet + String(SdResId(STR_ANNOTATION_YESTERDAY)); sRet = sRet + String(SdResId(STR_ANNOTATION_YESTERDAY));
else else if (aDate.IsValidAndGregorian() )
if (aDate.IsValidAndGregorian() )
sRet = sRet + rLocalData.getDate(aDate); sRet = sRet + rLocalData.getDate(aDate);
Time aTime( aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.HundredthSeconds ); Time aTime( aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.HundredthSeconds );
...@@ -1101,7 +1099,7 @@ Color AnnotationManagerImpl::GetColor(sal_uInt16 aAuthorIndex) ...@@ -1101,7 +1099,7 @@ Color AnnotationManagerImpl::GetColor(sal_uInt16 aAuthorIndex)
return Color( aArrayNormal[ aAuthorIndex % (sizeof( aArrayNormal )/ sizeof( aArrayNormal[0] ))]); return Color( aArrayNormal[ aAuthorIndex % (sizeof( aArrayNormal )/ sizeof( aArrayNormal[0] ))]);
} }
else
return Color(COL_WHITE); return Color(COL_WHITE);
} }
...@@ -1116,7 +1114,7 @@ Color AnnotationManagerImpl::GetColorLight(sal_uInt16 aAuthorIndex) ...@@ -1116,7 +1114,7 @@ Color AnnotationManagerImpl::GetColorLight(sal_uInt16 aAuthorIndex)
return Color( aArrayLight[ aAuthorIndex % (sizeof( aArrayLight )/ sizeof( aArrayLight[0] ))]); return Color( aArrayLight[ aAuthorIndex % (sizeof( aArrayLight )/ sizeof( aArrayLight[0] ))]);
} }
else
return Color(COL_WHITE); return Color(COL_WHITE);
} }
...@@ -1131,7 +1129,7 @@ Color AnnotationManagerImpl::GetColorDark(sal_uInt16 aAuthorIndex) ...@@ -1131,7 +1129,7 @@ Color AnnotationManagerImpl::GetColorDark(sal_uInt16 aAuthorIndex)
return Color( aArrayAnkor[ aAuthorIndex % (sizeof( aArrayAnkor ) / sizeof( aArrayAnkor[0] ))]); return Color( aArrayAnkor[ aAuthorIndex % (sizeof( aArrayAnkor ) / sizeof( aArrayAnkor[0] ))]);
} }
else
return Color(COL_WHITE); return Color(COL_WHITE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment