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