summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/dbdocimp.cxx
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2002-11-20 13:36:29 +0000
committerNiklas Nebel <nn@openoffice.org>2002-11-20 13:36:29 +0000
commiteacb79951c4b8e8b4aa0f9c109f0bd8d6178ec8d (patch)
tree34cd263de9c55875c05f36cae1e99ca495fe16cf /sc/source/ui/docshell/dbdocimp.cxx
parent5f9c078bc015882c7de9aecff83af57d9d6f0df4 (diff)
#83422# different error messages for protected cells and part of array formula
Diffstat (limited to 'sc/source/ui/docshell/dbdocimp.cxx')
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 6d394fefb965..ac947ca2796c 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dbdocimp.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: er $ $Date: 2002-08-08 13:02:40 $
+ * last change: $Author: nn $ $Date: 2002-11-20 14:33:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -98,6 +98,7 @@
#include "docpool.hxx"
#include "attrib.hxx"
#include "dbdocutl.hxx"
+#include "editable.hxx"
using namespace com::sun::star;
@@ -516,9 +517,15 @@ BOOL ScDBDocFunc::DoImport( USHORT nTab, const ScImportParam& rParam,
if (bSuccess)
{
// old and new range editable?
- if ( !pDoc->IsBlockEditable(nTab, rParam.nCol1,rParam.nRow1,rParam.nCol2,rParam.nRow2) ||
- !pDoc->IsBlockEditable(nTab, rParam.nCol1,rParam.nRow1,nEndCol,nEndRow) ||
- pDoc->GetChangeTrack() != NULL )
+ ScEditableTester aTester;
+ aTester.TestBlock( pDoc, nTab, rParam.nCol1,rParam.nRow1,rParam.nCol2,rParam.nRow2 );
+ aTester.TestBlock( pDoc, nTab, rParam.nCol1,rParam.nRow1,nEndCol,nEndRow );
+ if ( !aTester.IsEditable() )
+ {
+ nErrStringId = aTester.GetMessageId();
+ bSuccess = FALSE;
+ }
+ else if ( pDoc->GetChangeTrack() != NULL )
{
nErrStringId = STR_PROTECTIONERR;
bSuccess = FALSE;