summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-25 17:16:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-03-25 21:35:08 +0200
commit1a600d6ed6578feda6e66d1e4f4f784818c308a6 (patch)
tree37695232bc404355999f7c17ce7a331943fbced4
parent84f7b97e4e5e7183fdd98dd2c618a2a25b1cdaed (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>
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx76
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 );
+ }
}
}
}