[Libreoffice-commits] core.git: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Mar 10 00:26:10 UTC 2019


 sc/source/ui/unoobj/docuno.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 03b6c20c66047af41ed2f78fe5dd229cd06392e8
Author:     Serge Krot <Serge.Krot at cib.de>
AuthorDate: Wed Mar 6 23:49:54 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Sun Mar 10 01:25:49 2019 +0100

    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 at CIB.de>

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index baf72864eff4..2856aba00cc9 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -2026,7 +2026,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()));


More information about the Libreoffice-commits mailing list