diff options
author | Eike Rathke <erack@redhat.com> | 2017-07-18 19:43:05 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-07-18 19:43:35 +0200 |
commit | 038063a352f59bad1ecdeeb63016e37f6945a420 (patch) | |
tree | b64769d58f9bc001dbf235f420038ba436344a33 /extensions | |
parent | 71c3113e9dbf61693fd947262370cc61cdf31ac7 (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 'extensions')
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index dc6e6d492b72..8381a7abad88 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -281,7 +281,7 @@ namespace pcr ::DateTime aDateTime( ::DateTime::EMPTY ); ::utl::typeConvert( aUNODateTime, aDateTime ); - double nValue = aDateTime - ::DateTime( *getTypedControlWindow()->GetFormatter()->GetNullDate() ); + double nValue = aDateTime - ::DateTime( getTypedControlWindow()->GetFormatter()->GetNullDate() ); getTypedControlWindow()->SetValue( nValue ); } } @@ -294,7 +294,7 @@ namespace pcr { double nValue = getTypedControlWindow()->GetValue(); - ::DateTime aDateTime( *getTypedControlWindow()->GetFormatter()->GetNullDate() ); + ::DateTime aDateTime( getTypedControlWindow()->GetFormatter()->GetNullDate() ); // add the "days" part double nDays = floor( nValue ); |