summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2018-11-18 15:27:04 +0100
committerBjörn Michaelsen <bjoern.michaelsen@libreoffice.org>2018-11-19 22:45:08 +0100
commitb14d30f8bff4315fb7ce83a00026e3fa6fb83acf (patch)
tree37f83d69b1b7249440d72077bccc9145fcc3bbca /sw/source
parent295059082e46718526ab0cc296416447128ceb8c (diff)
no more SwClient/SwModify for SwTextTableRows
Change-Id: I267904c751c9b32b9b64b0cf1b7f9d922bc7e1f7 Reviewed-on: https://gerrit.libreoffice.org/63529 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unotbl.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index dd2161c24ef4..a66ee1d8631e 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1300,10 +1300,12 @@ uno::Sequence< OUString > SwXTextTableRow::getSupportedServiceNames()
SwXTextTableRow::SwXTextTableRow(SwFrameFormat* pFormat, SwTableLine* pLn) :
- SwClient(pFormat),
- m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_TABLE_ROW)),
- pLine(pLn)
-{ }
+ m_pFormat(pFormat),
+ pLine(pLn),
+ m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_TABLE_ROW))
+{
+ StartListening(m_pFormat->GetNotifier());
+}
SwXTextTableRow::~SwXTextTableRow()
{
@@ -1452,18 +1454,16 @@ void SwXTextTableRow::addVetoableChangeListener(const OUString& /*rPropertyName*
void SwXTextTableRow::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/)
{ throw uno::RuntimeException("not implemented", static_cast<cppu::OWeakObject*>(this)); };
-void SwXTextTableRow::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
- { ClientModify(this, pOld, pNew); }
-
-void SwXTextTableRow::SwClientNotify(const SwModify& rModify, const SfxHint& rHint)
+void SwXTextTableRow::Notify(const SfxHint& rHint)
{
- if(auto pFindHint = dynamic_cast<const FindUnoInstanceHint<SwTableLine, SwXTextTableRow>*>(&rHint))
+ if(rHint.GetId() == SfxHintId::Dying)
+ {
+ m_pFormat = nullptr;
+ } else if(auto pFindHint = dynamic_cast<const FindUnoInstanceHint<SwTableLine, SwXTextTableRow>*>(&rHint))
{
if(!pFindHint->m_pCore && pFindHint->m_pCore == pLine)
pFindHint->m_pResult = this;
}
- else
- SwClient::SwClientNotify(rModify, rHint);
}
SwTableLine* SwXTextTableRow::FindLine(SwTable* pTable, SwTableLine const * pLine)
@@ -3961,7 +3961,7 @@ uno::Any SwXTableRows::getByIndex(sal_Int32 nIndex)
throw lang::IndexOutOfBoundsException();
SwTableLine* pLine = pTable->GetTabLines()[nIndex];
FindUnoInstanceHint<SwTableLine,SwXTextTableRow> aHint{pLine};
- pFrameFormat->CallSwClientNotify(aHint);
+ pFrameFormat->GetNotifier().Broadcast(aHint);
if(!aHint.m_pResult)
aHint.m_pResult = new SwXTextTableRow(pFrameFormat, pLine);
uno::Reference<beans::XPropertySet> xRet = static_cast<beans::XPropertySet*>(aHint.m_pResult);