From 7639d8e1fbc374c5fef6ed0f9f0d93440524a1dc Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Tue, 12 Feb 2008 15:36:01 +0000 Subject: INTEGRATION: CWS aw054 (1.13.160); FILE MERGED 2007/11/05 17:39:50 aw 1.13.160.1: #i83183# need to use original target PaintWindow in getWindow(), may be called inside paint (SW and SC do that) --- .../sdr/contact/viewobjectcontactofsdrmediaobj.cxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx index 4912d97f26aa..e8d6c037f574 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx @@ -4,9 +4,9 @@ * * $RCSfile: viewobjectcontactofsdrmediaobj.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: hr $ $Date: 2007-06-27 18:48:06 $ + * last change: $Author: vg $ $Date: 2008-02-12 16:36:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -183,7 +183,18 @@ Window* ViewObjectContactOfSdrMediaObj::getWindow() const if(pObjectContactOfPageView) { - OutputDevice& rOutDev = pObjectContactOfPageView->GetPageWindow().GetPaintWindow().GetOutputDevice(); + const SdrPageWindow& rPageWindow = pObjectContactOfPageView->GetPageWindow(); + const SdrPaintWindow* pPaintWindow = &rPageWindow.GetPaintWindow(); + + if(rPageWindow.GetOriginalPaintWindow()) + { + // #i83183# prefer OriginalPaintWindow if set; this is + // the real target device. GetPaintWindow() may return + // the current buffer device instead + pPaintWindow = rPageWindow.GetOriginalPaintWindow(); + } + + OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); if(OUTDEV_WINDOW == rOutDev.GetOutDevType()) { -- cgit