svx/source/unodraw/unoshap4.cxx |   12 ------------
 1 file changed, 12 deletions(-)

New commits:
commit 4bee213c000e9775101d7bb95fd36d98e8d982e6
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Aug 20 12:36:23 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Aug 20 16:37:58 2024 +0200

    Revert "tdf#158510 Launch media from a presentation dir path" (24.8 only)
    
    This reverts commit d875b5acdd50588d0d570890bd7eef6abb208199.
    
    Reverting it in libreoffice-24-8 only since there are more
    patches for tdf#158510 not backported to this branch,
    to be on the safe side
    
    Change-Id: If4562565a993e522a51c980ce7d3a6de11931f1f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172080
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 712c43560803..58ad9a6b2db0 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -30,7 +30,6 @@
 #include <svx/svdomedia.hxx>
 #include <svx/svdpool.hxx>
 #include <comphelper/classids.hxx>
-#include <comphelper/DirectoryHelper.hxx>
 #include <comphelper/embeddedobjectcontainer.hxx>
 #include <comphelper/propertysequence.hxx>
 #include <comphelper/propertyvalue.hxx>
@@ -823,17 +822,6 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& 
rName, const SfxItemPr
             if( rValue >>= aURL )
             {
                 bOk = true;
-                if ( aURL.startsWith("file:///") && 
!comphelper::DirectoryHelper::fileExists(aURL) )
-                {
-                    comphelper::IEmbeddedHelper* pPersist = 
GetSdrObject()->getSdrModelFromSdrObject().GetPersist();
-                    auto fileDirectoryEndIdx = 
pPersist->getDocumentBaseURL().lastIndexOf("/");
-                    auto fileNameStartIdx = aURL.lastIndexOf("/");
-                    if (fileDirectoryEndIdx != -1 && fileNameStartIdx != -1)
-                    {
-                        aURL = 
OUString::Concat(pPersist->getDocumentBaseURL().subView(0, fileDirectoryEndIdx 
+ 1))
-                            + aURL.subView(fileNameStartIdx + 1);
-                    }
-                }
                 aItem.setURL( aURL, u""_ustr, referer_ );
             }
         }

Reply via email to