[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source
Caolán McNamara
caolanm at redhat.com
Thu Apr 5 14:46:35 UTC 2018
sd/source/ui/dlg/PhotoAlbumDialog.cxx | 76 +++++++++++++++++++++++++++-------
1 file changed, 62 insertions(+), 14 deletions(-)
New commits:
commit 92a0181d96a43a7a0449f400d38299097e864617
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/51835
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index ffc73486e2c3..6d117be7fc79 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.Message );
+ }
}
}
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.Message );
+ }
}
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.Message );
+ }
}
}
}
@@ -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.Message );
+ }
}
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.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 );
+ }
}
}
}
More information about the Libreoffice-commits
mailing list