summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-15 10:52:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-16 14:21:16 +0200
commit120588850a43910fd2a6cd5ff903feece714b525 (patch)
treeed0947dcf23fa105744ef431d16c84556aa263c3 /sc/source
parent2d873932bb282667a19c05e939146d5ad22c28d4 (diff)
ScEditableTester ctor never passed a null ScDocument*
Change-Id: I29338e400ba489e57571cb7711d92f611d5ce8d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102841 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/app/inputhdl.cxx4
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx12
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx4
-rw-r--r--sc/source/ui/docshell/docfunc.cxx42
-rw-r--r--sc/source/ui/docshell/editable.cxx34
-rw-r--r--sc/source/ui/docshell/impex.cxx2
-rw-r--r--sc/source/ui/inc/editable.hxx16
-rw-r--r--sc/source/ui/view/dbfunc.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/spelldialog.cxx2
-rw-r--r--sc/source/ui/view/viewfun2.cxx2
-rw-r--r--sc/source/ui/view/viewfun3.cxx2
-rw-r--r--sc/source/ui/view/viewfun4.cxx6
-rw-r--r--sc/source/ui/view/viewfunc.cxx8
15 files changed, 70 insertions, 70 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 28e2d83acd4b..8794f70eefa6 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2329,10 +2329,10 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
const ScMarkData& rMark = pActiveViewSh->GetViewData().GetMarkData();
ScEditableTester aTester;
if ( rMark.IsMarked() || rMark.IsMultiMarked() )
- aTester.TestSelection( &rDoc, rMark );
+ aTester.TestSelection( rDoc, rMark );
else
aTester.TestSelectedBlock(
- &rDoc, aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Col(), aCursorPos.Row(), rMark );
+ rDoc, aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Col(), aCursorPos.Row(), rMark );
bool bStartInputMode = true;
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 37bf1afc25e2..246d41749553 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -512,7 +512,7 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
else
nStartingColToEdit++;
}
- ScEditableTester aTester( &rDoc, nTab, nStartingColToEdit, nStartingRowToEdit,
+ ScEditableTester aTester( rDoc, nTab, nStartingColToEdit, nStartingRowToEdit,
aLocalParam.nCol2, aLocalParam.nRow2, true /*bNoMatrixAtAll*/ );
if (!aTester.IsEditable())
{
@@ -686,7 +686,7 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
return false;
}
- ScEditableTester aTester( &rDoc, nDestTab, aLocalParam.nCol1,aLocalParam.nRow1,
+ ScEditableTester aTester( rDoc, nDestTab, aLocalParam.nCol1,aLocalParam.nRow1,
aLocalParam.nCol2,aLocalParam.nRow2);
if (!aTester.IsEditable())
{
@@ -998,7 +998,7 @@ void ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
return;
}
- ScEditableTester aTester( &rDoc, nTab, 0,rParam.nRow1+1, rDoc.MaxCol(),rDoc.MaxRow() );
+ ScEditableTester aTester( rDoc, nTab, 0,rParam.nRow1+1, rDoc.MaxCol(),rDoc.MaxRow() );
if (!aTester.IsEditable())
{
if (!bApi)
@@ -1170,7 +1170,7 @@ bool isEditable(ScDocShell& rDocShell, const ScRangeList& rRanges, bool bApi)
for (size_t i = 0, n = rRanges.size(); i < n; ++i)
{
const ScRange & r = rRanges[i];
- ScEditableTester aTester(&rDoc, r);
+ ScEditableTester aTester(rDoc, r);
if (!aTester.IsEditable())
{
if (!bApi)
@@ -1221,7 +1221,7 @@ bool checkNewOutputRange(ScDPObject& rDPObj, ScDocShell& rDocShell, ScRange& rNe
return false;
}
- ScEditableTester aTester(&rDoc, rNewOut);
+ ScEditableTester aTester(rDoc, rNewOut);
if (!aTester.IsEditable())
{
// destination area isn't editable
@@ -1480,7 +1480,7 @@ bool ScDBDocFunc::CreatePivotTable(const ScDPObject& rDPObj, bool bRecord, bool
}
{
- ScEditableTester aTester(&rDoc, aNewOut);
+ ScEditableTester aTester(rDoc, aNewOut);
if (!aTester.IsEditable())
{
// destination area isn't editable
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index c99693dd00ec..6a460119289b 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -393,8 +393,8 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
{
// old and new range editable?
ScEditableTester aTester;
- aTester.TestBlock( &rDoc, nTab, rParam.nCol1,rParam.nRow1,rParam.nCol2,rParam.nRow2 );
- aTester.TestBlock( &rDoc, nTab, rParam.nCol1,rParam.nRow1,nEndCol,nEndRow );
+ aTester.TestBlock( rDoc, nTab, rParam.nCol1,rParam.nRow1,rParam.nCol2,rParam.nRow2 );
+ aTester.TestBlock( rDoc, nTab, rParam.nCol1,rParam.nRow1,nEndCol,nEndRow );
if ( !aTester.IsEditable() )
{
pErrStringId = aTester.GetMessageId();
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index ab353c1699f1..57184a3223e7 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -579,7 +579,7 @@ bool ScDocFunc::DeleteContents(
if (bRecord && !rDoc.IsUndoEnabled())
bRecord = false;
- ScEditableTester aTester( &rDoc, rMark );
+ ScEditableTester aTester( rDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
@@ -666,7 +666,7 @@ bool ScDocFunc::DeleteCell(
if (bRecord && !rDoc.IsUndoEnabled())
bRecord = false;
- ScEditableTester aTester(&rDoc, rPos.Col(), rPos.Row(), rPos.Col(), rPos.Row(), rMark);
+ ScEditableTester aTester(rDoc, rPos.Col(), rPos.Row(), rPos.Col(), rPos.Row(), rMark);
if (!aTester.IsEditable())
{
rDocShell.ErrorMessage(aTester.GetMessageId());
@@ -733,7 +733,7 @@ bool ScDocFunc::TransliterateText( const ScMarkData& rMark, TransliterationFlags
if (!rDoc.IsUndoEnabled())
bRecord = false;
- ScEditableTester aTester( &rDoc, rMark );
+ ScEditableTester aTester( rDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
@@ -788,7 +788,7 @@ bool ScDocFunc::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, con
ScDocument& rDoc = rDocShell.GetDocument();
bool bUndo(rDoc.IsUndoEnabled());
- ScEditableTester aTester( &rDoc, rPos.Tab(), rPos.Col(),rPos.Row(), rPos.Col(),rPos.Row() );
+ ScEditableTester aTester( rDoc, rPos.Tab(), rPos.Col(),rPos.Row(), rPos.Col(),rPos.Row() );
if (!aTester.IsEditable())
{
if (!bApi)
@@ -1298,7 +1298,7 @@ void ScDocFunc::SetNoteText( const ScAddress& rPos, const OUString& rText, bool
ScDocShellModificator aModificator( rDocShell );
ScDocument& rDoc = rDocShell.GetDocument();
- ScEditableTester aTester( &rDoc, rPos.Tab(), rPos.Col(),rPos.Row(), rPos.Col(),rPos.Row() );
+ ScEditableTester aTester( rDoc, rPos.Tab(), rPos.Col(),rPos.Row(), rPos.Col(),rPos.Row() );
if (!aTester.IsEditable())
{
if (!bApi)
@@ -1323,7 +1323,7 @@ void ScDocFunc::ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, c
{
ScDocShellModificator aModificator( rDocShell );
ScDocument& rDoc = rDocShell.GetDocument();
- ScEditableTester aTester( &rDoc, rPos.Tab(), rPos.Col(),rPos.Row(), rPos.Col(),rPos.Row() );
+ ScEditableTester aTester( rDoc, rPos.Tab(), rPos.Col(),rPos.Row(), rPos.Col(),rPos.Row() );
if (aTester.IsEditable())
{
ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
@@ -1876,7 +1876,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
break;
default:
aTester = ScEditableTester(
- &rDoc, nMergeTestStartCol, nMergeTestStartRow, nEditTestEndCol, nEditTestEndRow, aMark);
+ rDoc, nMergeTestStartCol, nMergeTestStartRow, nEditTestEndCol, nEditTestEndRow, aMark);
}
if (!aTester.IsEditable())
@@ -2370,7 +2370,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
break;
default:
aTester = ScEditableTester(
- &rDoc, nUndoStartCol, nUndoStartRow, nEditTestEndX, nEditTestEndY, aMark);
+ rDoc, nUndoStartCol, nUndoStartRow, nEditTestEndX, nEditTestEndY, aMark);
}
if (!aTester.IsEditable())
@@ -2931,10 +2931,10 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
ScEditableTester aTester;
for (nTab=nDestTab; nTab<=nDestEndTab; nTab++)
- aTester.TestBlock( &rDoc, nTab, nDestCol,nDestRow, nUndoEndCol,nUndoEndRow );
+ aTester.TestBlock( rDoc, nTab, nDestCol,nDestRow, nUndoEndCol,nUndoEndRow );
if (bCut)
for (nTab=nStartTab; nTab<=nEndTab; nTab++)
- aTester.TestBlock( &rDoc, nTab, nStartCol,nStartRow, nEndCol,nEndRow );
+ aTester.TestBlock( rDoc, nTab, nStartCol,nStartRow, nEndCol,nEndRow );
if (!aTester.IsEditable())
{
@@ -4086,7 +4086,7 @@ void ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, b
ScDocument& rDoc = rDocShell.GetDocument();
bool bUndo (rDoc.IsUndoEnabled());
- ScEditableTester aTester( &rDoc, rMark );
+ ScEditableTester aTester( rDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
@@ -4131,7 +4131,7 @@ bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, bool bIncrement, bool bAp
ScDocument& rDoc = rDocShell.GetDocument();
bool bUndo(rDoc.IsUndoEnabled());
- ScEditableTester aTester( &rDoc, rMark );
+ ScEditableTester aTester( rDoc, rMark );
if (!aTester.IsEditable())
{
if (!bApi)
@@ -4221,7 +4221,7 @@ bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
}
ScAutoFormat* pAutoFormat = ScGlobal::GetOrCreateAutoFormat();
- ScEditableTester aTester( &rDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
+ ScEditableTester aTester( rDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
if ( nFormatNo < pAutoFormat->size() && aTester.IsEditable() )
{
weld::WaitObject aWait( ScDocShell::GetActiveDialogParent() );
@@ -4334,7 +4334,7 @@ bool ScDocFunc::EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
aMark.SelectTable( nTab, true );
}
- ScEditableTester aTester( &rDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
+ ScEditableTester aTester( rDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
if ( aTester.IsEditable() )
{
weld::WaitObject aWait( ScDocShell::GetActiveDialogParent() );
@@ -4421,7 +4421,7 @@ bool ScDocFunc::TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
aMark.SelectTable( nTab, true );
}
- ScEditableTester aTester( &rDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
+ ScEditableTester aTester( rDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
if ( aTester.IsEditable() )
{
weld::WaitObject aWait( ScDocShell::GetActiveDialogParent() );
@@ -4565,7 +4565,7 @@ bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
aMark.SelectTable( nTab, true );
}
- ScEditableTester aTester( &rDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
+ ScEditableTester aTester( rDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
if ( aTester.IsEditable() )
{
weld::WaitObject aWait( ScDocShell::GetActiveDialogParent() );
@@ -4678,7 +4678,7 @@ bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
aMark.SelectTable( nTab, true );
}
- ScEditableTester aTester( &rDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
+ ScEditableTester aTester( rDoc, nStartCol,nStartRow, nEndCol,nEndRow, aMark );
if ( aTester.IsEditable() )
{
weld::WaitObject aWait( ScDocShell::GetActiveDialogParent() );
@@ -4847,7 +4847,7 @@ bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
//! Source range can be protected !!!
//! but can't contain matrix fragments !!!
- ScEditableTester aTester( &rDoc, aDestArea );
+ ScEditableTester aTester( rDoc, aDestArea );
if ( !aTester.IsEditable() )
{
if (!bApi)
@@ -4947,7 +4947,7 @@ bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, bo
for (const auto& rTab : rOption.maTabs)
{
- ScEditableTester aTester( &rDoc, rTab, nStartCol, nStartRow, nEndCol, nEndRow );
+ ScEditableTester aTester( rDoc, rTab, nStartCol, nStartRow, nEndCol, nEndRow );
if (!aTester.IsEditable())
{
if (!bApi)
@@ -5382,7 +5382,7 @@ bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, bool bApi )
SCCOL nEndCol = nStartCol + 1;
SCROW nEndRow = nStartRow + static_cast<SCROW>(nValidCount) - 1;
- ScEditableTester aTester( &rDoc, nTab, nStartCol,nStartRow, nEndCol,nEndRow );
+ ScEditableTester aTester( rDoc, nTab, nStartCol,nStartRow, nEndCol,nEndRow );
if (aTester.IsEditable())
{
ScDocumentUniquePtr pUndoDoc;
@@ -5722,7 +5722,7 @@ void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bInteraction
if (!rDoc.IsUndoEnabled())
bRecord = false;
- ScEditableTester aTester(&rDoc, rRange);
+ ScEditableTester aTester(rDoc, rRange);
if (!aTester.IsEditable())
{
if (bInteraction)
diff --git a/sc/source/ui/docshell/editable.cxx b/sc/source/ui/docshell/editable.cxx
index ec9f071b9096..1de616790124 100644
--- a/sc/source/ui/docshell/editable.cxx
+++ b/sc/source/ui/docshell/editable.cxx
@@ -28,35 +28,35 @@ ScEditableTester::ScEditableTester() :
{
}
-ScEditableTester::ScEditableTester( const ScDocument* pDoc, SCTAB nTab,
+ScEditableTester::ScEditableTester( const ScDocument& rDoc, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bNoMatrixAtAll ) :
mbIsEditable(true),
mbOnlyMatrix(true)
{
- TestBlock( pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow, bNoMatrixAtAll );
+ TestBlock( rDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow, bNoMatrixAtAll );
}
-ScEditableTester::ScEditableTester( const ScDocument* pDoc,
+ScEditableTester::ScEditableTester( const ScDocument& rDoc,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark ) :
mbIsEditable(true),
mbOnlyMatrix(true)
{
- TestSelectedBlock( pDoc, nStartCol, nStartRow, nEndCol, nEndRow, rMark );
+ TestSelectedBlock( rDoc, nStartCol, nStartRow, nEndCol, nEndRow, rMark );
}
-ScEditableTester::ScEditableTester( const ScDocument* pDoc, const ScRange& rRange ) :
+ScEditableTester::ScEditableTester( const ScDocument& rDoc, const ScRange& rRange ) :
mbIsEditable(true),
mbOnlyMatrix(true)
{
- TestRange( pDoc, rRange );
+ TestRange( rDoc, rRange );
}
-ScEditableTester::ScEditableTester( const ScDocument* pDoc, const ScMarkData& rMark ) :
+ScEditableTester::ScEditableTester( const ScDocument& rDoc, const ScMarkData& rMark ) :
mbIsEditable(true),
mbOnlyMatrix(true)
{
- TestSelection( pDoc, rMark );
+ TestSelection( rDoc, rMark );
}
ScEditableTester::ScEditableTester( ScViewFunc* pView ) :
@@ -79,13 +79,13 @@ ScEditableTester::ScEditableTester(
TestBlockForAction(rDoc, eAction, nStart, nEnd, rMark);
}
-void ScEditableTester::TestBlock( const ScDocument* pDoc, SCTAB nTab,
+void ScEditableTester::TestBlock( const ScDocument& rDoc, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bNoMatrixAtAll )
{
if (mbIsEditable || mbOnlyMatrix)
{
bool bThisMatrix;
- if (!pDoc->IsBlockEditable( nTab, nStartCol, nStartRow, nEndCol, nEndRow, &bThisMatrix, bNoMatrixAtAll))
+ if (!rDoc.IsBlockEditable( nTab, nStartCol, nStartRow, nEndCol, nEndRow, &bThisMatrix, bNoMatrixAtAll))
{
mbIsEditable = false;
if ( !bThisMatrix )
@@ -94,21 +94,21 @@ void ScEditableTester::TestBlock( const ScDocument* pDoc, SCTAB nTab,
}
}
-void ScEditableTester::TestSelectedBlock( const ScDocument* pDoc,
+void ScEditableTester::TestSelectedBlock( const ScDocument& rDoc,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark )
{
- SCTAB nTabCount = pDoc->GetTableCount();
+ SCTAB nTabCount = rDoc.GetTableCount();
for (const auto& rTab : rMark)
{
if (rTab >= nTabCount)
break;
- TestBlock( pDoc, rTab, nStartCol, nStartRow, nEndCol, nEndRow, false );
+ TestBlock( rDoc, rTab, nStartCol, nStartRow, nEndCol, nEndRow, false );
}
}
-void ScEditableTester::TestRange( const ScDocument* pDoc, const ScRange& rRange )
+void ScEditableTester::TestRange( const ScDocument& rDoc, const ScRange& rRange )
{
SCCOL nStartCol = rRange.aStart.Col();
SCROW nStartRow = rRange.aStart.Row();
@@ -117,15 +117,15 @@ void ScEditableTester::TestRange( const ScDocument* pDoc, const ScRange& rRange
SCROW nEndRow = rRange.aEnd.Row();
SCTAB nEndTab = rRange.aEnd.Tab();
for (SCTAB nTab=nStartTab; nTab<=nEndTab; nTab++)
- TestBlock( pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow, false );
+ TestBlock( rDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow, false );
}
-void ScEditableTester::TestSelection( const ScDocument* pDoc, const ScMarkData& rMark )
+void ScEditableTester::TestSelection( const ScDocument& rDoc, const ScMarkData& rMark )
{
if (mbIsEditable || mbOnlyMatrix)
{
bool bThisMatrix;
- if ( !pDoc->IsSelectionEditable( rMark, &bThisMatrix ) )
+ if ( !rDoc.IsSelectionEditable( rMark, &bThisMatrix ) )
{
mbIsEditable = false;
if ( !bThisMatrix )
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 428dd02d4ffa..e4d384ff1e61 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -232,7 +232,7 @@ bool ScImportExport::StartPaste()
{
if ( !bAll )
{
- ScEditableTester aTester( &rDoc, aRange );
+ ScEditableTester aTester( rDoc, aRange );
if ( !aTester.IsEditable() )
{
vcl::Window* pWin = Application::GetDefDialogParent();
diff --git a/sc/source/ui/inc/editable.hxx b/sc/source/ui/inc/editable.hxx
index 2e86c1270246..ea499a7bd27d 100644
--- a/sc/source/ui/inc/editable.hxx
+++ b/sc/source/ui/inc/editable.hxx
@@ -44,20 +44,20 @@ public:
/** @param bNoMatrixAtAll
TRUE if there must not be any matrix, not even entirely
contained; for example in sorting. */
- ScEditableTester( const ScDocument* pDoc, SCTAB nTab,
+ ScEditableTester( const ScDocument& rDoc, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
bool bNoMatrixAtAll = false );
// calls TestSelectedBlock
- ScEditableTester( const ScDocument* pDoc,
+ ScEditableTester( const ScDocument& rDoc,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark );
// calls TestRange
- ScEditableTester( const ScDocument* pDoc, const ScRange& rRange );
+ ScEditableTester( const ScDocument& rDoc, const ScRange& rRange );
// calls TestSelection
- ScEditableTester( const ScDocument* pDoc, const ScMarkData& rMark );
+ ScEditableTester( const ScDocument& rDoc, const ScMarkData& rMark );
// calls TestView
ScEditableTester( ScViewFunc* pView );
@@ -68,14 +68,14 @@ public:
// Several calls to the Test... methods check if *all* of the ranges
// are editable. For several independent checks, Reset() has to be used.
- void TestBlock( const ScDocument* pDoc, SCTAB nTab,
+ void TestBlock( const ScDocument& rDoc, SCTAB nTab,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
bool bNoMatrixAtAll = false );
- void TestSelectedBlock( const ScDocument* pDoc,
+ void TestSelectedBlock( const ScDocument& rDoc,
SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark );
- void TestRange( const ScDocument* pDoc, const ScRange& rRange );
- void TestSelection( const ScDocument* pDoc, const ScMarkData& rMark );
+ void TestRange( const ScDocument& rDoc, const ScRange& rRange );
+ void TestSelection( const ScDocument& rDoc, const ScMarkData& rMark );
void TestBlockForAction(
const ScDocument& rDoc, sc::ColRowEditAction eAction, SCCOLROW nStart, SCCOLROW nEnd,
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index de6a8326112e..9698af40aa53 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -432,7 +432,7 @@ void ScDBFunc::HideAutoFilter()
bool ScDBFunc::ImportData( const ScImportParam& rParam )
{
ScDocument& rDoc = GetViewData().GetDocument();
- ScEditableTester aTester( &rDoc, GetViewData().GetTabNo(), rParam.nCol1,rParam.nRow1,
+ ScEditableTester aTester( rDoc, GetViewData().GetTabNo(), rParam.nCol1,rParam.nRow1,
rParam.nCol2,rParam.nRow2 );
if ( !aTester.IsEditable() )
{
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 9e7fe04c9b94..cdfb2a7eb717 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -446,7 +446,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord,
return;
}
- ScEditableTester aTester( &rDoc, nTab, 0,rParam.nRow1+1, rDoc.MaxCol(),rDoc.MaxRow() );
+ ScEditableTester aTester( rDoc, nTab, 0,rParam.nRow1+1, rDoc.MaxCol(),rDoc.MaxRow() );
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index d52b0e5d354f..7ee10d644e9e 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3869,7 +3869,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
SCTAB nTab = pViewData->GetTabNo();
ScDocument& rDoc = pViewData->GetDocument();
- ScEditableTester aTester( &rDoc, nTab, nPosX,nPosY, nPosX,nPosY );
+ ScEditableTester aTester( rDoc, nTab, nPosX,nPosY, nPosX,nPosY );
if ( !aTester.IsFormatEditable() )
nRet = DND_ACTION_NONE; // forbidden
}
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx
index d3a385752375..32158705dddf 100644
--- a/sc/source/ui/view/spelldialog.cxx
+++ b/sc/source/ui/view/spelldialog.cxx
@@ -197,7 +197,7 @@ void ScSpellDialogChildWindow::Init()
case SC_SELECTTYPE_SHEET:
{
// test if there is something editable
- ScEditableTester aTester( mpDoc, rMarkData );
+ ScEditableTester aTester( *mpDoc, rMarkData );
if( !aTester.IsEditable() )
{
// #i85751# Don't show an ErrorMessage here, because the vcl
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index b9d5e389e4b6..048181f3cb7e 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2171,7 +2171,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
SCROW nDestRow = rParam.aRefVariableCell.Row();
SCTAB nDestTab = rParam.aRefVariableCell.Tab();
- ScEditableTester aTester( &rDoc, nDestTab, nDestCol,nDestRow, nDestCol,nDestRow );
+ ScEditableTester aTester( rDoc, nDestTab, nDestCol,nDestRow, nDestCol,nDestRow );
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 407c10782fc2..a56a0f497b6f 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1194,7 +1194,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
// check cell-protection
- ScEditableTester aTester( &rDoc, nStartTab, nStartCol,nStartRow, nUndoEndCol,nUndoEndRow );
+ ScEditableTester aTester( rDoc, nStartTab, nStartCol,nStartRow, nUndoEndCol,nUndoEndRow );
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 6d81ea668d85..c9c852c9a8a6 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -197,7 +197,7 @@ void ScViewFunc::DoRefConversion()
aMarkRange = ScRange( GetViewData().GetCurX(),
GetViewData().GetCurY(), GetViewData().GetTabNo() );
}
- ScEditableTester aTester( &rDoc, aMarkRange.aStart.Col(), aMarkRange.aStart.Row(),
+ ScEditableTester aTester( rDoc, aMarkRange.aStart.Col(), aMarkRange.aStart.Row(),
aMarkRange.aEnd.Col(), aMarkRange.aEnd.Row(),rMark );
if (!aTester.IsEditable())
{
@@ -339,7 +339,7 @@ void ScViewFunc::DoThesaurus()
nTab = GetViewData().GetTabNo();
ScAddress aPos(nCol, nRow, nTab);
- ScEditableTester aTester( &rDoc, nCol, nRow, nCol, nRow, rMark );
+ ScEditableTester aTester( rDoc, nCol, nRow, nCol, nRow, rMark );
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
@@ -469,7 +469,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam )
bool bMarked = rMark.IsMultiMarked();
if (bMarked)
{
- ScEditableTester aTester( &rDoc, rMark );
+ ScEditableTester aTester( rDoc, rMark );
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 9bf109b8ba14..0f363c0bd970 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -352,7 +352,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
ScDocFunc &rFunc = GetViewData().GetDocFunc();
ScDocShellModificator aModificator( *pDocSh );
- ScEditableTester aTester( &rDoc, nCol,nRow, nCol,nRow, rMark );
+ ScEditableTester aTester( rDoc, nCol,nRow, nCol,nRow, rMark );
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
@@ -602,7 +602,7 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r
bool bUndo(rDoc.IsUndoEnabled());
ScDocShellModificator aModificator( *pDocSh );
- ScEditableTester aTester( &rDoc, nTab, nCol,nRow, nCol,nRow );
+ ScEditableTester aTester( rDoc, nTab, nCol,nRow, nCol,nRow );
if (aTester.IsEditable())
{
ScAddress aPos( nCol, nRow, nTab );
@@ -637,7 +637,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
ScDocShellModificator aModificator( *pDocSh );
- ScEditableTester aTester( &rDoc, nTab, nCol,nRow, nCol,nRow );
+ ScEditableTester aTester( rDoc, nTab, nCol,nRow, nCol,nRow );
if (aTester.IsEditable())
{
@@ -1794,7 +1794,7 @@ void ScViewFunc::DeleteMulti( bool bRows )
if (i == 0)
{
// test to the end of the sheet
- ScEditableTester aTester( &rDoc, nTab, nStartCol, nStartRow, rDoc.MaxCol(), rDoc.MaxRow() );
+ ScEditableTester aTester( rDoc, nTab, nStartCol, nStartRow, rDoc.MaxCol(), rDoc.MaxRow() );
if (!aTester.IsEditable())
pErrorId = aTester.GetMessageId();
}