summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-02-24 13:46:10 +0100
committerEike Rathke <erack@redhat.com>2018-02-24 21:02:40 +0100
commit5f4df7af832e886bd279db566dc6693db9bb6a89 (patch)
tree65eea27bac2fb3fc4590c58cdcc996084af6a4d5 /sc
parent8c04ab5e7b3420de8557ff9ad8e67f601f51211f (diff)
Consider ScOoxPasswordHash in isProtectedWithPass(), tdf#104250 prep
And clear in setPassword() Change-Id: Ib68bb5be8d6908909afc1e1d5bd6bbeccb6d0083
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