sd/source/ui/animations/CustomAnimationList.cxx | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)
New commits: commit e559d360d0a19715bd6261b7dfc7f03eb7c9b99e Author: Mark Hung <mark...@gmail.com> Date: Tue Jun 19 00:10:49 2018 +0800 tdf#90243 don't append index if shape already has a name. Change-Id: I518ad83bf3782af7cb3144982ec8844a573f0de4 Reviewed-on: https://gerrit.libreoffice.org/56051 Tested-by: Jenkins Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 4f1b4eef4786..11d54bbe04f7 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -124,16 +124,25 @@ OUString getShapeDescription( const Reference< XShape >& xShape, bool bWithText { OUString aDescription; Reference< XPropertySet > xSet( xShape, UNO_QUERY ); + bool bAppendIndex = true; + if( xSet.is() ) { - Reference< XPropertySetInfo > xInfo( xSet->getPropertySetInfo() ); - const OUString aPropName( "UINameSingular"); - if( xInfo->hasPropertyByName( aPropName ) ) - xSet->getPropertyValue( aPropName ) >>= aDescription; + Reference<XPropertySetInfo> xInfo(xSet->getPropertySetInfo()); + + xSet->getPropertyValue("Name") >>= aDescription; + bAppendIndex = aDescription.isEmpty(); + + const OUString aPropName("UINameSingular"); + if(xInfo->hasPropertyByName(aPropName)) + xSet->getPropertyValue(aPropName) >>= aDescription; } - aDescription += " "; - aDescription += OUString::number( getShapeIndex( xShape ) ); + if (bAppendIndex) + { + aDescription += " "; + aDescription += OUString::number(getShapeIndex(xShape)); + } if( bWithText ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits