[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 18 21:27:10 UTC 2019
sd/source/ui/animations/CustomAnimationList.cxx | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
New commits:
commit 0a5913594a0ad8dbe197f940a6ba59d537e4f69e
Author: Mark Hung <marklh9 at gmail.com>
AuthorDate: Sat Feb 16 21:14:43 2019 +0800
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Feb 18 22:26:45 2019 +0100
sd: fix crashing when adding new effects to media.
Check if the objct has name roperty with hasPropertyByName() before
accessing in case some objects ( media, table, control, etc. ) do not
have name property.
Regression caused by e559d360d0a19 ( related to tdf#90243 ).
Change-Id: I05fc45c631f8acd3b9ba8c8305d4bc1e31651824
Reviewed-on: https://gerrit.libreoffice.org/67901
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9 at gmail.com>
(cherry picked from commit a18bb779e03217db6e18ba6b8110289b4b3f101d)
Reviewed-on: https://gerrit.libreoffice.org/67963
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 61e864b004a4..6980e859d0e4 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -128,16 +128,25 @@ OUString getShapeDescription( const Reference< XShape >& xShape, bool bWithText
Reference< XPropertySet > xSet( xShape, UNO_QUERY );
bool bAppendIndex = true;
- if( xSet.is() )
+ if(xSet.is()) try
{
Reference<XPropertySetInfo> xInfo(xSet->getPropertySetInfo());
+ if (xInfo.is())
+ {
+ const OUString aPropName1("Name");
+ if(xInfo->hasPropertyByName(aPropName1))
+ xSet->getPropertyValue(aPropName1) >>= aDescription;
- xSet->getPropertyValue("Name") >>= aDescription;
- bAppendIndex = aDescription.isEmpty();
+ bAppendIndex = aDescription.isEmpty();
- const OUString aPropName("UINameSingular");
- if(xInfo->hasPropertyByName(aPropName))
- xSet->getPropertyValue(aPropName) >>= aDescription;
+ const OUString aPropName2("UINameSingular");
+ if(xInfo->hasPropertyByName(aPropName2))
+ xSet->getPropertyValue(aPropName2) >>= aDescription;
+ }
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL("sd::getShapeDescription(), exception caught!" );
}
if (bAppendIndex)
More information about the Libreoffice-commits
mailing list