summaryrefslogtreecommitdiff
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
commita4ee60a86b62af6cf83e9a70152f06f50a79982a (patch)
tree2c61f90a13bc286134d2e4036386afff3c60c1da
parent5bff70a55a8629d21543fb247ec01c1443e79deb (diff)
fdo#34072
replace content in unprotected cells, even if the sheet is protected
-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 f39fad9fe..4837dc9e0 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 ec16f0f4a..00dc12fd4 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;