[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sfx2/source

David Tardon dtardon at redhat.com
Tue Jul 22 09:48:30 PDT 2014


 sfx2/source/doc/guisaveas.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a958b590a34a1eaa888a36285f6aa364606383ad
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Jul 14 15:07:52 2014 +0200

    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
    (cherry picked from commit f3d7734af45f30a87d6de76aa3de7593d541bdc8)
    Reviewed-on: https://gerrit.libreoffice.org/10295
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 446d9d5..13105dc 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() )


More information about the Libreoffice-commits mailing list