summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/chgtrack.hxx2
-rw-r--r--sc/source/core/tool/chgtrack.cxx10
-rw-r--r--sc/source/ui/undo/undoblk3.cxx7
3 files changed, 10 insertions, 9 deletions
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index c5af0df88064..b061aa7f2ddf 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -1025,7 +1025,7 @@ public:
// after new values were set in the document,
// old values from RefDoc/UndoDoc.
// All contents with a cell in RefDoc
- void AppendContentsIfInRefDoc( ScDocument* pRefDoc,
+ void AppendContentsIfInRefDoc( ScDocument& rRefDoc,
sal_uLong& nStartAction, sal_uLong& nEndAction );
// Meant for import filter, creates and inserts
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index a1779618333f..84848a57e540 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2768,21 +2768,21 @@ void ScChangeTrack::AppendContentRange( const ScRange& rRange,
}
}
-void ScChangeTrack::AppendContentsIfInRefDoc( ScDocument* pRefDoc,
+void ScChangeTrack::AppendContentsIfInRefDoc( ScDocument& rRefDoc,
sal_uLong& nStartAction, sal_uLong& nEndAction )
{
- ScCellIterator aIter(pRefDoc, ScRange(0,0,0,rDoc.MaxCol(),rDoc.MaxRow(),MAXTAB));
+ ScCellIterator aIter(&rRefDoc, ScRange(0,0,0,rDoc.MaxCol(),rDoc.MaxRow(),MAXTAB));
if (aIter.first())
{
nStartAction = GetActionMax() + 1;
StartBlockModify( ScChangeTrackMsgType::Append, nStartAction );
- SvNumberFormatter* pFormatter = pRefDoc->GetFormatTable();
+ SvNumberFormatter* pFormatter = rRefDoc.GetFormatTable();
do
{
const ScAddress& rPos = aIter.GetPos();
- const ScPatternAttr* pPat = pRefDoc->GetPattern(rPos);
+ const ScPatternAttr* pPat = rRefDoc.GetPattern(rPos);
AppendContent(
- rPos, aIter.getCellValue(), pPat->GetNumberFormat(pFormatter), pRefDoc);
+ rPos, aIter.getCellValue(), pPat->GetNumberFormat(pFormatter), &rRefDoc);
}
while (aIter.next());
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index f08e420a4ad8..d7358831d75f 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -940,7 +940,7 @@ void ScUndoReplace::SetChangeTrack()
if ( pUndoDoc )
{ //! UndoDoc includes only the changed cells,
// that is why an Iterator can be used
- pChangeTrack->AppendContentsIfInRefDoc( pUndoDoc.get(),
+ pChangeTrack->AppendContentsIfInRefDoc( *pUndoDoc,
nStartChangeAction, nEndChangeAction );
}
else
@@ -1193,7 +1193,7 @@ void ScUndoConversion::SetChangeTrack()
if ( pChangeTrack )
{
if ( pUndoDoc )
- pChangeTrack->AppendContentsIfInRefDoc( pUndoDoc.get(),
+ pChangeTrack->AppendContentsIfInRefDoc( *pUndoDoc,
nStartChangeAction, nEndChangeAction );
else
{
@@ -1285,6 +1285,7 @@ pRedoDoc ( std::move(pNewRedoDoc) ),
aRange ( aMarkRange ),
bMulti ( bNewMulti )
{
+ assert(pUndoDoc && pUndoDoc);
SetChangeTrack();
}
@@ -1303,7 +1304,7 @@ void ScUndoRefConversion::SetChangeTrack()
{
ScChangeTrack* pChangeTrack = pDocShell->GetDocument().GetChangeTrack();
if ( pChangeTrack )
- pChangeTrack->AppendContentsIfInRefDoc( pUndoDoc.get(),
+ pChangeTrack->AppendContentsIfInRefDoc( *pUndoDoc,
nStartChangeAction, nEndChangeAction );
else
nStartChangeAction = nEndChangeAction = 0;