summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-10-04 17:18:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-10-04 20:42:37 +0200
commit6539ff3f4123a961a949c8d6a5fae8880c3d7081 (patch)
tree1f917212dc8c40aee1c4e1c5493a16b30917f56a /sw/source/core
parente11cdf021a1ee7ff95733699e75c35af72c54c69 (diff)
DocxTableStyleExport never passed a null SwDoc*
ditto: SwASCIIParser ctor SwNumRule::CopyNumRule SwDataChanged ctor Change-Id: I0f731ef2856eb70bd5fff5372ee7bc769e1f8bd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103922 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx2
-rw-r--r--sw/source/core/doc/docfmt.cxx2
-rw-r--r--sw/source/core/doc/number.cxx6
-rw-r--r--sw/source/core/doc/swserv.cxx12
-rw-r--r--sw/source/core/inc/mvsave.hxx4
5 files changed, 13 insertions, 13 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index cf697077133f..fe748212d497 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -3120,7 +3120,7 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
{
// BUG 26675: Send DataChanged before deleting, so that we notice which objects are in scope.
// After that they can be before/after the position.
- SwDataChanged aTmp( &m_rDoc, rPos );
+ SwDataChanged aTmp( m_rDoc, rPos );
}
SwUndoSplitNode* pUndo = nullptr;
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index dbafd42f1856..008f0beea2b2 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1581,7 +1581,7 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles )
const SwNumRule& rR = *rArr[ n ];
SwNumRule* pNew = FindNumRulePtr( rR.GetName());
if( pNew )
- pNew->CopyNumRule( this, rR );
+ pNew->CopyNumRule(*this, rR);
else
{
if( !rR.IsAutoRule() )
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index a75c2478320d..4de390353fdf 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -853,17 +853,17 @@ OUString SwNumRule::MakeParagraphStyleListString() const
A kind of copy constructor, so that the num formats are attached to the
right CharFormats of a Document.
Copies the NumFormats and returns itself. */
-SwNumRule& SwNumRule::CopyNumRule( SwDoc* pDoc, const SwNumRule& rNumRule )
+SwNumRule& SwNumRule::CopyNumRule( SwDoc& rDoc, const SwNumRule& rNumRule )
{
for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
Set( n, rNumRule.maFormats[ n ].get() );
if( maFormats[ n ] && maFormats[ n ]->GetCharFormat() &&
- !pDoc->GetCharFormats()->IsAlive(maFormats[n]->GetCharFormat()))
+ !rDoc.GetCharFormats()->IsAlive(maFormats[n]->GetCharFormat()))
{
// If we copy across different Documents, then copy the
// corresponding CharFormat into the new Document.
- maFormats[n]->SetCharFormat( pDoc->CopyCharFormat( *maFormats[n]->
+ maFormats[n]->SetCharFormat( rDoc.CopyCharFormat( *maFormats[n]->
GetCharFormat() ) );
}
}
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index 100e8b6a3f2c..cc2d3fe5dbf5 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -275,13 +275,13 @@ void SwServerObject::SetDdeBookmark( ::sw::mark::IMark& rBookmark)
}
SwDataChanged::SwDataChanged( const SwPaM& rPam )
- : m_pPam( &rPam ), m_pPos( nullptr ), m_pDoc( &rPam.GetDoc() )
+ : m_pPam( &rPam ), m_pPos( nullptr ), m_rDoc( rPam.GetDoc() )
{
m_nContent = rPam.GetPoint()->nContent.GetIndex();
}
-SwDataChanged::SwDataChanged( SwDoc* pDc, const SwPosition& rPos )
- : m_pPam( nullptr ), m_pPos( &rPos ), m_pDoc( pDc )
+SwDataChanged::SwDataChanged( SwDoc& rDc, const SwPosition& rPos )
+ : m_pPam( nullptr ), m_pPos( &rPos ), m_rDoc( rDc )
{
m_nContent = rPos.nContent.GetIndex();
}
@@ -289,10 +289,10 @@ SwDataChanged::SwDataChanged( SwDoc* pDc, const SwPosition& rPos )
SwDataChanged::~SwDataChanged()
{
// JP 09.04.96: Only if the Layout is available (thus during input)
- if( !m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() )
+ if( !m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() )
return;
- const ::sfx2::SvLinkSources& rServers = m_pDoc->getIDocumentLinksAdministration().GetLinkManager().GetServers();
+ const ::sfx2::SvLinkSources& rServers = m_rDoc.getIDocumentLinksAdministration().GetLinkManager().GetServers();
::sfx2::SvLinkSources aTemp(rServers);
for( const auto& rpLinkSrc : aTemp )
@@ -312,7 +312,7 @@ SwDataChanged::~SwDataChanged()
if( !refObj->HasDataLinks() )
{
// Then remove from the list
- m_pDoc->getIDocumentLinksAdministration().GetLinkManager().RemoveServer( rpLinkSrc );
+ m_rDoc.getIDocumentLinksAdministration().GetLinkManager().RemoveServer( rpLinkSrc );
}
}
}
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index 0b962383bdb5..6aeefcd950d3 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -130,12 +130,12 @@ class SwDataChanged
{
const SwPaM* m_pPam;
const SwPosition* m_pPos;
- SwDoc* m_pDoc;
+ SwDoc& m_rDoc;
sal_Int32 m_nContent;
public:
SwDataChanged( const SwPaM& rPam );
- SwDataChanged( SwDoc* pDoc, const SwPosition& rPos );
+ SwDataChanged( SwDoc& rDoc, const SwPosition& rPos );
~SwDataChanged();
sal_Int32 GetContent() const { return m_nContent; }