summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-07-14 15:07:52 +0200
committerDavid Tardon <dtardon@redhat.com>2014-07-14 15:11:17 +0200
commitf3d7734af45f30a87d6de76aa3de7593d541bdc8 (patch)
tree51504b430a8969af23dc1aed02462d18d00b1766 /sfx2
parentc72498d7adb1345aeed9df3398b0007549e6e0da (diff)
fdo#81304 don't parse file name as part of URL
... because the name is not URL-encoded at this point, so parsing it as a part of the URL will interpret special characters, e.g. #. Change-Id: I780baed1753e9674d835dc296d31c088b67d8ba7
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/guisaveas.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index b6efad193fbc..229477243b42 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1279,7 +1279,8 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con
uno::UNO_QUERY );
if ( xTypeDetection.is() )
{
- INetURLObject aObj( OUString( "file:///c:/" ) + aRecommendedName );
+ INetURLObject aObj( OUString( "file:///c:/" ) );
+ aObj.SetName( aRecommendedName );
uno::Sequence< beans::PropertyValue > aTypeNameProps;
if ( ( xTypeDetection->getByName( aTypeName ) >>= aTypeNameProps ) && aTypeNameProps.getLength() )