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
693d7797
Kaydet (Commit)
693d7797
authored
May 24, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use comphelper::resolveLink
üst
3f0cbdfd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
28 deletions
+16
-28
makefile.mk
jvmfwk/plugins/sunmajor/pluginlib/makefile.mk
+1
-0
util.cxx
jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+14
-27
build.lst
jvmfwk/prj/build.lst
+1
-1
No files found.
jvmfwk/plugins/sunmajor/pluginlib/makefile.mk
Dosyayı görüntüle @
693d7797
...
@@ -61,6 +61,7 @@ SHL1TARGET= $(UNOCOMPONENT1)
...
@@ -61,6 +61,7 @@ SHL1TARGET= $(UNOCOMPONENT1)
SHL1STDLIBS
=
\
SHL1STDLIBS
=
\
$(CPPULIB)
\
$(CPPULIB)
\
$(CPPUHELPER)
\
$(CPPUHELPER)
\
$(COMPHELPERLIB)
\
$(SALLIB)
\
$(SALLIB)
\
$(SALHELPERLIB)
$(SALHELPERLIB)
...
...
jvmfwk/plugins/sunmajor/pluginlib/util.cxx
Dosyayı görüntüle @
693d7797
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include "rtl/byteseq.hxx"
#include "rtl/byteseq.hxx"
#include "rtl/ustrbuf.hxx"
#include "rtl/ustrbuf.hxx"
#include "rtl/instance.hxx"
#include "rtl/instance.hxx"
#include <comphelper/linkhelper.hxx>
#include "boost/scoped_array.hpp"
#include "boost/scoped_array.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Sequence.hxx"
#include <utility>
#include <utility>
...
@@ -59,6 +60,7 @@
...
@@ -59,6 +60,7 @@
#include "sunjre.hxx"
#include "sunjre.hxx"
#include "vendorlist.hxx"
#include "vendorlist.hxx"
#include "diagnostics.h"
#include "diagnostics.h"
using
namespace
osl
;
using
namespace
osl
;
using
namespace
std
;
using
namespace
std
;
...
@@ -820,32 +822,20 @@ bool getJREInfoByPath(const rtl::OUString& path,
...
@@ -820,32 +822,20 @@ bool getJREInfoByPath(const rtl::OUString& path,
*/
*/
OUString
resolveDirPath
(
const
OUString
&
path
)
OUString
resolveDirPath
(
const
OUString
&
path
)
{
{
OUString
ret
;
OUString
sResolved
=
path
;
OUString
sResolved
;
//getAbsoluteFileURL also resolves links
if
(
!
comphelper
::
resolveLink
(
sResolved
))
if
(
File
::
getAbsoluteFileURL
(
OUSTR
(
"file:///"
),
path
,
sResolved
)
!=
File
::
E_None
)
return
OUString
();
return
OUString
();
//check if this is a valid path and if it is a directory
OUString
ret
;
//check if this is a directory
DirectoryItem
item
;
DirectoryItem
item
;
if
(
DirectoryItem
::
get
(
sResolved
,
item
)
==
File
::
E_None
)
if
(
DirectoryItem
::
get
(
sResolved
,
item
)
==
File
::
E_None
)
{
{
FileStatus
status
(
osl_FileStatus_Mask_Type
|
FileStatus
status
(
osl_FileStatus_Mask_Type
|
osl_FileStatus_Mask_LinkTargetURL
|
osl_FileStatus_Mask_FileURL
);
osl_FileStatus_Mask_FileURL
);
int
nDepth
=
0
;
while
(
item
.
getFileStatus
(
status
)
==
File
::
E_None
&&
status
.
getFileType
()
==
FileStatus
::
Link
)
{
if
(
++
nDepth
==
128
)
break
;
sResolved
=
status
.
getLinkTargetURL
();
if
(
DirectoryItem
::
get
(
sResolved
,
item
)
!=
File
::
E_None
)
break
;
}
if
(
item
.
getFileStatus
(
status
)
==
File
::
E_None
if
(
item
.
getFileStatus
(
status
)
==
File
::
E_None
&&
status
.
getFileType
()
==
FileStatus
::
Directory
)
&&
status
.
getFileType
()
==
FileStatus
::
Directory
)
{
{
...
@@ -856,8 +846,7 @@ OUString resolveDirPath(const OUString & path)
...
@@ -856,8 +846,7 @@ OUString resolveDirPath(const OUString & path)
#endif
#endif
}
}
}
}
else
return
OUString
();
return
ret
;
return
ret
;
}
}
/** Checks if the path is a file. If it is a link to a file than
/** Checks if the path is a file. If it is a link to a file than
...
@@ -865,20 +854,20 @@ OUString resolveDirPath(const OUString & path)
...
@@ -865,20 +854,20 @@ OUString resolveDirPath(const OUString & path)
*/
*/
OUString
resolveFilePath
(
const
OUString
&
path
)
OUString
resolveFilePath
(
const
OUString
&
path
)
{
{
OUString
ret
;
OUString
sResolved
=
path
;
OUString
sResolved
;
if
(
File
::
getAbsoluteFileURL
(
if
(
!
comphelper
::
resolveLink
(
sResolved
))
OUSTR
(
"file:///"
),
path
,
sResolved
)
!=
File
::
E_None
)
return
OUString
();
return
OUString
();
OUString
ret
;
//check if this is a valid path to a file or and if it is a link
//check if this is a valid path to a file or and if it is a link
DirectoryItem
item
;
DirectoryItem
item
;
if
(
DirectoryItem
::
get
(
sResolved
,
item
)
==
File
::
E_None
)
if
(
DirectoryItem
::
get
(
sResolved
,
item
)
==
File
::
E_None
)
{
{
FileStatus
status
(
osl_FileStatus_Mask_Type
|
FileStatus
status
(
osl_FileStatus_Mask_Type
|
osl_FileStatus_Mask_LinkTargetURL
|
osl_FileStatus_Mask_FileURL
);
osl_FileStatus_Mask_FileURL
);
if
(
item
.
getFileStatus
(
status
)
==
File
::
E_None
if
(
item
.
getFileStatus
(
status
)
==
File
::
E_None
&&
status
.
getFileType
()
==
FileStatus
::
Regular
)
&&
status
.
getFileType
()
==
FileStatus
::
Regular
)
{
{
...
@@ -889,8 +878,6 @@ OUString resolveFilePath(const OUString & path)
...
@@ -889,8 +878,6 @@ OUString resolveFilePath(const OUString & path)
#endif
#endif
}
}
}
}
else
return
OUString
();
return
ret
;
return
ret
;
}
}
...
...
jvmfwk/prj/build.lst
Dosyayı görüntüle @
693d7797
jvmf jvmfwk : cppu cppuhelper sal LIBXML2:libxml2 NULL
jvmf jvmfwk : cppu cppuhelper sal
comphelper
LIBXML2:libxml2 NULL
jvmf jvmfwk\inc nmake - all jvmf_inc NULL
jvmf jvmfwk\inc nmake - all jvmf_inc NULL
jvmf jvmfwk\source nmake - all jvmf_framework jvmf_inc NULL
jvmf jvmfwk\source nmake - all jvmf_framework jvmf_inc NULL
jvmf jvmfwk\plugins\sunmajor\pluginlib nmake - all jvmf_sunmajorlib jvmf_inc NULL
jvmf jvmfwk\plugins\sunmajor\pluginlib nmake - all jvmf_sunmajorlib jvmf_inc 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