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
1bf8006f
Kaydet (Commit)
1bf8006f
authored
Şub 24, 2018
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Write ScOoxPasswordHash to OOXML if set, tdf#104250 prep
Change-Id: I51996c673e6c44bbfc27972800d78d9807fe67db
üst
e3dd12fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
tabprotection.hxx
sc/inc/tabprotection.hxx
+3
-0
tabprotection.cxx
sc/source/core/data/tabprotection.cxx
+16
-0
excrecds.cxx
sc/source/filter/excel/excrecds.cxx
+10
-0
No files found.
sc/inc/tabprotection.hxx
Dosyayı görüntüle @
1bf8006f
...
@@ -85,6 +85,7 @@ public:
...
@@ -85,6 +85,7 @@ public:
virtual
void
setPassword
(
const
OUString
&
aPassText
)
=
0
;
virtual
void
setPassword
(
const
OUString
&
aPassText
)
=
0
;
virtual
css
::
uno
::
Sequence
<
sal_Int8
>
getPasswordHash
(
virtual
css
::
uno
::
Sequence
<
sal_Int8
>
getPasswordHash
(
ScPasswordHash
eHash
,
ScPasswordHash
eHas2
=
PASSHASH_UNSPECIFIED
)
const
=
0
;
ScPasswordHash
eHash
,
ScPasswordHash
eHas2
=
PASSHASH_UNSPECIFIED
)
const
=
0
;
virtual
const
ScOoxPasswordHash
&
getPasswordHash
()
const
=
0
;
virtual
void
setPasswordHash
(
virtual
void
setPasswordHash
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
=
PASSHASH_UNSPECIFIED
)
=
0
;
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
=
PASSHASH_UNSPECIFIED
)
=
0
;
...
@@ -116,6 +117,7 @@ public:
...
@@ -116,6 +117,7 @@ public:
virtual
void
setPassword
(
const
OUString
&
aPassText
)
override
;
virtual
void
setPassword
(
const
OUString
&
aPassText
)
override
;
virtual
css
::
uno
::
Sequence
<
sal_Int8
>
getPasswordHash
(
virtual
css
::
uno
::
Sequence
<
sal_Int8
>
getPasswordHash
(
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
=
PASSHASH_UNSPECIFIED
)
const
override
;
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
=
PASSHASH_UNSPECIFIED
)
const
override
;
virtual
const
ScOoxPasswordHash
&
getPasswordHash
()
const
override
;
virtual
void
setPasswordHash
(
virtual
void
setPasswordHash
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
=
PASSHASH_UNSPECIFIED
)
override
;
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
=
PASSHASH_UNSPECIFIED
)
override
;
...
@@ -199,6 +201,7 @@ public:
...
@@ -199,6 +201,7 @@ public:
virtual
void
setPassword
(
const
OUString
&
aPassText
)
override
;
virtual
void
setPassword
(
const
OUString
&
aPassText
)
override
;
virtual
css
::
uno
::
Sequence
<
sal_Int8
>
getPasswordHash
(
virtual
css
::
uno
::
Sequence
<
sal_Int8
>
getPasswordHash
(
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
=
PASSHASH_UNSPECIFIED
)
const
override
;
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
=
PASSHASH_UNSPECIFIED
)
const
override
;
virtual
const
ScOoxPasswordHash
&
getPasswordHash
()
const
override
;
virtual
void
setPasswordHash
(
virtual
void
setPasswordHash
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
=
PASSHASH_UNSPECIFIED
)
override
;
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
=
PASSHASH_UNSPECIFIED
)
override
;
...
...
sc/source/core/data/tabprotection.cxx
Dosyayı görüntüle @
1bf8006f
...
@@ -124,6 +124,7 @@ public:
...
@@ -124,6 +124,7 @@ public:
void
setPassword
(
const
OUString
&
aPassText
);
void
setPassword
(
const
OUString
&
aPassText
);
css
::
uno
::
Sequence
<
sal_Int8
>
getPasswordHash
(
css
::
uno
::
Sequence
<
sal_Int8
>
getPasswordHash
(
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
)
const
;
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
)
const
;
const
ScOoxPasswordHash
&
getPasswordHash
()
const
;
void
setPasswordHash
(
void
setPasswordHash
(
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
const
css
::
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
);
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
);
...
@@ -311,6 +312,11 @@ Sequence<sal_Int8> ScTableProtectionImpl::getPasswordHash(
...
@@ -311,6 +312,11 @@ Sequence<sal_Int8> ScTableProtectionImpl::getPasswordHash(
return
Sequence
<
sal_Int8
>
();
return
Sequence
<
sal_Int8
>
();
}
}
const
ScOoxPasswordHash
&
ScTableProtectionImpl
::
getPasswordHash
()
const
{
return
maPasswordHash
;
}
void
ScTableProtectionImpl
::
setPasswordHash
(
void
ScTableProtectionImpl
::
setPasswordHash
(
const
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
)
const
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
)
{
{
...
@@ -586,6 +592,11 @@ uno::Sequence<sal_Int8> ScDocProtection::getPasswordHash(ScPasswordHash eHash, S
...
@@ -586,6 +592,11 @@ uno::Sequence<sal_Int8> ScDocProtection::getPasswordHash(ScPasswordHash eHash, S
return
mpImpl
->
getPasswordHash
(
eHash
,
eHash2
);
return
mpImpl
->
getPasswordHash
(
eHash
,
eHash2
);
}
}
const
ScOoxPasswordHash
&
ScDocProtection
::
getPasswordHash
()
const
{
return
mpImpl
->
getPasswordHash
();
}
void
ScDocProtection
::
setPasswordHash
(
void
ScDocProtection
::
setPasswordHash
(
const
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
)
const
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
)
{
{
...
@@ -666,6 +677,11 @@ Sequence<sal_Int8> ScTableProtection::getPasswordHash(ScPasswordHash eHash, ScPa
...
@@ -666,6 +677,11 @@ Sequence<sal_Int8> ScTableProtection::getPasswordHash(ScPasswordHash eHash, ScPa
return
mpImpl
->
getPasswordHash
(
eHash
,
eHash2
);
return
mpImpl
->
getPasswordHash
(
eHash
,
eHash2
);
}
}
const
ScOoxPasswordHash
&
ScTableProtection
::
getPasswordHash
()
const
{
return
mpImpl
->
getPasswordHash
();
}
void
ScTableProtection
::
setPasswordHash
(
void
ScTableProtection
::
setPasswordHash
(
const
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
)
const
uno
::
Sequence
<
sal_Int8
>&
aPassword
,
ScPasswordHash
eHash
,
ScPasswordHash
eHash2
)
{
{
...
...
sc/source/filter/excel/excrecds.cxx
Dosyayı görüntüle @
1bf8006f
...
@@ -469,6 +469,12 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm )
...
@@ -469,6 +469,12 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm )
const
ScTableProtection
*
pTabProtect
=
rDoc
.
GetTabProtection
(
mnTab
);
const
ScTableProtection
*
pTabProtect
=
rDoc
.
GetTabProtection
(
mnTab
);
if
(
pTabProtect
)
if
(
pTabProtect
)
{
{
const
ScOoxPasswordHash
&
rPH
=
pTabProtect
->
getPasswordHash
();
// Do not write any hash attributes if there is no password.
ScOoxPasswordHash
aPH
;
if
(
rPH
.
hasPassword
())
aPH
=
rPH
;
Sequence
<
sal_Int8
>
aHash
=
pTabProtect
->
getPasswordHash
(
PASSHASH_XL
);
Sequence
<
sal_Int8
>
aHash
=
pTabProtect
->
getPasswordHash
(
PASSHASH_XL
);
OString
sHash
;
OString
sHash
;
if
(
aHash
.
getLength
()
>=
2
)
if
(
aHash
.
getLength
()
>=
2
)
...
@@ -480,6 +486,10 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm )
...
@@ -480,6 +486,10 @@ void XclExpSheetProtection::SaveXml( XclExpXmlStream& rStrm )
}
}
sax_fastparser
::
FSHelperPtr
&
rWorksheet
=
rStrm
.
GetCurrentStream
();
sax_fastparser
::
FSHelperPtr
&
rWorksheet
=
rStrm
.
GetCurrentStream
();
rWorksheet
->
singleElement
(
XML_sheetProtection
,
rWorksheet
->
singleElement
(
XML_sheetProtection
,
XML_algorithmName
,
aPH
.
maAlgorithmName
.
isEmpty
()
?
nullptr
:
XclXmlUtils
::
ToOString
(
aPH
.
maAlgorithmName
).
getStr
(),
XML_hashValue
,
aPH
.
maHashValue
.
isEmpty
()
?
nullptr
:
XclXmlUtils
::
ToOString
(
aPH
.
maHashValue
).
getStr
(),
XML_saltValue
,
aPH
.
maSaltValue
.
isEmpty
()
?
nullptr
:
XclXmlUtils
::
ToOString
(
aPH
.
maSaltValue
).
getStr
(),
XML_spinCount
,
aPH
.
mnSpinCount
?
OString
::
number
(
aPH
.
mnSpinCount
).
getStr
()
:
nullptr
,
XML_sheet
,
ToPsz
(
true
),
XML_sheet
,
ToPsz
(
true
),
XML_password
,
sHash
.
isEmpty
()
?
nullptr
:
sHash
.
getStr
(),
XML_password
,
sHash
.
isEmpty
()
?
nullptr
:
sHash
.
getStr
(),
XML_objects
,
pTabProtect
->
isOptionEnabled
(
ScTableProtection
::
OBJECTS
)
?
nullptr
:
ToPsz
(
true
),
XML_objects
,
pTabProtect
->
isOptionEnabled
(
ScTableProtection
::
OBJECTS
)
?
nullptr
:
ToPsz
(
true
),
...
...
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