summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-23 12:09:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-24 11:02:05 +0200
commit2346b09d19d98992e2dae826d7576cfe01538461 (patch)
tree04857a9ef28258c06c49cf42249d0d51a43ff245 /sc/source/ui/docshell/docsh5.cxx
parent87f6ca70a7c1ce94d6a5a32789ab430f6e604db6 (diff)
ScCellFormat::GetString never called with a null ScDocument*
and similar, allowing a few redundant null checks to be dropped Change-Id: Ice0d6d57df112a09d3e1af3d34126b3519529daf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103278 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/docshell/docsh5.cxx')
-rw-r--r--sc/source/ui/docshell/docsh5.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index fde5d60e5a10..cbdc901fa45c 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -577,7 +577,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord )
std::unique_ptr<ScOutlineTable> pUndoTab(pTable ? new ScOutlineTable( *pTable ) : nullptr);
ScDocumentUniquePtr pUndoDoc(new ScDocument( SCDOCMODE_UNDO ));
- pUndoDoc->InitUndo( &m_aDocument, 0, nTabCount-1, false, true );
+ pUndoDoc->InitUndo( m_aDocument, 0, nTabCount-1, false, true );
// row state
m_aDocument.CopyToDocument(0, 0, nDestTab, m_aDocument.MaxCol(), m_aDocument.MaxRow(), nDestTab,
@@ -603,7 +603,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord )
else
{
ScDocumentUniquePtr pUndoDoc(new ScDocument( SCDOCMODE_UNDO ));
- pUndoDoc->InitUndo( &m_aDocument, aDestArea.nTab, aDestArea.nTab );
+ pUndoDoc->InitUndo( m_aDocument, aDestArea.nTab, aDestArea.nTab );
m_aDocument.CopyToDocument(aDestArea.nColStart, aDestArea.nRowStart, aDestArea.nTab,
aDestArea.nColEnd, aDestArea.nRowEnd, aDestArea.nTab,
@@ -692,7 +692,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const OUString& rName, bool bRecord )
if (bRecord)
{
ScDocumentUniquePtr pUndoDoc(new ScDocument( SCDOCMODE_UNDO ));
- pUndoDoc->InitUndo( &m_aDocument, nTab,nEndTab ); // also all scenarios
+ pUndoDoc->InitUndo( m_aDocument, nTab,nEndTab ); // also all scenarios
// shown table:
m_aDocument.CopyToDocument(nStartCol, nStartRow, nTab,
nEndCol, nEndRow, nTab, InsertDeleteFlags::ALL,