[libreoffice/f16] fdo#31966 + leap year fix

Michael Stahl mstahl at fedoraproject.org
Wed Feb 29 14:42:55 UTC 2012


commit 636ffc0ac2d0ac1453f921487070f967aac33a56
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Feb 29 15:42:17 2012 +0100

    fdo#31966 + leap year fix

 0001-Correctly-calculate-leap-year.patch           |   34 ++++++++++++++++++++
 ...o-not-create-an-empty-slide-when-printing.patch |   29 +++++++++++++++++
 libreoffice.spec                                   |   10 +++++-
 3 files changed, 72 insertions(+), 1 deletions(-)
---
diff --git a/0001-Correctly-calculate-leap-year.patch b/0001-Correctly-calculate-leap-year.patch
new file mode 100644
index 0000000..441c865
--- /dev/null
+++ b/0001-Correctly-calculate-leap-year.patch
@@ -0,0 +1,34 @@
+From a2d96b51f3272ecbdc0f4f9d4b2ee65409892554 Mon Sep 17 00:00:00 2001
+From: Kohei Yoshida <kohei.yoshida at suse.com>
+Date: Tue, 28 Feb 2012 22:01:52 -0500
+Subject: [PATCH 1/2] Correctly calculate leap year.
+
+With the old code, year 2000 would not be a leap year, but it actually
+is.  With this, Calc correctly loads cell with date value of 2000-2-29.
+
+(regression from CWS sw33bf02 8786083eb9dabb0d7b328a217ba99a1d71493ad7)
+
+Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
+Signed-off-by: Eike Rathke <erack at redhat.com>
+Signed-off-by: Michael Stahl <mstahl at redhat.com>
+(cherry picked from commit 3c993bd0c3120445f27cb37e6ecfd8b45c6605e0)
+---
+ sax/source/tools/converter.cxx |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
+index f2dea8a..eb22e0f 100644
+--- a/sax/source/tools/converter.cxx
++++ b/sax/source/tools/converter.cxx
+@@ -1320,7 +1320,7 @@ readDateTimeComponent(const ::rtl::OUString & rString,
+ static bool lcl_isLeapYear(const sal_uInt32 nYear)
+ {
+     return ((nYear % 4) == 0)
+-        && !(((nYear % 100) == 0) || ((nYear % 400) == 0));
++        && (((nYear % 100) != 0) || ((nYear % 400) == 0));
+ }
+ 
+ static sal_uInt16
+-- 
+1.7.7.6
+
diff --git a/0001-fdo-31966-do-not-create-an-empty-slide-when-printing.patch b/0001-fdo-31966-do-not-create-an-empty-slide-when-printing.patch
new file mode 100644
index 0000000..f84d329
--- /dev/null
+++ b/0001-fdo-31966-do-not-create-an-empty-slide-when-printing.patch
@@ -0,0 +1,29 @@
+From 6c0f9cc00e81862e888b680a83bd14c0f16811aa Mon Sep 17 00:00:00 2001
+From: Ivan Timofeev <timofeev.i.s at gmail.com>
+Date: Mon, 27 Feb 2012 16:26:39 +0400
+Subject: [PATCH] fdo#31966: do not create an empty slide when printing
+ handouts
+
+Signed-off-by: Michael Meeks <michael.meeks at suse.com>
+---
+ sd/source/ui/view/DocumentRenderer.cxx |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
+index 758e5ed..64cd478 100644
+--- a/sd/source/ui/view/DocumentRenderer.cxx
++++ b/sd/source/ui/view/DocumentRenderer.cxx
+@@ -1967,8 +1967,8 @@ private:
+ 
+             // Create a printer page when we have found one page for each
+             // placeholder or when this is the last (and special) loop.
+-            if (aPageIndices.size() == nShapeCount
+-                || nIndex==nCount)
++            if (!aPageIndices.empty() &&
++                (aPageIndices.size() == nShapeCount || nIndex == nCount))
+             {
+                 maPrinterPages.push_back(
+                     ::boost::shared_ptr<PrinterPage>(
+-- 
+1.7.7.6
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 5b3922b..dadd997 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -33,7 +33,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        %{libo_version}.2
-Release:        7%{?dist}
+Release:        8%{?dist}
 License:        (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain and ASL 2.0 and Artistic
 Group:          Applications/Productivity
 URL:            http://www.documentfoundation.org/develop
@@ -221,6 +221,8 @@ Patch102: 0001-fix-support-for-embedded-images-for-basic-Dialogs-fd.patch
 Patch103: 0001-fdo-39510-fix-yet-more-layout-crashes-in-SwRootFrm.patch
 Patch104: 0001-fdo-39657-fix-crash-when-parsing-XML-signatures.patch
 Patch105: 0001-rhbz-794679-use-proper-Indian-Rupee-currency-symbol.patch
+Patch106: 0001-fdo-31966-do-not-create-an-empty-slide-when-printing.patch
+Patch107: 0001-Correctly-calculate-leap-year.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1125,6 +1127,8 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch103 -p1 -b .fdo-39510-fix-yet-more-layout-crashes-in-SwRootFrm.patch
 %patch104 -p1 -b .fdo-39657-fix-crash-when-parsing-XML-signatures.patch
 %patch105 -p1 -b .rhbz-794679-use-proper-Indian-Rupee-currency-symbol.patch
+%patch106 -p1 -b .fdo-31966-do-not-create-an-empty-slide-when-printing.patch
+%patch107 -p1 -b .Correctly-calculate-leap-year.patch
 
 # these are horribly incomplete--empty translations and copied english
 # strings with spattering of translated strings
@@ -2435,6 +2439,10 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
+
+* Wed Feb 29 2012 Caolán McNamara <caolanm at redhat.com> - 3.4.5.2-8.UNBUILT
+- Resolves: fdo#31966 do not create an empty slide when printing handouts
+
 * Wed Feb 29 2012 Caolán McNamara <caolanm at redhat.com> - 3.4.5.2-7
 - Resolves: rhbz#788045 swriter --help wouldn't display help
 


More information about the scm-commits mailing list