[Libreoffice-commits] .: sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jan 3 02:02:18 PST 2013
sd/source/ui/annotations/annotationmanager.cxx | 26 +++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
New commits:
commit 95fc4bdb8ee6cefa3514895ba2f12789e2879956
Author: Matteo Casalin <matteo.casalin at gmx.com>
Date: Thu Jan 3 10:36:59 2013 +0100
Remove unneeded 'else' and fix 'else if' style
Change-Id: I774af9ca0631e931ddc8c5025981dabca557e325
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 89d69aa..3ddcd33 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -127,8 +127,8 @@ static SfxBindings* getBindings( ViewShellBase& rBase )
{
if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
return &rBase.GetMainViewShell()->GetViewFrame()->GetBindings();
- else
- return 0;
+
+ return 0;
}
// --------------------------------------------------------------------
@@ -137,8 +137,8 @@ static SfxDispatcher* getDispatcher( ViewShellBase& rBase )
{
if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
return rBase.GetMainViewShell()->GetViewFrame()->GetDispatcher();
- else
- return 0;
+
+ return 0;
}
com::sun::star::util::DateTime getCurrentDateTime()
@@ -161,11 +161,9 @@ OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotatio
Date aDate = Date( aDateTime.Day, aDateTime.Month, aDateTime.Year );
if (aDate==aSysDate)
sRet = sRet + String(SdResId(STR_ANNOTATION_TODAY));
- else
- if (aDate == Date(aSysDate-1))
+ else if (aDate == Date(aSysDate-1))
sRet = sRet + String(SdResId(STR_ANNOTATION_YESTERDAY));
- else
- if (aDate.IsValidAndGregorian() )
+ else if (aDate.IsValidAndGregorian() )
sRet = sRet + rLocalData.getDate(aDate);
Time aTime( aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.HundredthSeconds );
@@ -1101,8 +1099,8 @@ Color AnnotationManagerImpl::GetColor(sal_uInt16 aAuthorIndex)
return Color( aArrayNormal[ aAuthorIndex % (sizeof( aArrayNormal )/ sizeof( aArrayNormal[0] ))]);
}
- else
- return Color(COL_WHITE);
+
+ return Color(COL_WHITE);
}
Color AnnotationManagerImpl::GetColorLight(sal_uInt16 aAuthorIndex)
@@ -1116,8 +1114,8 @@ Color AnnotationManagerImpl::GetColorLight(sal_uInt16 aAuthorIndex)
return Color( aArrayLight[ aAuthorIndex % (sizeof( aArrayLight )/ sizeof( aArrayLight[0] ))]);
}
- else
- return Color(COL_WHITE);
+
+ return Color(COL_WHITE);
}
Color AnnotationManagerImpl::GetColorDark(sal_uInt16 aAuthorIndex)
@@ -1131,8 +1129,8 @@ Color AnnotationManagerImpl::GetColorDark(sal_uInt16 aAuthorIndex)
return Color( aArrayAnkor[ aAuthorIndex % (sizeof( aArrayAnkor ) / sizeof( aArrayAnkor[0] ))]);
}
- else
- return Color(COL_WHITE);
+
+ return Color(COL_WHITE);
}
SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward )
More information about the Libreoffice-commits
mailing list