Resolves: rhbz#1111216 allow to export an empty sheet to PDF

f41
David Tardon 11 years ago
parent cc9a1c3ebb
commit 055dc2f254

@ -0,0 +1,29 @@
From 0b793116deaf35ce67245c1106e5ed5a722c7560 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
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

@ -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

Loading…
Cancel
Save