diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-25 17:16:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-25 21:35:08 +0200 |
commit | 1a600d6ed6578feda6e66d1e4f4f784818c308a6 (patch) | |
tree | 37695232bc404355999f7c17ce7a331943fbced4 /sd | |
parent | 84f7b97e4e5e7183fdd98dd2c618a2a25b1cdaed (diff) |
tdf#116544 crash on unhandled IllegalArgument exception
Change-Id: I290ba6097d6d91bf4677e7e92c896bd6359cbc49
Reviewed-on: https://gerrit.libreoffice.org/51833
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/PhotoAlbumDialog.cxx | 76 |
1 files changed, 62 insertions, 14 deletions
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index b3ab9cbaa344..739548ce570d 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -182,9 +182,16 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) aPicPos.Y = (aPageSize.Height - aPicSize.Height)/2; xShape->setPosition(aPicPos); - xSlide->add(xShape); - if(bCreateCaptions) - createCaption( aPageSize ); + try + { + xSlide->add(xShape); + if (bCreateCaptions) + createCaption( aPageSize ); + } + catch (const css::uno::Exception& exc) + { + SAL_WARN( "sd", exc ); + } } } else if( nOpt == TWO_IMAGES ) @@ -250,7 +257,14 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) aPicPos.Y = aPageSize.Height/2 - aPicSize.Height/2; xShape->setPosition(aPicPos); - xSlide->add(xShape); + try + { + xSlide->add(xShape); + } + catch (const css::uno::Exception& exc) + { + SAL_WARN( "sd", exc ); + } } if( !sUrl2.isEmpty() ) @@ -287,10 +301,17 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) aPicPos.Y = aPageSize.Height/2 - aPicSize.Height/2; xShape->setPosition(aPicPos); - xSlide->add(xShape); - if(bCreateCaptions) - createCaption( aPageSize ); + try + { + xSlide->add(xShape); + if(bCreateCaptions) + createCaption( aPageSize ); + } + catch (const css::uno::Exception& exc) + { + SAL_WARN( "sd", exc ); + } } } } @@ -369,7 +390,14 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) aPicPos.Y = aPageSize.Height/4 - aPicSize.Height/2; xShape->setPosition(aPicPos); - xSlide->add(xShape); + try + { + xSlide->add(xShape); + } + catch (const css::uno::Exception& exc) + { + SAL_WARN( "sd", exc ); + } } if( !sUrl2.isEmpty() ) { @@ -405,7 +433,14 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) aPicPos.Y = aPageSize.Height/4 - aPicSize.Height/2; xShape->setPosition(aPicPos); - xSlide->add(xShape); + try + { + xSlide->add(xShape); + } + catch (const css::uno::Exception& exc) + { + SAL_WARN( "sd", exc ); + } } if( !sUrl3.isEmpty() ) { @@ -441,7 +476,14 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) aPicPos.Y = aPageSize.Height/4 - aPicSize.Height/2 + aPageSize.Height/2; xShape->setPosition(aPicPos); - xSlide->add(xShape); + try + { + xSlide->add(xShape); + } + catch (const css::uno::Exception& exc) + { + SAL_WARN( "sd", exc ); + } } if( !sUrl4.isEmpty() ) { @@ -477,10 +519,16 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) aPicPos.Y = aPageSize.Height/4 - aPicSize.Height/2 + aPageSize.Height/2; xShape->setPosition(aPicPos); - xSlide->add(xShape); - if(bCreateCaptions) - createCaption( aPageSize ); - + try + { + xSlide->add(xShape); + if(bCreateCaptions) + createCaption( aPageSize ); + } + catch (const css::uno::Exception& exc) + { + SAL_WARN( "sd", exc ); + } } } } |