summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2018-01-29 23:54:03 +0100
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2018-01-29 23:54:03 +0100
commit5e6608e1d55a423dd9d309d68a6e5c03b29a934f (patch)
tree9885393b28122d03e4d81827d05288b178b0a7d8
parent61db9f05ab0451f684752fc686b972ed0ca35d72 (diff)
intermediate: docufld
Change-Id: I93f6dbf4eda561d68146be714e633576394d5a75
-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 c89a418f66a2..c8ef9db0375a 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -632,7 +632,7 @@ public:
class SwJumpEditFieldType : public SwFieldType
{
SwDoc* pDoc;
- SwDepend aDep;
+ SwMultiDepend aDep;
public:
SwJumpEditFieldType( SwDoc* pDoc );
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 4e23cc1cf2b5..18a6fcc4f8b5 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -2393,7 +2393,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 ), pDoc( pD ), aDep( this, nullptr )
+ : SwFieldType( SwFieldIds::JumpEdit ), pDoc( pD ), aDep( *this )
{
}
@@ -2405,11 +2405,7 @@ SwFieldType* SwJumpEditFieldType::Copy() const
SwCharFormat* SwJumpEditFieldType::GetCharFormat()
{
SwCharFormat* pFormat = pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_JUMPEDIT );
-
- // not registered yet?
- if( !aDep.GetRegisteredIn() )
- pFormat->Add( &aDep ); // register
-
+ aDep.StartListening(pFormat);
return pFormat;
}