Kaydet (Commit) 56a9903a authored tarafından Matteo Casalin's avatar Matteo Casalin

OUString: avoid getTokenCount to only get last token

Change-Id: I68529076a6a6c2b23842c41d3e9099083a78d3c6
üst f96e78a7
......@@ -1948,8 +1948,9 @@ OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
aGalleryDir = SvtPathOptions().GetGalleryPath();
sal_Int32 nTokenCount = comphelper::string::getTokenCount(aGalleryDir, ';');
INetURLObject aGalleryUserSound( aGalleryDir.getToken( nTokenCount - 1, ';' ) );
// Use last token delimited by ';'. copy(lastIndexOf+1) works whether
// string is empty or not and whether ';' is there or not.
INetURLObject aGalleryUserSound( aGalleryDir.copy(aGalleryDir.lastIndexOf(';')+1) );
aGalleryUserSound.Append( aRetval );
const auto nRemainingSize = rStCtrl.remainingSize();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment