sc/source/filter/excel/xeescher.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 0d70adef01e50f2b1b27faa8f18294e72406b84d Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Mon Feb 17 05:39:07 2014 +0100 fix invalid string access, related #i83611# Change-Id: I5954f78e10d99a064f83e96282c28c086c7f07f1 Reviewed-on: https://gerrit.libreoffice.org/8096 Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index b72b5ed..241182c 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -690,7 +690,10 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< //Export description as alt text if( SdrObject* pSdrObj = SdrObject::getSdrObjectFromXShape( xShape ) ) { - OUString aAltTxt = pSdrObj->GetDescription().copy( 0, MSPROP_DESCRIPTION_MAX_LEN ); + OUString aAltTxt; + OUString aDescrText = pSdrObj->GetDescription(); + if(!aDescrText.isEmpty()) + aAltTxt = aDescrText.copy( 0, std::min<sal_Int32>(MSPROP_DESCRIPTION_MAX_LEN, aDescrText.getLength()) ); aPropOpt.AddOpt( ESCHER_Prop_wzDescription, aAltTxt ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits