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
1f36d120
Kaydet (Commit)
1f36d120
authored
Eyl 04, 2011
tarafından
Niklas Nebel
Kaydeden (comit)
Markus Mohrhard
Eyl 06, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
related #i114504: don't assume external references are always file urls
üst
5b478183
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
xmltabi.cxx
sc/source/filter/xml/xmltabi.cxx
+16
-12
No files found.
sc/source/filter/xml/xmltabi.cxx
Dosyayı görüntüle @
1f36d120
...
...
@@ -57,6 +57,8 @@
#include <xmloff/xmltoken.hxx>
#include <xmloff/XMLEventsImportContext.hxx>
#include <tools/urlobj.hxx>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheets.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
...
...
@@ -90,27 +92,29 @@ static bool lcl_isExternalRefCache(const rtl::OUString& rName, rtl::OUString& rU
// 'file:///path/to/file's.ods'#Sheet (Notice the quote in the file name.
// That's allowed.)
static
const
sal_Unicode
aPrefix
[]
=
{
'\''
,
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
};
if
(
rName
.
toChar
()
!=
'\''
)
// initial quote
return
false
;
// #i114504# Other schemes besides "file:" are also allowed.
// CompareProtocolScheme is quick, only looks at the start of the string.
INetProtocol
eProt
=
INetURLObject
::
CompareProtocolScheme
(
rName
.
copy
(
1
)
);
if
(
eProt
==
INET_PROT_NOT_VALID
)
return
false
;
rtl
::
OUString
aPrefix
=
INetURLObject
::
GetScheme
(
eProt
);
sal_Int32
nPrefLen
=
aPrefix
.
getLength
();
rtl
::
OUStringBuffer
aUrlBuf
,
aTabNameBuf
;
aUrlBuf
.
append
Ascii
(
"file://"
);
aUrlBuf
.
append
(
aPrefix
);
sal_Int32
n
=
rName
.
getLength
();
const
sal_Unicode
*
p
=
rName
.
getStr
();
bool
bInUrl
=
true
;
sal_Unicode
cPrev
=
0
;
for
(
sal_Int32
i
=
0
;
i
<
n
;
++
i
)
for
(
sal_Int32
i
=
nPrefLen
+
1
;
i
<
n
;
++
i
)
// start the loop after quote and prefix
{
const
sal_Unicode
c
=
p
[
i
];
if
(
i
<=
7
)
{
// Checking the prefix 'file://'.
if
(
c
!=
aPrefix
[
i
])
return
false
;
}
else
if
(
bInUrl
)
if
(
bInUrl
)
{
// parsing file URL
if
(
c
==
'#'
)
...
...
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