summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-06-19 16:57:03 +0200
committerDavid Tardon <dtardon@redhat.com>2014-06-19 17:14:48 +0200
commit0b793116deaf35ce67245c1106e5ed5a722c7560 (patch)
tree73b646490bc423c1b49611d6ca31a8e2cdd092bc /sc
parentca6fadad69ec74f413de40a880349490a5311d9c (diff)
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
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 9aeceb7c7314..75cabca93aee 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 )