summaryrefslogtreecommitdiff
path: root/sd/source/ui/annotations/annotationmanager.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-12-01 21:03:42 +0100
committerEike Rathke <erack@redhat.com>2011-12-01 21:04:29 +0100
commit86adb5cacb4fe3e7fb869299447da5876f0da30d (patch)
treef7998dd1a12a82ca53a4fa155cdf5536ac25ef62 /sd/source/ui/annotations/annotationmanager.cxx
parentb20ea84970fb8b3068880a361822941c47f50edd (diff)
get rid of class Date and Time default ctor with system time penalty
Diffstat (limited to 'sd/source/ui/annotations/annotationmanager.cxx')
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 625ecd40013f..fdc9655b3406 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -168,11 +168,12 @@ OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotatio
com::sun::star::util::DateTime aDateTime( xAnnotation->getDateTime() );
+ Date aSysDate( Date::SYSTEM );
Date aDate = Date( aDateTime.Day, aDateTime.Month, aDateTime.Year );
- if (aDate==Date())
+ if (aDate==aSysDate)
sRet = sRet + String(SdResId(STR_ANNOTATION_TODAY));
else
- if (aDate == Date(Date()-1))
+ if (aDate == Date(aSysDate-1))
sRet = sRet + String(SdResId(STR_ANNOTATION_YESTERDAY));
else
if (aDate.IsValidAndGregorian() )