summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/doc/guisaveas.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 229477243b42..cf18115c3e45 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1279,8 +1279,8 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con
uno::UNO_QUERY );
if ( xTypeDetection.is() )
{
- INetURLObject aObj( OUString( "file:///c:/" ) );
- aObj.SetName( aRecommendedName );
+ INetURLObject aObj( OUString( "c:/" ) + aRecommendedName, INET_PROT_FILE,
+ INetURLObject::ENCODE_ALL, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DOS );
uno::Sequence< beans::PropertyValue > aTypeNameProps;
if ( ( xTypeDetection->getByName( aTypeName ) >>= aTypeNameProps ) && aTypeNameProps.getLength() )
@@ -1293,7 +1293,7 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con
aObj.SetExtension( aExtensions[0] );
}
- aRecommendedName = aObj.GetName( INetURLObject::DECODE_WITH_CHARSET );
+ aRecommendedName = aObj.GetName( INetURLObject::DECODE_WITH_CHARSET, RTL_TEXTENCODING_UTF8 );
}
}
}