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
67b37498
Kaydet (Commit)
67b37498
authored
Eyl 04, 2011
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
related #i114504: external reference manager part
üst
1f36d120
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
externalrefmgr.cxx
sc/source/ui/docshell/externalrefmgr.cxx
+26
-3
No files found.
sc/source/ui/docshell/externalrefmgr.cxx
Dosyayı görüntüle @
67b37498
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
#include "sfx2/linkmgr.hxx"
#include "sfx2/linkmgr.hxx"
#include "tools/urlobj.hxx"
#include "tools/urlobj.hxx"
#include "unotools/ucbhelper.hxx"
#include "unotools/ucbhelper.hxx"
#include "unotools/localfilehelper.hxx"
#include <memory>
#include <memory>
#include <algorithm>
#include <algorithm>
...
@@ -2201,6 +2202,10 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
...
@@ -2201,6 +2202,10 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
return
NULL
;
return
NULL
;
OUString
aOptions
=
pFileData
->
maFilterOptions
;
OUString
aOptions
=
pFileData
->
maFilterOptions
;
if
(
pFileData
->
maFilterName
.
getLength
()
)
rFilter
=
pFileData
->
maFilterName
;
// don't overwrite stored filter with guessed filter
else
ScDocumentLoader
::
GetFilterName
(
aFile
,
rFilter
,
aOptions
,
true
,
false
);;
ScDocumentLoader
::
GetFilterName
(
aFile
,
rFilter
,
aOptions
,
true
,
false
);
ScDocumentLoader
::
GetFilterName
(
aFile
,
rFilter
,
aOptions
,
true
,
false
);
const
SfxFilter
*
pFilter
=
ScDocShell
::
Factory
().
GetFilterContainer
()
->
GetFilter4FilterName
(
rFilter
);
const
SfxFilter
*
pFilter
=
ScDocShell
::
Factory
().
GetFilterContainer
()
->
GetFilter4FilterName
(
rFilter
);
...
@@ -2267,10 +2272,19 @@ bool ScExternalRefManager::isFileLoadable(const OUString& rFile) const
...
@@ -2267,10 +2272,19 @@ bool ScExternalRefManager::isFileLoadable(const OUString& rFile) const
if
(
isOwnDocument
(
rFile
))
if
(
isOwnDocument
(
rFile
))
return
false
;
return
false
;
String
aPhysical
;
if
(
utl
::
LocalFileHelper
::
ConvertURLToPhysicalName
(
rFile
,
aPhysical
)
&&
aPhysical
.
Len
())
{
// #i114504# try IsFolder/Exists only for file URLs
if
(
utl
::
UCBContentHelper
::
IsFolder
(
rFile
))
return
utl
::
UCBContentHelper
::
Exists
(
rFile
);
return
false
;
if
(
utl
::
UCBContentHelper
::
IsFolder
(
rFile
))
return
false
;
return
utl
::
UCBContentHelper
::
Exists
(
rFile
);
}
else
return
true
;
// for http and others, Exists doesn't work, but the URL can still be opened
return
utl
::
UCBContentHelper
::
Exists
(
rFile
);
return
utl
::
UCBContentHelper
::
Exists
(
rFile
);
}
}
...
@@ -2286,7 +2300,16 @@ void ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId)
...
@@ -2286,7 +2300,16 @@ void ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId)
return
;
return
;
OUString
aFilter
,
aOptions
;
OUString
aFilter
,
aOptions
;
ScDocumentLoader
::
GetFilterName
(
*
pFileName
,
aFilter
,
aOptions
,
true
,
false
);
const
SrcFileData
*
pFileData
=
getExternalFileData
(
nFileId
);
if
(
pFileData
)
{
aFilter
=
pFileData
->
maFilterName
;
aOptions
=
pFileData
->
maFilterOptions
;
}
// If a filter was already set (for example, loading the cached table),
// don't call GetFilterName which has to access the source file.
if
(
!
aFilter
.
getLength
())
ScDocumentLoader
::
GetFilterName
(
*
pFileName
,
aFilter
,
aOptions
,
true
,
false
);
sfx2
::
LinkManager
*
pLinkMgr
=
mpDoc
->
GetLinkManager
();
sfx2
::
LinkManager
*
pLinkMgr
=
mpDoc
->
GetLinkManager
();
ScExternalRefLink
*
pLink
=
new
ScExternalRefLink
(
mpDoc
,
nFileId
,
aFilter
);
ScExternalRefLink
*
pLink
=
new
ScExternalRefLink
(
mpDoc
,
nFileId
,
aFilter
);
OSL_ENSURE
(
pFileName
,
"ScExternalRefManager::insertExternalFileLink: file name pointer is NULL"
);
OSL_ENSURE
(
pFileName
,
"ScExternalRefManager::insertExternalFileLink: file name pointer is NULL"
);
...
...
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