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
b0a6b164
Kaydet (Commit)
b0a6b164
authored
Nis 08, 2014
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add .xlsx unit test for enhanced protection
Change-Id: I8a6c6295998c6545318f6b490d1f617d6178013b
üst
6d658afd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
enhanced-protection.xlsx
sc/qa/unit/data/xlsx/enhanced-protection.xlsx
+0
-0
filters-test.cxx
sc/qa/unit/filters-test.cxx
+23
-5
No files found.
sc/qa/unit/data/xlsx/enhanced-protection.xlsx
0 → 100644
Dosyayı görüntüle @
b0a6b164
File added
sc/qa/unit/filters-test.cxx
Dosyayı görüntüle @
b0a6b164
...
...
@@ -71,6 +71,7 @@ public:
void
testSharedFormulaXLSX
();
void
testLegacyCellAnchoredRotatedShape
();
void
testEnhancedProtectionXLS
();
void
testEnhancedProtectionXLSX
();
CPPUNIT_TEST_SUITE
(
ScFiltersTest
);
CPPUNIT_TEST
(
testCVEs
);
...
...
@@ -85,6 +86,7 @@ public:
CPPUNIT_TEST
(
testSharedFormulaXLSX
);
CPPUNIT_TEST
(
testLegacyCellAnchoredRotatedShape
);
CPPUNIT_TEST
(
testEnhancedProtectionXLS
);
CPPUNIT_TEST
(
testEnhancedProtectionXLSX
);
CPPUNIT_TEST_SUITE_END
();
...
...
@@ -499,12 +501,8 @@ void ScFiltersTest::testLegacyCellAnchoredRotatedShape()
}
}
void
ScFiltersTest
::
testEnhancedProtectionXLS
(
)
void
testEnhancedProtectionImpl
(
ScDocument
*
pDoc
)
{
ScDocShellRef
xDocSh
=
loadDoc
(
"enhanced-protection."
,
XLS
);
CPPUNIT_ASSERT
(
xDocSh
.
Is
());
ScDocument
*
pDoc
=
xDocSh
->
GetDocument
();
const
ScTableProtection
*
pProt
=
pDoc
->
GetTabProtection
(
0
);
CPPUNIT_ASSERT
(
!
pProt
->
isBlockEditable
(
ScRange
(
0
,
0
,
0
,
0
,
0
,
0
)));
// locked
...
...
@@ -516,6 +514,26 @@ void ScFiltersTest::testEnhancedProtectionXLS()
CPPUNIT_ASSERT
(
pProt
->
isBlockEditable
(
ScRange
(
0
,
1
,
0
,
0
,
2
,
0
)));
// union of two different editables
CPPUNIT_ASSERT
(
!
pProt
->
isBlockEditable
(
ScRange
(
0
,
0
,
0
,
0
,
1
,
0
)));
// union of locked and editable
CPPUNIT_ASSERT
(
!
pProt
->
isBlockEditable
(
ScRange
(
0
,
2
,
0
,
0
,
3
,
0
)));
// union of editable and password editable
}
void
ScFiltersTest
::
testEnhancedProtectionXLS
()
{
ScDocShellRef
xDocSh
=
loadDoc
(
"enhanced-protection."
,
XLS
);
CPPUNIT_ASSERT
(
xDocSh
.
Is
());
ScDocument
*
pDoc
=
xDocSh
->
GetDocument
();
testEnhancedProtectionImpl
(
pDoc
);
xDocSh
->
DoClose
();
}
void
ScFiltersTest
::
testEnhancedProtectionXLSX
()
{
ScDocShellRef
xDocSh
=
loadDoc
(
"enhanced-protection."
,
XLSX
);
CPPUNIT_ASSERT
(
xDocSh
.
Is
());
ScDocument
*
pDoc
=
xDocSh
->
GetDocument
();
testEnhancedProtectionImpl
(
pDoc
);
xDocSh
->
DoClose
();
}
...
...
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