diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2019-02-25 21:11:37 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@libreoffice.org> | 2019-02-26 20:11:39 +0100 |
commit | b3394345c900548f1b4c91246d3188aa04e30e8c (patch) | |
tree | ffcd708e773d42e08c485af79ff49953449ef3ad /sw/source/core/unocore/unoredlines.cxx | |
parent | 861e3220a15138c5ec8f572c3cd898f99ea7df99 (diff) |
UNO redline: uno SvtListener instead of SwClient
Change-Id: Ic580df179c6aa1dedc866cf0882c124d5b13fcb3
Reviewed-on: https://gerrit.libreoffice.org/68360
Tested-by: Jenkins
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core/unocore/unoredlines.cxx')
-rw-r--r-- | sw/source/core/unocore/unoredlines.cxx | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx index 3012bffc071d..5776064cd7a9 100644 --- a/sw/source/core/unocore/unoredlines.cxx +++ b/sw/source/core/unocore/unoredlines.cxx @@ -105,20 +105,12 @@ uno::Sequence< OUString > SwXRedlines::getSupportedServiceNames() return uno::Sequence< OUString >(); } -beans::XPropertySet* SwXRedlines::GetObject( SwRangeRedline& rRedline, SwDoc& rDoc ) -{ - SwPageDesc* pStdDesc = rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD); - SwIterator<SwXRedline,SwPageDesc> aIter(*pStdDesc); - SwXRedline* pxRedline = aIter.First(); - while(pxRedline) - { - if(pxRedline->GetRedline() == &rRedline) - break; - pxRedline = aIter.Next(); - } - if( !pxRedline ) - pxRedline = new SwXRedline(rRedline, rDoc); - return pxRedline; +beans::XPropertySet* SwXRedlines::GetObject( SwRangeRedline& rRedline, SwDoc& rDoc ) +{ + SwXRedline* pXRedline(nullptr); + sw::FindRedlineHint aHint(rRedline, &pXRedline); + rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->GetNotifier().Broadcast(aHint); + return pXRedline ? pXRedline : new SwXRedline(rRedline, rDoc); } SwXRedlineEnumeration::SwXRedlineEnumeration(SwDoc& rDoc) : |