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
11109ded
Kaydet (Commit)
11109ded
authored
Ara 30, 2014
tarafından
Markus Mohrhard
Kaydeden (comit)
Markus Mohrhard
Ara 30, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add test for fdo#84556
Change-Id: I9b3af4f66513fff437facd17c0758ee92ac5744d
üst
b010e672
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
13 deletions
+48
-13
relative-refs1.xls
sc/qa/unit/data/xls/shared-formula/relative-refs1.xls
+0
-0
relative-refs2.xls
sc/qa/unit/data/xls/shared-formula/relative-refs2.xls
+0
-0
subsequent_filters-test.cxx
sc/qa/unit/subsequent_filters-test.cxx
+48
-13
No files found.
sc/qa/unit/data/xls/shared-formula/relative-refs.xls
→
sc/qa/unit/data/xls/shared-formula/relative-refs
1
.xls
Dosyayı görüntüle @
11109ded
File moved
sc/qa/unit/data/xls/shared-formula/relative-refs2.xls
0 → 100644
Dosyayı görüntüle @
11109ded
File added
sc/qa/unit/subsequent_filters-test.cxx
Dosyayı görüntüle @
11109ded
...
@@ -2583,23 +2583,58 @@ void ScFiltersTest::testSharedFormulaXLSB()
...
@@ -2583,23 +2583,58 @@ void ScFiltersTest::testSharedFormulaXLSB()
void
ScFiltersTest
::
testSharedFormulaXLS
()
void
ScFiltersTest
::
testSharedFormulaXLS
()
{
{
ScDocShellRef
xDocSh
=
loadDoc
(
"shared-formula/relative-refs."
,
XLS
);
{
CPPUNIT_ASSERT
(
xDocSh
.
Is
());
// fdo#80091
ScDocument
&
rDoc
=
xDocSh
->
GetDocument
();
ScDocShellRef
xDocSh
=
loadDoc
(
"shared-formula/relative-refs1."
,
XLS
);
rDoc
.
CalcAll
();
CPPUNIT_ASSERT
(
xDocSh
.
Is
());
ScDocument
&
rDoc
=
xDocSh
->
GetDocument
();
rDoc
.
CalcAll
();
// A1:A30 should be all formulas, and they should belong to the same group.
// A1:A30 should be all formulas, and they should belong to the same group.
const
ScFormulaCell
*
pFC
=
rDoc
.
GetFormulaCell
(
ScAddress
(
0
,
1
,
0
));
const
ScFormulaCell
*
pFC
=
rDoc
.
GetFormulaCell
(
ScAddress
(
0
,
1
,
0
));
CPPUNIT_ASSERT
(
pFC
);
CPPUNIT_ASSERT
(
pFC
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
SCROW
>
(
1
),
pFC
->
GetSharedTopRow
());
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
SCROW
>
(
1
),
pFC
->
GetSharedTopRow
());
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
SCROW
>
(
29
),
pFC
->
GetSharedLength
());
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
SCROW
>
(
29
),
pFC
->
GetSharedLength
());
for
(
SCROW
nRow
=
0
;
nRow
<
30
;
++
nRow
)
for
(
SCROW
nRow
=
0
;
nRow
<
30
;
++
nRow
)
{
{
ASSERT_DOUBLES_EQUAL
(
double
(
nRow
+
1
),
rDoc
.
GetValue
(
0
,
nRow
,
0
));
ASSERT_DOUBLES_EQUAL
(
double
(
nRow
+
1
),
rDoc
.
GetValue
(
0
,
nRow
,
0
));
}
xDocSh
->
DoClose
();
}
}
xDocSh
->
DoClose
();
{
// fdo#84556 and some related tests
ScDocShellRef
xDocSh
=
loadDoc
(
"shared-formula/relative-refs2."
,
XLS
);
CPPUNIT_ASSERT
(
xDocSh
.
Is
());
ScDocument
&
rDoc
=
xDocSh
->
GetDocument
();
rDoc
.
CalcAll
();
{
const
ScFormulaCell
*
pFC
=
rDoc
.
GetFormulaCell
(
ScAddress
(
2
,
1
,
0
));
CPPUNIT_ASSERT
(
pFC
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
SCROW
>
(
1
),
pFC
->
GetSharedTopRow
());
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
SCROW
>
(
10
),
pFC
->
GetSharedLength
());
OUString
aFormula
;
rDoc
.
GetFormula
(
2
,
1
,
0
,
aFormula
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"=SUM(B9:D9)"
),
aFormula
);
}
{
const
ScFormulaCell
*
pFC
=
rDoc
.
GetFormulaCell
(
ScAddress
(
4
,
8
,
0
));
CPPUNIT_ASSERT
(
pFC
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
SCROW
>
(
8
),
pFC
->
GetSharedTopRow
());
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
SCROW
>
(
10
),
pFC
->
GetSharedLength
());
OUString
aFormula
;
rDoc
.
GetFormula
(
4
,
8
,
0
,
aFormula
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"=SUM(G9:EY9)"
),
aFormula
);
}
xDocSh
->
DoClose
();
}
}
}
void
ScFiltersTest
::
testExternalRefCacheXLSX
()
void
ScFiltersTest
::
testExternalRefCacheXLSX
()
...
...
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