summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2019-03-06 23:49:54 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-03-19 10:23:23 +0100
commit0c70e9ab4713a50fec558d6c4e4dfb2517039fc8 (patch)
treede8b360fe8291eef9e7c46c639d7ee6a3638752e
parentb0464b42d1416a521e6ce0e492f1628b5fb46910 (diff)
tdf#120161 sc: use selection to set required printed area
Change-Id: Id0798cbff2d327e2bb955fbbc530a201975f6003 Reviewed-on: https://gerrit.libreoffice.org/68833 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 03b6c20c66047af41ed2f78fe5dd229cd06392e8) Reviewed-on: https://gerrit.libreoffice.org/69118 Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de> Tested-by: Serge Krot (CIB) <Serge.Krot@cib.de> (cherry picked from commit f0b71fafd3a2fd6158c5952d601092179cba21e5) Reviewed-on: https://gerrit.libreoffice.org/69263
-rw-r--r--sc/source/ui/unoobj/docuno.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 1fd3c9158d7f..1d0928c34cbe 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1971,7 +1971,8 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
std::unique_ptr<ScPrintFunc, o3tl::default_delete<ScPrintFunc>> pPrintFunc;
- if (m_pPrintState && m_pPrintState->nPrintTab == nTab)
+ if (m_pPrintState && m_pPrintState->nPrintTab == nTab
+ && ! pSelRange) // tdf#120161 use selection to set required printed area
pPrintFunc.reset(new ScPrintFunc(pDev, pDocShell, *m_pPrintState, &aStatus.GetOptions()));
else
pPrintFunc.reset(new ScPrintFunc(pDev, pDocShell, nTab, pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions()));