diff options
Diffstat (limited to 'svx/source/unodraw/UnoGraphicExporter.cxx')
-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 91902ae91b4d..2956b8f8b6ed 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 { |