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
f1ca1384
Kaydet (Commit)
f1ca1384
authored
Nis 08, 2014
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
also check if a newly read password protection applies to a range
Change-Id: Ibbf4fee2b87c82cdbd565681690a231fb06da66f
üst
3974d6a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
tabprotection.hxx
sc/inc/tabprotection.hxx
+5
-0
tabprotection.cxx
sc/source/core/data/tabprotection.cxx
+4
-4
No files found.
sc/inc/tabprotection.hxx
Dosyayı görüntüle @
f1ca1384
...
...
@@ -133,6 +133,11 @@ struct ScEnhancedProtection
{
return
!
maSecurityDescriptor
.
empty
()
||
!
maSecurityDescriptorXML
.
isEmpty
();
}
bool
hasPassword
()
const
{
return
mnPasswordVerifier
!=
0
||
!
maHashValue
.
isEmpty
();
}
};
/** sheet protection state container
...
...
sc/source/core/data/tabprotection.cxx
Dosyayı görüntüle @
f1ca1384
...
...
@@ -379,7 +379,7 @@ bool ScTableProtectionImpl::updateReference( UpdateRefMode eMode, ScDocument* pD
bool
ScTableProtectionImpl
::
isBlockEditable
(
const
ScRange
&
rRange
)
const
{
/* TODO: ask for password (and remember) if
mnPasswordVerifier
was set for
/* TODO: ask for password (and remember) if
a password
was set for
* a matching range and no matching range without password was encountered.
* Would need another return type than boolean to reflect
* "password required for a specific protection". */
...
...
@@ -401,7 +401,7 @@ bool ScTableProtectionImpl::isBlockEditable( const ScRange& rRange ) const
if
((
*
it
).
maRangeList
->
In
(
rRange
))
{
// Range is editable if no password is assigned.
if
(
!
(
*
it
).
mnPasswordVerifier
)
if
(
!
(
*
it
).
hasPassword
()
)
return
true
;
}
}
...
...
@@ -422,7 +422,7 @@ bool ScTableProtectionImpl::isBlockEditable( const ScRange& rRange ) const
if
(
aList
.
size
()
==
1
&&
*
aList
[
0
]
==
rRange
)
{
// Range is editable if no password is assigned.
if
(
!
(
*
it
).
mnPasswordVerifier
)
if
(
!
(
*
it
).
hasPassword
()
)
return
true
;
}
}
...
...
@@ -440,7 +440,7 @@ bool ScTableProtectionImpl::isBlockEditable( const ScRange& rRange ) const
if
(
!
(
*
it
).
hasSecurityDescriptor
()
&&
(
*
it
).
maRangeList
.
Is
())
{
// Ranges are editable if no password is assigned.
if
(
!
(
*
it
).
mnPasswordVerifier
)
if
(
!
(
*
it
).
hasPassword
()
)
{
const
ScRangeList
&
rRanges
=
*
(
*
it
).
maRangeList
;
size_t
nRanges
=
rRanges
.
size
();
...
...
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