diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-10-29 13:22:30 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-10-29 13:22:30 +0000 |
commit | d7c1cd7976cc346a7c9384dff41f06376126b38a (patch) | |
tree | 5471e0f86a8b953909e22f329c0e062cf090b8ff /fpicker | |
parent | ab33e14647ada2a32624fa39ec0ddbbbdc694df5 (diff) |
CWS-TOOLING: integrate CWS c07v026_OOO320
2009-10-19 10:26:11 +0200 mav r277008 : #b6886425# use standard solution to encode the URL for the Gnome
2009-10-19 08:38:28 +0200 mav r276998 : #b6886425# encode the URL correctly for the Gnome
2009-10-07 12:49:32 +0200 os r276749 : #b6887668# resize items depending on the item text length
2009-09-28 18:42:32 +0200 dr r276499 : #b6883075# shrink print ranges to Excel sheet limits
2009-09-28 16:50:25 +0200 od r276497 : #b6882166# method <SwSectionFrm::SimpleFormat(..)>
- assure notification on position changes, otherwise the layout will not be correct.
2009-09-15 18:31:37 +0200 dr r276185 : #b6872823# check cursor before using, patch by aw
2009-09-09 10:52:52 +0200 od r275975 : #b6879723# correct handling of new list level attributes regarding paragraph indent values,
especially in case of OOo 2.0 and former hidden compatibility option "Ignore first line
indent on numbering"
2009-09-08 11:10:31 +0200 od r275918 : #b6876367# method <lcl_SetTxtFmtColl(..)>
- do not reset list attributes at paragraph, if its applied list style
will not change due to the newly applied paragraph style.
2009-09-07 12:48:58 +0200 obo r275890 : Merge from c07v025 into this CWS
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/unx/gnome/SalGtkPicker.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fpicker/source/unx/gnome/SalGtkPicker.cxx b/fpicker/source/unx/gnome/SalGtkPicker.cxx index b6b9d2bb36ab..cde61d801495 100644 --- a/fpicker/source/unx/gnome/SalGtkPicker.cxx +++ b/fpicker/source/unx/gnome/SalGtkPicker.cxx @@ -73,6 +73,8 @@ rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn) INetURLObject aURL(sURL); if (INET_PROT_FILE == aURL.GetProtocol()) { + // all the URLs are handled by office in UTF-8 + // so the Gnome FP related URLs should be converted accordingly gchar *pEncodedFileName = g_filename_from_uri(pIn, NULL, NULL); if ( pEncodedFileName ) { @@ -94,12 +96,19 @@ rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn) rtl::OString SalGtkPicker::unicodetouri(const rtl::OUString &rURL) { + // all the URLs are handled by office in UTF-8 ( and encoded with "%xx" codes based on UTF-8 ) + // so the Gnome FP related URLs should be converted accordingly OString sURL = OUStringToOString(rURL, RTL_TEXTENCODING_UTF8); INetURLObject aURL(rURL); if (INET_PROT_FILE == aURL.GetProtocol()) { - rtl::OUString sOUURL = aURL.getExternalURL(INetURLObject::DECODE_WITH_CHARSET, osl_getThreadTextEncoding()); - sURL = OUStringToOString( sOUURL, osl_getThreadTextEncoding()); + OUString aNewURL = Reference<uri::XExternalUriReferenceTranslator>(Reference<XMultiServiceFactory>(comphelper::getProcessServiceFactory(), UNO_QUERY_THROW)->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator"))), UNO_QUERY_THROW)->translateToExternal( rURL ); + + if( aNewURL.getLength() ) + { + // At this point the URL should contain ascii characters only actually + sURL = OUStringToOString( aNewURL, osl_getThreadTextEncoding() ); + } } return sURL; } |