summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-02-12 15:36:01 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-02-12 15:36:01 +0000
commit7639d8e1fbc374c5fef6ed0f9f0d93440524a1dc (patch)
tree7c47a6cfee5288f22fcbec131dea788d444d5cb2
parent7905fa16efa6786c3521c2bdd11d0bb65335bf57 (diff)
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)
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx17
1 files 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())
{