diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 23:28:08 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-08-19 23:28:08 +0000 |
commit | bdfeef462e3afdb654ad2c83d594ee684031dec9 (patch) | |
tree | 637ab9a07a8049c5578fd3ecd24296ab344cf572 /sw/source/core | |
parent | 1e3483b2568bb5ad5939b32f0f014244ec19c26b (diff) |
INTEGRATION: CWS aw033 (1.81.24); FILE MERGED
2008/07/15 14:28:21 aw 1.81.24.1: #i39532# changes after resync - SW problem with XDrawPage lifetime
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 855448dfe098..d4a82a9d7ef6 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: unodraw.cxx,v $ - * $Revision: 1.81 $ + * $Revision: 1.82 $ * * This file is part of OpenOffice.org. * @@ -478,7 +478,16 @@ uno::Any SwXDrawPage::queryInterface( const uno::Type& aType ) uno::Any aRet = SwXDrawPageBaseClass::queryInterface(aType); if(!aRet.hasValue()) { - aRet = GetSvxPage()->queryAggregation(aType); + // secure with checking if page exists. This may not be the case + // either for new SW docs with no yet graphics usage or when + // the doc is closed and someone else still holds a UNO reference + // to the XDrawPage (in that case, pDoc is set to 0) + SwFmDrawPage* pPage = GetSvxPage(); + + if(pPage) + { + aRet = pPage->queryAggregation(aType); + } } return aRet; } @@ -841,6 +850,13 @@ SwFmDrawPage* SwXDrawPage::GetSvxPage() } return pDrawPage; } + +// renamed and outlined to detect where it's called +void SwXDrawPage::InvalidateSwDoc() +{ + pDoc = 0; +} + /**************************************************************************** ****************************************************************************/ |