[Libreoffice-commits] core.git: sd/source
Caolán McNamara
caolanm at redhat.com
Sun Mar 25 19:35:28 UTC 2018
sd/source/ui/dlg/PhotoAlbumDialog.cxx | 76 +++++++++++++++++++++++++++-------
1 file changed, 62 insertions(+), 14 deletions(-)
New commits:
commit 1a600d6ed6578feda6e66d1e4f4f784818c308a6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Mar 25 17:16:36 2018 +0100
tdf#116544 crash on unhandled IllegalArgument exception
Change-Id: I290ba6097d6d91bf4677e7e92c896bd6359cbc49
Reviewed-on: https://gerrit.libreoffice.org/51833
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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 );
+ }
}
}
}
More information about the Libreoffice-commits
mailing list