diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2008-07-02 11:08:21 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2008-07-02 11:08:21 +0000 |
commit | 0094c005be08e727651ee151c17b2e8e6ea5da7d (patch) | |
tree | a741807906b6e75325d83a922d9bfee15e06884d /svx/source/unodraw | |
parent | ac0196d9cafee2f481be8bbdc1dbab28da968b87 (diff) |
INTEGRATION: CWS impress145 (1.42.108); FILE MERGED
2008/06/18 12:47:41 cl 1.42.108.1: #133503# do not crash on empty master page
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/UnoGraphicExporter.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index cb970b0db5..fa5d9a712d 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: UnoGraphicExporter.cxx,v $ - * $Revision: 1.42 $ + * $Revision: 1.43 $ * * This file is part of OpenOffice.org. * @@ -711,15 +711,19 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, { if( rSettings.mbExportOnlyBackground ) { + SdrObject* pShape = 0; if( pPage->IsMasterPage() ) { - aShapes.push_back( pPage->GetObj(0) ); + if( pPage->GetObjCount() > 0 ) + pShape = pPage->GetObj(0); } else { - if( pPage->GetBackgroundObj() ) - aShapes.push_back( pPage->GetBackgroundObj() ); + pShape = pPage->GetBackgroundObj(); } + + if( pShape ) + aShapes.push_back( pShape ); } else { |