summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-30 01:34:24 +0100
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-02-01 17:03:07 +0000
commit7c6b21c31904b2ed007f961e4bf094af1a1981c7 (patch)
tree11fe8319697c820192a478834e0988476c4d5ac5
parent3305827a24a1b9c66220bb3578fec6a43df4a421 (diff)
if no cond format is valid use the existing protection, fdo#58826
Change-Id: Ib52a546a98f681b918de5e3bd285c36407fa8254 Reviewed-on: https://gerrit.libreoffice.org/1942 Reviewed-by: Kohei Yoshida <kohei.yoshida@gmail.com> Tested-by: Kohei Yoshida <kohei.yoshida@gmail.com>
-rw-r--r--sc/source/core/data/attarray.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 201538d6fe7f..8059b178790a 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1278,6 +1278,8 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const
const ScProtectionAttr* pCondProtect = static_cast<const ScProtectionAttr*>(pItem);
if( pCondProtect->GetProtection() || pProtect->GetHideCell() )
bFoundCond = true;
+ else
+ break;
}
else
{
@@ -1285,7 +1287,7 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const
// but existing one + cell where conditional
// formatting does not remove it
// => we have a protected cell
- bFoundCond = true;
+ bFoundCond = bFoundTemp;
}
}
bFoundTemp = bFoundCond;