[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source
Julien Nabet
serval2412 at yahoo.fr
Fri Apr 6 14:04:42 UTC 2018
sd/source/ui/animations/SlideTransitionPane.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit fce0f5823bbd6297f3455a2a36e4a66c423db9b9
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Thu Apr 5 21:45:20 2018 +0200
tdf#115407: preselect sound file saved
To display the sound in the dropbox, the complete filename
(eg: file:///home/julien/lo/libreoffice/instdir/share/gallery/sounds/pluck.wav)
was compared with items of the sound list formed like this:
file:///home/julien/lo/libreoffice/instdir/program/../share/gallery/sounds/pluck.wav
See https://bugs.documentfoundation.org/show_bug.cgi?id=115407#c1
Since listbox displays only basename, let's just compare basenames
Change-Id: I5fb49990322423fa7818e5d6e1cafd828e3500ec
Reviewed-on: https://gerrit.libreoffice.org/52476
(cherry picked from commit 23c82e1a377ea6fce65d71277ec59b3ca150b98a)
Reviewed-on: https://gerrit.libreoffice.org/52490
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
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/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index c6aef5197813..8cce78ffc5bb 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -270,10 +270,11 @@ struct lcl_EqualsSoundFileName : public ::std::unary_function< OUString, bool >
{
// note: formerly this was a case insensitive search for all
// platforms. It seems more sensible to do this platform-dependent
+ INetURLObject aURL(rStr);
#if defined(_WIN32)
- return maStr.equalsIgnoreAsciiCase( rStr );
+ return maStr.equalsIgnoreAsciiCase( aURL.GetBase() );
#else
- return maStr == rStr;
+ return maStr == aURL.GetBase();
#endif
}
@@ -286,9 +287,10 @@ bool lcl_findSoundInList( const ::std::vector< OUString > & rSoundList,
const OUString & rFileName,
::std::vector< OUString >::size_type & rOutPosition )
{
+ INetURLObject aURL(rFileName);
::std::vector< OUString >::const_iterator aIt =
::std::find_if( rSoundList.begin(), rSoundList.end(),
- lcl_EqualsSoundFileName( rFileName ));
+ lcl_EqualsSoundFileName( aURL.GetBase()));
if( aIt != rSoundList.end())
{
rOutPosition = ::std::distance( rSoundList.begin(), aIt );
More information about the Libreoffice-commits
mailing list