diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-12-12 22:24:45 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2017-12-13 00:55:08 +0100 |
commit | c7a2538129f16ef1253ae974737d5c9676aaf883 (patch) | |
tree | 1e01b6bf595ec9d6a7382252134268d6c9514944 | |
parent | 5217a2a0bf27e496cc429ee45dff7c239b466ae6 (diff) |
tdf#114384 reset the print state if the sheet changes
Change-Id: Ia90a2bae0dab3d82cae1204a9205f386f71e5c49
Reviewed-on: https://gerrit.libreoffice.org/46301
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 0df42b9be2f1..d5560485bc62 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1787,7 +1787,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 else { std::unique_ptr<ScPrintFunc, o3tl::default_delete<ScPrintFunc>> pPrintFunc; - if (m_pPrintState) + if (m_pPrintState && m_pPrintState->nPrintTab == nTab) pPrintFunc.reset(new ScPrintFunc(pDocShell, pDocShell->GetPrinter(), *m_pPrintState, &aStatus.GetOptions())); else pPrintFunc.reset(new ScPrintFunc(pDocShell, pDocShell->GetPrinter(), nTab, @@ -1934,7 +1934,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec std::unique_ptr<ScPrintFunc, o3tl::default_delete<ScPrintFunc>> pPrintFunc; - if (m_pPrintState) + if (m_pPrintState && m_pPrintState->nPrintTab == nTab) 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())); |