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 | b4ddd7d3c0a5063a5f92d89eafbcc0533caf9970 (patch) | |
tree | 6196ff2c7f085ed1ecde8ae3572f79d023b5d4bb /svx | |
parent | 50e999692f999e62f4648ca5773131de033615c3 (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')
-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 { |