summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/tabprotection.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx
index 9eefbfce4c97..6aecc83a3c11 100644
--- a/sc/source/core/data/tabprotection.cxx
+++ b/sc/source/core/data/tabprotection.cxx
@@ -209,7 +209,7 @@ bool ScTableProtectionImpl::isProtectedWithPass() const
if (!mbProtected)
return false;
- return !maPassText.isEmpty() || maPassHash.getLength();
+ return !maPassText.isEmpty() || maPassHash.getLength() || maPasswordHash.hasPassword();
}
void ScTableProtectionImpl::setProtected(bool bProtected)
@@ -232,6 +232,7 @@ void ScTableProtectionImpl::setPassword(const OUString& aPassText)
{
maPassHash = Sequence<sal_Int8>();
}
+ maPasswordHash.clear();
}
bool ScTableProtectionImpl::hasPasswordHash(ScPasswordHash eHash, ScPasswordHash eHash2) const