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
a145e885
Kaydet (Commit)
a145e885
authored
Mar 13, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#76032: Write test for this.
Change-Id: Iec8d32a4e53d2d5d3cdc9767c2ede7654fe2bdd6
üst
534425bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
row-index-1-based.xlsx
sc/qa/unit/data/xlsx/row-index-1-based.xlsx
+0
-0
subsequent_filters-test.cxx
sc/qa/unit/subsequent_filters-test.cxx
+39
-0
No files found.
sc/qa/unit/data/xlsx/row-index-1-based.xlsx
0 → 100644
Dosyayı görüntüle @
a145e885
File added
sc/qa/unit/subsequent_filters-test.cxx
Dosyayı görüntüle @
a145e885
...
@@ -127,6 +127,12 @@ public:
...
@@ -127,6 +127,12 @@ public:
//change this test file only in excel and not in calc
//change this test file only in excel and not in calc
void
testCellValueXLSX
();
void
testCellValueXLSX
();
/**
* Test importing of xlsx document that previously had its row index off
* by one. (fdo#76032)
*/
void
testRowIndex1BasedXLSX
();
//misc tests unrelated to the import filters
//misc tests unrelated to the import filters
void
testPasswordNew
();
void
testPasswordNew
();
void
testPasswordOld
();
void
testPasswordOld
();
...
@@ -195,6 +201,7 @@ public:
...
@@ -195,6 +201,7 @@ public:
CPPUNIT_TEST
(
testDataTableMultiTableXLSX
);
CPPUNIT_TEST
(
testDataTableMultiTableXLSX
);
CPPUNIT_TEST
(
testBrokenQuotesCSV
);
CPPUNIT_TEST
(
testBrokenQuotesCSV
);
CPPUNIT_TEST
(
testCellValueXLSX
);
CPPUNIT_TEST
(
testCellValueXLSX
);
CPPUNIT_TEST
(
testRowIndex1BasedXLSX
);
CPPUNIT_TEST
(
testControlImport
);
CPPUNIT_TEST
(
testControlImport
);
CPPUNIT_TEST
(
testChartImportODS
);
CPPUNIT_TEST
(
testChartImportODS
);
...
@@ -1417,6 +1424,38 @@ void ScFiltersTest::testCellValueXLSX()
...
@@ -1417,6 +1424,38 @@ void ScFiltersTest::testCellValueXLSX()
xDocSh
->
DoClose
();
xDocSh
->
DoClose
();
}
}
void
ScFiltersTest
::
testRowIndex1BasedXLSX
()
{
ScDocShellRef
xDocSh
=
loadDoc
(
"row-index-1-based."
,
XLSX
);
CPPUNIT_ASSERT
(
xDocSh
.
Is
());
ScDocument
*
pDoc
=
xDocSh
->
GetDocument
();
// A1
OUString
aStr
=
pDoc
->
GetString
(
ScAddress
(
0
,
0
,
0
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Action Plan.Name"
),
aStr
);
// B1
aStr
=
pDoc
->
GetString
(
ScAddress
(
1
,
0
,
0
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Action Plan.Description"
),
aStr
);
// A2
aStr
=
pDoc
->
GetString
(
ScAddress
(
0
,
1
,
0
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Jerry"
),
aStr
);
// B2 - multi-line text.
const
EditTextObject
*
pText
=
pDoc
->
GetEditText
(
ScAddress
(
1
,
1
,
0
));
CPPUNIT_ASSERT
(
pText
);
CPPUNIT_ASSERT
(
pText
->
GetParagraphCount
()
==
3
);
aStr
=
pText
->
GetText
(
0
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"This is a longer Text."
),
aStr
);
aStr
=
pText
->
GetText
(
1
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Second line."
),
aStr
);
aStr
=
pText
->
GetText
(
2
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Third line."
),
aStr
);
xDocSh
->
DoClose
();
}
void
ScFiltersTest
::
testPassword_Impl
(
const
OUString
&
aFileNameBase
)
void
ScFiltersTest
::
testPassword_Impl
(
const
OUString
&
aFileNameBase
)
{
{
OUString
aFileExtension
(
getFileFormats
()[
0
].
pName
,
strlen
(
getFileFormats
()[
0
].
pName
),
RTL_TEXTENCODING_UTF8
);
OUString
aFileExtension
(
getFileFormats
()[
0
].
pName
,
strlen
(
getFileFormats
()[
0
].
pName
),
RTL_TEXTENCODING_UTF8
);
...
...
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