diff options
Diffstat (limited to 'sw')
44 files changed, 99 insertions, 100 deletions
diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx index 289d5f0b7ee1..477df5aab185 100644 --- a/sw/inc/unobaseclass.hxx +++ b/sw/inc/unobaseclass.hxx @@ -111,7 +111,7 @@ namespace sw { UnoTunnelImpl(const css::uno::Sequence< sal_Int8 > & rId, C *const pThis) { - if (isUnoTunnelId<C>(rId)) + if (comphelper::isUnoTunnelId<C>(rId)) { return ::sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(pThis) ); diff --git a/sw/source/core/layout/dumpfilter.cxx b/sw/source/core/layout/dumpfilter.cxx index 073d6a7e69b5..f931b1cc35ad 100644 --- a/sw/source/core/layout/dumpfilter.cxx +++ b/sw/source/core/layout/dumpfilter.cxx @@ -87,7 +87,7 @@ namespace sw uno::Reference< io::XOutputStream >() ); // Actually get the SwRootFrame to call dumpAsXml - auto pXDoc = comphelper::getUnoTunnelImplementation<SwXTextDocument>(m_xSrcDoc); + auto pXDoc = comphelper::getFromUnoTunnel<SwXTextDocument>(m_xSrcDoc); if ( pXDoc ) { SwRootFrame* pLayout = pXDoc->GetDocShell()->GetWrtShell()->GetLayout(); diff --git a/sw/source/core/unocore/TextCursorHelper.cxx b/sw/source/core/unocore/TextCursorHelper.cxx index a8f47e6113cd..bf522698d051 100644 --- a/sw/source/core/unocore/TextCursorHelper.cxx +++ b/sw/source/core/unocore/TextCursorHelper.cxx @@ -24,7 +24,7 @@ using namespace ::com::sun::star; const uno::Sequence< sal_Int8 > & OTextCursorHelper::getUnoTunnelId() { - static const UnoTunnelIdInit theOTextCursorHelperUnoTunnelId; + static const comphelper::UnoIdInit theOTextCursorHelperUnoTunnelId; return theOTextCursorHelperUnoTunnelId.getSeq(); } @@ -32,7 +32,7 @@ const uno::Sequence< sal_Int8 > & OTextCursorHelper::getUnoTunnelId() sal_Int64 SAL_CALL OTextCursorHelper::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<OTextCursorHelper>(rId) ) + if( comphelper::isUnoTunnelId<OTextCursorHelper>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 4da8866a27cd..5ee6dac48ab0 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -198,7 +198,7 @@ uno::Reference<text::XTextContent> SwXBookmark::CreateXBookmark( const uno::Sequence< sal_Int8 > & SwXBookmark::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXBookmarkUnoTunnelId; + static const comphelper::UnoIdInit theSwXBookmarkUnoTunnelId; return theSwXBookmarkUnoTunnelId.getSeq(); } diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 7a78239c8ad1..2fc30b19998d 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -1595,7 +1595,7 @@ void SwChartDataProvider::AddRowCols( const sal_Int32 nLen = xRef->getTextualData().getLength(); if (nLen > 1) // value data-sequence ? { - auto pDataSeq = comphelper::getUnoTunnelImplementation<SwChartDataSequence>(xRef); + auto pDataSeq = comphelper::getFromUnoTunnel<SwChartDataSequence>(xRef); if (pDataSeq) { SwRangeDescriptor aDesc; @@ -1874,13 +1874,13 @@ SwChartDataSequence::~SwChartDataSequence() const uno::Sequence< sal_Int8 > & SwChartDataSequence::getUnoTunnelId() { - static const UnoTunnelIdInit theSwChartDataSequenceUnoTunnelId; + static const comphelper::UnoIdInit theSwChartDataSequenceUnoTunnelId; return theSwChartDataSequenceUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwChartDataSequence::getSomething( const uno::Sequence< sal_Int8 > &rId ) { - if( isUnoTunnelId<SwChartDataSequence>(rId) ) + if( comphelper::isUnoTunnelId<SwChartDataSequence>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index e8e6c40ef702..3cdea60b7eb1 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -833,7 +833,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam) uno::Reference<XIndexReplace> xIndexReplace; if(rValue >>= xIndexReplace) { - auto pSwNum = comphelper::getUnoTunnelImplementation<SwXNumberingRules>(xIndexReplace); + auto pSwNum = comphelper::getFromUnoTunnel<SwXNumberingRules>(xIndexReplace); if(pSwNum) { SwDoc& rDoc = rPam.GetDoc(); diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index a2a0faf4f1f8..e9e2a67e8174 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -848,13 +848,13 @@ void SwXDrawPage::InvalidateSwDoc() const uno::Sequence< sal_Int8 > & SwXShape::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXShapeUnoTunnelId; + static const comphelper::UnoIdInit theSwXShapeUnoTunnelId; return theSwXShapeUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXShape::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXShape>(rId) ) + if( comphelper::isUnoTunnelId<SwXShape>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } @@ -936,7 +936,7 @@ void SwXShape::AddExistingShapeToFormat( SdrObject const & _rObj ) if ( !pCurrent ) continue; - auto pSwShape = comphelper::getUnoTunnelImplementation<SwXShape>(pCurrent->getWeakUnoShape()); + auto pSwShape = comphelper::getFromUnoTunnel<SwXShape>(pCurrent->getWeakUnoShape()); if ( pSwShape ) { if ( pSwShape->m_bDescriptor ) @@ -1060,7 +1060,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a uno::Reference<text::XTextFrame> xFrame; if(aValue >>= xFrame) { - SwXFrame* pFrame = comphelper::getUnoTunnelImplementation<SwXFrame>(xFrame); + SwXFrame* pFrame = comphelper::getFromUnoTunnel<SwXFrame>(xFrame); if(pFrame && pFrame->GetFrameFormat() && pFrame->GetFrameFormat()->GetDoc() == pDoc) { @@ -2192,7 +2192,7 @@ uno::Sequence< OUString > SwXShape::getSupportedServiceNames() SvxShape* SwXShape::GetSvxShape() { if(m_xShapeAgg.is()) - return comphelper::getUnoTunnelImplementation<SvxShape>(m_xShapeAgg); + return comphelper::getFromUnoTunnel<SvxShape>(m_xShapeAgg); return nullptr; } @@ -2308,7 +2308,7 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition ) // #i34750# // use method <SvxShape->getPosition()> to get the correct // 'Drawing layer' position of the top group shape. - auto pSvxGroupShape = comphelper::getUnoTunnelImplementation<SvxShape>(pTopGroupObj->getUnoShape()); + auto pSvxGroupShape = comphelper::getFromUnoTunnel<SvxShape>(pTopGroupObj->getUnoShape()); const awt::Point aGroupPos = pSvxGroupShape->getPosition(); aNewPos.X = o3tl::saturating_add(aNewPos.X, aGroupPos.X); aNewPos.Y = o3tl::saturating_add(aNewPos.Y, aGroupPos.Y); diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 425258b6741a..fec80e3e7c13 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -461,7 +461,7 @@ protected: const uno::Sequence< sal_Int8 > & SwXFieldMaster::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXFieldMasterUnoTunnelId; + static const comphelper::UnoIdInit theSwXFieldMasterUnoTunnelId; return theSwXFieldMasterUnoTunnelId.getSeq(); } @@ -1173,7 +1173,7 @@ public: const uno::Sequence< sal_Int8 > & SwXTextField::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextFieldUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextFieldUnoTunnelId; return theSwXTextFieldUnoTunnelId.getSeq(); } diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index 4cf9259dc5b6..daf57af4e417 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -315,7 +315,7 @@ css::uno::Sequence< ::sal_Int32 > SAL_CALL SwXFlatParagraph::getLanguagePortions const uno::Sequence< sal_Int8 >& SwXFlatParagraph::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXFlatParagraphUnoTunnelId; + static const comphelper::UnoIdInit theSwXFlatParagraphUnoTunnelId; return theSwXFlatParagraphUnoTunnelId.getSeq(); } diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 9af79f131220..eb7e22d10a7a 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1161,13 +1161,13 @@ public: const ::uno::Sequence< sal_Int8 > & SwXFrame::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXFrameUnoTunnelId; + static const comphelper::UnoIdInit theSwXFrameUnoTunnelId; return theSwXFrameUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXFrame::getSomething( const ::uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXFrame>(rId) ) + if( comphelper::isUnoTunnelId<SwXFrame>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } @@ -1733,7 +1733,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& uno::Reference<text::XTextFrame> xFrame; if(aValue >>= xFrame) { - SwXFrame* pFrame = comphelper::getUnoTunnelImplementation<SwXFrame>(xFrame); + SwXFrame* pFrame = comphelper::getFromUnoTunnel<SwXFrame>(xFrame); if(pFrame && this != pFrame && pFrame->GetFrameFormat() && pFrame->GetFrameFormat()->GetDoc() == pDoc) { SfxItemSet aSet( pDoc->GetAttrPool(), diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 1433f3046d58..2b3d686b8de7 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -168,7 +168,7 @@ SwXFootnote::CreateXFootnote(SwDoc & rDoc, SwFormatFootnote *const pFootnoteForm const uno::Sequence< sal_Int8 > & SwXFootnote::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXFootnoteUnoTunnelId; + static const comphelper::UnoIdInit theSwXFootnoteUnoTunnelId; return theSwXFootnoteUnoTunnelId.getSeq(); } diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 58aba6aef78c..ce461692d85a 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -427,7 +427,7 @@ SwXDocumentIndex::CreateXDocumentIndex( const uno::Sequence< sal_Int8 > & SwXDocumentIndex::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXDocumentIndexUnoTunnelId; + static const comphelper::UnoIdInit theSwXDocumentIndexUnoTunnelId; return theSwXDocumentIndexUnoTunnelId.getSeq(); } @@ -1656,7 +1656,7 @@ namespace const uno::Sequence< sal_Int8 > & SwXDocumentIndexMark::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXDocumentIndexMarkUnoTunnelId; + static const comphelper::UnoIdInit theSwXDocumentIndexMarkUnoTunnelId; return theSwXDocumentIndexMarkUnoTunnelId.getSeq(); } diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index acd5d50f23d0..1f6eaf7d33d4 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -849,7 +849,7 @@ SwXTextCursor::getSupportedServiceNames() const uno::Sequence< sal_Int8 > & SwXTextCursor::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextCursorUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextCursorUnoTunnelId; return theSwXTextCursorUnoTunnelId.getSeq(); } @@ -2858,7 +2858,7 @@ SwXTextCursor::createEnumeration() SwUnoCursor & rUnoCursor( GetCursorOrThrow() ); - SwXText* pParentText = comphelper::getUnoTunnelImplementation<SwXText>(m_xParentText); + SwXText* pParentText = comphelper::getFromUnoTunnel<SwXText>(m_xParentText); OSL_ENSURE(pParentText, "parent is not a SwXText"); if (!pParentText) { diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index e99450378bac..1dff3dfe1e2a 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -904,7 +904,7 @@ void SwXTextRange::DeleteAndInsert( const uno::Sequence< sal_Int8 > & SwXTextRange::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextRangeUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextRangeUnoTunnelId; return theSwXTextRangeUnoTunnelId.getSeq(); } @@ -1142,7 +1142,7 @@ bool XTextRangeToSwPaM( SwUnoInternalPaM & rToFill, xTextCursor.set(pHeadText->CreateTextCursor(true)); xTextCursor->gotoEnd(true); pCursor = - comphelper::getUnoTunnelImplementation<OTextCursorHelper>(xTextCursor); + comphelper::getFromUnoTunnel<OTextCursorHelper>(xTextCursor); pCursor->GetPaM()->Normalize(); } else @@ -1151,7 +1151,7 @@ bool XTextRangeToSwPaM( SwUnoInternalPaM & rToFill, xTextCursor.set( pText->CreateCursor() ); xTextCursor->gotoEnd(true); pCursor = - comphelper::getUnoTunnelImplementation<OTextCursorHelper>(xTextCursor); + comphelper::getFromUnoTunnel<OTextCursorHelper>(xTextCursor); } if(pRange && &pRange->GetDoc() == &rToFill.GetDoc()) { @@ -1633,7 +1633,7 @@ rtl::Reference<SwXTextRanges> SwXTextRanges::Create(SwPaM *const pPaM) const uno::Sequence< sal_Int8 > & SwXTextRanges::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextRangesUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextRangesUnoTunnelId; return theSwXTextRangesUnoTunnelId.getSeq(); } diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 5b7d3ab08c17..99132a6fd949 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -287,7 +287,7 @@ bool SwXParagraph::SelectPaM(SwPaM & rPaM) const uno::Sequence< sal_Int8 > & SwXParagraph::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXParagraphUnoTunnelId; + static const comphelper::UnoIdInit theSwXParagraphUnoTunnelId; return theSwXParagraphUnoTunnelId.getSeq(); } diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 243d4fff1d79..b54b049c9393 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -774,13 +774,13 @@ uno::Reference< container::XEnumeration > SwXTextPortion::createContentEnumerat const uno::Sequence< sal_Int8 > & SwXTextPortion::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextPortionUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextPortionUnoTunnelId; return theSwXTextPortionUnoTunnelId.getSeq(); } sal_Int64 SwXTextPortion::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXTextPortion>(rId) ) + if( comphelper::isUnoTunnelId<SwXTextPortion>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index d573a590497b..bf2bed1d1a70 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -280,14 +280,14 @@ namespace const uno::Sequence< sal_Int8 > & SwXTextPortionEnumeration::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextPortionEnumerationUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextPortionEnumerationUnoTunnelId; return theSwXTextPortionEnumerationUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXTextPortionEnumeration::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXTextPortionEnumeration>(rId) ) + if( comphelper::isUnoTunnelId<SwXTextPortionEnumeration>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ) ); } diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 625a991a074a..c5afac478431 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -151,7 +151,7 @@ SwXReferenceMark::CreateXReferenceMark( const uno::Sequence< sal_Int8 > & SwXReferenceMark::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXReferenceMarkUnoTunnelId; + static const comphelper::UnoIdInit theSwXReferenceMarkUnoTunnelId; return theSwXReferenceMarkUnoTunnelId.getSeq(); } @@ -713,7 +713,7 @@ SwXMeta::CreateXMeta(::sw::Meta & rMeta, if (pPortions) // set cache in the XMeta to the given portions { SwXMeta *const pXMeta( - comphelper::getUnoTunnelImplementation<SwXMeta>(xMeta)); + comphelper::getFromUnoTunnel<SwXMeta>(xMeta)); assert(pXMeta); // NB: the meta must always be created with the complete content // if SwXTextPortionEnumeration is created for a selection, @@ -842,7 +842,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb) const uno::Sequence< sal_Int8 > & SwXMeta::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXMetaUnoTunnelId; + static const comphelper::UnoIdInit theSwXMetaUnoTunnelId; return theSwXMetaUnoTunnelId.getSeq(); } diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 15c71d7bca61..4cbf679158c7 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -229,7 +229,7 @@ SwXTextSection::~SwXTextSection() const uno::Sequence< sal_Int8 > & SwXTextSection::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextSectionUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextSectionUnoTunnelId; return theSwXTextSectionUnoTunnelId.getSeq(); } diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index afc309008ca2..770ef5d4b879 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1020,14 +1020,14 @@ namespace const uno::Sequence< sal_Int8 > & SwXNumberingRules::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXNumberingRulesUnoTunnelId; + static const comphelper::UnoIdInit theSwXNumberingRulesUnoTunnelId; return theSwXNumberingRulesUnoTunnelId.getSeq(); } // return implementation specific data sal_Int64 SwXNumberingRules::getSomething( const uno::Sequence< sal_Int8 > & rId ) { - if( isUnoTunnelId<SwXNumberingRules>(rId) ) + if( comphelper::isUnoTunnelId<SwXNumberingRules>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index d4816e5b009a..666e36b73edc 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -347,13 +347,13 @@ namespace const uno::Sequence< sal_Int8 > & SwXTextSearch::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextSearchUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextSearchUnoTunnelId; return theSwXTextSearchUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXTextSearch::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXTextSearch>(rId) ) + if( comphelper::isUnoTunnelId<SwXTextSearch>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index ccc815c01e9d..19e0f8d8710e 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1047,7 +1047,7 @@ void XStyleFamily::replaceByName(const OUString& rName, const uno::Any& rElement uno::Reference<style::XStyle> xStyle = FindStyle(pBase->GetName()); if(xStyle.is()) { - SwXStyle* pStyle = comphelper::getUnoTunnelImplementation<SwXStyle>(xStyle); + SwXStyle* pStyle = comphelper::getFromUnoTunnel<SwXStyle>(xStyle); if(pStyle) pStyle->Invalidate(); } @@ -1209,13 +1209,13 @@ namespace const uno::Sequence<sal_Int8>& SwXStyle::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXStyleUnoTunnelId; + static const comphelper::UnoIdInit theSwXStyleUnoTunnelId; return theSwXStyleUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXStyle::getSomething(const uno::Sequence<sal_Int8>& rId) { - if(isUnoTunnelId<SwXStyle>(rId)) + if(comphelper::isUnoTunnelId<SwXStyle>(rId)) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 03b5a88c81ef..92a3aea81a17 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -755,13 +755,13 @@ SwXCell::~SwXCell() const uno::Sequence< sal_Int8 > & SwXCell::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXCellUnoTunnelId; + static const comphelper::UnoIdInit theSwXCellUnoTunnelId; return theSwXCellUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXCell::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXCell>(rId) ) + if( comphelper::isUnoTunnelId<SwXCell>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } @@ -1976,13 +1976,13 @@ public: const uno::Sequence< sal_Int8 > & SwXTextTable::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextTableUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextTableUnoTunnelId; return theSwXTextTableUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXTextTable::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if(isUnoTunnelId<SwXTextTable>(rId)) + if(comphelper::isUnoTunnelId<SwXTextTable>(rId)) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } @@ -3183,13 +3183,13 @@ namespace const uno::Sequence< sal_Int8 > & SwXCellRange::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXCellRangeUnoTunnelId; + static const comphelper::UnoIdInit theSwXCellRangeUnoTunnelId; return theSwXCellRangeUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXCellRange::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXCellRange>(rId) ) + if( comphelper::isUnoTunnelId<SwXCellRange>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index fa779d95abd8..57630ebc5388 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -630,7 +630,7 @@ SwXText::insertTextContentBefore( } SwXParagraph *const pPara = - comphelper::getUnoTunnelImplementation<SwXParagraph>(xNewContent); + comphelper::getFromUnoTunnel<SwXParagraph>(xNewContent); if (!pPara || !pPara->IsDescriptor() || !xSuccessor.is()) { throw lang::IllegalArgumentException(); @@ -686,7 +686,7 @@ SwXText::insertTextContentAfter( } SwXParagraph *const pPara = - comphelper::getUnoTunnelImplementation<SwXParagraph>(xNewContent); + comphelper::getFromUnoTunnel<SwXParagraph>(xNewContent); if(!pPara || !pPara->IsDescriptor() || !xPredecessor.is()) { throw lang::IllegalArgumentException(); @@ -978,7 +978,7 @@ bool SwXText::Impl::CheckForOwnMember( const uno::Reference<text::XTextCursor> xOwnCursor(m_rThis.CreateCursor()); OTextCursorHelper *const pOwnCursor = - comphelper::getUnoTunnelImplementation<OTextCursorHelper>(xOwnCursor); + comphelper::getFromUnoTunnel<OTextCursorHelper>(xOwnCursor); OSL_ENSURE(pOwnCursor, "OTextCursorHelper::getUnoTunnelId() ??? "); const SwStartNode* pOwnStartNode = pOwnCursor->GetPaM()->GetNode().StartOfSectionNode(); @@ -1200,7 +1200,7 @@ namespace const uno::Sequence< sal_Int8 > & SwXText::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextUnoTunnelId; return theSwXTextUnoTunnelId.getSeq(); } @@ -1571,9 +1571,9 @@ SwXText::convertToTextFrame( pTempStartPam.reset(); SwXTextRange *const pStartRange = - comphelper::getUnoTunnelImplementation<SwXTextRange>(xStart); + comphelper::getFromUnoTunnel<SwXTextRange>(xStart); SwXTextRange *const pEndRange = - comphelper::getUnoTunnelImplementation<SwXTextRange>(xEnd); + comphelper::getFromUnoTunnel<SwXTextRange>(xEnd); // bookmarks have to be removed before the referenced text node // is deleted in DelFullPara if (pStartRange) @@ -1779,7 +1779,7 @@ SwXText::convertToTextFrame( const uno::Reference<text::XTextCursor> xFrameTextCursor = rNewFrame.createTextCursor(); SwXTextCursor *const pFrameCursor = - comphelper::getUnoTunnelImplementation<SwXTextCursor>(xFrameTextCursor); + comphelper::getFromUnoTunnel<SwXTextCursor>(xFrameTextCursor); if (bParaBeforeInserted) { // todo: remove paragraph before frame diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 3daf6f29676c..092d098ca1a2 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -445,7 +445,7 @@ bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< bea VclPtr< OutputDevice > pOut; if (xRenderDevice.is()) { - VCLXDevice* pDevice = comphelper::getUnoTunnelImplementation<VCLXDevice>( xRenderDevice ); + VCLXDevice* pDevice = comphelper::getFromUnoTunnel<VCLXDevice>( xRenderDevice ); if (pDevice) pOut = pDevice->GetOutputDevice(); } diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 45621dc62d74..0670e8e102b4 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1061,7 +1061,7 @@ void SwViewShell::SizeChgNotify() ss << aDocSize.Width() + 2 * DOCUMENTBORDER << ", " << aDocSize.Height() + 2 * DOCUMENTBORDER; OString sSize = ss.str().c_str(); - SwXTextDocument* pModel = comphelper::getUnoTunnelImplementation<SwXTextDocument>(GetSfxViewShell()->GetCurrentDocument()); + SwXTextDocument* pModel = comphelper::getFromUnoTunnel<SwXTextDocument>(GetSfxViewShell()->GetCurrentDocument()); SfxLokHelper::notifyDocumentSizeChanged(GetSfxViewShell(), sSize, pModel); } } diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 4a6254a54be0..220302456d50 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -505,7 +505,7 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height ) // To get to the SwXShape* we need an interface that is implemented by SwXShape uno::Reference< beans::XPropertySet > xPropSet( m_xShape, UNO_QUERY ); - SwXShape *pSwShape = comphelper::getUnoTunnelImplementation<SwXShape>(xPropSet); + SwXShape *pSwShape = comphelper::getFromUnoTunnel<SwXShape>(xPropSet); OSL_ENSURE( pSwShape, "Where is SW-Shape?" ); if( pSwShape ) @@ -653,7 +653,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha } } - SwXShape *pSwShape = comphelper::getUnoTunnelImplementation<SwXShape>(xPropSet); + SwXShape *pSwShape = comphelper::getFromUnoTunnel<SwXShape>(xPropSet); OSL_ENSURE( pSwShape, "Where is SW-Shape?" ); diff --git a/sw/source/filter/indexing/IndexingExportFilter.cxx b/sw/source/filter/indexing/IndexingExportFilter.cxx index 52488782aaf9..1f9f43aa18f0 100644 --- a/sw/source/filter/indexing/IndexingExportFilter.cxx +++ b/sw/source/filter/indexing/IndexingExportFilter.cxx @@ -31,8 +31,7 @@ sal_Bool IndexingExportFilter::filter(const uno::Sequence<beans::PropertyValue>& utl::MediaDescriptor aMediaDesc = aDescriptor; // Actually get the SwRootFrame to call dumpAsXml - auto pXTextDocument - = comphelper::getUnoTunnelImplementation<SwXTextDocument>(m_xSourceDocument); + auto pXTextDocument = comphelper::getFromUnoTunnel<SwXTextDocument>(m_xSourceDocument); if (pXTextDocument) { uno::Reference<io::XOutputStream> xOutputStream = aMediaDesc.getUnpackedValueOrDefault( diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 3ed4a25570d6..3ee1856c2a16 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -477,13 +477,13 @@ void SwXMLExport::ExportContent_() const Sequence< sal_Int8 > & SwXMLExport::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSwXMLExportUnoTunnelId; + static const comphelper::UnoIdInit theSwXMLExportUnoTunnelId; return theSwXMLExportUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXMLExport::getSomething( const Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXMLExport>(rId) ) + if( comphelper::isUnoTunnelId<SwXMLExport>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 6aa1e89a4fee..9e2d709f6d92 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -362,13 +362,13 @@ void SwXMLImport::setStyleInsertMode( SfxStyleFamily nFamilies, const Sequence< sal_Int8 > & SwXMLImport::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSwXMLImportUnoTunnelId; + static const comphelper::UnoIdInit theSwXMLImportUnoTunnelId; return theSwXMLImportUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXMLImport::getSomething( const Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXMLImport>(rId) ) + if( comphelper::isUnoTunnelId<SwXMLImport>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); } @@ -1625,7 +1625,7 @@ void SwXMLImport::initialize( SwDoc* SwImport::GetDocFromXMLImport( SvXMLImport const & rImport ) { - auto pTextDoc = comphelper::getUnoTunnelImplementation<SwXTextDocument>(rImport.GetModel()); + auto pTextDoc = comphelper::getFromUnoTunnel<SwXTextDocument>(rImport.GetModel()); assert( pTextDoc ); assert( pTextDoc->GetDocShell() ); SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); @@ -1636,7 +1636,7 @@ SwDoc* SwImport::GetDocFromXMLImport( SvXMLImport const & rImport ) void SwXMLImport::initXForms() { // obtain SwDoc - auto pXTextDocument = comphelper::getUnoTunnelImplementation<SwXTextDocument>(GetModel()); + auto pXTextDocument = comphelper::getFromUnoTunnel<SwXTextDocument>(GetModel()); if( pXTextDocument == nullptr ) return; diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index df82f518e6aa..1933fe91f6e7 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -597,7 +597,7 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, SwOneExampleFrame& //now the ViewOptions should be set properly Reference< XViewSettingsSupplier > xSettings(xModel->getCurrentController(), UNO_QUERY); m_xViewProperties = xSettings->getViewSettings(); - auto pXDoc = comphelper::getUnoTunnelImplementation<SwXTextDocument>(xModel); + auto pXDoc = comphelper::getFromUnoTunnel<SwXTextDocument>(xModel); SwDocShell* pDocShell = pXDoc->GetDocShell(); m_pExampleWrtShell = pDocShell->GetWrtShell(); OSL_ENSURE(m_pExampleWrtShell, "No SwWrtShell found!"); diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index 3faac515beab..13b84fd58e60 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -88,7 +88,7 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, CreateExample_Hdl, SwOneExampleFrame&, void try { uno::Reference< frame::XModel > & xModel = m_xExampleFrame->GetModel(); - auto pDoc = comphelper::getUnoTunnelImplementation<SwXTextDocument>(xModel); + auto pDoc = comphelper::getFromUnoTunnel<SwXTextDocument>(xModel); if( pDoc ) pDoc->GetDocShell()->LoadStyles_( *m_rWrtShell.GetView().GetDocShell(), true ); diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index cb32fb1f852e..9d51e1e29633 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -4196,14 +4196,14 @@ void SwTransferable::ClearSelection( SwWrtShell& rSh, const Sequence< sal_Int8 >& SwTransferable::getUnoTunnelId() { - static const UnoTunnelIdInit theSwTransferableUnoTunnelId; + static const comphelper::UnoIdInit theSwTransferableUnoTunnelId; return theSwTransferableUnoTunnelId.getSeq(); } sal_Int64 SwTransferable::getSomething( const Sequence< sal_Int8 >& rId ) { sal_Int64 nRet; - if( isUnoTunnelId<SwTransferable>(rId) ) + if( comphelper::isUnoTunnelId<SwTransferable>(rId) ) { nRet = sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ) ); } @@ -4214,7 +4214,7 @@ sal_Int64 SwTransferable::getSomething( const Sequence< sal_Int8 >& rId ) SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper& rData ) { - return comphelper::getUnoTunnelImplementation<SwTransferable>(rData.GetTransferable()); + return comphelper::getFromUnoTunnel<SwTransferable>(rData.GetTransferable()); } SwTransferDdeLink::SwTransferDdeLink( SwTransferable& rTrans, SwWrtShell& rSh ) diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx index 273c5c0ae870..d5cafd27703b 100644 --- a/sw/source/uibase/misc/glosdoc.cxx +++ b/sw/source/uibase/misc/glosdoc.cxx @@ -459,7 +459,7 @@ void SwGlossaries::RemoveFileFromList( const OUString& rGroup ) aLoop != m_aGlossaryEntries.end(); ) { - auto pEntry = comphelper::getUnoTunnelImplementation<SwXAutoTextEntry>(aLoop->get()); + auto pEntry = comphelper::getFromUnoTunnel<SwXAutoTextEntry>(aLoop->get()); if ( pEntry && ( pEntry->GetGroupName() == rGroup ) ) { pEntry->Invalidate(); @@ -511,7 +511,7 @@ void SwGlossaries::InvalidateUNOOjects() // invalidate all the AutoTextEntry-objects for (const auto& rEntry : m_aGlossaryEntries) { - auto pEntry = comphelper::getUnoTunnelImplementation<SwXAutoTextEntry>(rEntry.get()); + auto pEntry = comphelper::getFromUnoTunnel<SwXAutoTextEntry>(rEntry.get()); if ( pEntry ) pEntry->Invalidate(); } @@ -530,7 +530,7 @@ Reference< text::XAutoTextGroup > SwGlossaries::GetAutoTextGroup( const OUString UnoAutoTextGroups::iterator aSearch = m_aGlossaryGroups.begin(); for ( ; aSearch != m_aGlossaryGroups.end(); ) { - auto pSwGroup = comphelper::getUnoTunnelImplementation<SwXAutoTextGroup>(aSearch->get()); + auto pSwGroup = comphelper::getFromUnoTunnel<SwXAutoTextGroup>(aSearch->get()); if ( !pSwGroup ) { // the object is dead in the meantime -> remove from cache diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 0ef37aeb3a00..ac355361a661 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -746,7 +746,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) case FN_REPAGINATE: { Reference < XModel > xModel = GetView().GetDocShell()->GetModel(); - auto pDoc = comphelper::getUnoTunnelImplementation<SwXTextDocument>(xModel); + auto pDoc = comphelper::getFromUnoTunnel<SwXTextDocument>(xModel); pDoc->NotifyRefreshListeners(); rSh.CalcLayout(); } diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx index ba1d84d304cc..3cbccb21b834 100644 --- a/sw/source/uibase/uiview/uivwimp.cxx +++ b/sw/source/uibase/uiview/uivwimp.cxx @@ -60,7 +60,7 @@ SwView_Impl::SwView_Impl(SwView* pShell) SwView_Impl::~SwView_Impl() { - auto pInterceptor = comphelper::getUnoTunnelImplementation<SwXDispatchProviderInterceptor>(xDisProvInterceptor); + auto pInterceptor = comphelper::getFromUnoTunnel<SwXDispatchProviderInterceptor>(xDisProvInterceptor); if(pInterceptor) pInterceptor->Invalidate(); view::XSelectionSupplier* pTextView = mxXTextView.get(); @@ -211,7 +211,7 @@ void SwView_Impl::Invalidate() GetUNOObject_Impl()->Invalidate(); for (const auto& xTransferable: mxTransferables) { - auto pTransferable = comphelper::getUnoTunnelImplementation<SwTransferable>(xTransferable.get()); + auto pTransferable = comphelper::getFromUnoTunnel<SwTransferable>(xTransferable.get()); if(pTransferable) pTransferable->Invalidate(); } diff --git a/sw/source/uibase/uno/SwXFilterOptions.cxx b/sw/source/uibase/uno/SwXFilterOptions.cxx index d4092067fcff..a522c9b04b2c 100644 --- a/sw/source/uibase/uno/SwXFilterOptions.cxx +++ b/sw/source/uibase/uno/SwXFilterOptions.cxx @@ -79,7 +79,7 @@ sal_Int16 SwXFilterOptions::execute() pInStream = utl::UcbStreamHelper::CreateStream( xInputStream ); SwDocShell* pDocShell = nullptr; - if (auto pXDoc = comphelper::getUnoTunnelImplementation<SwXTextDocument>(xModel); pXDoc) + if (auto pXDoc = comphelper::getFromUnoTunnel<SwXTextDocument>(xModel); pXDoc) pDocShell = pXDoc->GetDocShell(); if(pDocShell) diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index c5689f63a747..f1423d00c05a 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -206,13 +206,13 @@ uno::Sequence< OUString > SwXAutoTextContainer::getSupportedServiceNames() const uno::Sequence< sal_Int8 > & SwXAutoTextGroup::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXAutoTextGroupUnoTunnelId; + static const comphelper::UnoIdInit theSwXAutoTextGroupUnoTunnelId; return theSwXAutoTextGroupUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXAutoTextGroup::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXAutoTextGroup>(rId) ) + if( comphelper::isUnoTunnelId<SwXAutoTextGroup>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); } @@ -668,13 +668,13 @@ uno::Sequence< OUString > SwXAutoTextGroup::getSupportedServiceNames() const uno::Sequence< sal_Int8 > & SwXAutoTextEntry::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXAutoTextEntryUnoTunnelId; + static const comphelper::UnoIdInit theSwXAutoTextEntryUnoTunnelId; return theSwXAutoTextEntryUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXAutoTextEntry::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXAutoTextEntry>(rId) ) + if( comphelper::isUnoTunnelId<SwXAutoTextEntry>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); } diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx index 696f946056ad..0e73893d29c0 100644 --- a/sw/source/uibase/uno/unodispatch.cxx +++ b/sw/source/uibase/uno/unodispatch.cxx @@ -152,14 +152,14 @@ void SwXDispatchProviderInterceptor::disposing( const lang::EventObject& ) const uno::Sequence< sal_Int8 > & SwXDispatchProviderInterceptor::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXDispatchProviderInterceptorUnoTunnelId; + static const comphelper::UnoIdInit theSwXDispatchProviderInterceptorUnoTunnelId; return theSwXDispatchProviderInterceptorUnoTunnelId.getSeq(); } sal_Int64 SwXDispatchProviderInterceptor::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier ) { - if( isUnoTunnelId<SwXDispatchProviderInterceptor>(aIdentifier) ) + if( comphelper::isUnoTunnelId<SwXDispatchProviderInterceptor>(aIdentifier) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); } diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index 3d8d25f2c74b..6836a9a0bc6d 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -151,7 +151,7 @@ static bool LoadFromURL_impl( // try to get the DocShell SwDocShell *pTmpDocShell = nullptr; - if (auto pTextDoc = comphelper::getUnoTunnelImplementation<SwXTextDocument>(xTmpModel); pTextDoc) + if (auto pTextDoc = comphelper::getFromUnoTunnel<SwXTextDocument>(xTmpModel); pTextDoc) pTmpDocShell = pTextDoc->GetDocShell(); bool bRes = false; diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 36195079e542..83d2499fd32a 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -271,17 +271,17 @@ public: const Sequence< sal_Int8 > & SwXTextDocument::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextDocumentUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextDocumentUnoTunnelId; return theSwXTextDocumentUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SwXTextDocument::getSomething( const Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXTextDocument>(rId) ) + if( comphelper::isUnoTunnelId<SwXTextDocument>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); } - if( isUnoTunnelId<SfxObjectShell>(rId) ) + if( comphelper::isUnoTunnelId<SfxObjectShell>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(m_pDocShell )); } @@ -768,7 +768,7 @@ SwUnoCursor* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > sal_Int32& nResult, Reference< XInterface > const & xLastResult) { - const auto pSearch = comphelper::getUnoTunnelImplementation<SwXTextSearch>(xDesc); + const auto pSearch = comphelper::getFromUnoTunnel<SwXTextSearch>(xDesc); if(!IsValid() || !pSearch) return nullptr; @@ -2282,7 +2282,7 @@ static VclPtr< OutputDevice > lcl_GetOutputDevice( const SwPrintUIOptions &rPrin aAny >>= xRenderDevice; if (xRenderDevice.is()) { - VCLXDevice* pDevice = comphelper::getUnoTunnelImplementation<VCLXDevice>( xRenderDevice ); + VCLXDevice* pDevice = comphelper::getFromUnoTunnel<VCLXDevice>( xRenderDevice ); pOut = pDevice ? pDevice->GetOutputDevice() : VclPtr< OutputDevice >(); } diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index eab83a072c1f..265a909bc47c 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -1691,7 +1691,7 @@ Sequence< OUString > SwXTextViewCursor::getSupportedServiceNames() const uno::Sequence< sal_Int8 > & SwXTextViewCursor::getUnoTunnelId() { - static const UnoTunnelIdInit theSwXTextViewCursorUnoTunnelId; + static const comphelper::UnoIdInit theSwXTextViewCursorUnoTunnelId; return theSwXTextViewCursorUnoTunnelId.getSeq(); } @@ -1699,7 +1699,7 @@ const uno::Sequence< sal_Int8 > & SwXTextViewCursor::getUnoTunnelId() sal_Int64 SAL_CALL SwXTextViewCursor::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SwXTextViewCursor>(rId) ) + if( comphelper::isUnoTunnelId<SwXTextViewCursor>(rId) ) { return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); } diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx index 7088018ccb63..64de71e62684 100644 --- a/sw/source/uibase/utlui/uiitems.cxx +++ b/sw/source/uibase/utlui/uiitems.cxx @@ -247,7 +247,7 @@ bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) uno::Reference< container::XIndexReplace> xRulesRef; if(rVal >>= xRulesRef) { - auto pSwXRules = comphelper::getUnoTunnelImplementation<SwXNumberingRules>(xRulesRef); + auto pSwXRules = comphelper::getFromUnoTunnel<SwXNumberingRules>(xRulesRef); if(pSwXRules) { *pRule = *pSwXRules->GetNumRule(); diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index 166ec51aaadb..492934146674 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -144,7 +144,7 @@ void SwOneExampleFrame::Paint(vcl::RenderContext& rRenderContext, const tools::R Color aBgColor = SW_MOD()->GetColorConfig().GetColorValue(::svtools::DOCCOLOR).nColor; m_xVirDev->DrawWallpaper(tools::Rectangle(Point(), aSize), aBgColor); - auto pCursor = comphelper::getUnoTunnelImplementation<OTextCursorHelper>(m_xCursor); + auto pCursor = comphelper::getFromUnoTunnel<OTextCursorHelper>(m_xCursor); if (pCursor) { uno::Reference<view::XViewSettingsSupplier> xSettings(m_xController, uno::UNO_QUERY); @@ -291,7 +291,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer, void ) //From here, a cursor is defined, which goes through the template, //and overwrites the template words where it is necessary. - auto pCursor = comphelper::getUnoTunnelImplementation<OTextCursorHelper>(m_xCursor); + auto pCursor = comphelper::getFromUnoTunnel<OTextCursorHelper>(m_xCursor); SwDoc *pDoc = pCursor ? pCursor->GetDoc() : nullptr; if (pDoc && (m_nStyleFlags & EX_LOCALIZE_TOC_STRINGS)) |