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
1356191e
Kaydet (Commit)
1356191e
authored
Ock 19, 2006
tarafından
Oliver Bolte
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
INTEGRATION: CWS qadev25 (1.5.6); FILE MERGED
2005/11/21 14:42:11 sw 1.5.6.1: #114501# special for ScCellRanges
üst
90a89b7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
4 deletions
+59
-4
_XNameReplace.java
qadevOOo/tests/java/ifc/container/_XNameReplace.java
+59
-4
No files found.
qadevOOo/tests/java/ifc/container/_XNameReplace.java
Dosyayı görüntüle @
1356191e
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
*
*
* $RCSfile: _XNameReplace.java,v $
* $RCSfile: _XNameReplace.java,v $
*
*
* $Revision: 1.
5
$
* $Revision: 1.
6
$
*
*
* last change: $Author:
rt $ $Date: 2005-09-08 23:23:13
$
* last change: $Author:
obo $ $Date: 2006-01-19 14:25:51
$
*
*
* The Contents of this file are made available subject to
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
* the terms of GNU Lesser General Public License Version 2.1.
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
package
ifc
.
container
;
package
ifc
.
container
;
import
com.sun.star.sheet.XCellRangeAddressable
;
import
lib.MultiMethodTest
;
import
lib.MultiMethodTest
;
import
util.ValueComparer
;
import
util.ValueComparer
;
...
@@ -143,13 +144,24 @@ public class _XNameReplace extends MultiMethodTest {
...
@@ -143,13 +144,24 @@ public class _XNameReplace extends MultiMethodTest {
log
.
println
(
"replace object '"
+
oNames
[
0
]
+
"' with another instance"
);
log
.
println
(
"replace object '"
+
oNames
[
0
]
+
"' with another instance"
);
oObj
.
replaceByName
(
oNames
[
0
],
oInstance
);
oObj
.
replaceByName
(
oNames
[
0
],
oInstance
);
Object
newEl
=
oObj
.
getByName
(
oNames
[
0
])
;
Object
newEl
=
oObj
.
getByName
(
oNames
[
0
])
;
ok
=
!
ValueComparer
.
equalValue
(
old
,
newEl
);
if
(
tEnv
.
getTestCase
().
getObjectName
().
equals
(
"ScCellRangesObj"
))
{
ok
=
compareRanges
(
old
,
newEl
);
}
else
{
ok
=
!
ValueComparer
.
equalValue
(
old
,
newEl
);
}
result
&=
ok
;
result
&=
ok
;
log
.
println
(
"result of replace: "
+
ok
);
log
.
println
(
"result of replace: "
+
ok
);
log
.
println
(
"replace back the old object"
);
log
.
println
(
"replace back the old object"
);
oObj
.
replaceByName
(
oNames
[
0
],
old
);
oObj
.
replaceByName
(
oNames
[
0
],
old
);
Object
origEl
=
oObj
.
getByName
(
oNames
[
0
])
;
Object
origEl
=
oObj
.
getByName
(
oNames
[
0
])
;
ok
=
ValueComparer
.
equalValue
(
old
,
origEl
);
if
(
tEnv
.
getTestCase
().
getObjectName
().
equals
(
"ScCellRangesObj"
))
{
ok
=
!
compareRanges
(
old
,
origEl
);
}
else
{
ok
=
ValueComparer
.
equalValue
(
old
,
origEl
);
}
result
&=
ok
;
result
&=
ok
;
log
.
println
(
"result of replace back: "
+
ok
);
log
.
println
(
"result of replace back: "
+
ok
);
}
catch
(
com
.
sun
.
star
.
lang
.
IllegalArgumentException
e
)
{
}
catch
(
com
.
sun
.
star
.
lang
.
IllegalArgumentException
e
)
{
...
@@ -174,6 +186,49 @@ public class _XNameReplace extends MultiMethodTest {
...
@@ -174,6 +186,49 @@ public class _XNameReplace extends MultiMethodTest {
disposeEnvironment
()
;
disposeEnvironment
()
;
}
}
// method returns false if the ranges are equal and true otherwise
private
boolean
compareRanges
(
Object
old
,
Object
newEl
)
{
XCellRangeAddressable
xCRA
=
(
XCellRangeAddressable
)
UnoRuntime
.
queryInterface
(
XCellRangeAddressable
.
class
,
old
);
XCellRangeAddressable
xCRA2
=
(
XCellRangeAddressable
)
UnoRuntime
.
queryInterface
(
XCellRangeAddressable
.
class
,
newEl
);
int
orgStartCol
=
xCRA
.
getRangeAddress
().
StartColumn
;
int
orgEndCol
=
xCRA
.
getRangeAddress
().
EndColumn
;
int
orgStartRow
=
xCRA
.
getRangeAddress
().
StartRow
;
int
orgEndRow
=
xCRA
.
getRangeAddress
().
EndRow
;
int
newStartCol
=
xCRA2
.
getRangeAddress
().
StartColumn
;
int
newEndCol
=
xCRA2
.
getRangeAddress
().
EndColumn
;
int
newStartRow
=
xCRA2
.
getRangeAddress
().
StartRow
;
int
newEndRow
=
xCRA2
.
getRangeAddress
().
EndRow
;
boolean
ret
=
true
;
if
(
orgStartCol
==
newStartCol
)
{
log
.
println
(
"\t StartColumn is the same"
);
ret
=
false
;
}
if
(
orgEndCol
==
newEndCol
)
{
log
.
println
(
"\t EndColumn is the same"
);
ret
=
false
;
}
if
(
orgStartRow
==
newStartRow
)
{
log
.
println
(
"\t StartRow is the same"
);
ret
=
false
;
}
if
(
orgEndRow
==
newEndRow
)
{
log
.
println
(
"\t EndRow is the same"
);
ret
=
false
;
}
return
ret
;
}
}
}
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