diff options
author | Eike Rathke <erack@redhat.com> | 2011-12-01 19:07:16 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2011-12-01 19:07:16 +0100 |
commit | 3a6e9e2dd7fb6c0e71eed13d4f70b05b9f832ace (patch) | |
tree | 015e8ed050094ce8c14a05b61742360018b9bbdf | |
parent | Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/binfilter (diff) | |
download | binfilter-3a6e9e2dd7fb6c0e71eed13d4f70b05b9f832ace.tar.gz binfilter-3a6e9e2dd7fb6c0e71eed13d4f70b05b9f832ace.zip |
get rid of class Date and Time default ctor with system time penalty
39 files changed, 84 insertions, 53 deletions
diff --git a/binfilter/bf_sc/source/core/data/sc_attrib.cxx b/binfilter/bf_sc/source/core/data/sc_attrib.cxx index d1cf0f189..a88fbd028 100644 --- a/binfilter/bf_sc/source/core/data/sc_attrib.cxx +++ b/binfilter/bf_sc/source/core/data/sc_attrib.cxx @@ -689,7 +689,7 @@ using namespace ::com::sun::star; /*N*/ while ((nPos = aStr.Search(pCommands[2])) != STRING_NOTFOUND) /*N*/ { /*N*/ ESelection aSel( nPar,nPos, nPar,nPos+pCommands[2].Len() ); -/*N*/ rEng.QuickInsertField( SvxFieldItem(SvxDateField(Date(),SVXDATETYPE_VAR)), aSel ); +/*N*/ rEng.QuickInsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM),SVXDATETYPE_VAR)), aSel ); /*N*/ lcl_SetSpace(aStr, aSel ); bChange = TRUE; /*N*/ } /*N*/ while ((nPos = aStr.Search(pCommands[3])) != STRING_NOTFOUND) diff --git a/binfilter/bf_sc/source/core/data/sc_global2.cxx b/binfilter/bf_sc/source/core/data/sc_global2.cxx index a186de375..5ebe7a098 100644 --- a/binfilter/bf_sc/source/core/data/sc_global2.cxx +++ b/binfilter/bf_sc/source/core/data/sc_global2.cxx @@ -824,7 +824,7 @@ namespace binfilter { /*N*/ void ScPostIt::AutoSetText( const String& rNewText ) /*N*/ { /*N*/ aStrText = rNewText; -/*N*/ aStrDate = ScGlobal::pLocaleData->getDate( Date() ); +/*N*/ aStrDate = ScGlobal::pLocaleData->getDate( Date( Date::SYSTEM ) ); /*N*/ /*N*/ SvtUserOptions aUserOpt; /*N*/ aStrAuthor = aUserOpt.GetID(); diff --git a/binfilter/bf_sc/source/core/data/sc_stlpool.cxx b/binfilter/bf_sc/source/core/data/sc_stlpool.cxx index 4040eb9c3..2f13accac 100644 --- a/binfilter/bf_sc/source/core/data/sc_stlpool.cxx +++ b/binfilter/bf_sc/source/core/data/sc_stlpool.cxx @@ -378,7 +378,7 @@ namespace binfilter { /*N*/ aStr = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(", ")); /*N*/ pEdEngine->SetText( aStr ); /*N*/ pEdEngine->QuickInsertField( SvxFieldItem(SvxTimeField()), ESelection(0,2,0,2) ); -/*N*/ pEdEngine->QuickInsertField( SvxFieldItem(SvxDateField(Date(),SVXDATETYPE_VAR)), +/*N*/ pEdEngine->QuickInsertField( SvxFieldItem(SvxDateField(Date( Date::SYSTEM),SVXDATETYPE_VAR)), /*N*/ ESelection() ); /*N*/ pTxtObj = pEdEngine->CreateTextObject(); /*N*/ pHeaderItem->SetRightArea( *pTxtObj ); diff --git a/binfilter/bf_sc/source/core/tool/sc_chgtrack.cxx b/binfilter/bf_sc/source/core/tool/sc_chgtrack.cxx index c3fb7f706..6c01c7ede 100644 --- a/binfilter/bf_sc/source/core/tool/sc_chgtrack.cxx +++ b/binfilter/bf_sc/source/core/tool/sc_chgtrack.cxx @@ -73,6 +73,7 @@ const USHORT nMemPoolChangeActionLinkEntry = (0x8000 - 64) / sizeof(ScChangeActi /*N*/ ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScRange& rRange ) /*N*/ : /*N*/ aBigRange( rRange ), + aDateTime( DateTime::SYSTEM ), /*N*/ pNext( NULL ), /*N*/ pPrev( NULL ), /*N*/ pLinkAny( NULL ), @@ -113,6 +114,7 @@ const USHORT nMemPoolChangeActionLinkEntry = (0x8000 - 64) / sizeof(ScChangeActi /*N*/ const ULONG nTempAction) /*N*/ : /*N*/ aBigRange( rRange ), + aDateTime( DateTime::SYSTEM ), /*N*/ pNext( NULL ), /*N*/ pPrev( NULL ), /*N*/ pLinkAny( NULL ), @@ -130,6 +132,7 @@ const USHORT nMemPoolChangeActionLinkEntry = (0x8000 - 64) / sizeof(ScChangeActi /*N*/ ScChangeAction::ScChangeAction( SvStream& rStrm, ScMultipleReadHeader& /*rHdr*/, /*N*/ ScChangeTrack* /*pTrack*/ ) /*N*/ : + aDateTime( DateTime::EMPTY ), /*N*/ pNext( NULL ), /*N*/ pPrev( NULL ), /*N*/ pLinkAny( NULL ), @@ -2014,6 +2017,7 @@ const USHORT ScChangeTrack::nContentSlots = /*N*/ ScChangeTrack::ScChangeTrack( ScDocument* pDocP ) : // Changetracking.sdc + aFixDateTime( DateTime::SYSTEM ), /*N*/ pDoc( pDocP ) /*N*/ { /*N*/ Init(); @@ -2024,6 +2028,7 @@ const USHORT ScChangeTrack::nContentSlots = /*N*/ ScChangeTrack::ScChangeTrack( ScDocument* pDocP, const StrCollection& aTempUserCollection) : /*N*/ aUserCollection(aTempUserCollection), + aFixDateTime( DateTime::SYSTEM ), /*N*/ pDoc( pDocP ) /*N*/ { /*N*/ Init(); diff --git a/binfilter/bf_sc/source/core/tool/sc_editutil.cxx b/binfilter/bf_sc/source/core/tool/sc_editutil.cxx index 355ee797a..1192164f5 100644 --- a/binfilter/bf_sc/source/core/tool/sc_editutil.cxx +++ b/binfilter/bf_sc/source/core/tool/sc_editutil.cxx @@ -372,6 +372,9 @@ const sal_Char ScEditUtil::pCalcDelimiters[] = "=();+-*/^&<>"; /*N*/ } /*N*/ ScHeaderFieldData::ScHeaderFieldData() + : + aDate( Date::EMPTY ), + aTime( Time::EMPTY ) /*N*/ { /*N*/ nPageNo = nTotalPages = 0; /*N*/ eNumType = SVX_ARABIC; diff --git a/binfilter/bf_sc/source/core/tool/sc_interpr2.cxx b/binfilter/bf_sc/source/core/tool/sc_interpr2.cxx index edb639f66..2d2cef70f 100644 --- a/binfilter/bf_sc/source/core/tool/sc_interpr2.cxx +++ b/binfilter/bf_sc/source/core/tool/sc_interpr2.cxx @@ -91,7 +91,7 @@ namespace binfilter { /*N*/ void ScInterpreter::ScGetActDate() /*N*/ { /*N*/ nFuncFmtType = NUMBERFORMAT_DATE; -/*N*/ Date aActDate; +/*N*/ Date aActDate( Date::SYSTEM ); /*N*/ long nDiff = aActDate - *(pFormatter->GetNullDate()); /*N*/ PushDouble((double) nDiff); /*N*/ } @@ -99,9 +99,9 @@ namespace binfilter { void ScInterpreter::ScGetActTime() { nFuncFmtType = NUMBERFORMAT_DATETIME; - Date aActDate; + Date aActDate( Date::SYSTEM ); long nDiff = aActDate - *(pFormatter->GetNullDate()); - Time aActTime; + Time aActTime( Time::SYSTEM ); double nTime = ((double)aActTime.Get100Sec() / 100 + (double)(aActTime.GetSec() + (aActTime.GetMin() * 60) + diff --git a/binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx b/binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx index e0a030704..0c5c78a0d 100644 --- a/binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx +++ b/binfilter/bf_sc/source/filter/xml/sc_xmlimprt.cxx @@ -1630,7 +1630,7 @@ void ScXMLImport::SetChangeTrackingViewSettings(const ::com::sun::star::uno::Seq util::DateTime aDateTime; if (rChangeProps[i].Value >>= aDateTime) { - DateTime aCoreDateTime; + DateTime aCoreDateTime( DateTime::EMPTY ); ScXMLConverter::ConvertAPIToCoreDateTime(aDateTime, aCoreDateTime); pViewSettings->SetTheFirstDateTime(aCoreDateTime); } @@ -1640,7 +1640,7 @@ void ScXMLImport::SetChangeTrackingViewSettings(const ::com::sun::star::uno::Seq util::DateTime aDateTime; if (rChangeProps[i].Value >>= aDateTime) { - DateTime aCoreDateTime; + DateTime aCoreDateTime( DateTime::EMPTY ); ScXMLConverter::ConvertAPIToCoreDateTime(aDateTime, aCoreDateTime); pViewSettings->SetTheLastDateTime(aCoreDateTime); } diff --git a/binfilter/bf_sc/source/ui/view/sc_printfun.cxx b/binfilter/bf_sc/source/ui/view/sc_printfun.cxx index a19fed8ee..f5b6e59b9 100644 --- a/binfilter/bf_sc/source/ui/view/sc_printfun.cxx +++ b/binfilter/bf_sc/source/ui/view/sc_printfun.cxx @@ -593,7 +593,7 @@ namespace binfilter { /*N*/ else /*N*/ aFieldData.nTotalPages = nTotalPages; /*N*/ -/*N*/ SetDateTime( Date(), Time() ); +/*N*/ SetDateTime( Date( Date::SYSTEM ), Time( Time::SYSTEM ) ); /*N*/ /*N*/ aFieldData.aTitle = pDocShell->GetTitle(); /*N*/ const INetURLObject& rURLObj = pDocShell->GetMedium()->GetURLObject(); diff --git a/binfilter/bf_sfx2/source/appl/appimp.hxx b/binfilter/bf_sfx2/source/appl/appimp.hxx index 801fa88fa..c193a7b49 100644 --- a/binfilter/bf_sfx2/source/appl/appimp.hxx +++ b/binfilter/bf_sfx2/source/appl/appimp.hxx @@ -75,6 +75,8 @@ struct SfxApplication_Impl USHORT nWarnLevel; BOOL bConfigLoaded:1; BOOL bAutoSaveNow:1; // ist TRUE, wenn der Timer abgelaufen ist, wenn die App nicht aktiv war + + SfxApplication_Impl() : aAutoSaveTime( Time::EMPTY ) {} }; }//end of namespace binfilter diff --git a/binfilter/bf_sfx2/source/doc/sfx2_docfile.cxx b/binfilter/bf_sfx2/source/doc/sfx2_docfile.cxx index 0e3d56f4c..2ca11c32b 100644 --- a/binfilter/bf_sfx2/source/doc/sfx2_docfile.cxx +++ b/binfilter/bf_sfx2/source/doc/sfx2_docfile.cxx @@ -373,7 +373,7 @@ void SAL_CALL SfxMediumHandler_Impl::handle( /*N*/ pAntiImpl( pAntiImplP ), /*N*/ nFileVersion( 0 ), /*N*/ pOrigFilter( 0 ), -/*N*/ aExpireTime( Date() + 10, Time() ), +/*N*/ aExpireTime( Date( Date::SYSTEM ) + 10, Time( Time::SYSTEM ) ), /*N*/ pTempDir( NULL ), /*N*/ pTempFile( NULL ), /*N*/ nLastStorageError( 0 ), diff --git a/binfilter/bf_sfx2/source/doc/sfx2_docinf.cxx b/binfilter/bf_sfx2/source/doc/sfx2_docinf.cxx index 15918f095..8826b3292 100644 --- a/binfilter/bf_sfx2/source/doc/sfx2_docinf.cxx +++ b/binfilter/bf_sfx2/source/doc/sfx2_docinf.cxx @@ -277,7 +277,9 @@ static const char pDocInfoHeader[] = "SfxDocumentInfo"; /*N*/ , aDateTime( rDateTime ) /*N*/ {} /*N*/ SfxPSDateTimeProperty_Impl( UINT32 nIdP ) : -/*N*/ SfxPSProperty_Impl( nIdP, VT_FILETIME ) {}; +/*N*/ SfxPSProperty_Impl( nIdP, VT_FILETIME ) +/*N*/ , aDateTime( DateTime::SYSTEM ) + {}; /*N*/ /*N*/ virtual ULONG Save( SvStream& ) {return 1;} /*N*/ virtual ULONG Load( SvStream& rStream ); @@ -591,6 +593,7 @@ static const char pDocInfoHeader[] = "SfxDocumentInfo"; //------------------------------------------------------------------------- /*N*/ SfxDocumentInfo::SfxDocumentInfo( const SfxDocumentInfo& rInf ): + aTemplateDate( DateTime::EMPTY ), /*N*/ nUserDataSize(0), /*N*/ pUserData(0) /*N*/ { @@ -781,6 +784,7 @@ static const char pDocInfoHeader[] = "SfxDocumentInfo"; /*N*/ bSaveVersionOnClose( FALSE ), /*N*/ aChanged( TIMESTAMP_INVALID_DATETIME ), /*N*/ aPrinted( TIMESTAMP_INVALID_DATETIME ), + aTemplateDate( DateTime::EMPTY ), /*N*/ nUserDataSize(0), /*N*/ nDocNo(1), /*N*/ pUserData(0), diff --git a/binfilter/bf_sfx2/source/doc/sfx2_objcont.cxx b/binfilter/bf_sfx2/source/doc/sfx2_objcont.cxx index 4d74e4b05..4814b0b60 100644 --- a/binfilter/bf_sfx2/source/doc/sfx2_objcont.cxx +++ b/binfilter/bf_sfx2/source/doc/sfx2_objcont.cxx @@ -148,7 +148,7 @@ using namespace ::com::sun::star::uno; /*N*/ Time aOldTime(rInfo.GetTime()); /*N*/ /*N*/ // Initialize some local member! Its neccessary for wollow operations! -/*N*/ DateTime aNow ; // Date and time at current moment +/*N*/ DateTime aNow( DateTime::SYSTEM ); // Date and time at current moment /*N*/ Time n24Time (24,0,0,0) ; // Time-value for 24 hours - see follow calculation /*N*/ ULONG nDays = 0 ; // Count of days between now and last editing /*N*/ Time nAddTime (0) ; // Value to add on aOldTime diff --git a/binfilter/bf_sfx2/source/doc/sfx2_objmisc.cxx b/binfilter/bf_sfx2/source/doc/sfx2_objmisc.cxx index 5a7526cf9..f809c55e1 100644 --- a/binfilter/bf_sfx2/source/doc/sfx2_objmisc.cxx +++ b/binfilter/bf_sfx2/source/doc/sfx2_objmisc.cxx @@ -839,7 +839,7 @@ namespace binfilter { /*?*/ } /*?*/ else if( rKV.GetKey().CompareIgnoreCaseToAscii( "expires" ) == COMPARE_EQUAL ) /*?*/ { -/*?*/ DateTime aDateTime; +/*?*/ DateTime aDateTime( DateTime::EMPTY ); /*?*/ INetRFC822Message::ParseDateField( rKV.GetValue(), aDateTime ); /*?*/ } /*?*/ else if( rKV.GetKey().CompareIgnoreCaseToAscii( "content-type" ) == COMPARE_EQUAL ) diff --git a/binfilter/bf_sfx2/source/doc/sfx2_xmlversion.cxx b/binfilter/bf_sfx2/source/doc/sfx2_xmlversion.cxx index d3f8c51d7..b69d8658f 100644 --- a/binfilter/bf_sfx2/source/doc/sfx2_xmlversion.cxx +++ b/binfilter/bf_sfx2/source/doc/sfx2_xmlversion.cxx @@ -186,7 +186,7 @@ sal_Char XMLN_VERSIONSLIST[] = "VersionList.xml"; /*?*/ ( aLclLocalName.compareToAscii( sXML_date_time ) == 0 ) ) /*?*/ { /*?*/ const OUString& rAttrValue = xAttrList->getValueByIndex( i ); -/*?*/ DateTime aTime; +/*?*/ DateTime aTime( DateTime::EMPTY ); /*?*/ if ( ParseISODateTimeString( rAttrValue, aTime ) ) /*?*/ pInfo->aCreateStamp.SetTime( aTime ); /*?*/ } diff --git a/binfilter/bf_sfx2/source/doc/timestamp.cxx b/binfilter/bf_sfx2/source/doc/timestamp.cxx index 233ec59b9..7436d127f 100644 --- a/binfilter/bf_sfx2/source/doc/timestamp.cxx +++ b/binfilter/bf_sfx2/source/doc/timestamp.cxx @@ -48,7 +48,7 @@ namespace binfilter { TimeStamp::TimeStamp () : m_sModifiedByName () - , m_aModifiedDateTime () + , m_aModifiedDateTime ( DateTime::SYSTEM ) { } @@ -63,7 +63,7 @@ TimeStamp::TimeStamp () TimeStamp::TimeStamp ( const String& rName ) : m_sModifiedByName ( rName ) - , m_aModifiedDateTime ( ) + , m_aModifiedDateTime ( DateTime::SYSTEM ) { // Safe impossible cases DBG_ASSERT ( impl_debug_checkParameter ( rName ), "TimeStamp::TimeStamp(String)\nInvalid parameter detected!\n" ) ; diff --git a/binfilter/bf_sfx2/source/inc/objshimp.hxx b/binfilter/bf_sfx2/source/inc/objshimp.hxx index 01574bb07..a16451d7b 100644 --- a/binfilter/bf_sfx2/source/inc/objshimp.hxx +++ b/binfilter/bf_sfx2/source/inc/objshimp.hxx @@ -139,7 +139,7 @@ struct SfxObjectShell_Impl pBasicLibContainer( 0 ), pDialogLibContainer( 0 ), pProgress( 0), - nTime(), + nTime( DateTime::EMPTY ), nVisualDocumentNumber( USHRT_MAX), bTemplateConfig( sal_False), diff --git a/binfilter/bf_so3/source/persist/persist.cxx b/binfilter/bf_so3/source/persist/persist.cxx index f891e5090..bbe370cc5 100644 --- a/binfilter/bf_so3/source/persist/persist.cxx +++ b/binfilter/bf_so3/source/persist/persist.cxx @@ -343,6 +343,7 @@ SvPersist::SvPersist() , nModifyCount ( 0 ) // Anzahl der modifizierten Childs und sich selbst , pParent ( NULL ) // kein zusaetzlicher RefCount , pChildList ( NULL ) + , aModifiedTime ( Time::EMPTY ) { } @@ -969,7 +970,7 @@ void SvPersist::SetModified( BOOL bModifiedP ) CountModified( bModifiedP ); } - aModifiedTime = Time(); + aModifiedTime = Time( Time::SYSTEM ); } void SvPersist::CountModified( BOOL bMod ) diff --git a/binfilter/bf_svtools/source/items1/svt_dateitem.cxx b/binfilter/bf_svtools/source/items1/svt_dateitem.cxx index 38abd6b2d..6567d2b30 100644 --- a/binfilter/bf_svtools/source/items1/svt_dateitem.cxx +++ b/binfilter/bf_svtools/source/items1/svt_dateitem.cxx @@ -137,7 +137,7 @@ SfxItemPresentation SfxDateTimeItem::GetPresentation ) const { DBG_CHKTHIS(SfxDateTimeItem, 0); - if (aDateTime.IsValidAndGregorian()) + if (aDateTime.IsValidDate()) if (pIntlWrapper) { rText = pIntlWrapper->getLocaleData()->getDate(aDateTime); diff --git a/binfilter/bf_svtools/source/items1/svt_dtritem.cxx b/binfilter/bf_svtools/source/items1/svt_dtritem.cxx index 994bcc29a..1abe08d28 100644 --- a/binfilter/bf_svtools/source/items1/svt_dtritem.cxx +++ b/binfilter/bf_svtools/source/items1/svt_dtritem.cxx @@ -113,7 +113,7 @@ SfxPoolItem* SfxDateTimeRangeItem::Create( SvStream& rStream, USHORT ) const rStream >> nEndDate; rStream >> nEndTime; - DateTime aStartDT, aEndDT; + DateTime aStartDT( DateTime::EMPTY ), aEndDT( DateTime::EMPTY ); aStartDT.SetDate( nStartDate ); aStartDT.SetTime( nStartTime ); diff --git a/binfilter/bf_svtools/source/items1/svt_frqitem.cxx b/binfilter/bf_svtools/source/items1/svt_frqitem.cxx index bf01a0fb6..05662dbd9 100644 --- a/binfilter/bf_svtools/source/items1/svt_frqitem.cxx +++ b/binfilter/bf_svtools/source/items1/svt_frqitem.cxx @@ -64,7 +64,8 @@ SfxFrequencyItem::SfxFrequencyItem( USHORT which, FrequencyMode eMode, Frequency nTInterval1 ( nTI1 ), aTime1 ( rT1 ), aTime2 ( rT2 ), - bMissingDate ( FALSE ) + bMissingDate ( FALSE ), + aMissingDate ( DateTime::EMPTY ) { DBG_CTOR( SfxFrequencyItem, 0 ); } @@ -81,7 +82,8 @@ SfxFrequencyItem::SfxFrequencyItem( const SfxFrequencyItem& rItem ) : nTInterval1 ( rItem.nTInterval1 ), aTime1 ( rItem.aTime1 ), aTime2 ( rItem.aTime2 ), - bMissingDate ( rItem.bMissingDate ) + bMissingDate ( rItem.bMissingDate ), + aMissingDate ( rItem.aMissingDate ) { DBG_CTOR( SfxFrequencyItem, 0 ); } diff --git a/binfilter/bf_svtools/source/numbers/svt_zforfind.cxx b/binfilter/bf_svtools/source/numbers/svt_zforfind.cxx index 9282dbb5a..1c7adbf4f 100644 --- a/binfilter/bf_svtools/source/numbers/svt_zforfind.cxx +++ b/binfilter/bf_svtools/source/numbers/svt_zforfind.cxx @@ -973,7 +973,7 @@ BOOL ImpSvNumberInputScan::GetDateRef( double& fDays, USHORT& nCounter, CalendarWrapper* pCal = pFormatter->GetCalendar(); for ( int nTryOrder = 1; nTryOrder <= nFormatOrder; nTryOrder++ ) { - pCal->setGregorianDateTime( Date() ); // today + pCal->setGregorianDateTime( Date( Date::SYSTEM ) ); // today String aOrgCalendar; // empty => not changed yet DateFormat DateFmt; BOOL bFormatTurn; @@ -1149,7 +1149,7 @@ input for the following reasons: if ( !bHadExact || !pCal->isValid() ) { if ( !bHadExact && nExactDateOrder ) - pCal->setGregorianDateTime( Date() ); // reset today + pCal->setGregorianDateTime( Date( Date::SYSTEM ) ); // reset today switch (DateFmt) { case MDY: diff --git a/binfilter/bf_svx/source/engine3d/svx_scene3d.cxx b/binfilter/bf_svx/source/engine3d/svx_scene3d.cxx index 88f976075..4e9435b74 100644 --- a/binfilter/bf_svx/source/engine3d/svx_scene3d.cxx +++ b/binfilter/bf_svx/source/engine3d/svx_scene3d.cxx @@ -64,7 +64,7 @@ namespace binfilter { /*N*/ aCamera(Vector3D(0,0,4), Vector3D()), /*N*/ nSaveStatus (0), /*N*/ nRestStatus (0), -/*N*/ aPaintTime(), +/*N*/ aPaintTime( Time::EMPTY ), /*N*/ nDisplayQuality(255), /*N*/ bDoubleBuffered(FALSE), /*N*/ bClipping(FALSE), diff --git a/binfilter/bf_svx/source/items/svx_flditem.cxx b/binfilter/bf_svx/source/items/svx_flditem.cxx index 3b7e6c656..5660a1b82 100644 --- a/binfilter/bf_svx/source/items/svx_flditem.cxx +++ b/binfilter/bf_svx/source/items/svx_flditem.cxx @@ -159,7 +159,7 @@ namespace binfilter { /*N*/ SvxDateField::SvxDateField() /*N*/ { -/*N*/ nFixDate = Date().GetDate(); +/*N*/ nFixDate = Date( Date::SYSTEM ).GetDate(); /*N*/ eType = SVXDATETYPE_VAR; /*N*/ eFormat = SVXDATEFORMAT_STDSMALL; /*N*/ } @@ -414,7 +414,7 @@ namespace binfilter { /*N*/ SvxExtTimeField::SvxExtTimeField() /*N*/ { -/*N*/ nFixTime = Time().GetTime(); +/*N*/ nFixTime = Time( Time::SYSTEM ).GetTime(); /*N*/ eType = SVXTIMETYPE_VAR; /*N*/ eFormat = SVXTIMEFORMAT_STANDARD; /*N*/ } diff --git a/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx b/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx index 8e6610c2c..6aba83f76 100644 --- a/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx +++ b/binfilter/bf_svx/source/svdraw/svx_svdmodel.cxx @@ -95,7 +95,7 @@ using namespace ::com::sun::star; /*N*/ { /*N*/ if (bInit) /*N*/ { -/*N*/ aCreationDate = DateTime(); +/*N*/ aCreationDate = DateTime( DateTime::SYSTEM ); /*N*/ eCreationCharSet = osl_getThreadTextEncoding(); /*N*/ } /*N*/ } @@ -333,6 +333,7 @@ using namespace ::com::sun::star; /*N*/ SdrModel::SdrModel(SfxItemPool* pPool, SvPersist* pPers, INT32 bLoadRefCounts): /*N*/ aInfo(TRUE), + aReadDate( DateTime::EMPTY ), /*N*/ aMaPag(1024,32,32), /*N*/ aPages(1024,32,32) /*N*/ { @@ -346,6 +347,7 @@ using namespace ::com::sun::star; /*N*/ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, SvPersist* pPers, INT32 bLoadRefCounts): /*N*/ aInfo(TRUE), + aReadDate( DateTime::EMPTY ), /*N*/ aMaPag(1024,32,32), /*N*/ aPages(1024,32,32), /*N*/ aTablePath(rPath) @@ -360,6 +362,7 @@ using namespace ::com::sun::star; /*N*/ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, SvPersist* pPers, bool bUseExtColorTable, INT32 bLoadRefCounts): /*N*/ aInfo(TRUE), + aReadDate( DateTime::EMPTY ), /*N*/ aMaPag(1024,32,32), /*N*/ aPages(1024,32,32), /*N*/ aTablePath(rPath) @@ -374,6 +377,7 @@ using namespace ::com::sun::star; /*N*/ SdrModel::SdrModel(const SdrModel& /*rSrcModel*/): /*N*/ SfxBroadcaster(), + aReadDate( DateTime::EMPTY ), /*N*/ aMaPag(1024,32,32), /*N*/ aPages(1024,32,32) /*N*/ { @@ -1659,7 +1663,7 @@ using namespace ::com::sun::star; /*N*/ SvStream& operator>>(SvStream& rIn, SdrModel& rMod) /*N*/ { /*N*/ if (rIn.GetError()!=0) return rIn; -/*N*/ rMod.aReadDate=DateTime(); // Zeitpunkt des Lesens merken +/*N*/ rMod.aReadDate=DateTime( DateTime::SYSTEM ); // Zeitpunkt des Lesens merken /*N*/ rMod.nProgressOfs=rIn.Tell(); /*N*/ rMod.nProgressMax=0xFFFFFFFF; // Vorlaeufiger Wert /*N*/ rMod.DoProgress(0); diff --git a/binfilter/bf_svx/source/svdraw/svx_svdogrp.cxx b/binfilter/bf_svx/source/svdraw/svx_svdogrp.cxx index 36ed78207..31c27786f 100644 --- a/binfilter/bf_svx/source/svdraw/svx_svdogrp.cxx +++ b/binfilter/bf_svx/source/svdraw/svx_svdogrp.cxx @@ -62,6 +62,7 @@ namespace binfilter { /*N*/ ImpSdrObjGroupLinkUserData::ImpSdrObjGroupLinkUserData(SdrObject* pObj1): /*N*/ SdrObjUserData(SdrInventor,SDRUSERDATA_OBJGROUPLINK,0), /*N*/ pObj(pObj1), + aFileDate0( DateTime::EMPTY ), /*N*/ nDrehWink0(0), /*N*/ nShearWink0(0), /*N*/ pLink(NULL), diff --git a/binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx b/binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx index 927317d17..530b98a7e 100644 --- a/binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx +++ b/binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx @@ -138,6 +138,7 @@ namespace binfilter { /*N*/ ImpSdrObjTextLinkUserData::ImpSdrObjTextLinkUserData(SdrTextObj* pObj1): /*N*/ SdrObjUserData(SdrInventor,SDRUSERDATA_OBJTEXTLINK,0), /*N*/ pObj(pObj1), + aFileDate0( DateTime::EMPTY ), /*N*/ pLink(NULL), /*N*/ eCharSet(RTL_TEXTENCODING_DONTKNOW) /*N*/ { diff --git a/binfilter/bf_sw/source/core/doc/sw_docnum.cxx b/binfilter/bf_sw/source/core/doc/sw_docnum.cxx index c7b87932d..6b26975c9 100644 --- a/binfilter/bf_sw/source/core/doc/sw_docnum.cxx +++ b/binfilter/bf_sw/source/core/doc/sw_docnum.cxx @@ -536,8 +536,8 @@ namespace binfilter { /*N*/ String aName; /*N*/ if( bAutoNum ) /*N*/ { -/*N*/ long n = Time().GetTime(); -/*N*/ n += Date().GetDate(); +/*N*/ long n = Time( Time::SYSTEM ).GetTime(); +/*N*/ n += Date( Date::SYSTEM ).GetDate(); /*N*/ aName = String::CreateFromInt32( n ); /*N*/ if( pChkStr && !pChkStr->Len() ) /*N*/ pChkStr = 0; diff --git a/binfilter/bf_sw/source/core/fields/sw_flddat.cxx b/binfilter/bf_sw/source/core/fields/sw_flddat.cxx index 681159d00..73a2a3f20 100644 --- a/binfilter/bf_sw/source/core/fields/sw_flddat.cxx +++ b/binfilter/bf_sw/source/core/fields/sw_flddat.cxx @@ -72,7 +72,7 @@ using namespace ::com::sun::star; /*N*/ } /*N*/ if (IsFixed()) /*N*/ { -/*N*/ DateTime aDateTime; +/*N*/ DateTime aDateTime( DateTime::SYSTEM ); /*N*/ SetDateTime(aDateTime); /*N*/ } /*N*/ } @@ -87,7 +87,7 @@ using namespace ::com::sun::star; /*N*/ /*N*/ if (!(IsFixed())) /*N*/ { -/*N*/ DateTime aDateTime; +/*N*/ DateTime aDateTime( DateTime::SYSTEM ); /*N*/ fVal = GetDateTime(GetDoc(), aDateTime); /*N*/ } /*N*/ else @@ -167,7 +167,7 @@ using namespace ::com::sun::star; /*N*/ if (IsFixed()) /*N*/ return SwValueField::GetValue(); /*N*/ else -/*N*/ return GetDateTime(GetDoc(), DateTime()); +/*N*/ return GetDateTime(GetDoc(), DateTime( DateTime::SYSTEM )); /*N*/ } /*-------------------------------------------------------------------- @@ -278,7 +278,7 @@ using namespace ::com::sun::star; /*N*/ util::DateTime aDateTimeValue; /*N*/ if(!(rVal >>= aDateTimeValue)) /*N*/ return FALSE; -/*N*/ DateTime aDateTime; +/*N*/ DateTime aDateTime( DateTime::EMPTY ); /*N*/ aDateTime.Set100Sec(aDateTimeValue.HundredthSeconds); /*N*/ aDateTime.SetSec(aDateTimeValue.Seconds); /*N*/ aDateTime.SetMin(aDateTimeValue.Minutes); diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx index 1cf36c1bc..414a80d4d 100644 --- a/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx +++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx @@ -1000,7 +1000,7 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo ) /*N*/ INT32 nVal; /*N*/ *rIo.pStrm >> nVal; /*N*/ SwDateTimeField* pFld = new SwDateTimeField( (SwDateTimeFieldType*)pType, DATEFLD|FIXEDFLD ); -/*N*/ Time aTmpTime; +/*N*/ Time aTmpTime( Time::SYSTEM ); /*N*/ Date aTmpDate(nVal); /*N*/ DateTime aDT(aTmpDate, aTmpTime); /*N*/ pFld->SetDateTime( aDT ); @@ -1013,7 +1013,7 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo ) INT32 nVal; *rIo.pStrm >> nVal; SwDateTimeField* pFld = new SwDateTimeField( (SwDateTimeFieldType*)pType, TIMEFLD|FIXEDFLD ); - Date aTmpDate; + Date aTmpDate( Date::SYSTEM ); DateTime aDT(aTmpDate, Time(nVal)); pFld->SetDateTime( aDT ); return pFld; @@ -1770,7 +1770,7 @@ static Sw3InFieldFn aInFieldFnTbl[] = /*?*/ switch( nWhich ) /*?*/ { /*?*/ case RES_DATETIMEFLD: -/*?*/ ((SwDateTimeField*)pFld)->SetDateTime( DateTime() ); +/*?*/ ((SwDateTimeField*)pFld)->SetDateTime( DateTime( DateTime::SYSTEM ) ); /*?*/ break; /*?*/ /*?*/ case RES_EXTUSERFLD: diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx index 96e7c29b2..6548a8564 100644 --- a/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx +++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx @@ -215,8 +215,8 @@ public: /*N*/ void Sw3IoImp::Reset() /*N*/ { -/*N*/ Date aDate; -/*N*/ Time aTime; +/*N*/ Date aDate( Date::SYSTEM ); +/*N*/ Time aTime( Time::SYSTEM ); /*N*/ // die folgenden beiden Felder werden auch zum Passwort-Check benutzt /*N*/ nDate = aDate.GetDate(); /*N*/ nTime = aTime.GetTime(); diff --git a/binfilter/bf_sw/source/core/swg/sw_rdflds.cxx b/binfilter/bf_sw/source/core/swg/sw_rdflds.cxx index ce0df591e..9912504f3 100644 --- a/binfilter/bf_sw/source/core/swg/sw_rdflds.cxx +++ b/binfilter/bf_sw/source/core/swg/sw_rdflds.cxx @@ -336,7 +336,7 @@ static SwField* In_SwFixDateField( SwSwgReader& rPar, SwDateTimeFieldType* pType rPar.r >> nVal; rPar.r.long3(); SwDateTimeField* pFld = new SwDateTimeField( pType, DATEFLD|FIXEDFLD ); - Time aTmpTime; + Time aTmpTime( Time::SYSTEM ); Date aTmpDate(nVal); DateTime aDT(aTmpDate, aTmpTime); pFld->SetDateTime( aDT ); @@ -350,7 +350,7 @@ static SwField* In_SwFixTimeField( SwSwgReader& rPar, SwDateTimeFieldType* pType rPar.r >> nVal; rPar.r.long3(); SwDateTimeField* pFld = new SwDateTimeField( pType ); - Date aTmpDate; + Date aTmpDate( Date::SYSTEM ); DateTime aDT(aTmpDate, Time(nVal)); pFld->SetDateTime( aDT ); return pFld; diff --git a/binfilter/bf_sw/source/core/unocore/sw_unofield.cxx b/binfilter/bf_sw/source/core/unocore/sw_unofield.cxx index 65bc01064..fa5285463 100644 --- a/binfilter/bf_sw/source/core/unocore/sw_unofield.cxx +++ b/binfilter/bf_sw/source/core/unocore/sw_unofield.cxx @@ -1037,6 +1037,7 @@ struct SwFieldProperties_Impl sal_Bool bBool4; SwFieldProperties_Impl(): + aDate( Date::SYSTEM ), fDouble(0.), pDateTime(0), nSubType(0), @@ -2023,7 +2024,7 @@ void SwXTextField::update( ) throw (RuntimeException) switch(pFld->Which()) { case RES_DATETIMEFLD: - ((SwDateTimeField*)pFld)->SetDateTime( ::DateTime() ); + ((SwDateTimeField*)pFld)->SetDateTime( ::DateTime( ::DateTime::SYSTEM ) ); break; case RES_EXTUSERFLD: diff --git a/binfilter/bf_sw/source/filter/basflt/sw_shellio.cxx b/binfilter/bf_sw/source/filter/basflt/sw_shellio.cxx index 0541c641c..6ca07034c 100644 --- a/binfilter/bf_sw/source/filter/basflt/sw_shellio.cxx +++ b/binfilter/bf_sw/source/filter/basflt/sw_shellio.cxx @@ -249,6 +249,9 @@ using namespace ::com::sun::star; } /*N*/ Reader::Reader() /*N*/ : pTemplate(0) + , aDStamp( Date::EMPTY ) + , aTStamp( Time::EMPTY ) + , aChkDateTime( DateTime::EMPTY ) /*N*/ , pStrm(0) /*N*/ , pStg(0) /*N*/ , pMedium(0) @@ -283,15 +286,15 @@ using namespace ::com::sun::star; /*N*/ else /*N*/ { /*?*/ INetURLObject aTDir( ::binfilter::StaticBaseUrl::SmartRelToAbs(aTemplateNm) ); -/*?*/ DateTime aCurrDateTime; +/*?*/ DateTime aCurrDateTime( DateTime::SYSTEM ); /*?*/ BOOL bLoad = FALSE; /*?*/ /*?*/ // Wenn das Template schon mal geladen wurde, nur einmal pro /*?*/ // Minute nachschauen, ob es geaendert wurde. /*?*/ if( !pTemplate || aCurrDateTime >= aChkDateTime ) /*?*/ { -/*?*/ Date aTstDate; -/*?*/ Time aTstTime; +/*?*/ Date aTstDate( Date::EMPTY ); +/*?*/ Time aTstTime( Time::EMPTY ); /*?*/ if( ::binfilter::GetModifiedDateTimeOfFile( /*?*/ aTDir.GetMainURL( INetURLObject::NO_DECODE ), /*?*/ &aTstDate, &aTstTime ) && diff --git a/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx b/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx index 99b2e9de3..d1c867f89 100644 --- a/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx +++ b/binfilter/bf_sw/source/filter/sw6/sw_sw6par.cxx @@ -4314,7 +4314,7 @@ BOOL Sw6Layout::InsertNote(SwDoc &rDoc,SwPaM &rPaM,USHORT nNote, BOOL bFuss) (aSta.cFrst!=NewPage)); if (!bErrs && aNot.Len()) { - Date aDate; + Date aDate( Date::SYSTEM ); String aLeer; SwPostItField aFld((SwPostItFieldType*) diff --git a/binfilter/bf_sw/source/filter/xml/sw_XMLRedlineImportHelper.cxx b/binfilter/bf_sw/source/filter/xml/sw_XMLRedlineImportHelper.cxx index 972abd6ae..a8571306b 100644 --- a/binfilter/bf_sw/source/filter/xml/sw_XMLRedlineImportHelper.cxx +++ b/binfilter/bf_sw/source/filter/xml/sw_XMLRedlineImportHelper.cxx @@ -681,7 +681,7 @@ SwRedlineData* XMLRedlineImportHelper::ConvertRedline( pDoc->InsertRedlineAuthor( pRedlineInfo->sAuthor ); // 2) util::DateTime -> DateTime - DateTime aDT; + DateTime aDT( DateTime::EMPTY ); aDT.SetYear( pRedlineInfo->aDateTime.Year ); aDT.SetMonth( pRedlineInfo->aDateTime.Month ); aDT.SetDay( pRedlineInfo->aDateTime.Day ); diff --git a/binfilter/bf_xmloff/source/forms/xmloff_propertyexport.cxx b/binfilter/bf_xmloff/source/forms/xmloff_propertyexport.cxx index 454657ae6..6f0ce7a16 100644 --- a/binfilter/bf_xmloff/source/forms/xmloff_propertyexport.cxx +++ b/binfilter/bf_xmloff/source/forms/xmloff_propertyexport.cxx @@ -607,7 +607,7 @@ namespace xmloff ::com::sun::star::util::DateTime aDateTime; if (_rValue >>= aDate) { - Date aToolsDate; + Date aToolsDate( Date::EMPTY ); ::utl::typeConvert(aDate, aToolsDate); fValue = aToolsDate.GetDate(); } @@ -618,7 +618,7 @@ namespace xmloff } else if (_rValue >>= aDateTime) { - DateTime aToolsDateTime; + DateTime aToolsDateTime( DateTime::EMPTY ); ::utl::typeConvert(aDateTime, aToolsDateTime); // the time part (the digits behind the comma) fValue = ((aDateTime.Hours * 60 + aDateTime.Minutes) * 60 + aDateTime.Seconds) * 100 + aDateTime.HundredthSeconds; diff --git a/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx b/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx index b53c8e875..1505eea5a 100644 --- a/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx +++ b/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx @@ -408,7 +408,7 @@ void SfxXMLMetaExport::Export() sal_Int32 nSecs = 0; if ( aPropVal >>= nSecs ) { - Time aTime; + Time aTime( Time::EMPTY ); aTime.MakeTimeFromMS( nSecs * 1000 ); ::rtl::OUString sReloadTime = GetISODurationString( aTime ); diff --git a/binfilter/bf_xmloff/source/meta/xmloff_xmlmetai.cxx b/binfilter/bf_xmloff/source/meta/xmloff_xmlmetai.cxx index 0a6004ff5..ebd07ad84 100644 --- a/binfilter/bf_xmloff/source/meta/xmloff_xmlmetai.cxx +++ b/binfilter/bf_xmloff/source/meta/xmloff_xmlmetai.cxx @@ -469,7 +469,7 @@ SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rInImport, sal_ break; case XML_TOK_META_RELOAD_DELAY: { - Time aTime; + Time aTime( Time::EMPTY ); if ( ParseISODurationString( sValue, aTime ) ) { sal_Int32 nSecs = aTime.GetMSFromTime() / 1000; @@ -568,7 +568,7 @@ void SfxXMLMetaElementContext::EndElement() uno::Any aPropAny; util::DateTime aDateTime; - Time aTime; + Time aTime( Time::EMPTY ); sal_Int32 nValue; switch ( nElementType ) { diff --git a/binfilter/inc/bf_sc/chgviset.hxx b/binfilter/inc/bf_sc/chgviset.hxx index 35130ea1f..d10bdc5ac 100644 --- a/binfilter/inc/bf_sc/chgviset.hxx +++ b/binfilter/inc/bf_sc/chgviset.hxx @@ -70,6 +70,10 @@ private: public: ScChangeViewSettings() + : + aFirstDateTime( DateTime::EMPTY ), + aLastDateTime( DateTime::EMPTY ) + { pCommentSearcher=NULL; bIsDate=FALSE; |