diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 12:26:29 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-11-26 12:26:29 +0000 |
commit | 05c099abee44021a664060e882462ff5d96bd16a (patch) | |
tree | 95207a2c2049ac0df0789c6c4dcaf66fc9acba33 /sc/source/ui/view/viewfun7.cxx | |
parent | a339da67ab50ce4fa696414378ad8d652cf2a367 (diff) |
INTEGRATION: CWS calcp2fix (1.17.100); FILE MERGED
2004/11/19 13:03:42 nn 1.17.100.1: #118522# call SetGraphicLink after inserting object
Diffstat (limited to 'sc/source/ui/view/viewfun7.cxx')
-rw-r--r-- | sc/source/ui/view/viewfun7.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index f3bd46cbdd9d..3e881c6fe5b7 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewfun7.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: kz $ $Date: 2004-10-04 20:28:15 $ + * last change: $Author: rt $ $Date: 2004-11-26 13:26:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -396,8 +396,7 @@ BOOL ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, Rectangle aRect(aPos, aSize); SdrGrafObj* pGrafObj = new SdrGrafObj(rGraphic, aRect); - if (rFile.Len()) - pGrafObj->SetGraphicLink( rFile, rFilter ); + // #118522# calling SetGraphicLink here doesn't work // #49961# Pfad wird nicht mehr als Name der Grafik gesetzt @@ -407,6 +406,13 @@ BOOL ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, // nicht markieren wenn Ole pDrawView->InsertObjectSafe(pGrafObj, *pDrawView->GetPageViewPvNum(0)); + + // #118522# SetGraphicLink has to be used after inserting the object, + // otherwise an empty graphic is swapped in and the contact stuff crashes. + // See #i37444#. + if (rFile.Len()) + pGrafObj->SetGraphicLink( rFile, rFilter ); + return TRUE; } |