summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-07-18 19:43:05 +0200
committerEike Rathke <erack@redhat.com>2017-07-18 19:43:35 +0200
commit038063a352f59bad1ecdeeb63016e37f6945a420 (patch)
treeb64769d58f9bc001dbf235f420038ba436344a33 /cui
parent71c3113e9dbf61693fd947262370cc61cdf31ac7 (diff)
Change nonsense non-const Date* GetNullDate() to const Date&
* first, a non-const Date* may leave the impression that one could change the NullDate through the pointer, which is only partly successful; luckily no one did that * second, there is always a NullDate so checking for nullptr is superfluous * third, the pointer was dereferenced (maybe after a check) everywhere to obtain the NullDate, luckily.. Change-Id: I3c3a788ba0336596ac6bde4c96e77a0cdb7a4a95
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optupdt.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index d229fef9f242..fef9e395d7f9 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -145,10 +145,10 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
LanguageType eUILang = Application::GetSettings().GetUILanguageTag().getLanguageType();
SvNumberFormatter *pNumberFormatter = new SvNumberFormatter( ::comphelper::getProcessComponentContext(), eUILang );
Color* pColor = nullptr;
- Date* pNullDate = pNumberFormatter->GetNullDate();
+ const Date& rNullDate = pNumberFormatter->GetNullDate();
sal_uInt32 nFormat = pNumberFormatter->GetStandardFormat( css::util::NumberFormat::DATE, eUILang );
- pNumberFormatter->GetOutputString( aDate - *pNullDate, nFormat, aDateStr, &pColor );
+ pNumberFormatter->GetOutputString( aDate - rNullDate, nFormat, aDateStr, &pColor );
nFormat = pNumberFormatter->GetStandardFormat( css::util::NumberFormat::TIME, eUILang );
pNumberFormatter->GetOutputString( aTime.GetTimeInDays(), nFormat, aTimeStr, &pColor );