summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-01-06 15:02:17 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-01-07 08:55:55 +0100
commit85b400482dee5c9da2cf83a755ec37ab149b5b20 (patch)
tree30f301df3cb487cab431d1c60bcff907dff625fb /sc/qa
parent41cfe181e3eb4502847fb56955635852e3928d92 (diff)
ScTable::GetProtection and ScDocument::GetTabProtection can be const
Change-Id: Ic30a3fe10ae6206e876a05bed5dc189a9516b452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108851 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 8f471b175148..1f8b648d81c6 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -770,7 +770,7 @@ void ScExportTest::testProtectionKeyODS_UTF16LErtlSHA1()
ScDocument& rDoc = xShell->GetDocument();
ScDocProtection *const pDocProt(rDoc.GetDocProtection());
CPPUNIT_ASSERT(pDocProt->verifyPassword(password));
- ScTableProtection *const pTabProt(rDoc.GetTabProtection(0));
+ const ScTableProtection *const pTabProt(rDoc.GetTabProtection(0));
CPPUNIT_ASSERT(pTabProt->verifyPassword(password));
// we can't assume that the user entered the password; check that we
@@ -793,7 +793,7 @@ void ScExportTest::testProtectionKeyODS_UTF8SHA1()
ScDocument& rDoc = xShell->GetDocument();
ScDocProtection *const pDocProt(rDoc.GetDocProtection());
CPPUNIT_ASSERT(pDocProt->verifyPassword(password));
- ScTableProtection *const pTabProt(rDoc.GetTabProtection(0));
+ const ScTableProtection *const pTabProt(rDoc.GetTabProtection(0));
CPPUNIT_ASSERT(pTabProt->verifyPassword(password));
// we can't assume that the user entered the password; check that we
@@ -816,7 +816,7 @@ void ScExportTest::testProtectionKeyODS_UTF8SHA256ODF12()
ScDocument& rDoc = xShell->GetDocument();
ScDocProtection *const pDocProt(rDoc.GetDocProtection());
CPPUNIT_ASSERT(pDocProt->verifyPassword(password));
- ScTableProtection *const pTabProt(rDoc.GetTabProtection(0));
+ const ScTableProtection *const pTabProt(rDoc.GetTabProtection(0));
CPPUNIT_ASSERT(pTabProt->verifyPassword(password));
// we can't assume that the user entered the password; check that we
@@ -839,7 +839,7 @@ void ScExportTest::testProtectionKeyODS_UTF8SHA256W3C()
ScDocument& rDoc = xShell->GetDocument();
ScDocProtection *const pDocProt(rDoc.GetDocProtection());
CPPUNIT_ASSERT(pDocProt->verifyPassword(password));
- ScTableProtection *const pTabProt(rDoc.GetTabProtection(0));
+ const ScTableProtection *const pTabProt(rDoc.GetTabProtection(0));
CPPUNIT_ASSERT(pTabProt->verifyPassword(password));
// we can't assume that the user entered the password; check that we
@@ -862,7 +862,7 @@ void ScExportTest::testProtectionKeyODS_XL_SHA1()
ScDocument& rDoc = xShell->GetDocument();
ScDocProtection *const pDocProt(rDoc.GetDocProtection());
CPPUNIT_ASSERT(pDocProt->verifyPassword(password));
- ScTableProtection *const pTabProt(rDoc.GetTabProtection(0));
+ const ScTableProtection *const pTabProt(rDoc.GetTabProtection(0));
CPPUNIT_ASSERT(pTabProt->verifyPassword(password));
// we can't assume that the user entered the password; check that we
@@ -3450,7 +3450,7 @@ namespace {
void testSheetProtection_Impl(const ScDocument& rDoc)
{
CPPUNIT_ASSERT(rDoc.IsTabProtected(0));
- ScTableProtection* pTabProtection = rDoc.GetTabProtection(0);
+ const ScTableProtection* pTabProtection = rDoc.GetTabProtection(0);
CPPUNIT_ASSERT(pTabProtection);
CPPUNIT_ASSERT(pTabProtection->isOptionEnabled(ScTableProtection::SELECT_UNLOCKED_CELLS));
CPPUNIT_ASSERT(!pTabProtection->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS));