diff --git a/0001-rhbz-1111216-allow-to-export-an-empty-sheet-to-PDF.patch b/0001-rhbz-1111216-allow-to-export-an-empty-sheet-to-PDF.patch new file mode 100644 index 0000000..c3c6e86 --- /dev/null +++ b/0001-rhbz-1111216-allow-to-export-an-empty-sheet-to-PDF.patch @@ -0,0 +1,29 @@ +From 0b793116deaf35ce67245c1106e5ed5a722c7560 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Thu, 19 Jun 2014 16:57:03 +0200 +Subject: [PATCH] rhbz#1111216 allow to export an empty sheet to PDF + +This is to consolidate Calc's behaviour with the other applications, +which always present at least one page for printing / PDF export. + +Change-Id: Iedf438618020c1e6d8ded5ac950c8ca2b12ad439 +--- + sc/source/ui/unoobj/docuno.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx +index 9aeceb7..75cabca 100644 +--- a/sc/source/ui/unoobj/docuno.cxx ++++ b/sc/source/ui/unoobj/docuno.cxx +@@ -958,7 +958,7 @@ sal_Int32 SAL_CALL ScModelObj::getRendererCount(const uno::Any& aSelection, + StringRangeEnumerator aRangeEnum( aPagesStr, 0, nPages-1 ); + nSelectCount = aRangeEnum.size(); + } +- return nSelectCount; ++ return (nSelectCount > 0) ? nSelectCount : 1; + } + + static sal_Int32 lcl_GetRendererNum( sal_Int32 nSelRenderer, const OUString& rPagesStr, sal_Int32 nTotalPages ) +-- +1.9.3 + diff --git a/libreoffice.spec b/libreoffice.spec index c1af4ea..f0b4c42 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -306,6 +306,7 @@ Patch14: 0001-never-run-autogen.sh.patch Patch15: 0001-add-X-TryExec-entries-to-desktop-files.patch # not upstreamed Patch16: 0001-disable-PSD-import-test-which-deadlocks-on-ARM.patch +Patch17: 0001-rhbz-1111216-allow-to-export-an-empty-sheet-to-PDF.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice