@ -1806,12 +1806,10 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::audioItemToLinkedAudio(UBGraphicsAud
}
}
QString audioFileHref = audioItem - > mediaFileUrl ( ) . toString ( ) ;
QString audioFileHref = audioItem - > mediaFileUrl ( ) . toString ( ) ;
//on windows
audioFileHref = UBFileSystemUtils : : removeLocalFilePrefix ( audioFileHref ) ;
if ( audioFileHref . startsWith ( " file:/// " ) )
if ( audioFileHref . startsWith ( mDocumentPath ) )
audioFileHref = audioFileHref . replace ( " file:/// " + mDocumentPath + " / " , " " ) ;
audioFileHref = audioFileHref . replace ( mDocumentPath + " / " , " " ) ;
//mac and linux
if ( audioFileHref . startsWith ( " file:// " ) )
audioFileHref = audioFileHref . replace ( " file:// " + mDocumentPath + " / " , " " ) ;
mXmlWriter . writeAttribute ( nsXLink , " href " , audioFileHref ) ;
mXmlWriter . writeAttribute ( nsXLink , " href " , audioFileHref ) ;
mXmlWriter . writeEndElement ( ) ;
mXmlWriter . writeEndElement ( ) ;
}
}
@ -1837,13 +1835,11 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::videoItemToLinkedVideo(UBGraphicsVid
}
}
QString videoFileHref = videoItem - > mediaFileUrl ( ) . toString ( ) ;
QString videoFileHref = videoItem - > mediaFileUrl ( ) . toString ( ) ;
//on windows
if ( videoFileHref . startsWith ( " file:/// " ) )
videoFileHref = UBFileSystemUtils : : removeLocalFilePrefix ( videoFileHref ) ;
videoFileHref = videoFileHref . replace ( " file:/// " + mDocumentPath + " / " , " " ) ;
if ( videoFileHref . startsWith ( mDocumentPath ) )
//on mac and linux
videoFileHref = videoFileHref . replace ( mDocumentPath + " / " , " " ) ;
if ( videoFileHref . startsWith ( " file:// " ) )
mXmlWriter . writeAttribute ( nsXLink , " href " , videoFileHref ) ;
videoFileHref = videoFileHref . replace ( " file:// " + mDocumentPath + " / " , " " ) ;
mXmlWriter . writeAttribute ( nsXLink , " href " , videoFileHref ) ;
mXmlWriter . writeEndElement ( ) ;
mXmlWriter . writeEndElement ( ) ;
}
}