[PUSHED] Re: [REVIEW 3-5][PATCH] Fix leap year calculation

Michael Stahl mstahl at redhat.com
Wed Feb 29 05:53:43 PST 2012


On 29/02/12 04:10, Kohei Yoshida wrote:
> Hi there,
> 
> The attached patch fixes a bug in our current leap year calculation
> code.  It is based on the algorithm posted on wikipedia[1], and seems to
> correctly identify year 2000 as a leap year.
> 
> Without this, Calc would convert 2000-2-29 into 1899-12-30 on load,
> which is ugly but very hard to detect.

argh, that misplaced "!" is entirely my fault, OOo 3.3 regression from
CWS sw33bf02 (previously dates were not checked for validity at all).

although before i removed the SvXMLUnitConverter code duplication for LO
3.5, the function was probably only used for reading the document
properties.

> Please consider this for 3.5.1, in which case I'll need 3 sign-offs.  I
> haven't pushed this to master yet.  I wanted to run it by Eike first
> before pushing to master.

thanks for fixing this problem!

pushed the fix plus a unit test for leap years to master,
libreoffice-3-5, libreoffice-3-5-1, libreoffice-3-4.

http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=a2d96b51f3272ecbdc0f4f9d4b2ee65409892554
http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=f3e65a72f8c37ee3795ed83b93f7483d45d5b403



More information about the LibreOffice mailing list