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
9501b985
Kaydet (Commit)
9501b985
authored
Nis 28, 2010
tarafından
sb
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sb120: do not swallow exceptions
üst
487c3b80
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
18 deletions
+40
-18
utils.java
qadevOOo/runner/util/utils.java
+37
-15
ORowSet.java
qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
+1
-1
ODatabaseForm.java
qadevOOo/tests/java/mod/_forms/ODatabaseForm.java
+1
-1
StandaloneDocumentInfo.java
qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java
+1
-1
No files found.
qadevOOo/runner/util/utils.java
Dosyayı görüntüle @
9501b985
...
...
@@ -45,6 +45,7 @@ import com.sun.star.beans.XPropertySet;
import
com.sun.star.beans.Property
;
import
com.sun.star.lang.XMultiServiceFactory
;
import
com.sun.star.uno.UnoRuntime
;
import
com.sun.star.ucb.InteractiveAugmentedIOException
;
import
com.sun.star.ucb.XSimpleFileAccess
;
import
com.sun.star.lang.XServiceInfo
;
...
...
@@ -542,16 +543,10 @@ public class utils {
return
res
;
}
/**
* Copies file to a new location using OpenOffice.org features. If the target
* file already exists, the file is deleted.
*
* @returns <code>true</code> if the file was successfully copied,
* <code>false</code> if some errors occured (e.g. file is locked, used
* by another process).
*/
public
static
boolean
overwriteFile
(
XMultiServiceFactory
xMsf
,
String
oldF
,
String
newF
)
{
boolean
res
=
false
;
private
static
void
overwriteFile_impl
(
XMultiServiceFactory
xMsf
,
String
oldF
,
String
newF
)
throws
InteractiveAugmentedIOException
{
try
{
Object
fileacc
=
xMsf
.
createInstance
(
"com.sun.star.comp.ucb.SimpleFileAccess"
);
...
...
@@ -561,15 +556,42 @@ public class utils {
simpleAccess
.
kill
(
newF
);
}
simpleAccess
.
copy
(
oldF
,
newF
);
res
=
true
;
}
catch
(
com
.
sun
.
star
.
ucb
.
InteractiveAugmentedIOException
e
)
{
return
false
;
}
catch
(
InteractiveAugmentedIOException
e
)
{
throw
e
;
}
catch
(
com
.
sun
.
star
.
uno
.
Exception
e
)
{
System
.
out
.
println
(
"Couldn't copy "
+
oldF
+
" to "
+
newF
+
"
.
"
);
System
.
out
.
println
(
"Couldn't copy "
+
oldF
+
" to "
+
newF
+
"
:
"
);
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
);
}
}
return
res
;
/**
* Copies file to a new location using OpenOffice.org features. If the target
* file already exists, the file is deleted.
*
* @returns <code>true</code> if the file was successfully copied,
* <code>false</code> if some errors occured (e.g. file is locked, used
* by another process).
*/
public
static
boolean
tryOverwriteFile
(
XMultiServiceFactory
xMsf
,
String
oldF
,
String
newF
)
{
try
{
overwriteFile_impl
(
xMsf
,
oldF
,
newF
);
}
catch
(
InteractiveAugmentedIOException
e
)
{
return
false
;
}
return
true
;
}
public
static
void
doOverwriteFile
(
XMultiServiceFactory
xMsf
,
String
oldF
,
String
newF
)
{
try
{
overwriteFile_impl
(
xMsf
,
oldF
,
newF
);
}
catch
(
InteractiveAugmentedIOException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
public
static
boolean
hasPropertyByName
(
XPropertySet
props
,
String
aName
)
{
...
...
qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
Dosyayı görüntüle @
9501b985
...
...
@@ -293,7 +293,7 @@ public class ORowSet extends TestCase {
oldF
=
utils
.
getFullURL
(
origDB
);
newF
=
tempFolder
+
tableName
+
".dbf"
;
}
while
(
!
utils
.
o
verwriteFile
(
orb
,
oldF
,
newF
)
);
while
(
!
utils
.
tryO
verwriteFile
(
orb
,
oldF
,
newF
)
);
m_tableFile
=
newF
;
}
...
...
qadevOOo/tests/java/mod/_forms/ODatabaseForm.java
Dosyayı görüntüle @
9501b985
...
...
@@ -311,7 +311,7 @@ public class ODatabaseForm extends TestCase {
oldF
=
utils
.
getFullURL
(
origDB
);
newF
=
utils
.
getOfficeTemp
((
XMultiServiceFactory
)
tParam
.
getMSF
())
+
tableName
+
".dbf"
;
}
while
(!
utils
.
o
verwriteFile
(((
XMultiServiceFactory
)
tParam
.
getMSF
()),
oldF
,
newF
)
&&
}
while
(!
utils
.
tryO
verwriteFile
(((
XMultiServiceFactory
)
tParam
.
getMSF
()),
oldF
,
newF
)
&&
(
uniqueSuffix
++
<
50
));
}
}
...
...
qadevOOo/tests/java/mod/_sfx/StandaloneDocumentInfo.java
Dosyayı görüntüle @
9501b985
...
...
@@ -87,7 +87,7 @@ public class StandaloneDocumentInfo extends TestCase {
destUrl
=
utils
.
getOfficeTemp
((
XMultiServiceFactory
)
tParam
.
getMSF
())
+
"SfxStandaloneDocInfoObject.sdw"
;
utils
.
o
verwriteFile
((
XMultiServiceFactory
)
tParam
.
getMSF
(),
srcUrl
,
destUrl
)
;
utils
.
doO
verwriteFile
((
XMultiServiceFactory
)
tParam
.
getMSF
(),
srcUrl
,
destUrl
)
;
}
/**
...
...
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