diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2023-08-09 11:34:00 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2023-09-01 00:05:28 +0200 |
commit | 140079362502408c75ceee67e86d779f61c0ac1b (patch) | |
tree | 192aac811efa24025ce2059c89a8141a059799d6 /sw/source/core/docnode/node.cxx | |
parent | 345b214c37d1f645dd0e6e084358f8ca81d9ed66 (diff) |
remove AUTOFMT_DOCNODE
- remove obsolete GetInfo()s
- introduce SwFormat::IsUsed()
- move handling from GetInfo to SwClientNotify
- make sure SwAutoFormatUsedHint is forwarded to clients where needed (e.g. SwTextFormatColl, SwDDETable, SwPageDesc, ...)
Change-Id: I07d9e94ee791ca6e738b4eb3e597055ad8fbe755
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155504
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core/docnode/node.cxx')
-rw-r--r-- | sw/source/core/docnode/node.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 4304b875c4d7..c9abe227643a 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1195,6 +1195,11 @@ void SwContentNode::SwClientNotify( const SwModify&, const SfxHint& rHint) static_cast<SwTextNode*>(this)->SetCalcHiddenCharFlags(); CallSwClientNotify(rHint); } + else if (rHint.GetId() == SfxHintId::SwAutoFormatUsedHint) + { + static_cast<const sw::AutoFormatUsedHint&>(rHint).CheckNode(this); + return; + } else if (auto pModifyChangedHint = dynamic_cast<const sw::ModifyChangedHint*>(&rHint)) { m_pCondColl = const_cast<SwFormatColl*>(static_cast<const SwFormatColl*>(pModifyChangedHint->m_pNew)); @@ -1572,12 +1577,6 @@ bool SwContentNode::GetInfo( SfxPoolItem& rInfo ) const if( GetAttr( RES_PAGEDESC ).GetPageDesc() ) static_cast<SwFindNearestNode&>(rInfo).CheckNode( *this ); return true; - case RES_AUTOFMT_DOCNODE: - if( &GetNodes() == static_cast<SwAutoFormatGetDocNode&>(rInfo).pNodes ) - { - return false; - } - break; } return sw::BroadcastingModify::GetInfo( rInfo ); } |