diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/conditio.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/dbdocutl.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/dpgroup.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/dputil.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/global2.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table4.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 32 | ||||
-rw-r--r-- | sc/source/core/tool/interpr8.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/excrecds.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/excel/xlroot.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/orcus/interface.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh8.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun6.cxx | 14 |
17 files changed, 48 insertions, 48 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 2256947ed7b7..5c5c3125851c 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1619,11 +1619,11 @@ bool ScCondDateFormatEntry::IsValid( const ScAddress& rPos ) const const Date& rActDate = *mpCache; SvNumberFormatter* pFormatter = mpDoc->GetFormatTable(); - long nCurrentDate = rActDate - *(pFormatter->GetNullDate()); + long nCurrentDate = rActDate - pFormatter->GetNullDate(); double nVal = rCell.getValue(); long nCellDate = (long) ::rtl::math::approxFloor(nVal); - Date aCellDate = *(pFormatter->GetNullDate()); + Date aCellDate = pFormatter->GetNullDate(); aCellDate += (long) ::rtl::math::approxFloor(nVal); switch(meType) diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx index 4f8f2bba8f45..0dc3d4f8b014 100644 --- a/sc/source/core/data/dbdocutl.cxx +++ b/sc/source/core/data/dbdocutl.cxx @@ -95,7 +95,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB SvNumberFormatter* pFormTable = pDoc->GetFormatTable(); nFormatIndex = pFormTable->GetStandardFormat( css::util::NumberFormat::DATE, ScGlobal::eLnge ); - nVal = Date( aDate ) - *pFormTable->GetNullDate(); + nVal = Date( aDate ) - pFormTable->GetNullDate(); } bValue = true; } @@ -125,7 +125,7 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB util::DateTime aStamp = xRow->getTimestamp(nRowPos); nVal = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) - - *pFormTable->GetNullDate() ) + + pFormTable->GetNullDate() ) + aStamp.Hours / static_cast<double>(::tools::Time::hourPerDay) + aStamp.Minutes / static_cast<double>(::tools::Time::minutePerDay) + aStamp.Seconds / static_cast<double>(::tools::Time::secondPerDay) + diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx index 97c87bff236f..1c2dcaed5164 100644 --- a/sc/source/core/data/dpgroup.cxx +++ b/sc/source/core/data/dpgroup.cxx @@ -694,7 +694,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio // grouped by dates. aCri.mpFilter.reset( new ScDPGroupDateFilter( - aMatchValues, *pDoc->GetFormatTable()->GetNullDate(), *pNumInfo)); + aMatchValues, pDoc->GetFormatTable()->GetNullDate(), *pNumInfo)); } else { @@ -727,7 +727,7 @@ void ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPFilteredCache::Criterio aCri.mnFieldIndex = nSrcDim; // use the source dimension, not the group dimension. aCri.mpFilter.reset( new ScDPGroupDateFilter( - aMatchValues, *pDoc->GetFormatTable()->GetNullDate(), *pNumInfo)); + aMatchValues, pDoc->GetFormatTable()->GetNullDate(), *pNumInfo)); aNewCriteria.push_back(aCri); } diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 2ae64ecf64e3..3e07c82eddf1 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -3224,7 +3224,7 @@ const ScDPCache* ScDPCollection::DBCaches::getCache( ::std::unique_ptr<ScDPCache> pCache(new ScDPCache(mpDoc)); SvNumberFormatter aFormat( comphelper::getProcessComponentContext(), ScGlobal::eLnge); - DBConnector aDB(*pCache, xRowSet, *aFormat.GetNullDate()); + DBConnector aDB(*pCache, xRowSet, aFormat.GetNullDate()); if (!aDB.isValid()) return nullptr; @@ -3327,7 +3327,7 @@ void ScDPCollection::DBCaches::updateCache( } SvNumberFormatter aFormat( comphelper::getProcessComponentContext(), ScGlobal::eLnge); - DBConnector aDB(rCache, xRowSet, *aFormat.GetNullDate()); + DBConnector aDB(rCache, xRowSet, aFormat.GetNullDate()); if (!aDB.isValid()) return; diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx index 440ac8d4e0bc..5bff6bb4d927 100644 --- a/sc/source/core/data/dputil.cxx +++ b/sc/source/core/data/dputil.cxx @@ -122,7 +122,7 @@ OUString ScDPUtil::getDateGroupName( { Date aDate(1, 1, SC_DP_LEAPYEAR); aDate += (nValue - 1); // nValue is 1-based - Date aNullDate = *pFormatter->GetNullDate(); + Date aNullDate = pFormatter->GetNullDate(); long nDays = aDate - aNullDate; const sal_uInt32 nFormat = pFormatter->GetFormatIndex(NF_DATE_SYS_DDMMM, ScGlobal::eLnge); @@ -334,7 +334,7 @@ sal_Int32 ScDPUtil::getDatePartValue( } else { - Date aDate = *(pFormatter->GetNullDate()); + Date aDate = pFormatter->GetNullDate(); aDate += (long)::rtl::math::approxFloor(fValue); switch ( nDatePart ) diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx index 1ef86f537b23..ab50f5aae7a4 100644 --- a/sc/source/core/data/global2.cxx +++ b/sc/source/core/data/global2.cxx @@ -590,7 +590,7 @@ Label_fallback_to_unambiguous: else { if (pFormatter) - fValue = aDate - *(pFormatter->GetNullDate()); + fValue = aDate - pFormatter->GetNullDate(); else { SAL_WARN("sc.core","ScGlobal::ConvertStringToValue - fixed null date"); diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 324eb2201a93..77d51762f3ef 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -267,7 +267,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, if (nCount > 1) { double nVal; - Date aNullDate = *pDocument->GetFormatTable()->GetNullDate(); + Date aNullDate = pDocument->GetFormatTable()->GetNullDate(); Date aDate1 = aNullDate; nVal = aFirstCell.mfValue; aDate1 += (long)nVal; @@ -1077,7 +1077,7 @@ void ScTable::IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillD const sal_uInt16 nMaxYear = 9956; long nInc = (long) nStep; // upper/lower limits ? - Date aNullDate = *pDocument->GetFormatTable()->GetNullDate(); + Date aNullDate = pDocument->GetFormatTable()->GetNullDate(); Date aDate = aNullDate; aDate += (long)rVal; switch (eCmd) diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 75a1d6b2debe..2eefbc3093c2 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -94,7 +94,7 @@ double ScInterpreter::GetDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int1 if (!bStrict) aDate += nDay - 1; if (aDate.IsValidAndGregorian()) - return (double) (aDate - *(pFormatter->GetNullDate())); + return (double) (aDate - pFormatter->GetNullDate()); else { SetError(FormulaError::NoValue); @@ -106,7 +106,7 @@ void ScInterpreter::ScGetActDate() { nFuncFmtType = css::util::NumberFormat::DATE; Date aActDate( Date::SYSTEM ); - long nDiff = aActDate - *(pFormatter->GetNullDate()); + long nDiff = aActDate - pFormatter->GetNullDate(); PushDouble((double) nDiff); } @@ -114,7 +114,7 @@ void ScInterpreter::ScGetActTime() { nFuncFmtType = css::util::NumberFormat::DATETIME; Date aActDate( Date::SYSTEM ); - long nDiff = aActDate - *(pFormatter->GetNullDate()); + long nDiff = aActDate - pFormatter->GetNullDate(); tools::Time aActTime( tools::Time::SYSTEM ); double nTime = aActTime.GetHour() / static_cast<double>(::tools::Time::hourPerDay) + aActTime.GetMin() / static_cast<double>(::tools::Time::minutePerDay) + @@ -125,21 +125,21 @@ void ScInterpreter::ScGetActTime() void ScInterpreter::ScGetYear() { - Date aDate = *(pFormatter->GetNullDate()); + Date aDate = pFormatter->GetNullDate(); aDate += (long) GetInt32(); PushDouble( (double) aDate.GetYear() ); } void ScInterpreter::ScGetMonth() { - Date aDate = *(pFormatter->GetNullDate()); + Date aDate = pFormatter->GetNullDate(); aDate += (long) GetInt32(); PushDouble( (double) aDate.GetMonth() ); } void ScInterpreter::ScGetDay() { - Date aDate = *(pFormatter->GetNullDate()); + Date aDate = pFormatter->GetNullDate(); aDate += (long) GetInt32(); PushDouble((double) aDate.GetDay()); } @@ -199,7 +199,7 @@ void ScInterpreter::ScGetDayOfWeek() else nFlag = 1; - Date aDate = *(pFormatter->GetNullDate()); + Date aDate = pFormatter->GetNullDate(); aDate += (long) GetInt32(); int nVal = (int) aDate.GetDayOfWeek(); // MONDAY = 0 switch (nFlag) @@ -241,7 +241,7 @@ void ScInterpreter::ScWeeknumOOo() { sal_Int16 nFlag = GetInt16(); - Date aDate = *(pFormatter->GetNullDate()); + Date aDate = pFormatter->GetNullDate(); aDate += (long) GetInt32(); PushInt( (int) aDate.GetWeekOfYear( nFlag == 1 ? SUNDAY : MONDAY )); } @@ -258,7 +258,7 @@ void ScInterpreter::ScGetWeekOfYear() else nFlag = GetInt16(); - Date aDate = *(pFormatter->GetNullDate()); + Date aDate = pFormatter->GetNullDate(); aDate += (long) GetInt32(); sal_Int32 nMinimumNumberOfDaysInWeek; @@ -301,7 +301,7 @@ void ScInterpreter::ScGetIsoWeekOfYear() { if ( MustHaveParamCount( GetByte(), 1 ) ) { - Date aDate = *(pFormatter->GetNullDate()); + Date aDate = pFormatter->GetNullDate(); aDate += (long) GetInt32(); PushInt( (int) aDate.GetWeekOfYear() ); } @@ -513,7 +513,7 @@ void ScInterpreter::ScNetWorkdays( bool bOOXML_Version ) { vector<double> nSortArray; bool bWeekendMask[ 7 ]; - Date aNullDate = *( pFormatter->GetNullDate() ); + Date aNullDate = pFormatter->GetNullDate(); sal_uInt32 nNullDate = Date::DateToDays( aNullDate.GetDay(), aNullDate.GetMonth(), aNullDate.GetYear() ); FormulaError nErr; if ( bOOXML_Version ) @@ -574,7 +574,7 @@ void ScInterpreter::ScWorkday_MS() nFuncFmtType = css::util::NumberFormat::DATE; vector<double> nSortArray; bool bWeekendMask[ 7 ]; - Date aNullDate = *( pFormatter->GetNullDate() ); + Date aNullDate = pFormatter->GetNullDate(); sal_uInt32 nNullDate = Date::DateToDays( aNullDate.GetDay(), aNullDate.GetMonth(), aNullDate.GetYear() ); FormulaError nErr = GetWeekendAndHolidayMasks_MS( nParamCount, nNullDate, nSortArray, bWeekendMask, true ); @@ -736,9 +736,9 @@ void ScInterpreter::ScGetDiffDate360() } else fSign = 1.0; - Date aDate1 = *(pFormatter->GetNullDate()); + Date aDate1 = pFormatter->GetNullDate(); aDate1 += (long) ::rtl::math::approxFloor(nDate1); - Date aDate2 = *(pFormatter->GetNullDate()); + Date aDate2 = pFormatter->GetNullDate(); aDate2 += (long) ::rtl::math::approxFloor(nDate2); if (aDate1.GetDay() == 31) aDate1 -= (sal_uLong) 1; @@ -810,12 +810,12 @@ void ScInterpreter::ScGetDateDif() // split dates in day, month, year for use with formats other than "d" sal_uInt16 d1, m1, d2, m2; sal_Int16 y1, y2; - Date aDate1( *( pFormatter->GetNullDate())); + Date aDate1( pFormatter->GetNullDate()); aDate1 += nDate1; y1 = aDate1.GetYear(); m1 = aDate1.GetMonth(); d1 = aDate1.GetDay(); - Date aDate2( *( pFormatter->GetNullDate())); + Date aDate2( pFormatter->GetNullDate()); aDate2 += nDate2; y2 = aDate2.GetYear(); m2 = aDate2.GetMonth(); diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx index b661a220ec27..96da08bb6e58 100644 --- a/sc/source/core/tool/interpr8.cxx +++ b/sc/source/core/tool/interpr8.cxx @@ -192,7 +192,7 @@ bool ScETSForecastCalculation::PreprocessDataRange( const ScMatrixRef& rMatX, co // Method: assume there is an month interval and verify. // If month interval is used, replace maRange.X with month values // for ease of calculations. - Date aNullDate = *( mpFormatter->GetNullDate() ); + Date aNullDate = mpFormatter->GetNullDate(); Date aDate = aNullDate + static_cast< long >( maRange[ 0 ].X ); mnMonthDay = aDate.GetDay(); for ( SCSIZE i = 1; i < mnCount && mnMonthDay; i++ ) @@ -812,7 +812,7 @@ void ScETSForecastCalculation::refill() double ScETSForecastCalculation::convertXtoMonths( double x ) { - Date aNullDate = *( mpFormatter->GetNullDate() ); + Date aNullDate = mpFormatter->GetNullDate(); Date aDate = aNullDate + static_cast< long >( x ); int nYear = aDate.GetYear(); int nMonth = aDate.GetMonth(); diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index fd0ce5977ddb..9b2c67cbbb85 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -286,9 +286,9 @@ const sal_uInt8* ExcDummy_041::GetData() const Exc1904::Exc1904( ScDocument& rDoc ) { - Date* pDate = rDoc.GetFormatTable()->GetNullDate(); - bVal = pDate && (*pDate == Date( 1, 1, 1904 )); - bDateCompatibility = pDate && !( *pDate == Date( 30, 12, 1899 )); + const Date& rDate = rDoc.GetFormatTable()->GetNullDate(); + bVal = (rDate == Date( 1, 1, 1904 )); + bDateCompatibility = !(rDate == Date( 30, 12, 1899 )); } sal_uInt16 Exc1904::GetNum() const diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index 262f40b409ba..72b1450a5084 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -316,7 +316,7 @@ SvNumberFormatter& XclRoot::GetFormatter() const DateTime XclRoot::GetNullDate() const { - return *GetFormatter().GetNullDate(); + return GetFormatter().GetNullDate(); } sal_uInt16 XclRoot::GetBaseYear() const diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index 35e9ffacfafa..c56f1c67cb80 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -529,7 +529,7 @@ void ScOrcusSheet::set_date_time( sal_uInt32 nSec = floor(second); sal_uInt32 nNanoSec = (second - nSec) * ::tools::Time::nanoSecPerSec; tools::Time aTime(hour, minute, nSec, nNanoSec); - Date aNullDate(*pFormatter->GetNullDate()); + Date aNullDate(pFormatter->GetNullDate()); long nDateDiff = aDate - aNullDate; double fTime = diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index e877e38097c0..86f8a2d446cf 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1434,7 +1434,7 @@ void ScCheckListMenuWindow::addDateMember(const OUString& rsName, double nVal, b SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); // Convert the numeric date value to a date object. - Date aDate = *(pFormatter->GetNullDate()); + Date aDate = pFormatter->GetNullDate(); aDate += static_cast<long>(rtl::math::approxFloor(nVal)); sal_Int16 nYear = aDate.GetYear(); diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 5a676d24d029..2cdcbbfe96c6 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -966,7 +966,7 @@ ErrCode ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding } else { - Date aDate = *(pNumFmt->GetNullDate()); // tools date + Date aDate = pNumFmt->GetNullDate(); // tools date aDate += (long)fVal; //! approxfloor? xRowUpdate->updateDate( nCol+1, aDate.GetUNODate() ); } diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 76f6ed8a9803..f992c18061c0 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1162,7 +1162,7 @@ static bool lcl_PutString( pCalendar->setValue( i18n::CalendarFieldIndex::MILLISECOND, nMilli ); if ( pCalendar->isValid() ) { - double fDiff = DateTime(*pDocFormatter->GetNullDate()) - + double fDiff = DateTime(pDocFormatter->GetNullDate()) - pCalendar->getEpochStart(); // #i14974# must use getLocalDateTime to get the same // date values as set above diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index ff173fda39fe..99e6ba02476a 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -689,7 +689,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) } if(eFillCmd==FILL_DATE) { - Date aNullDate = *pDoc->GetFormatTable()->GetNullDate(); + Date aNullDate = pDoc->GetFormatTable()->GetNullDate(); Date aStartDate = aNullDate; aStartDate+= (long)fStartVal; Date aEndDate = aNullDate; @@ -1119,7 +1119,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE( pFact, "ScAbstractFactory create fail!" ); - Date aNullDate( *GetViewData()->GetDocument()->GetFormatTable()->GetNullDate() ); + Date aNullDate( GetViewData()->GetDocument()->GetFormatTable()->GetNullDate() ); ScopedVclPtr<AbstractScDPDateGroupDlg> pDlg( pFact->CreateScDPDateGroupDlg( pTabViewShell->GetDialogParent(), aNumInfo, nParts, aNullDate ) ); diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx index 97ca1bdb4f23..9816afda8d20 100644 --- a/sc/source/ui/view/viewfun6.cxx +++ b/sc/source/ui/view/viewfun6.cxx @@ -280,7 +280,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) case css::util::NumberFormat::DATE: { Date aActDate( Date::SYSTEM ); - fVal = aActDate - *pFormatter->GetNullDate(); + fVal = aActDate - pFormatter->GetNullDate(); if (nCurNumFormatType == css::util::NumberFormat::DATE) nFormat = nCurNumFormat; } @@ -300,7 +300,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) case css::util::NumberFormat::DATETIME: { DateTime aActDateTime( DateTime::SYSTEM ); - fVal = aActDateTime - DateTime( *pFormatter->GetNullDate()); + fVal = aActDateTime - DateTime( pFormatter->GetNullDate()); if (nCurNumFormatType == css::util::NumberFormat::DATETIME) nFormat = nCurNumFormat; } @@ -353,7 +353,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) // date, which otherwise would only be possible by // applying a date format. double fDate = rtl::math::approxFloor( fCell); - if (fDate == (Date( Date::SYSTEM) - *pFormatter->GetNullDate())) + if (fDate == (Date( Date::SYSTEM) - pFormatter->GetNullDate())) bForceReqFmt = true; } break; @@ -379,7 +379,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) // zero and date is current date, else force time only. double fDate = rtl::math::approxFloor( fCell); double fTime = fCell - fDate; - if (fTime == 0.0 && fDate == (Date( Date::SYSTEM) - *pFormatter->GetNullDate())) + if (fTime == 0.0 && fDate == (Date( Date::SYSTEM) - pFormatter->GetNullDate())) nReqFmt = css::util::NumberFormat::DATETIME; else bForceReqFmt = true; @@ -400,7 +400,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) case css::util::NumberFormat::DATE: { Date aActDate( Date::SYSTEM ); - fVal = aActDate - *pFormatter->GetNullDate(); + fVal = aActDate - pFormatter->GetNullDate(); } break; case css::util::NumberFormat::TIME: @@ -423,7 +423,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) { double fTime = fCell - rtl::math::approxFloor( fCell); Date aActDate( Date::SYSTEM ); - fVal = (aActDate - *pFormatter->GetNullDate()) + fTime; + fVal = (aActDate - pFormatter->GetNullDate()) + fTime; } break; default: @@ -432,7 +432,7 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) // Converting the null date to DateTime forces the // correct operator-() to be used, resulting in a // fractional date+time instead of only date value. - fVal = aActDateTime - DateTime( *pFormatter->GetNullDate()); + fVal = aActDateTime - DateTime( pFormatter->GetNullDate()); } } break; |