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 ...@@ -1948,8 +1948,9 @@ OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
osl_getTempDirURL(&aGalleryDir.pData); osl_getTempDirURL(&aGalleryDir.pData);
else else
aGalleryDir = SvtPathOptions().GetGalleryPath(); aGalleryDir = SvtPathOptions().GetGalleryPath();
sal_Int32 nTokenCount = comphelper::string::getTokenCount(aGalleryDir, ';'); // Use last token delimited by ';'. copy(lastIndexOf+1) works whether
INetURLObject aGalleryUserSound( aGalleryDir.getToken( nTokenCount - 1, ';' ) ); // string is empty or not and whether ';' is there or not.
INetURLObject aGalleryUserSound( aGalleryDir.copy(aGalleryDir.lastIndexOf(';')+1) );
aGalleryUserSound.Append( aRetval ); aGalleryUserSound.Append( aRetval );
const auto nRemainingSize = rStCtrl.remainingSize(); 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