diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-25 17:16:36 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-04-12 10:54:26 +0200 |
commit | 0126c695f8bc08be69570245c696f3edea229164 (patch) | |
tree | 74d630c3ee0c74c1822c1da12bb53cd775b98a5f | |
parent | bd9e43281b3baabd343f0199702bcd748cbbc9a6 (diff) |
tdf#116544 crash on unhandled IllegalArgument exception
Change-Id: I290ba6097d6d91bf4677e7e92c896bd6359cbc49
Reviewed-on: https://gerrit.libreoffice.org/51834
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit 944b882d3296b33f4b33b8ef3e33d020ed428732)
-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 72d8bd2a1db2..9ba0850f5949 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -180,9 +180,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 ) @@ -249,7 +256,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 ); + } } } } @@ -370,7 +391,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() ) { @@ -407,7 +435,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() ) { @@ -444,7 +479,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() ) { @@ -481,10 +523,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 ); + } } } } |