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-07 17:45:30 +0200 |
commit | 94a1396b92204ac736bf287fe73e485af9c2dda4 (patch) | |
tree | 1ef084b924d0041de370ba080b4afa07ca26621e | |
parent | 383d810b5cc1288b32deb3138a25f7d11b9f582d (diff) |
tdf#116544 crash on unhandled IllegalArgument exception
Change-Id: I290ba6097d6d91bf4677e7e92c896bd6359cbc49
Reviewed-on: https://gerrit.libreoffice.org/51835
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit 92a0181d96a43a7a0449f400d38299097e864617)
-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 7a285f93cd19..caa80f118ea7 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -178,9 +178,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.Message ); + } } } else if( nOpt == TWO_IMAGES ) @@ -248,7 +255,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.Message ); + } } if( !sUrl2.isEmpty() ) @@ -286,10 +300,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.Message ); + } } } } @@ -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.Message ); + } } if( !sUrl2.isEmpty() ) { @@ -406,7 +434,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.Message ); + } } 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.Message ); + } } 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.Message ); + } } } } |