summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
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 /sfx2/source/dialog
parentb20ea84970fb8b3068880a361822941c47f50edd (diff)
get rid of class Date and Time default ctor with system time penalty
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx4
-rw-r--r--sfx2/source/dialog/versdlg.cxx4
2 files changed, 5 insertions, 3 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index ca68dcf35b34..ac3858cac3ae 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -377,7 +377,7 @@ int SfxDocumentInfoItem::operator==( const SfxPoolItem& rItem) const
void SfxDocumentInfoItem::resetUserData(const ::rtl::OUString & i_rAuthor)
{
setAuthor(i_rAuthor);
- DateTime now;
+ DateTime now( DateTime::SYSTEM );
setCreationDate( util::DateTime(
now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
now.GetDay(), now.GetMonth(), now.GetYear() ) );
@@ -884,7 +884,7 @@ IMPL_LINK( SfxDocumentPage, DeleteHdl, PushButton*, EMPTYARG )
if ( bEnableUseUserData && aUseUserDataCB.IsChecked() )
aName = SvtUserOptions().GetFullName();
LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
- DateTime now;
+ DateTime now( DateTime::SYSTEM );
util::DateTime uDT(
now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
now.GetDay(), now.GetMonth(), now.GetYear() );
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 88c4fa6b6d96..8c5d14ddf686 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -66,6 +66,7 @@ struct SfxVersionInfo
SfxVersionInfo();
SfxVersionInfo( const SfxVersionInfo& rInfo )
+ : aCreationDate( DateTime::EMPTY )
{ *this = rInfo; }
SfxVersionInfo& operator=( const SfxVersionInfo &rInfo )
@@ -142,6 +143,7 @@ SfxVersionTableDtor& SfxVersionTableDtor::operator=( const SfxVersionTableDtor&
//----------------------------------------------------------------
SfxVersionInfo::SfxVersionInfo()
+ : aCreationDate( DateTime::EMPTY )
{
}
@@ -325,7 +327,7 @@ void SfxVersionDialog::Open_Impl()
void SfxVersionDialog::RecalcDateColumn()
{
// recalculate the datetime column width
- DateTime aNow;
+ DateTime aNow( DateTime::SYSTEM );
mpLocaleWrapper = new LocaleDataWrapper(
::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
String sDateTime = ConvertDateTime_Impl( aNow, *mpLocaleWrapper );