summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-25 17:16:36 +0100
committerAndras Timar <andras.timar@collabora.com>2018-04-07 13:27:33 +0200
commit3c143ea818964124e46befe1877158f32bcd39b5 (patch)
tree0aca33fb5d895853967cdb02c069c0d782bb2537 /sd
parente78cbac46be9ea66107dd2f5a1607c3224a2d928 (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)
Diffstat (limited to 'sd')
-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 a77d4f98c1a4..957232c6a2f9 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 );
+ }
}
}
}