[Libreoffice] Class Time and its funny ideas about time

Thorsten Behrens thb at documentfoundation.org
Thu Aug 11 07:55:09 PDT 2011


Lubos Lunak wrote:
>  As much as I don't like it, I can possibly see at least some reason for time 
> having 25 hours, but 10 seconds without 20 seconds being 10 seconds (and 
> there is actually explicit code to ensure that)?
> 
>  Does somebody know why the Time class does either of these and how much would 
> break if I fixed these two to be sane?
> 
Reasons for that buried in the past I guess, and maybe not too
useful to try to answer - for the second question, GetHour() should
be easy to grep for, and operator- has at least client code in
editeng/source/misc/svxacorr.cxx, sfx2/source/doc/objcont.cxx, and
automation/source/server/statemnt.cxx

It's unclear to me, how valuable it is to fix-up tools/time.hxx &
all client code, vs. to use e.g.
http://www.boost.org/doc/libs/1_47_0/doc/html/chrono.html when you
need a sane implementation in new code ...

At the very least, documenting your findings in tools.hxx of course
would be great.

HTH,

-- Thorsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110811/73e7e2d1/attachment.pgp>


More information about the LibreOffice mailing list