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
0a1a09be
Kaydet (Commit)
0a1a09be
authored
Ock 31, 2003
tarafından
Stephan Wunderlich
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CHG: using AnyConverter instead of simple cast
üst
441cb7b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
ScAccessiblePageHeader.java
qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeader.java
+24
-7
No files found.
qadevOOo/tests/java/mod/_sc/ScAccessiblePageHeader.java
Dosyayı görüntüle @
0a1a09be
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
*
*
* $RCSfile: ScAccessiblePageHeader.java,v $
* $RCSfile: ScAccessiblePageHeader.java,v $
*
*
* $Revision: 1.
1
$
* $Revision: 1.
2
$
*
*
* last change: $Author: sw $
* last change: $Author: sw $
*
*
...
@@ -98,6 +98,9 @@ import com.sun.star.style.XStyle;
...
@@ -98,6 +98,9 @@ import com.sun.star.style.XStyle;
import
com.sun.star.style.XStyleFamiliesSupplier
;
import
com.sun.star.style.XStyleFamiliesSupplier
;
import
com.sun.star.text.XText
;
import
com.sun.star.text.XText
;
import
com.sun.star.uno.Type
;
import
com.sun.star.uno.AnyConverter
;
/**
/**
* Test for object which is represented by accessible component of
* Test for object which is represented by accessible component of
* a printed header in 'Page Preview' mode.
* a printed header in 'Page Preview' mode.
...
@@ -140,7 +143,13 @@ public class ScAccessiblePageHeader extends TestCase {
...
@@ -140,7 +143,13 @@ public class ScAccessiblePageHeader extends TestCase {
XSpreadsheets
oSheets
=
xSpreadsheetDoc
.
getSheets
()
;
XSpreadsheets
oSheets
=
xSpreadsheetDoc
.
getSheets
()
;
XIndexAccess
oIndexSheets
=
(
XIndexAccess
)
XIndexAccess
oIndexSheets
=
(
XIndexAccess
)
UnoRuntime
.
queryInterface
(
XIndexAccess
.
class
,
oSheets
);
UnoRuntime
.
queryInterface
(
XIndexAccess
.
class
,
oSheets
);
XSpreadsheet
oSheet
=
(
XSpreadsheet
)
oIndexSheets
.
getByIndex
(
0
);
XSpreadsheet
oSheet
=
null
;
try
{
oSheet
=
(
XSpreadsheet
)
AnyConverter
.
toObject
(
new
Type
(
XSpreadsheet
.
class
),
oIndexSheets
.
getByIndex
(
0
));
}
catch
(
com
.
sun
.
star
.
lang
.
IllegalArgumentException
iae
)
{
throw
new
StatusException
(
"couldn't get sheet"
,
iae
);
}
xCell
=
oSheet
.
getCellByPosition
(
0
,
0
)
;
xCell
=
oSheet
.
getCellByPosition
(
0
,
0
)
;
xCell
.
setFormula
(
"ScAccessiblePageHeader"
);
xCell
.
setFormula
(
"ScAccessiblePageHeader"
);
}
catch
(
com
.
sun
.
star
.
lang
.
WrappedTargetException
e
)
{
}
catch
(
com
.
sun
.
star
.
lang
.
WrappedTargetException
e
)
{
...
@@ -202,15 +211,19 @@ public class ScAccessiblePageHeader extends TestCase {
...
@@ -202,15 +211,19 @@ public class ScAccessiblePageHeader extends TestCase {
XStyle
StdStyle
=
null
;
XStyle
StdStyle
=
null
;
try
{
try
{
XNameAccess
PageStyles
=
(
XNameAccess
)
XNameAccess
PageStyles
=
(
XNameAccess
)
AnyConverter
.
toObject
(
StyleFamNames
.
getByName
(
"PageStyles"
);
new
Type
(
XNameAccess
.
class
),
StdStyle
=
(
XStyle
)
PageStyles
.
getByName
(
"Default"
);
StyleFamNames
.
getByName
(
"PageStyles"
));
StdStyle
=
(
XStyle
)
AnyConverter
.
toObject
(
new
Type
(
XStyle
.
class
),
PageStyles
.
getByName
(
"Default"
));
}
catch
(
com
.
sun
.
star
.
lang
.
WrappedTargetException
e
){
}
catch
(
com
.
sun
.
star
.
lang
.
WrappedTargetException
e
){
e
.
printStackTrace
(
log
);
e
.
printStackTrace
(
log
);
throw
new
StatusException
(
"Couldn't get by name"
,
e
);
throw
new
StatusException
(
"Couldn't get by name"
,
e
);
}
catch
(
com
.
sun
.
star
.
container
.
NoSuchElementException
e
){
}
catch
(
com
.
sun
.
star
.
container
.
NoSuchElementException
e
){
e
.
printStackTrace
(
log
);
e
.
printStackTrace
(
log
);
throw
new
StatusException
(
"Couldn't get by name"
,
e
);
throw
new
StatusException
(
"Couldn't get by name"
,
e
);
}
catch
(
com
.
sun
.
star
.
lang
.
IllegalArgumentException
iae
)
{
throw
new
StatusException
(
"Couldn't convert any"
,
iae
);
}
}
//get the property-set
//get the property-set
...
@@ -222,14 +235,18 @@ public class ScAccessiblePageHeader extends TestCase {
...
@@ -222,14 +235,18 @@ public class ScAccessiblePageHeader extends TestCase {
// first we write what we are intend to do to log file
// first we write what we are intend to do to log file
log
.
println
(
"creating a test environment"
);
log
.
println
(
"creating a test environment"
);
try
{
try
{
RPHC
=
(
XHeaderFooterContent
)
RPHC
=
(
XHeaderFooterContent
)
AnyConverter
.
toObject
(
PropSet
.
getPropertyValue
(
"RightPageHeaderContent"
);
new
Type
(
XHeaderFooterContent
.
class
),
PropSet
.
getPropertyValue
(
"RightPageHeaderContent"
));
}
catch
(
com
.
sun
.
star
.
lang
.
WrappedTargetException
e
){
}
catch
(
com
.
sun
.
star
.
lang
.
WrappedTargetException
e
){
e
.
printStackTrace
(
log
);
e
.
printStackTrace
(
log
);
throw
new
StatusException
(
"Couldn't get HeaderContent"
,
e
);
throw
new
StatusException
(
"Couldn't get HeaderContent"
,
e
);
}
catch
(
com
.
sun
.
star
.
beans
.
UnknownPropertyException
e
){
}
catch
(
com
.
sun
.
star
.
beans
.
UnknownPropertyException
e
){
e
.
printStackTrace
(
log
);
e
.
printStackTrace
(
log
);
throw
new
StatusException
(
"Couldn't get HeaderContent"
,
e
);
throw
new
StatusException
(
"Couldn't get HeaderContent"
,
e
);
}
catch
(
com
.
sun
.
star
.
lang
.
IllegalArgumentException
e
){
e
.
printStackTrace
(
log
);
throw
new
StatusException
(
"Couldn't get HeaderContent"
,
e
);
}
}
final
XHeaderFooterContent
RPHC2
=
RPHC
;
final
XHeaderFooterContent
RPHC2
=
RPHC
;
...
...
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