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
11b0bbcb
Kaydet (Commit)
11b0bbcb
authored
Mar 16, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add test for conditional format list size
Change-Id: Ib7df18a5ff8f9afa00c925245eae0ae8be9e06e9
üst
87c18643
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
new_cond_format.cxx
sc/qa/extras/new_cond_format.cxx
+26
-1
No files found.
sc/qa/extras/new_cond_format.cxx
Dosyayı görüntüle @
11b0bbcb
...
...
@@ -20,7 +20,7 @@ using namespace css;
namespace
sc_apitest
{
#define NUMBER_OF_TESTS
1
#define NUMBER_OF_TESTS
2
class
ScConditionalFormatTest
:
public
CalcUnoApiTest
{
...
...
@@ -32,9 +32,11 @@ public:
uno
::
Reference
<
uno
::
XInterface
>
init
();
void
testRequestCondFormatListFromSheet
();
void
testCondFormatListProperties
();
CPPUNIT_TEST_SUITE
(
ScConditionalFormatTest
);
CPPUNIT_TEST
(
testRequestCondFormatListFromSheet
);
CPPUNIT_TEST
(
testCondFormatListProperties
);
CPPUNIT_TEST_SUITE_END
();
private
:
...
...
@@ -79,6 +81,29 @@ void ScConditionalFormatTest::testRequestCondFormatListFromSheet()
CPPUNIT_ASSERT
(
xCondFormats
.
is
());
}
namespace
{
uno
::
Reference
<
sheet
::
XConditionalFormats
>
getConditionalFormatList
(
uno
::
Reference
<
uno
::
XInterface
>
xInterface
)
{
uno
::
Reference
<
sheet
::
XSpreadsheet
>
xSheet
(
xInterface
,
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
beans
::
XPropertySet
>
xProps
(
xSheet
,
uno
::
UNO_QUERY_THROW
);
uno
::
Any
aAny
=
xProps
->
getPropertyValue
(
"ConditionalFormats"
);
uno
::
Reference
<
sheet
::
XConditionalFormats
>
xCondFormats
;
CPPUNIT_ASSERT
(
aAny
>>=
xCondFormats
);
CPPUNIT_ASSERT
(
xCondFormats
.
is
());
return
xCondFormats
;
}
}
void
ScConditionalFormatTest
::
testCondFormatListProperties
()
{
uno
::
Reference
<
sheet
::
XConditionalFormats
>
xCondFormat
=
getConditionalFormatList
(
init
());
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
4
),
xCondFormat
->
getLength
());
}
void
ScConditionalFormatTest
::
setUp
()
{
nTest
++
;
...
...
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