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
438efb38
Kaydet (Commit)
438efb38
authored
Mar 19, 2013
tarafından
Andras Timar
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#39445 writing out tools/fsys.hxx (basic)
Change-Id: I2ec7546572fa72359615f371715b4aa82b1182ca
üst
b82f6851
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
29 deletions
+17
-29
runtime.hxx
basic/source/inc/runtime.hxx
+0
-6
methods.cxx
basic/source/runtime/methods.cxx
+17
-23
No files found.
basic/source/inc/runtime.hxx
Dosyayı görüntüle @
438efb38
...
...
@@ -458,12 +458,6 @@ OUString getFullPath( const OUString& aRelPath );
// has not to be infected with UNO)
void
implStepRenameUCB
(
const
OUString
&
aSource
,
const
OUString
&
aDest
);
//*** OSL file access ***
// #87427 OSL need File URLs, so map to getFullPath
inline
OUString
getFullPathUNC
(
const
OUString
&
aRelPath
)
{
return
getFullPath
(
aRelPath
);
}
void
implStepRenameOSL
(
const
OUString
&
aSource
,
const
OUString
&
aDest
);
bool
IsBaseIndexOne
();
...
...
basic/source/runtime/methods.cxx
Dosyayı görüntüle @
438efb38
...
...
@@ -38,11 +38,7 @@
#include "runtime.hxx"
#include "sbunoobj.hxx"
#ifdef WNT
#include <tools/fsys.hxx>
#else
#include <osl/file.hxx>
#endif
#include "errobject.hxx"
#include <comphelper/processfactory.hxx>
...
...
@@ -548,7 +544,7 @@ void implStepRenameUCB( const OUString& aSource, const OUString& aDest )
// Implementation of StepRENAME with OSL
void
implStepRenameOSL
(
const
OUString
&
aSource
,
const
OUString
&
aDest
)
{
FileBase
::
RC
nRet
=
File
::
move
(
getFullPath
UNC
(
aSource
),
getFullPathUNC
(
aDest
)
);
FileBase
::
RC
nRet
=
File
::
move
(
getFullPath
(
aSource
),
getFullPath
(
aDest
)
);
if
(
nRet
!=
FileBase
::
E_None
)
{
StarBASIC
::
Error
(
SbERR_PATH_NOT_FOUND
);
...
...
@@ -582,7 +578,7 @@ RTLFUNC(FileCopy)
}
else
{
FileBase
::
RC
nRet
=
File
::
copy
(
getFullPath
UNC
(
aSource
),
getFullPathUNC
(
aDest
)
);
FileBase
::
RC
nRet
=
File
::
copy
(
getFullPath
(
aSource
),
getFullPath
(
aDest
)
);
if
(
nRet
!=
FileBase
::
E_None
)
{
StarBASIC
::
Error
(
SbERR_PATH_NOT_FOUND
);
...
...
@@ -626,7 +622,7 @@ RTLFUNC(Kill)
}
else
{
File
::
remove
(
getFullPath
UNC
(
aFileSpec
)
);
File
::
remove
(
getFullPath
(
aFileSpec
)
);
}
}
else
...
...
@@ -662,7 +658,7 @@ RTLFUNC(MkDir)
}
else
{
Directory
::
create
(
getFullPath
UNC
(
aPath
)
);
Directory
::
create
(
getFullPath
(
aPath
)
);
}
}
else
...
...
@@ -774,7 +770,7 @@ RTLFUNC(RmDir)
}
else
{
implRemoveDirRecursive
(
getFullPath
UNC
(
aPath
)
);
implRemoveDirRecursive
(
getFullPath
(
aPath
)
);
}
}
else
...
...
@@ -840,7 +836,7 @@ RTLFUNC(FileLen)
else
{
DirectoryItem
aItem
;
DirectoryItem
::
get
(
getFullPath
UNC
(
aStr
),
aItem
);
DirectoryItem
::
get
(
getFullPath
(
aStr
),
aItem
);
FileStatus
aFileStatus
(
osl_FileStatus_Mask_FileSize
);
aItem
.
getFileStatus
(
aFileStatus
);
nLen
=
(
sal_Int32
)
aFileStatus
.
getFileSize
();
...
...
@@ -2927,18 +2923,16 @@ RTLFUNC(GetAttr)
{
sal_Int16
nFlags
=
0
;
// In Windows,
W
e want to use Windows API to get the file attributes
// In Windows,
w
e want to use Windows API to get the file attributes
// for VBA interoperability.
#if defined( WNT )
if
(
SbiRuntime
::
isVBAEnabled
()
)
{
DirEntry
aEntry
(
rPar
.
Get
(
1
)
->
GetOUString
()
);
aEntry
.
ToAbs
();
// #57064 extract the real-path for virtual URLs
OString
aByteStrFullPath
(
OUStringToOString
(
aEntry
.
GetFull
(),
osl_getThreadTextEncoding
()));
DWORD
nRealFlags
=
GetFileAttributes
(
aByteStrFullPath
.
getStr
());
OUString
aPathURL
=
getFullPath
(
rPar
.
Get
(
1
)
->
GetOUString
()
);
OUString
aPath
;
getSystemPathFromFileURL
(
aPathURL
,
aPath
);
OString
aSystemPath
(
OUStringToOString
(
aPath
,
osl_getThreadTextEncoding
()));
DWORD
nRealFlags
=
GetFileAttributes
(
aSystemPath
.
getStr
());
if
(
nRealFlags
!=
0xffffffff
)
{
if
(
nRealFlags
==
FILE_ATTRIBUTE_NORMAL
)
...
...
@@ -2999,7 +2993,7 @@ RTLFUNC(GetAttr)
else
{
DirectoryItem
aItem
;
DirectoryItem
::
get
(
getFullPath
UNC
(
rPar
.
Get
(
1
)
->
GetOUString
()
),
aItem
);
DirectoryItem
::
get
(
getFullPath
(
rPar
.
Get
(
1
)
->
GetOUString
()
),
aItem
);
FileStatus
aFileStatus
(
osl_FileStatus_Mask_Attributes
|
osl_FileStatus_Mask_Type
);
aItem
.
getFileStatus
(
aFileStatus
);
sal_uInt64
nAttributes
=
aFileStatus
.
getAttributes
();
...
...
@@ -3059,7 +3053,7 @@ RTLFUNC(FileDateTime)
else
{
DirectoryItem
aItem
;
DirectoryItem
::
get
(
getFullPath
UNC
(
aPath
),
aItem
);
DirectoryItem
::
get
(
getFullPath
(
aPath
),
aItem
);
FileStatus
aFileStatus
(
osl_FileStatus_Mask_ModifyTime
);
aItem
.
getFileStatus
(
aFileStatus
);
TimeValue
aTimeVal
=
aFileStatus
.
getModifyTime
();
...
...
@@ -3506,7 +3500,7 @@ RTLFUNC(Shell)
std
::
list
<
String
>::
const_iterator
iter
=
aTokenList
.
begin
();
const
OUString
&
rStr
=
*
iter
;
OUString
aOUStrProg
(
rStr
.
getStr
(),
rStr
.
getLength
()
);
OUString
aOUStrProgU
NC
=
getFullPathUNC
(
aOUStrProg
);
OUString
aOUStrProgU
RL
=
getFullPath
(
aOUStrProg
);
++
iter
;
...
...
@@ -3526,7 +3520,7 @@ RTLFUNC(Shell)
oslProcess
pApp
;
sal_Bool
bSucc
=
osl_executeProcess
(
aOUStrProgU
NC
.
pData
,
aOUStrProgU
RL
.
pData
,
pParamList
,
nParamCount
,
nOptions
,
...
...
@@ -4583,7 +4577,7 @@ RTLFUNC(FileExists)
else
{
DirectoryItem
aItem
;
FileBase
::
RC
nRet
=
DirectoryItem
::
get
(
getFullPath
UNC
(
aStr
),
aItem
);
FileBase
::
RC
nRet
=
DirectoryItem
::
get
(
getFullPath
(
aStr
),
aItem
);
bExists
=
(
nRet
==
FileBase
::
E_None
);
}
rPar
.
Get
(
0
)
->
PutBool
(
bExists
);
...
...
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