summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/mediadescriptor.cxx21
1 files changed, 18 insertions, 3 deletions
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index 7fd7d5fc272b..21361f565dae 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -47,6 +47,23 @@
namespace comphelper{
+namespace {
+
+ OUString removeFragment(OUString const & uri) {
+ css::uno::Reference< css::uri::XUriReference > ref(
+ css::uri::UriReferenceFactory::create(
+ comphelper::getProcessComponentContext())->
+ parse(uri));
+ if (ref.is()) {
+ ref->clearFragment();
+ return ref->getUriReference();
+ } else {
+ SAL_WARN("comphelper", "cannot parse <" << uri << ">");
+ return uri;
+ }
+ }
+}
+
const OUString& MediaDescriptor::PROP_ABORTED()
{
static const OUString sProp("Aborted");
@@ -467,9 +484,7 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool bLockFile )
css::uno::Reference< css::uno::XInterface >());
// Parse URL! Only the main part has to be used further. E.g. a jumpmark can make trouble
- // We need to keep the full URL with Mark to store the Object ID
- // in CMIS UCB
- return impl_openStreamWithURL( sURL, bLockFile );
+ return impl_openStreamWithURL( removeFragment(sURL), bLockFile );
}
catch(const css::uno::Exception& ex)
{