[Libreoffice-commits] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Wed May 18 11:52:11 PDT 2011
sc/source/core/data/table6.cxx | 3 ++-
sc/source/ui/view/viewfun2.cxx | 16 ----------------
2 files changed, 2 insertions(+), 17 deletions(-)
New commits:
commit a4ee60a86b62af6cf83e9a70152f06f50a79982a
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Tue May 17 11:27:07 2011 +0900
fdo#34072
replace content in unprotected cells, even if the sheet is protected
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index f39fad9..4837dc9 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 ec16f0f..00dc12f 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;
More information about the Libreoffice-commits
mailing list