diff options
author | Christian Lippka <cl@openoffice.org> | 2002-08-06 08:23:41 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2002-08-06 08:23:41 +0000 |
commit | 62f9c9c4908acea5903d2cc580a475a044e23419 (patch) | |
tree | 732ffb26c6d3fbb00be98e5b3149193502c8e80d /svx/source/unodraw | |
parent | cd9376fcbbb722d2d5b497409a6837a3f45d09aa (diff) |
#101808# made SvxGraphicObject::setPropertyValue more resistent against rescheduling
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index c6a0396b0b73..111565d8d589 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoshap2.cxx,v $ * - * $Revision: 1.36 $ + * $Revision: 1.37 $ * - * last change: $Author: cl $ $Date: 2001-12-11 12:37:57 $ + * last change: $Author: cl $ $Date: 2002-08-06 09:23:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1592,8 +1592,15 @@ void SAL_CALL SvxGraphicObject::setPropertyValue( const OUString& aPropertyName, String aTmpStr(aURL); ByteString aUniqueID( aTmpStr, RTL_TEXTENCODING_UTF8 ); GraphicObject aGrafObj( aUniqueID ); - ((SdrGrafObj*)pObj)->ReleaseGraphicLink(); - ((SdrGrafObj*)pObj)->SetGraphicObject( aGrafObj ); + + // #101808# since loading a graphic can cause a reschedule of the office + // it is possible that our shape is removed while where in this + // method. + if( pObj ) + { + ((SdrGrafObj*)pObj)->ReleaseGraphicLink(); + ((SdrGrafObj*)pObj)->SetGraphicObject( aGrafObj ); + } } else if( aURL.compareToAscii( UNO_NAME_GRAPHOBJ_URLPKGPREFIX, RTL_CONSTASCII_LENGTH( UNO_NAME_GRAPHOBJ_URLPKGPREFIX ) ) != 0 ) { @@ -1625,7 +1632,11 @@ void SAL_CALL SvxGraphicObject::setPropertyValue( const OUString& aPropertyName, else aFilterName = pSfxFilter->GetFilterName(); - ((SdrGrafObj*)pObj)->SetGraphicLink( aURL, aFilterName ); + // #101808# since loading a graphic can cause a reschedule of the office + // it is possible that our shape is removed while where in this + // method. + if( pObj ) + ((SdrGrafObj*)pObj)->SetGraphicLink( aURL, aFilterName ); } else { |