Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
6ca75f60
Kaydet (Commit)
6ca75f60
authored
Agu 25, 2010
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fpicker-kde-non-utf8.diff: Work even with non-UTF-8 locales.
n#168616.
üst
955a13d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
27 deletions
+27
-27
kdefilepicker.cxx
fpicker/source/unx/kde/kdefilepicker.cxx
+26
-27
kdefilepicker.hxx
fpicker/source/unx/kde/kdefilepicker.hxx
+1
-0
No files found.
fpicker/source/unx/kde/kdefilepicker.cxx
Dosyayı görüntüle @
6ca75f60
...
...
@@ -226,38 +226,14 @@ void FileDialog::customEvent( QCustomEvent *pEvent )
{
KURL
::
List
qList
(
selectedURLs
()
);
for
(
KURL
::
List
::
const_iterator
it
=
qList
.
begin
();
it
!=
qList
.
end
();
++
it
)
{
qString
.
append
(
" "
);
QString
qUrlStr
=
addExtension
(
(
*
it
).
url
()
);
if
(
!
isExecuting
()
&&
!
isSupportedProtocol
(
KURL
(
qUrlStr
).
protocol
()
)
)
qUrlStr
=
localCopy
(
qUrlStr
);
if
(
qUrlStr
.
startsWith
(
"file:/"
)
&&
qUrlStr
.
mid
(
6
,
1
)
!=
"/"
)
qUrlStr
.
replace
(
"file:/"
,
"file:///"
);
if
(
!
qUrlStr
.
isEmpty
()
)
appendEscaped
(
qString
,
qUrlStr
);
}
appendURL
(
qString
,
(
*
it
)
);
}
else
{
// we have to return the selected files anyway
const
KFileItemList
*
pItems
=
ops
->
selectedItems
();
for
(
KFileItemListIterator
it
(
*
pItems
);
it
.
current
();
++
it
)
{
qString
.
append
(
" "
);
QString
qUrlStr
=
addExtension
(
(
*
it
)
->
url
().
url
()
);
if
(
!
isExecuting
()
&&
!
isSupportedProtocol
(
KURL
(
qUrlStr
).
protocol
()
)
)
qUrlStr
=
localCopy
(
qUrlStr
);
if
(
qUrlStr
.
startsWith
(
"file:/"
)
&&
qUrlStr
.
mid
(
6
,
1
)
!=
"/"
)
qUrlStr
.
replace
(
"file:/"
,
"file:///"
);
if
(
!
qUrlStr
.
isEmpty
()
)
appendEscaped
(
qString
,
qUrlStr
);
}
appendURL
(
qString
,
(
*
it
)
->
url
()
);
}
sendCommand
(
qString
);
...
...
@@ -627,7 +603,8 @@ KURL FileDialog::mostLocalURL( const KURL &rURL ) const
QString
FileDialog
::
localCopy
(
const
QString
&
rFileName
)
const
{
KURL
qLocalURL
=
mostLocalURL
(
KURL
(
rFileName
)
);
// 106 == MIB enum for UTF-8
KURL
qLocalURL
=
mostLocalURL
(
KURL
(
rFileName
,
106
)
);
if
(
qLocalURL
.
isLocalFile
()
)
return
qLocalURL
.
url
();
...
...
@@ -678,6 +655,28 @@ void FileDialog::sendCommand( const QString &rCommand )
::
std
::
cout
<<
rCommand
.
utf8
()
<<
::
std
::
endl
;
}
void
FileDialog
::
appendURL
(
QString
&
rBuffer
,
const
KURL
&
rURL
)
{
// From Martin Kretzschmar:
// file:///path/to/test%E0.odt is not a valid URL from OOo's point of
// view. (?Most modern parts of?) OOo assume(s) that the URL contains only
// ASCII characters (which test%E0.odt does) and is UTF-8 after unescaping
// (which file:///path/test%E0.odt is not).
// Cf. the comment in sal/inc/osl/file.h.
// 106 == MIB enum for UTF-8
QString
qUrlStr
=
addExtension
(
rURL
.
url
(
0
,
106
)
);
if
(
!
isExecuting
()
&&
!
isSupportedProtocol
(
rURL
.
protocol
()
)
)
qUrlStr
=
localCopy
(
qUrlStr
);
if
(
qUrlStr
.
startsWith
(
"file:/"
)
&&
qUrlStr
.
mid
(
6
,
1
)
!=
"/"
)
qUrlStr
.
replace
(
"file:/"
,
"file:///"
);
rBuffer
.
append
(
" "
);
if
(
!
qUrlStr
.
isEmpty
()
)
appendEscaped
(
rBuffer
,
qUrlStr
);
}
void
FileDialog
::
appendEscaped
(
QString
&
rBuffer
,
const
QString
&
rString
)
{
const
QChar
*
pUnicode
=
rString
.
unicode
();
...
...
fpicker/source/unx/kde/kdefilepicker.hxx
Dosyayı görüntüle @
6ca75f60
...
...
@@ -108,6 +108,7 @@ protected slots:
protected
:
void
sendCommand
(
const
QString
&
rCommand
);
void
appendURL
(
QString
&
rBuffer
,
const
KURL
&
rURL
);
void
appendEscaped
(
QString
&
rBuffer
,
const
QString
&
rString
);
QString
escapeString
(
const
QString
&
rString
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment