summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2011-05-17 11:27:07 +0900
committerKohei Yoshida <kyoshida@novell.com>2011-05-18 14:51:25 -0400
commit966470ee35806de2e92e218da584d56f05c8e4f3 (patch)
tree7e574aed1e9535be6c96dacb33ae811761c45d6a /sc
parent99e036df6506990b0a417f41f3c4d85a28f48b96 (diff)
fdo#34072
replace content in unprotected cells, even if the sheet is protected
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/table6.cxx3
-rw-r--r--sc/source/ui/view/viewfun2.cxx16
2 files changed, 2 insertions, 17 deletions
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 20ad1ca1b007..d37afa30e5d2 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -148,7 +148,8 @@ sal_Bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW
!( (eCellType == CELLTYPE_FORMULA &&
((cMatrixFlag = ((ScFormulaCell*)pCell)->GetMatrixFlag()) == MM_REFERENCE))
// kein UndoDoc => Matrix nicht wiederherstellbar => nicht ersetzen
- || (cMatrixFlag != MM_NONE && !pUndoDoc) )
+ || (cMatrixFlag != MM_NONE && !pUndoDoc) ) &&
+ IsBlockEditable(nCol, nRow, nCol, nRow)
)
{
if ( cMatrixFlag == MM_NONE && rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE )
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 17bf069f274d..d2dfad0ab766 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1632,22 +1632,6 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
}
}
- if ( nCommand == SVX_SEARCHCMD_REPLACE
- || nCommand == SVX_SEARCHCMD_REPLACE_ALL )
- {
- for ( SCTAB j = nStartTab; j <= nEndTab; j++ )
- {
- if ( (bAllTables || rMark.GetTableSelect( j )) &&
- pDoc->IsTabProtected( j ) )
- {
- if ( pOldSelectedTables )
- delete [] pOldSelectedTables;
- ErrorMessage(STR_PROTECTIONERR);
- return;
- }
- }
- }
-
if ( nCommand == SVX_SEARCHCMD_FIND
|| nCommand == SVX_SEARCHCMD_FIND_ALL)
bAddUndo = false;