summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-02-23 19:49:45 +0100
committerEike Rathke <erack@redhat.com>2018-02-23 19:50:39 +0100
commit6d67347311923dbe3975cfa197649f5856c00723 (patch)
treeeb113f29370c11b1dea6eb75edf003cd22ab199c /sc/source/filter
parent1f159a4df7dcf9c4b1a35d16aee2303b8fa34b27 (diff)
Move OOXML password definitions to struct ScOoxPasswordHash, tdf#104250 prep
Change-Id: I595d5ae8db6f739900afdfdde1e36b0a0b1d2179
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/excel/excrecds.cxx8
-rw-r--r--sc/source/filter/oox/worksheetsettings.cxx8
2 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 2125a593ae1b..e3af479967a0 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -516,10 +516,10 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm )
* 'algorithmName', 'hashValue', 'saltValue' and
* 'spinCount' are absent; so do we if it was present. */
XML_password, (*it).mnPasswordVerifier ? OString::number( (*it).mnPasswordVerifier, 16).getStr() : nullptr,
- XML_algorithmName, (*it).maAlgorithmName.isEmpty() ? nullptr : XclXmlUtils::ToOString( (*it).maAlgorithmName).getStr(),
- XML_hashValue, (*it).maHashValue.isEmpty() ? nullptr : XclXmlUtils::ToOString( (*it).maHashValue).getStr(),
- XML_saltValue, (*it).maSaltValue.isEmpty() ? nullptr : XclXmlUtils::ToOString( (*it).maSaltValue).getStr(),
- XML_spinCount, (*it).mnSpinCount ? OString::number( (*it).mnSpinCount).getStr() : nullptr,
+ XML_algorithmName, (*it).maPasswordHash.maAlgorithmName.isEmpty() ? nullptr : XclXmlUtils::ToOString( (*it).maPasswordHash.maAlgorithmName).getStr(),
+ XML_hashValue, (*it).maPasswordHash.maHashValue.isEmpty() ? nullptr : XclXmlUtils::ToOString( (*it).maPasswordHash.maHashValue).getStr(),
+ XML_saltValue, (*it).maPasswordHash.maSaltValue.isEmpty() ? nullptr : XclXmlUtils::ToOString( (*it).maPasswordHash.maSaltValue).getStr(),
+ XML_spinCount, (*it).maPasswordHash.mnSpinCount ? OString::number( (*it).maPasswordHash.mnSpinCount).getStr() : nullptr,
XML_sqref, (*it).maRangeList.is() ? XclXmlUtils::ToOString( *(*it).maRangeList).getStr() : nullptr,
FSEND);
}
diff --git a/sc/source/filter/oox/worksheetsettings.cxx b/sc/source/filter/oox/worksheetsettings.cxx
index 06fc1db11da0..bdeb6cc04884 100644
--- a/sc/source/filter/oox/worksheetsettings.cxx
+++ b/sc/source/filter/oox/worksheetsettings.cxx
@@ -144,10 +144,10 @@ void WorksheetSettings::importProtectedRange( const AttributeList& rAttribs )
* 'saltValue' and 'spinCount' that are written if the protection was newly
* created. */
aProt.mnPasswordVerifier = rAttribs.getIntegerHex( XML_password, 0);
- aProt.maAlgorithmName = rAttribs.getString( XML_algorithmName, OUString());
- aProt.maHashValue = rAttribs.getString( XML_hashValue, OUString());
- aProt.maSaltValue = rAttribs.getString( XML_saltValue, OUString());
- aProt.mnSpinCount = rAttribs.getUnsigned( XML_spinCount, 0);
+ aProt.maPasswordHash.maAlgorithmName = rAttribs.getString( XML_algorithmName, OUString());
+ aProt.maPasswordHash.maHashValue = rAttribs.getString( XML_hashValue, OUString());
+ aProt.maPasswordHash.maSaltValue = rAttribs.getString( XML_saltValue, OUString());
+ aProt.maPasswordHash.mnSpinCount = rAttribs.getUnsigned( XML_spinCount, 0);
OUString aRefs( rAttribs.getString( XML_sqref, OUString()));
if (!aRefs.isEmpty())
{