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
ebd70ae1
Kaydet (Commit)
ebd70ae1
authored
Haz 03, 2013
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add test case for outline import from ODS
Change-Id: I60f92dd13282281d77571e41707d68ae55722d9b
üst
d91b1238
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
2 deletions
+58
-2
olinetab.hxx
sc/inc/olinetab.hxx
+2
-2
outline.ods
sc/qa/unit/data/ods/outline.ods
+0
-0
subsequent_filters-test.cxx
sc/qa/unit/subsequent_filters-test.cxx
+56
-0
No files found.
sc/inc/olinetab.hxx
Dosyayı görüntüle @
ebd70ae1
...
...
@@ -41,7 +41,7 @@ public:
ScOutlineEntry
(
SCCOLROW
nNewStart
,
SCCOLROW
nNewSize
,
bool
bNewHidden
=
false
);
ScOutlineEntry
(
const
ScOutlineEntry
&
rEntry
);
SCCOLROW
GetStart
()
const
;
SC
_DLLPUBLIC
SC
COLROW
GetStart
()
const
;
SCSIZE
GetSize
()
const
;
SC_DLLPUBLIC
SCCOLROW
GetEnd
()
const
;
...
...
@@ -53,7 +53,7 @@ public:
/**
* @return true if the control is visible, false otherwise.
*/
bool
IsVisible
()
const
;
SC_DLLPUBLIC
bool
IsVisible
()
const
;
void
Move
(
SCsCOLROW
nDelta
);
void
SetSize
(
SCSIZE
nNewSize
);
...
...
sc/qa/unit/data/ods/outline.ods
0 → 100644
Dosyayı görüntüle @
ebd70ae1
File added
sc/qa/unit/subsequent_filters-test.cxx
Dosyayı görüntüle @
ebd70ae1
...
...
@@ -40,6 +40,7 @@
#include "docfunc.hxx"
#include "markdata.hxx"
#include "colorscale.hxx"
#include "olinetab.hxx"
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
...
...
@@ -137,6 +138,7 @@ public:
void
testOptimalHeightReset
();
void
testPrintRangeODS
();
void
testOutlineODS
();
CPPUNIT_TEST_SUITE
(
ScFiltersTest
);
CPPUNIT_TEST
(
testBasicCellContentODS
);
...
...
@@ -201,6 +203,7 @@ public:
CPPUNIT_TEST
(
testMiscRowHeights
);
CPPUNIT_TEST
(
testOptimalHeightReset
);
CPPUNIT_TEST
(
testPrintRangeODS
);
CPPUNIT_TEST
(
testOutlineODS
);
CPPUNIT_TEST_SUITE_END
();
private
:
...
...
@@ -1941,6 +1944,59 @@ void ScFiltersTest::testPrintRangeODS()
CPPUNIT_ASSERT_EQUAL
(
ScRange
(
0
,
2
,
0
,
0
,
4
,
0
),
*
pRange
);
}
void
ScFiltersTest
::
testOutlineODS
()
{
ScDocShellRef
xDocSh
=
loadDoc
(
"outline."
,
ODS
);
ScDocument
*
pDoc
=
xDocSh
->
GetDocument
();
const
ScOutlineTable
*
pTable
=
pDoc
->
GetOutlineTable
(
0
);
CPPUNIT_ASSERT
(
pTable
);
const
ScOutlineArray
*
pArr
=
pTable
->
GetRowArray
();
size_t
nDepth
=
pArr
->
GetDepth
();
CPPUNIT_ASSERT_EQUAL
(
size_t
(
4
),
nDepth
);
for
(
size_t
i
=
0
;
i
<
nDepth
;
++
i
)
{
CPPUNIT_ASSERT_EQUAL
(
size_t
(
1
),
pArr
->
GetCount
(
i
));
}
struct
OutlineData
{
SCCOLROW
nStart
;
SCCOLROW
nEnd
;
bool
bHidden
;
bool
bVisible
;
size_t
nDepth
;
size_t
nIndex
;
};
OutlineData
aRow
[]
=
{
{
1
,
29
,
false
,
true
,
0
,
0
},
{
2
,
26
,
false
,
true
,
1
,
0
},
{
4
,
23
,
false
,
true
,
2
,
0
},
{
6
,
20
,
true
,
true
,
3
,
0
}
};
for
(
size_t
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aRow
);
++
i
)
{
const
ScOutlineEntry
*
pEntry
=
pArr
->
GetEntry
(
aRow
[
i
].
nDepth
,
aRow
[
i
].
nIndex
);
SCCOLROW
nStart
=
pEntry
->
GetStart
();
CPPUNIT_ASSERT_EQUAL
(
aRow
[
i
].
nStart
,
nStart
);
SCCOLROW
nEnd
=
pEntry
->
GetEnd
();
CPPUNIT_ASSERT_EQUAL
(
aRow
[
i
].
nEnd
,
nEnd
);
bool
bHidden
=
pEntry
->
IsHidden
();
CPPUNIT_ASSERT_EQUAL
(
aRow
[
i
].
bHidden
,
bHidden
);
bool
bVisible
=
pEntry
->
IsVisible
();
CPPUNIT_ASSERT_EQUAL
(
aRow
[
i
].
bVisible
,
bVisible
);
}
}
ScFiltersTest
::
ScFiltersTest
()
:
ScBootstrapFixture
(
"/sc/qa/unit/data"
)
{
...
...
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