summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/view/output3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/output3.cxx')
-rw-r--r--sc/source/ui/view/output3.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index bc6efec654..760a62a12d 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -206,7 +206,13 @@ void ScOutputData::DrawSelectiveObjects(SdrLayerID nLayer)
if(pPageView)
{
- if (nullptr != pPageView->FindPageWindow(*mpDev))
+ // tdf#160589 need to check for registered PaintWindow using the
+ // 'original' TragetDevice, mpDev might have been changed by a
+ // call to ::SetContentDevice. That again might patch in a
+ // pre-render device fetched from SdrPaintWindow::GetTargetOutputDevice
+ // and thus the test if target is aregistered PageWindow would fail
+ assert(nullptr != mpOriginalTargetDevice && "mpOriginalTargetDevice *must* be set when constructing ScOutputData (!)");
+ if (nullptr != pPageView->FindPageWindow(*mpOriginalTargetDevice))
{
// Target OutputDevice is registered for this view
// (as it should be), we can just render