summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2018-01-29 23:54:03 +0100
committerBjörn Michaelsen <bjoern.michaelsen@libreoffice.org>2018-03-11 23:33:59 +0100
commitf4ab54c17ce2fb1959886377a1e37111aed80000 (patch)
tree5c7f487582f91c74797fb10ea09779de2a56835b /sw
parent5c04518c2d4b289289d551e22709e22702563d50 (diff)
use sw::WriterMultiListener instead of SwDepend in SwJumpEditFieldType
Change-Id: I93f6dbf4eda561d68146be714e633576394d5a75 Reviewed-on: https://gerrit.libreoffice.org/49566 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org> Tested-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/docufld.hxx2
-rw-r--r--sw/source/core/fields/docufld.cxx8
2 files changed, 3 insertions, 7 deletions
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 6d7fcd2f95c9..fd699b563356 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -632,7 +632,7 @@ public:
class SwJumpEditFieldType : public SwFieldType
{
SwDoc* m_pDoc;
- SwDepend m_aDep;
+ sw::WriterMultiListener m_aDep;
public:
SwJumpEditFieldType( SwDoc* pDoc );
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 3ae4dcf8639c..fa08469d50fe 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -2394,7 +2394,7 @@ bool SwRefPageGetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
// field type to jump to and edit
SwJumpEditFieldType::SwJumpEditFieldType( SwDoc* pD )
- : SwFieldType( SwFieldIds::JumpEdit ), m_pDoc( pD ), m_aDep( this, nullptr )
+ : SwFieldType( SwFieldIds::JumpEdit ), m_pDoc( pD ), m_aDep( *this )
{
}
@@ -2406,11 +2406,7 @@ SwFieldType* SwJumpEditFieldType::Copy() const
SwCharFormat* SwJumpEditFieldType::GetCharFormat()
{
SwCharFormat* pFormat = m_pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_JUMPEDIT );
-
- // not registered yet?
- if( !m_aDep.GetRegisteredIn() )
- pFormat->Add( &m_aDep ); // register
-
+ m_aDep.StartListening(pFormat);
return pFormat;
}