Kaydet (Commit) ca828172 authored tarafından Matteo Casalin's avatar Matteo Casalin Kaydeden (comit) Luboš Luňák

Avoid unnecessary operations on an OUString

Change-Id: I1820711664a6aa18587e1e4a3d74a8e4cbfcc07e
Reviewed-on: https://gerrit.libreoffice.org/1537Reviewed-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
Tested-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
üst f6b4d031
...@@ -160,11 +160,11 @@ OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotatio ...@@ -160,11 +160,11 @@ OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotatio
Date aSysDate( Date::SYSTEM ); Date aSysDate( Date::SYSTEM );
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 = SdResId(STR_ANNOTATION_TODAY);
else if (aDate == Date(aSysDate-1)) else if (aDate == Date(aSysDate-1))
sRet = sRet + String(SdResId(STR_ANNOTATION_YESTERDAY)); sRet = SdResId(STR_ANNOTATION_YESTERDAY);
else if (aDate.IsValidAndGregorian() ) else if (aDate.IsValidAndGregorian() )
sRet = sRet + rLocalData.getDate(aDate); sRet = rLocalData.getDate(aDate);
Time aTime( aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.HundredthSeconds ); Time aTime( aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.HundredthSeconds );
if(aTime.GetTime() != 0) if(aTime.GetTime() != 0)
......
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