summaryrefslogtreecommitdiff
path: root/svx/source/sdr
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-11-03 15:03:37 +0000
committerRüdiger Timm <rt@openoffice.org>2004-11-03 15:03:37 +0000
commit8c599b37627245b5aaf8f43a190ce4e7b1c69c46 (patch)
tree467d5a7bb2b53d92a14db7feeb63c46bae99a734 /svx/source/sdr
parente1231629616a6e9f6aebcb752ee142c6c739e0c5 (diff)
INTEGRATION: CWS jmf3 (1.3.68); FILE MERGED
2004/10/04 10:33:12 ka 1.3.68.1: watch for correct cast
Diffstat (limited to 'svx/source/sdr')
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
index 87b89830f8be..dc9352c50a42 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: viewobjectcontactofsdrmediaobj.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: rt $ $Date: 2004-08-24 07:20:33 $
+ * last change: $Author: rt $ $Date: 2004-11-03 16:03:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -180,9 +180,15 @@ void ViewObjectContactOfSdrMediaObj::PaintObject(DisplayInfo& rDisplayInfo)
Window* ViewObjectContactOfSdrMediaObj::getWindow() const
{
- OutputDevice& rOutDev = static_cast< ObjectContactOfPageView& >( GetObjectContact() ).GetPageViewWindow().GetOutputDevice();
+ ObjectContactOfPageView* pOC = dynamic_cast< ObjectContactOfPageView* >( &GetObjectContact() );
- return( ( rOutDev.GetOutDevType() == OUTDEV_WINDOW ) ? static_cast< Window* >( &rOutDev ) : NULL );
+ if( pOC)
+ {
+ OutputDevice& rOutDev = pOC->GetPageViewWindow().GetOutputDevice();
+ return( ( rOutDev.GetOutDevType() == OUTDEV_WINDOW ) ? static_cast< Window* >( &rOutDev ) : NULL );
+ }
+
+ return NULL;
}
// ------------------------------------------------------------------------------