[Libreoffice-commits] core.git: 2 commits - avmedia/source svx/source

Stephan Bergmann sbergman at redhat.com
Wed Nov 20 00:59:00 PST 2013


 avmedia/source/vlc/vlcmanager.cxx |    2 +-
 svx/source/svdraw/svdomedia.cxx   |    6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit e8be170586023dc9b47bdb7c1637f34fdeec7408
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 20 09:35:23 2013 +0100

    String clean-up
    
    Change-Id: I56c397d4cd0ad6c328d660f50189ab5f4b5cfca6

diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index f9d838b..2928225 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -351,8 +351,6 @@ static bool lcl_HandlePackageURL(
     return true;
 }
 
-static char const s_PkgScheme[] = "vnd.sun.star.Package:";
-
 void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProperties )
 {
     bool bBroadcastChanged = false;
@@ -364,9 +362,7 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper
     {
         m_pImpl->m_xCachedSnapshot.clear();
         OUString const url(rNewProperties.getURL());
-        if ((0 == rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength(
-                url.getStr(), url.getLength(),
-                s_PkgScheme, SAL_N_ELEMENTS(s_PkgScheme) - 1)))
+        if (url.startsWithIgnoreAsciiCase("vnd.sun.star.Package:"))
         {
             if (   !m_pImpl->m_pTempFile
                 || (m_pImpl->m_pTempFile->m_TempFileURL !=
commit b7a71d4f69e6e9e4b739e5d408291b62e0d961bc
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 20 09:33:55 2013 +0100

    Only throw exceptions that match specification
    
    Change-Id: I3f9c692173fea9496bdda7772a8371e6a5427d3a

diff --git a/avmedia/source/vlc/vlcmanager.cxx b/avmedia/source/vlc/vlcmanager.cxx
index 9894b73..192efdc 100644
--- a/avmedia/source/vlc/vlcmanager.cxx
+++ b/avmedia/source/vlc/vlcmanager.cxx
@@ -85,7 +85,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const rtl::OUSt
     throw (uno::RuntimeException)
 {
     if ( !m_is_vlc_found )
-        throw uno::Exception();
+        throw uno::RuntimeException("VLC not found", 0);
 
     if ( !rURL.isEmpty() )
     {


More information about the Libreoffice-commits mailing list