diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-09-14 08:19:47 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-09-15 06:07:36 +0200 |
commit | 05bc93db2de56000f65764d7e394d03747cac23d (patch) | |
tree | 975de9ae83572aac8a5c3ea8db281e1017ee5be0 | |
parent | 8cbb414ed737f9ffc76e1258e6671769bf63fc6c (diff) |
Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1
The header got some changes:
1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace
2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace
of uses of OImplementationId with it, including in XTypeProvider
3. Introduce convenience functions 'getSomething_cast' to cast between
sal_Int64 and object pointers uniformly.
4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make
it a bit shorter, and to reflect its function better. Templatize it
to take also css::uno::Any for convenience.
5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it
handle cases both with and without fallback to parent.
6. Adjust UNO3_GETIMPLEMENTATION_* macros
TODO (in separate commits):
- Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation
- Replace all uses of OImplementationId in core with UnoIdInit
- Deprecate OImplementationId in <cppuhelper/typeprovider.hxx>
- Change implementations of getSomething to use getSomethingImpl
- Revise uses of getSomething to use getFromUnoTunnel
Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
301 files changed, 723 insertions, 684 deletions
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index cf3bf77169e7..61c837697576 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -142,7 +142,7 @@ namespace sal_Int64 SAL_CALL OToolBoxWindowItem::getSomething( const Sequence< sal_Int8 >& _rId ) { - if (isUnoTunnelId<OToolBoxWindowItem>(_rId)) + if (comphelper::isUnoTunnelId<OToolBoxWindowItem>(_rId)) return reinterpret_cast< sal_Int64>( this ); return 0; @@ -301,7 +301,7 @@ void VCLXAccessibleToolBox::implReleaseToolboxItem( ToolBoxItemsMap::iterator co NotifyAccessibleEvent( AccessibleEventId::CHILD, Any( xItemAcc ), Any() ); } - auto pWindowItem = comphelper::getUnoTunnelImplementation<OToolBoxWindowItem>(xItemAcc); + auto pWindowItem = comphelper::getFromUnoTunnel<OToolBoxWindowItem>(xItemAcc); if ( !pWindowItem ) { static_cast< VCLXAccessibleToolBoxItem* >( xItemAcc.get() )->ReleaseToolBox(); @@ -333,7 +333,7 @@ void VCLXAccessibleToolBox::UpdateItem_Impl( ToolBox::ImplToolItems::size_type _ { Reference< XAccessible > xItemAcc( aIndexAdjust->second ); - auto pWindowItem = comphelper::getUnoTunnelImplementation<OToolBoxWindowItem>(xItemAcc); + auto pWindowItem = comphelper::getFromUnoTunnel<OToolBoxWindowItem>(xItemAcc); if ( !pWindowItem ) { VCLXAccessibleToolBoxItem* pItem = static_cast< VCLXAccessibleToolBoxItem* >( xItemAcc.get() ); diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 425c1c8a6f7a..4f365409c3fc 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -2090,7 +2090,7 @@ void SAL_CALL AnimationNode::removeChangesListener( const Reference< XChangesLis // XUnoTunnel ::sal_Int64 SAL_CALL AnimationNode::getSomething( const Sequence< ::sal_Int8 >& rId ) { - if( isUnoTunnelId<AnimationNode>(rId) ) + if( comphelper::isUnoTunnelId<AnimationNode>(rId) ) { return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this)); @@ -2103,7 +2103,7 @@ void SAL_CALL AnimationNode::removeChangesListener( const Reference< XChangesLis const css::uno::Sequence< sal_Int8 > & AnimationNode::getUnoTunnelId() { - static const UnoTunnelIdInit theAnimationNodeUnoTunnelId; + static const comphelper::UnoIdInit theAnimationNodeUnoTunnelId; return theAnimationNodeUnoTunnelId.getSeq(); } diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx index 12bb90610877..79e381399703 100644 --- a/basctl/source/basicide/basicrenderable.cxx +++ b/basctl/source/basicide/basicrenderable.cxx @@ -88,7 +88,7 @@ VclPtr< Printer > Renderable::getPrinter() const if( aValue >>= xRenderDevice ) { - VCLXDevice* pDevice = comphelper::getUnoTunnelImplementation<VCLXDevice>(xRenderDevice); + VCLXDevice* pDevice = comphelper::getFromUnoTunnel<VCLXDevice>(xRenderDevice); VclPtr< OutputDevice > pOut = pDevice ? pDevice->GetOutputDevice() : VclPtr< OutputDevice >(); pPrinter = dynamic_cast<Printer*>(pOut.get()); } diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index 8b539d9dc644..a4c1a4befa2b 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -631,7 +631,7 @@ Reference< XAccessible > SAL_CALL AccessibleBase::getAccessibleAtPoint( const aw awt::Rectangle SAL_CALL AccessibleBase::getBounds() { ExplicitValueProvider *pExplicitValueProvider( - comphelper::getUnoTunnelImplementation<ExplicitValueProvider>( m_aAccInfo.m_xView )); + comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_aAccInfo.m_xView )); if( pExplicitValueProvider ) { VclPtr<vcl::Window> pWindow( VCLUnoHelper::GetWindow( m_aAccInfo.m_xWindow )); diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx index 0738f52abc36..6ea9befe8009 100644 --- a/chart2/source/controller/accessibility/AccessibleChartView.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx @@ -299,7 +299,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments Reference< chart2::XChartDocument > xChartDoc( xChartModel, uno::UNO_QUERY ); if( xChartDoc.is()) m_spObjectHierarchy = - std::make_shared<ObjectHierarchy>( xChartDoc, comphelper::getUnoTunnelImplementation<ExplicitValueProvider>(m_xChartView) ); + std::make_shared<ObjectHierarchy>( xChartDoc, comphelper::getFromUnoTunnel<ExplicitValueProvider>(m_xChartView) ); else m_spObjectHierarchy.reset(); } diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx index 898e4676c763..aef26f4a483a 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx @@ -1043,7 +1043,7 @@ namespace { uno::Reference< lang::XMultiServiceFactory > getShapeFactory(const uno::Reference<uno::XInterface>& xChartView) { - auto pProvider = comphelper::getUnoTunnelImplementation<ExplicitValueProvider>(xChartView); + auto pProvider = comphelper::getFromUnoTunnel<ExplicitValueProvider>(xChartView); if( pProvider ) return pProvider->getDrawModelWrapper()->getShapeFactory(); diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx index a7aeb35d72d6..f06ff56559fa 100644 --- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx @@ -70,7 +70,7 @@ double InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( { double fStepWidth = 0.001; - ExplicitValueProvider* pExplicitValueProvider( comphelper::getUnoTunnelImplementation<ExplicitValueProvider>(xChartView) ); + ExplicitValueProvider* pExplicitValueProvider( comphelper::getFromUnoTunnel<ExplicitValueProvider>(xChartView) ); if( pExplicitValueProvider ) { Reference< XAxis > xAxis; diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 8f6b0644e6e3..5ae751ad96b0 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1485,7 +1485,7 @@ DrawModelWrapper* ChartController::GetDrawModelWrapper() { if( !m_pDrawModelWrapper ) { - ExplicitValueProvider* pProvider = comphelper::getUnoTunnelImplementation<ExplicitValueProvider>( m_xChartView ); + ExplicitValueProvider* pProvider = comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_xChartView ); if( pProvider ) m_pDrawModelWrapper = pProvider->getDrawModelWrapper(); if ( m_pDrawModelWrapper ) diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index c6af3878bdd7..4b9479c78dab 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -177,7 +177,7 @@ void ChartController::executeDispatch_PositionAndSize(const ::css::uno::Sequence if(pOutItemSet || pArgs) { awt::Rectangle aOldObjectRect; - ExplicitValueProvider* pProvider(comphelper::getUnoTunnelImplementation<ExplicitValueProvider>( m_xChartView )); + ExplicitValueProvider* pProvider(comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_xChartView )); if( pProvider ) aOldObjectRect = pProvider->getRectangleOfObject(aCID); diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx index e7a35fef3410..57eadfb63ca9 100644 --- a/chart2/source/controller/main/ChartController_Properties.cxx +++ b/chart2/source/controller/main/ChartController_Properties.cxx @@ -733,7 +733,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( std::unique_ptr<wrapper::ItemConverter> pItemConverter( createItemConverter( rObjectCID, getModel(), m_xCC, m_pDrawModelWrapper->getSdrModel(), - comphelper::getUnoTunnelImplementation<ExplicitValueProvider>(m_xChartView), + comphelper::getFromUnoTunnel<ExplicitValueProvider>(m_xChartView), pRefSizeProv.get())); if (!pItemConverter) diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 73b7ad46a9d9..1d58ddc70b40 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1301,7 +1301,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt ) } } - Menu* pPopupMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>(xPopupMenu)->GetMenu(); + Menu* pPopupMenu = comphelper::getFromUnoTunnel<VCLXMenu>(xPopupMenu)->GetMenu(); boost::property_tree::ptree aMenu = SfxDispatcher::fillPopupMenu(pPopupMenu); boost::property_tree::ptree aRoot; aRoot.add_child("menu", aMenu); @@ -1382,7 +1382,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) { // Navigation (Tab/F3/Home/End) uno::Reference< XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY ); - ObjectKeyNavigation aObjNav( m_aSelection.getSelectedOID(), xChartDoc, comphelper::getUnoTunnelImplementation<ExplicitValueProvider>( m_xChartView )); + ObjectKeyNavigation aObjNav( m_aSelection.getSelectedOID(), xChartDoc, comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_xChartView )); awt::KeyEvent aKeyEvent( ::svt::AcceleratorExecute::st_VCLKey2AWTKey( aKeyCode )); bReturn = aObjNav.handleKeyEvent( aKeyEvent ); if( bReturn ) @@ -1649,7 +1649,7 @@ bool ChartController::requestQuickHelp( // set rectangle ExplicitValueProvider * pValueProvider( - comphelper::getUnoTunnelImplementation<ExplicitValueProvider>( m_xChartView )); + comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_xChartView )); if( pValueProvider ) rOutEqualRect = pValueProvider->getRectangleOfObject( aCID, true ); } @@ -1804,7 +1804,7 @@ bool ChartController::impl_moveOrResizeObject( ( aRefSize.Width > 0 && aRefSize.Height > 0 ) ) { ExplicitValueProvider * pValueProvider( - comphelper::getUnoTunnelImplementation<ExplicitValueProvider>( m_xChartView )); + comphelper::getFromUnoTunnel<ExplicitValueProvider>( m_xChartView )); if( pValueProvider ) { awt::Rectangle aRect( pValueProvider->getRectangleOfObject( rCID )); diff --git a/chart2/source/controller/uitest/uiobject.cxx b/chart2/source/controller/uitest/uiobject.cxx index 651c407565d7..45915a62e554 100644 --- a/chart2/source/controller/uitest/uiobject.cxx +++ b/chart2/source/controller/uitest/uiobject.cxx @@ -175,7 +175,7 @@ std::set<OUString> ChartWindowUIObject::get_children() const css::uno::Reference< css::chart2::XChartDocument > xChartDoc( pController->getModel(), css::uno::UNO_QUERY ); css::uno::Reference<css::uno::XInterface> xChartView = pController->getChartView(); - chart::ExplicitValueProvider* pValueProvider = comphelper::getUnoTunnelImplementation<chart::ExplicitValueProvider>( xChartView ); + chart::ExplicitValueProvider* pValueProvider = comphelper::getFromUnoTunnel<chart::ExplicitValueProvider>( xChartView ); chart::ObjectHierarchy aHierarchy(xChartDoc, pValueProvider); chart::ObjectIdentifier aIdentifier = chart::ObjectHierarchy::getRootNodeOID(); aChildren.insert(aIdentifier.getObjectCID()); diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 9960f84c00b1..c5bf2167184d 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -1210,7 +1210,7 @@ Reference< util::XNumberFormatsSupplier > const & ChartModel::getNumberFormatsSu // ____ XUnoTunnel ___ ::sal_Int64 SAL_CALL ChartModel::getSomething( const Sequence< ::sal_Int8 >& aIdentifier ) { - if( isUnoTunnelId<SvNumberFormatsSupplierObj>(aIdentifier) ) + if( comphelper::isUnoTunnelId<SvNumberFormatsSupplierObj>(aIdentifier) ) { Reference< lang::XUnoTunnel > xTunnel( getNumberFormatsSupplier(), uno::UNO_QUERY ); if( xTunnel.is() ) diff --git a/chart2/source/tools/NumberFormatterWrapper.cxx b/chart2/source/tools/NumberFormatterWrapper.cxx index e6bc55d0556f..f5bef49d19de 100644 --- a/chart2/source/tools/NumberFormatterWrapper.cxx +++ b/chart2/source/tools/NumberFormatterWrapper.cxx @@ -57,7 +57,7 @@ NumberFormatterWrapper::NumberFormatterWrapper( const uno::Reference< util::XNum OUString sNullDate( "NullDate" ); if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(sNullDate) ) m_aNullDate = xProp->getPropertyValue(sNullDate); - SvNumberFormatsSupplierObj* pSupplierObj = comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>( xSupplier ); + SvNumberFormatsSupplierObj* pSupplierObj = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( xSupplier ); if( pSupplierObj ) m_pNumberFormatter = pSupplierObj->GetNumberFormatter(); SAL_WARN_IF(!m_pNumberFormatter,"chart2.tools","need a numberformatter"); diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index e2b983d7d63a..17295029e26d 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -377,7 +377,7 @@ static bool lcl_hasWordBreak( const Reference<drawing::XShape>& xShape ) if (!xShape.is()) return false; - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>(xShape); + SvxShape* pShape = comphelper::getFromUnoTunnel<SvxShape>(xShape); SvxShapeText* pShapeText = dynamic_cast<SvxShapeText*>(pShape); if (!pShapeText) return false; diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index c9ef9f953bb6..499bb55c1504 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1033,7 +1033,7 @@ struct CreateShapeParam2D const uno::Sequence<sal_Int8>& ExplicitValueProvider::getUnoTunnelId() { - static const UnoTunnelIdInit theExplicitValueProviderUnoTunnelId; + static const comphelper::UnoIdInit theExplicitValueProviderUnoTunnelId; return theExplicitValueProviderUnoTunnelId.getSeq(); } @@ -1204,7 +1204,7 @@ sal_Bool SAL_CALL ChartView::isDataFlavorSupported( const datatransfer::DataFlav // ____ XUnoTunnel ___ ::sal_Int64 SAL_CALL ChartView::getSomething( const uno::Sequence< ::sal_Int8 >& aIdentifier ) { - if( isUnoTunnelId<ExplicitValueProvider>(aIdentifier) ) + if( comphelper::isUnoTunnelId<ExplicitValueProvider>(aIdentifier) ) { ExplicitValueProvider* pProvider = this; return reinterpret_cast<sal_Int64>(pProvider); @@ -1736,7 +1736,7 @@ bool ChartView::getExplicitValuesForAxis( SdrPage* ChartView::getSdrPage() { - auto pSvxDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>(m_xDrawPage); + auto pSvxDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>(m_xDrawPage); if(pSvxDrawPage) return pSvxDrawPage->GetSdrPage(); @@ -1898,7 +1898,7 @@ awt::Rectangle ExplicitValueProvider::AddSubtractAxisTitleSizes( uno::Reference< chart2::XTitle > xSecondTitle_Width( TitleHelper::getTitle( TitleHelper::SECONDARY_Y_AXIS_TITLE, rModel ) ); if( xTitle_Height.is() || xTitle_Width.is() || xSecondTitle_Height.is() || xSecondTitle_Width.is() ) { - ExplicitValueProvider* pExplicitValueProvider = comphelper::getUnoTunnelImplementation<ExplicitValueProvider>(xChartView); + ExplicitValueProvider* pExplicitValueProvider = comphelper::getFromUnoTunnel<ExplicitValueProvider>(xChartView); if( pExplicitValueProvider ) { //detect whether x axis points into x direction or not diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx index 49304aad3270..b3d4a372d2b2 100644 --- a/comphelper/source/misc/accimplaccess.cxx +++ b/comphelper/source/misc/accimplaccess.cxx @@ -49,7 +49,7 @@ namespace comphelper sal_Int64 SAL_CALL OAccessibleImplementationAccess::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) { - if (isUnoTunnelId<OAccessibleImplementationAccess>(_rIdentifier)) + if (comphelper::isUnoTunnelId<OAccessibleImplementationAccess>(_rIdentifier)) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx index ecaae9f522e5..221a98e24f67 100644 --- a/configmgr/source/childaccess.cxx +++ b/configmgr/source/childaccess.cxx @@ -57,7 +57,7 @@ namespace configmgr { css::uno::Sequence< sal_Int8 > const & ChildAccess::getTunnelId() { - static const UnoTunnelIdInit theChildAccessUnoTunnelId; + static const comphelper::UnoIdInit theChildAccessUnoTunnelId; return theChildAccessUnoTunnelId.getSeq(); } diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx index d7d999058a24..eb08aa4fe82c 100644 --- a/connectivity/source/commontools/ConnectionWrapper.cxx +++ b/connectivity/source/commontools/ConnectionWrapper.cxx @@ -154,7 +154,7 @@ Sequence< Type > SAL_CALL OConnectionWrapper::getTypes( ) // css::lang::XUnoTunnel sal_Int64 SAL_CALL OConnectionWrapper::getSomething( const Sequence< sal_Int8 >& rId ) { - if (isUnoTunnelId<OConnectionWrapper>(rId)) + if (comphelper::isUnoTunnelId<OConnectionWrapper>(rId)) return reinterpret_cast< sal_Int64 >( this ); if(m_xUnoTunnel.is()) diff --git a/connectivity/source/commontools/TConnection.cxx b/connectivity/source/commontools/TConnection.cxx index 89ab7e9ca11d..6e7709cc2e1a 100644 --- a/connectivity/source/commontools/TConnection.cxx +++ b/connectivity/source/commontools/TConnection.cxx @@ -57,7 +57,7 @@ void OMetaConnection::disposing() //XUnoTunnel sal_Int64 SAL_CALL OMetaConnection::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) { - return (isUnoTunnelId<OMetaConnection>(rId)) + return (comphelper::isUnoTunnelId<OMetaConnection>(rId)) ? reinterpret_cast< sal_Int64 >( this ) : sal_Int64(0); } diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx index c73e2cb245af..2f0f5ca53f2e 100644 --- a/connectivity/source/drivers/ado/AColumn.cxx +++ b/connectivity/source/drivers/ado/AColumn.cxx @@ -90,7 +90,7 @@ Sequence< sal_Int8 > OAdoColumn::getUnoTunnelId() sal_Int64 OAdoColumn::getSomething( const Sequence< sal_Int8 > & rId ) { - return isUnoTunnelId<OAdoColumn>(rId) + return comphelper::isUnoTunnelId<OAdoColumn>(rId) ? reinterpret_cast< sal_Int64 >( this ) : OColumn_ADO::getSomething(rId); } diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx index 88d10ecd9af3..6297871d5b62 100644 --- a/connectivity/source/drivers/ado/AColumns.cxx +++ b/connectivity/source/drivers/ado/AColumns.cxx @@ -62,7 +62,7 @@ Reference< XPropertySet > OColumns::createDescriptor() // XAppend sdbcx::ObjectType OColumns::appendObject( const OUString&, const Reference< XPropertySet >& descriptor ) { - rtl::Reference<OAdoColumn> pColumn = getUnoTunnelImplementation<OAdoColumn>( descriptor ); + rtl::Reference<OAdoColumn> pColumn = getFromUnoTunnel<OAdoColumn>( descriptor ); Reference< XPropertySet > xColumn; if ( !pColumn.is() ) { diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index 664990f66564..0669955356bf 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -490,7 +490,7 @@ void OConnection::disposing() sal_Int64 SAL_CALL OConnection::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) { - return isUnoTunnelId<OConnection>(rId) + return comphelper::isUnoTunnelId<OConnection>(rId) ? reinterpret_cast< sal_Int64 >( this ) : diff --git a/connectivity/source/drivers/ado/AGroup.cxx b/connectivity/source/drivers/ado/AGroup.cxx index b41fbdbba05d..3a5a736431c0 100644 --- a/connectivity/source/drivers/ado/AGroup.cxx +++ b/connectivity/source/drivers/ado/AGroup.cxx @@ -93,7 +93,7 @@ Sequence< sal_Int8 > OAdoGroup::getUnoTunnelId() sal_Int64 OAdoGroup::getSomething( const Sequence< sal_Int8 > & rId ) { - return isUnoTunnelId<OAdoGroup>(rId) + return comphelper::isUnoTunnelId<OAdoGroup>(rId) ? reinterpret_cast< sal_Int64 >( this ) : OGroup_ADO::getSomething(rId); } diff --git a/connectivity/source/drivers/ado/AGroups.cxx b/connectivity/source/drivers/ado/AGroups.cxx index 211f34f6bebe..e3fb165b0a34 100644 --- a/connectivity/source/drivers/ado/AGroups.cxx +++ b/connectivity/source/drivers/ado/AGroups.cxx @@ -58,7 +58,7 @@ Reference< XPropertySet > OGroups::createDescriptor() // XAppend sdbcx::ObjectType OGroups::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - OAdoGroup* pGroup = getUnoTunnelImplementation<OAdoGroup>(descriptor); + OAdoGroup* pGroup = getFromUnoTunnel<OAdoGroup>(descriptor); if ( pGroup == nullptr ) m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_GROUP_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); diff --git a/connectivity/source/drivers/ado/AIndex.cxx b/connectivity/source/drivers/ado/AIndex.cxx index 61a047bc9b00..3445ab78a240 100644 --- a/connectivity/source/drivers/ado/AIndex.cxx +++ b/connectivity/source/drivers/ado/AIndex.cxx @@ -82,7 +82,7 @@ Sequence< sal_Int8 > OAdoIndex::getUnoTunnelId() sal_Int64 OAdoIndex::getSomething( const Sequence< sal_Int8 > & rId ) { - return isUnoTunnelId<OAdoIndex>(rId) + return comphelper::isUnoTunnelId<OAdoIndex>(rId) ? reinterpret_cast< sal_Int64 >( this ) : sdbcx::OIndex::getSomething(rId); } diff --git a/connectivity/source/drivers/ado/AIndexes.cxx b/connectivity/source/drivers/ado/AIndexes.cxx index 616cd863ada4..c2cdb76081d2 100644 --- a/connectivity/source/drivers/ado/AIndexes.cxx +++ b/connectivity/source/drivers/ado/AIndexes.cxx @@ -58,7 +58,7 @@ Reference< XPropertySet > OIndexes::createDescriptor() // XAppend sdbcx::ObjectType OIndexes::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - OAdoIndex* pIndex = getUnoTunnelImplementation<OAdoIndex>(descriptor); + OAdoIndex* pIndex = getFromUnoTunnel<OAdoIndex>(descriptor); if ( pIndex == nullptr ) m_pConnection->throwGenericSQLException( STR_INVALID_INDEX_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); diff --git a/connectivity/source/drivers/ado/AKey.cxx b/connectivity/source/drivers/ado/AKey.cxx index 764765b35620..6c3db4537e85 100644 --- a/connectivity/source/drivers/ado/AKey.cxx +++ b/connectivity/source/drivers/ado/AKey.cxx @@ -78,7 +78,7 @@ Sequence< sal_Int8 > OAdoKey::getUnoTunnelId() sal_Int64 OAdoKey::getSomething( const Sequence< sal_Int8 > & rId ) { - return isUnoTunnelId<OAdoKey>(rId) + return comphelper::isUnoTunnelId<OAdoKey>(rId) ? reinterpret_cast< sal_Int64 >( this ) : OKey_ADO::getSomething(rId); } diff --git a/connectivity/source/drivers/ado/AKeys.cxx b/connectivity/source/drivers/ado/AKeys.cxx index 0d921c39842b..a18d91709455 100644 --- a/connectivity/source/drivers/ado/AKeys.cxx +++ b/connectivity/source/drivers/ado/AKeys.cxx @@ -58,7 +58,7 @@ Reference< XPropertySet > OKeys::createDescriptor() // XAppend sdbcx::ObjectType OKeys::appendObject( const OUString&, const Reference< XPropertySet >& descriptor ) { - OAdoKey* pKey = getUnoTunnelImplementation<OAdoKey>( descriptor ); + OAdoKey* pKey = getFromUnoTunnel<OAdoKey>( descriptor ); if ( pKey == nullptr) m_pConnection->throwGenericSQLException( STR_INVALID_KEY_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx index 92f28ce56a06..6b2175a46b29 100644 --- a/connectivity/source/drivers/ado/ATable.cxx +++ b/connectivity/source/drivers/ado/ATable.cxx @@ -139,7 +139,7 @@ Sequence< sal_Int8 > OAdoTable::getUnoTunnelId() sal_Int64 OAdoTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return isUnoTunnelId<OAdoTable>(rId) + return comphelper::isUnoTunnelId<OAdoTable>(rId) ? reinterpret_cast< sal_Int64 >( this ) : OTable_TYPEDEF::getSomething(rId); } @@ -168,7 +168,7 @@ void SAL_CALL OAdoTable::alterColumnByName( const OUString& colName, const Refer checkDisposed(OTableDescriptor_BASE_TYPEDEF::rBHelper.bDisposed); bool bError = true; - OAdoColumn* pColumn = comphelper::getUnoTunnelImplementation<OAdoColumn>(descriptor); + OAdoColumn* pColumn = comphelper::getFromUnoTunnel<OAdoColumn>(descriptor); if(pColumn != nullptr) { WpADOColumns aColumns = m_aTable.get_Columns(); diff --git a/connectivity/source/drivers/ado/ATables.cxx b/connectivity/source/drivers/ado/ATables.cxx index 9ce87634e425..b8f6fb9d2c72 100644 --- a/connectivity/source/drivers/ado/ATables.cxx +++ b/connectivity/source/drivers/ado/ATables.cxx @@ -65,7 +65,7 @@ Reference< XPropertySet > OTables::createDescriptor() // XAppend sdbcx::ObjectType OTables::appendObject( const OUString&, const Reference< XPropertySet >& descriptor ) { - OAdoTable* pTable = getUnoTunnelImplementation<OAdoTable>( descriptor ); + OAdoTable* pTable = getFromUnoTunnel<OAdoTable>( descriptor ); if ( pTable == nullptr ) m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_TABLE_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); diff --git a/connectivity/source/drivers/ado/AUser.cxx b/connectivity/source/drivers/ado/AUser.cxx index 724334cea696..4d86ce97d63f 100644 --- a/connectivity/source/drivers/ado/AUser.cxx +++ b/connectivity/source/drivers/ado/AUser.cxx @@ -77,7 +77,7 @@ Sequence< sal_Int8 > OAdoUser::getUnoTunnelId() sal_Int64 OAdoUser::getSomething( const Sequence< sal_Int8 > & rId ) { - return isUnoTunnelId<OAdoUser>(rId) + return comphelper::isUnoTunnelId<OAdoUser>(rId) ? reinterpret_cast< sal_Int64 >( this ) : OUser_TYPEDEF::getSomething(rId); } diff --git a/connectivity/source/drivers/ado/AUsers.cxx b/connectivity/source/drivers/ado/AUsers.cxx index 2620e915a89e..9d0dab6e8d4c 100644 --- a/connectivity/source/drivers/ado/AUsers.cxx +++ b/connectivity/source/drivers/ado/AUsers.cxx @@ -56,7 +56,7 @@ Reference< XPropertySet > OUsers::createDescriptor() // XAppend sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - OUserExtend* pUser = getUnoTunnelImplementation<OUserExtend>( descriptor ); + OUserExtend* pUser = getFromUnoTunnel<OUserExtend>( descriptor ); if ( pUser == nullptr ) m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_USER_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); diff --git a/connectivity/source/drivers/ado/AView.cxx b/connectivity/source/drivers/ado/AView.cxx index b53c1a026200..5460bab249c2 100644 --- a/connectivity/source/drivers/ado/AView.cxx +++ b/connectivity/source/drivers/ado/AView.cxx @@ -52,7 +52,7 @@ Sequence< sal_Int8 > OAdoView::getUnoTunnelId() sal_Int64 OAdoView::getSomething( const Sequence< sal_Int8 > & rId ) { - return isUnoTunnelId<OAdoView>(rId) + return comphelper::isUnoTunnelId<OAdoView>(rId) ? reinterpret_cast< sal_Int64 >( this ) : OView_ADO::getSomething(rId); } diff --git a/connectivity/source/drivers/ado/AViews.cxx b/connectivity/source/drivers/ado/AViews.cxx index cbe239e73825..22fe40142d25 100644 --- a/connectivity/source/drivers/ado/AViews.cxx +++ b/connectivity/source/drivers/ado/AViews.cxx @@ -61,7 +61,7 @@ Reference< XPropertySet > OViews::createDescriptor() // XAppend sdbcx::ObjectType OViews::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - OAdoView* pView = getUnoTunnelImplementation<OAdoView>( descriptor ); + OAdoView* pView = getFromUnoTunnel<OAdoView>( descriptor ); if ( pView == nullptr ) m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_VIEW_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index f2c50362ab30..382142ece38e 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -621,7 +621,7 @@ Sequence< sal_Int8 > OCalcTable::getUnoTunnelId() sal_Int64 OCalcTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return (isUnoTunnelId<OCalcTable>(rId)) + return (comphelper::isUnoTunnelId<OCalcTable>(rId)) ? reinterpret_cast< sal_Int64 >( this ) : OCalcTable_BASE::getSomething(rId); } diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index 4bb3a0c7179a..601f1585eaef 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -294,7 +294,7 @@ Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo( aRow[4] = new ORowSetValueDecorator(getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE)))); aRow[6] = new ORowSetValueDecorator(*pBegin); - auto pIndex = comphelper::getUnoTunnelImplementation<ODbaseIndex>(xIndex); + auto pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(xIndex); if(pIndex) { aRow[11] = new ORowSetValueDecorator(static_cast<sal_Int32>(pIndex->getHeader().db_maxkeys)); diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index 04f46be9a513..f2dce48c62b7 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -111,7 +111,7 @@ Sequence< sal_Int8 > ODbaseIndex::getUnoTunnelId() sal_Int64 ODbaseIndex::getSomething( const Sequence< sal_Int8 > & rId ) { - return (isUnoTunnelId<ODbaseIndex>(rId)) + return (comphelper::isUnoTunnelId<ODbaseIndex>(rId)) ? reinterpret_cast< sal_Int64 >( this ) : ODbaseIndex_BASE::getSomething(rId); } diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx b/connectivity/source/drivers/dbase/DIndexes.cxx index 2a4cf72fb496..d97e1187b5fd 100644 --- a/connectivity/source/drivers/dbase/DIndexes.cxx +++ b/connectivity/source/drivers/dbase/DIndexes.cxx @@ -107,7 +107,7 @@ sdbcx::ObjectType ODbaseIndexes::appendObject( const OUString& _rForName, const // XDrop void ODbaseIndexes::dropObject(sal_Int32 _nPos, const OUString& /*_sElementName*/) { - auto pIndex = comphelper::getUnoTunnelImplementation<ODbaseIndex>(getObject(_nPos)); + auto pIndex = comphelper::getFromUnoTunnel<ODbaseIndex>(getObject(_nPos)); if ( pIndex ) pIndex->DropImpl(); } diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx index 17cbac2e41ab..148dc145ad9e 100644 --- a/connectivity/source/drivers/dbase/DResultSet.cxx +++ b/connectivity/source/drivers/dbase/DResultSet.cxx @@ -155,7 +155,7 @@ Sequence< sal_Int32 > SAL_CALL ODbaseResultSet::deleteRows( const Sequence< An bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_xIndex) { - auto pIndex = comphelper::getUnoTunnelImplementation<dbase::ODbaseIndex>(_xIndex); + auto pIndex = comphelper::getFromUnoTunnel<dbase::ODbaseIndex>(_xIndex); if(pIndex) { std::unique_ptr<dbase::OIndexIterator> pIter = pIndex->createIterator(); diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index f597ce615b5f..a270d3ad007f 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -742,7 +742,7 @@ Sequence< sal_Int8 > ODbaseTable::getUnoTunnelId() sal_Int64 ODbaseTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return (isUnoTunnelId<ODbaseTable>(rId)) + return (comphelper::isUnoTunnelId<ODbaseTable>(rId)) ? reinterpret_cast< sal_Int64 >( this ) : ODbaseTable_BASE::getSomething(rId); } diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx index 74c81c62601b..266816eeb776 100644 --- a/connectivity/source/drivers/dbase/DTables.cxx +++ b/connectivity/source/drivers/dbase/DTables.cxx @@ -65,7 +65,7 @@ Reference< XPropertySet > ODbaseTables::createDescriptor() // XAppend sdbcx::ObjectType ODbaseTables::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - auto pTable = comphelper::getUnoTunnelImplementation<ODbaseTable>(descriptor); + auto pTable = comphelper::getFromUnoTunnel<ODbaseTable>(descriptor); if(pTable) { pTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),makeAny(_rForName)); diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index 964d8ff16861..3b0dacea6f37 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -401,7 +401,7 @@ Reference< XDynamicResultSet > OConnection::getDir() const sal_Int64 SAL_CALL OConnection::getSomething( const Sequence< sal_Int8 >& rId ) { - return (isUnoTunnelId<OConnection>(rId)) + return (comphelper::isUnoTunnelId<OConnection>(rId)) ? reinterpret_cast< sal_Int64 >( this ) : sal_Int64(0); } diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 215c381aa8c1..c41f985d0bb0 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -393,7 +393,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( xNames->getByName(*pBegin), css::uno::UNO_QUERY); if(xTable.is()) { - auto pTable = comphelper::getUnoTunnelImplementation<OFileTable>(xTable); + auto pTable = comphelper::getFromUnoTunnel<OFileTable>(xTable); if(pTable && !pTable->isReadOnly()) { aRow[6] = ODatabaseMetaDataResultSet::getInsertValue(); diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index 9bd0692bac26..4b6d45fe7420 100644 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx @@ -172,7 +172,7 @@ Reference< XTablesSupplier > SAL_CALL OFileDriver::getDataDefinitionByConnection ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(ODriver_BASE::rBHelper.bDisposed); - if (OConnection* pSearchConnection = comphelper::getUnoTunnelImplementation<OConnection>(connection)) + if (OConnection* pSearchConnection = comphelper::getFromUnoTunnel<OConnection>(connection)) { for (auto const& elem : m_xConnections) { diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index 4d29f1de7a84..7c2649d8fc8f 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -1391,7 +1391,7 @@ Sequence< sal_Int8 > OResultSet::getUnoTunnelId() sal_Int64 OResultSet::getSomething( const Sequence< sal_Int8 > & rId ) { - return isUnoTunnelId<OResultSet>(rId) + return comphelper::isUnoTunnelId<OResultSet>(rId) ? reinterpret_cast< sal_Int64 >( this ) : 0; } diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index b47bfb811a1f..7da609bb4ae0 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -130,7 +130,7 @@ Sequence< sal_Int8 > OFileTable::getUnoTunnelId() sal_Int64 OFileTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return isUnoTunnelId<OFileTable>(rId) + return comphelper::isUnoTunnelId<OFileTable>(rId) ? reinterpret_cast< sal_Int64 >( this ) : OTable_TYPEDEF::getSomething(rId); } diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx index 040770fe0e6d..dd827eca52a7 100644 --- a/connectivity/source/drivers/firebird/Connection.cxx +++ b/connectivity/source/drivers/firebird/Connection.cxx @@ -382,7 +382,7 @@ Reference< XClob> Connection::createClob(ISC_QUAD const * pBlobId) // virtual sal_Int64 SAL_CALL Connection::getSomething(const css::uno::Sequence<sal_Int8>& rId) { - return (isUnoTunnelId<Connection>(rId)) ? reinterpret_cast<sal_Int64>(this) : sal_Int64(0); + return (comphelper::isUnoTunnelId<Connection>(rId)) ? reinterpret_cast<sal_Int64>(this) : sal_Int64(0); } // static diff --git a/connectivity/source/drivers/firebird/Driver.cxx b/connectivity/source/drivers/firebird/Driver.cxx index fbf29293a31c..c9dc6155d0e0 100644 --- a/connectivity/source/drivers/firebird/Driver.cxx +++ b/connectivity/source/drivers/firebird/Driver.cxx @@ -191,7 +191,7 @@ sal_Int32 SAL_CALL FirebirdDriver::getMinorVersion( ) uno::Reference< XTablesSupplier > SAL_CALL FirebirdDriver::getDataDefinitionByConnection( const uno::Reference< XConnection >& rConnection) { - if (Connection* pConnection = comphelper::getUnoTunnelImplementation<Connection>(rConnection)) + if (Connection* pConnection = comphelper::getFromUnoTunnel<Connection>(rConnection)) return pConnection->createCatalog(); return {}; } diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 0574130ee993..43116033add6 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -562,7 +562,7 @@ Sequence< sal_Int8 > OFlatTable::getUnoTunnelId() sal_Int64 OFlatTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return (isUnoTunnelId<OFlatTable>(rId)) + return (comphelper::isUnoTunnelId<OFlatTable>(rId)) ? reinterpret_cast< sal_Int64 >( this ) : OFlatTable_BASE::getSomething(rId); } diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index e4d4e399ba2a..962e574879cf 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -333,7 +333,7 @@ namespace connectivity if ( xOrig.is() ) { // now we have to set the URL to get the correct answer for metadata()->getURL() - auto pMetaConnection = comphelper::getUnoTunnelImplementation<OMetaConnection>(xOrig); + auto pMetaConnection = comphelper::getFromUnoTunnel<OMetaConnection>(xOrig); if ( pMetaConnection ) pMetaConnection->setURL(url); diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 89d75fac7e3d..76d0c5b332ee 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -127,7 +127,7 @@ Sequence< sal_Int8 > OHSQLTable::getUnoTunnelId() sal_Int64 OHSQLTable::getSomething( const Sequence< sal_Int8 > & rId ) { - return (isUnoTunnelId<OHSQLTable>(rId)) + return (comphelper::isUnoTunnelId<OHSQLTable>(rId)) ? reinterpret_cast< sal_Int64 >( this ) : OTable_TYPEDEF::getSomething(rId); } diff --git a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx index 0225381c74b3..ad8ce525feac 100644 --- a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx @@ -255,8 +255,7 @@ Reference<XConnection> SAL_CALL ODriverDelegator::connect(const OUString& url, if (xConnection.is()) { // now we have to set the URL to get the correct answer for metadata()->getURL() - auto pMetaConnection - = comphelper::getUnoTunnelImplementation<OMetaConnection>(xConnection); + auto pMetaConnection = comphelper::getFromUnoTunnel<OMetaConnection>(xConnection); if (pMetaConnection) pMetaConnection->setURL(url); m_aConnections.push_back( @@ -321,7 +320,7 @@ ODriverDelegator::getDataDefinitionByConnection(const Reference<XConnection>& co checkDisposed(ODriverDelegator_BASE::rBHelper.bDisposed); Reference<XTablesSupplier> xTab; - auto pConnection = comphelper::getUnoTunnelImplementation<OMetaConnection>(connection); + auto pConnection = comphelper::getFromUnoTunnel<OMetaConnection>(connection); if (pConnection) { TWeakPairVector::iterator i diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx b/connectivity/source/drivers/mysql_jdbc/YTable.cxx index 26e0fde19632..22c6bfa6df6c 100644 --- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx +++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx @@ -128,8 +128,8 @@ Sequence<sal_Int8> OMySQLTable::getUnoTunnelId() sal_Int64 OMySQLTable::getSomething(const Sequence<sal_Int8>& rId) { - return (isUnoTunnelId<OMySQLTable>(rId)) ? reinterpret_cast<sal_Int64>(this) - : OTable_TYPEDEF::getSomething(rId); + return (comphelper::isUnoTunnelId<OMySQLTable>(rId)) ? reinterpret_cast<sal_Int64>(this) + : OTable_TYPEDEF::getSomething(rId); } // XAlterTable diff --git a/connectivity/source/drivers/writer/WTable.cxx b/connectivity/source/drivers/writer/WTable.cxx index 8448132556e6..a1e97ab836ed 100644 --- a/connectivity/source/drivers/writer/WTable.cxx +++ b/connectivity/source/drivers/writer/WTable.cxx @@ -220,8 +220,8 @@ uno::Sequence<sal_Int8> OWriterTable::getUnoTunnelId() sal_Int64 OWriterTable::getSomething(const uno::Sequence<sal_Int8>& rId) { - return (isUnoTunnelId<OWriterTable>(rId)) ? reinterpret_cast<sal_Int64>(this) - : OWriterTable_BASE::getSomething(rId); + return (comphelper::isUnoTunnelId<OWriterTable>(rId)) ? reinterpret_cast<sal_Int64>(this) + : OWriterTable_BASE::getSomething(rId); } bool OWriterTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols, bool bRetrieveData) diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx index c7f8e0ba9ff0..0aa6c0d3c627 100644 --- a/connectivity/source/sdbcx/VCollection.cxx +++ b/connectivity/source/sdbcx/VCollection.cxx @@ -374,7 +374,7 @@ void SAL_CALL OCollection::appendByDescriptor( const Reference< XPropertySet >& if ( !xNewlyCreated.is() ) throw RuntimeException(); - ODescriptor* pDescriptor = comphelper::getUnoTunnelImplementation<ODescriptor>( xNewlyCreated ); + ODescriptor* pDescriptor = comphelper::getFromUnoTunnel<ODescriptor>( xNewlyCreated ); if ( pDescriptor ) pDescriptor->setNew( false ); diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx index 8a32a1b58b39..0d70aa0b41af 100644 --- a/connectivity/source/sdbcx/VDescriptor.cxx +++ b/connectivity/source/sdbcx/VDescriptor.cxx @@ -46,7 +46,7 @@ namespace connectivity::sdbcx // css::lang::XUnoTunnel sal_Int64 SAL_CALL ODescriptor::getSomething( const Sequence< sal_Int8 >& rId ) { - return (isUnoTunnelId<ODescriptor>(rId)) + return (comphelper::isUnoTunnelId<ODescriptor>(rId)) ? reinterpret_cast< sal_Int64 >( this ) : 0; } @@ -87,7 +87,7 @@ namespace connectivity::sdbcx bool ODescriptor::isNew( const Reference< XInterface >& _rxDescriptor ) { - ODescriptor* pImplementation = comphelper::getUnoTunnelImplementation<ODescriptor>( _rxDescriptor ); + ODescriptor* pImplementation = comphelper::getFromUnoTunnel<ODescriptor>( _rxDescriptor ); return pImplementation && pImplementation->isNew(); } diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index f7deaa0c1d5e..798783587995 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -437,7 +437,7 @@ void SAL_CALL ORowSet::release() noexcept // css::XUnoTunnel sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId ) { - if (isUnoTunnelId<ORowSet>(rId)) + if (comphelper::isUnoTunnelId<ORowSet>(rId)) return reinterpret_cast<sal_Int64>(this); return 0; @@ -2141,7 +2141,7 @@ void ORowSet::notifyRowSetAndClonesRowDelete( const Any& _rBookmark ) // notify the clones for (auto const& elem : m_aClones) { - auto pClone = comphelper::getUnoTunnelImplementation<ORowSetClone>(elem.get()); + auto pClone = comphelper::getFromUnoTunnel<ORowSetClone>(elem.get()); if(pClone) pClone->onDeleteRow( _rBookmark ); } @@ -2154,7 +2154,7 @@ void ORowSet::notifyRowSetAndClonesRowDeleted( const Any& _rBookmark, sal_Int32 // notify the clones for (auto const& clone : m_aClones) { - auto pClone = comphelper::getUnoTunnelImplementation<ORowSetClone>(clone.get()); + auto pClone = comphelper::getFromUnoTunnel<ORowSetClone>(clone.get()); if(pClone) pClone->onDeletedRow( _rBookmark, _nPos ); } @@ -2909,7 +2909,7 @@ Sequence< sal_Int8 > ORowSetClone::getUnoTunnelId() // css::XUnoTunnel sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId ) { - if (isUnoTunnelId<ORowSetClone>(rId)) + if (comphelper::isUnoTunnelId<ORowSetClone>(rId)) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index 6dff0b3b0964..e4b3a07e697d 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -451,7 +451,7 @@ OUString SAL_CALL ODBTableDecorator::getName() sal_Int64 SAL_CALL ODBTableDecorator::getSomething( const Sequence< sal_Int8 >& rId ) { - if (isUnoTunnelId<ODBTableDecorator>(rId)) + if (comphelper::isUnoTunnelId<ODBTableDecorator>(rId)) return reinterpret_cast<sal_Int64>(this); sal_Int64 nRet = 0; diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx index 2ba824d0afbd..bd0c59c75fbf 100644 --- a/dbaccess/source/core/api/querydescriptor.cxx +++ b/dbaccess/source/core/api/querydescriptor.cxx @@ -140,7 +140,7 @@ OQueryDescriptor_Base::~OQueryDescriptor_Base() sal_Int64 SAL_CALL OQueryDescriptor_Base::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) { - if (isUnoTunnelId<OQueryDescriptor_Base>(_rIdentifier)) + if (comphelper::isUnoTunnelId<OQueryDescriptor_Base>(_rIdentifier)) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index 054c1de241cb..94cb5646032d 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -297,7 +297,7 @@ void SAL_CALL ODBTable::alterColumnByName( const OUString& _rName, const Referen sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId ) { sal_Int64 nRet(0); - if (isUnoTunnelId<ODBTable>(rId)) + if (comphelper::isUnoTunnelId<ODBTable>(rId)) nRet = reinterpret_cast<sal_Int64>(this); else nRet = OTable_Base::getSomething(rId); diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index e08fc61b65bb..d18be06e882b 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -545,7 +545,7 @@ void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent // css::lang::XUnoTunnel sal_Int64 OContentHelper::getSomething( const Sequence< sal_Int8 > & rId ) { - if (isUnoTunnelId<OContentHelper>(rId)) + if (comphelper::isUnoTunnelId<OContentHelper>(rId)) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index 8e17e0440abc..651dca08f674 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -709,7 +709,7 @@ void ODatabaseContext::databaseDocumentURLChange( const OUString& _rOldURL, cons sal_Int64 SAL_CALL ODatabaseContext::getSomething( const Sequence< sal_Int8 >& rId ) { - if (isUnoTunnelId<ODatabaseContext>(rId)) + if (comphelper::isUnoTunnelId<ODatabaseContext>(rId)) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx index c9ca13c41ebb..5b3772983d7c 100644 --- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx +++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx @@ -526,7 +526,7 @@ void ODefinitionContainer::implAppend(const OUString& _rName, const Reference< X // #i44786# lcl_ensureName( _rxNewObject, _rName ); - ::rtl::Reference< OContentHelper > pContent = comphelper::getUnoTunnelImplementation<OContentHelper>( _rxNewObject ); + ::rtl::Reference< OContentHelper > pContent = comphelper::getFromUnoTunnel<OContentHelper>( _rxNewObject ); if ( pContent.is() ) { TContentPtr pImpl = pContent->getImpl(); @@ -585,7 +585,7 @@ void ODefinitionContainer::approveNewObject(const OUString& _sName,const Referen DBA_RES( RID_STR_NAME_ALREADY_USED ), *this ); - ::rtl::Reference< OContentHelper > pContent( comphelper::getUnoTunnelImplementation<OContentHelper>( _rxObject ) ); + ::rtl::Reference< OContentHelper > pContent( comphelper::getFromUnoTunnel<OContentHelper>( _rxObject ) ); if ( !pContent.is() ) throw IllegalArgumentException( DBA_RES( RID_STR_OBJECT_CONTAINER_MISMATCH ), diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx index 4554a1fd4dcb..cfd552b36d7e 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.cxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx @@ -636,7 +636,7 @@ OUString SAL_CALL ODocumentContainer::composeHierarchicalName( const OUString& i ::rtl::Reference<OContentHelper> pContent; try { - pContent = comphelper::getUnoTunnelImplementation<OContentHelper>(const_cast<ODocumentContainer*>(this)->implGetByName( _sName, true )); + pContent = comphelper::getFromUnoTunnel<OContentHelper>(const_cast<ODocumentContainer*>(this)->implGetByName( _sName, true )); } catch(const Exception&) { diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index 4aa7c4c5abb9..b68819d6740a 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -251,7 +251,7 @@ SbaGridControl* UnoDataBrowserView::getVclControl() const Reference< css::awt::XWindowPeer > xPeer = m_xGrid->getPeer(); if ( xPeer.is() ) { - SbaXGridPeer* pPeer = comphelper::getUnoTunnelImplementation<SbaXGridPeer>(xPeer); + SbaXGridPeer* pPeer = comphelper::getFromUnoTunnel<SbaXGridPeer>(xPeer); UnoDataBrowserView* pTHIS = const_cast<UnoDataBrowserView*>(this); if ( pPeer ) { diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index f9871eaee981..0006f45de56f 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -667,7 +667,7 @@ SvNumberFormatter* SbaGridControl::GetDatasourceFormatter() { Reference< css::util::XNumberFormatsSupplier > xSupplier = ::dbtools::getNumberFormats(::dbtools::getConnection(Reference< XRowSet > (getDataSource(),UNO_QUERY)), true, getContext()); - SvNumberFormatsSupplierObj* pSupplierImpl = comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>( xSupplier ); + SvNumberFormatsSupplierObj* pSupplierImpl = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( xSupplier ); if ( !pSupplierImpl ) return nullptr; diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index d62d9ea3e482..336fa15bac9f 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -281,7 +281,7 @@ IMPL_LINK_NOARG(OFieldDescControl, FormatClickHdl, weld::Button&, void) sal_Int32 nOldFormatKey(pActFieldDescr->GetFormatKey()); SvxCellHorJustify rOldJustify = pActFieldDescr->GetHorJustify(); Reference< XNumberFormatsSupplier > xSupplier = GetFormatter()->getNumberFormatsSupplier(); - SvNumberFormatsSupplierObj* pSupplierImpl = comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>( xSupplier ); + SvNumberFormatsSupplierObj* pSupplierImpl = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( xSupplier ); if (!pSupplierImpl) return; diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 61a6481f1a11..adab71f29d8f 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -772,7 +772,7 @@ void ODatabaseExport::ensureFormatter() if ( !m_pFormatter ) { Reference< XNumberFormatsSupplier > xSupplier = m_xFormatter->getNumberFormatsSupplier(); - auto pSupplierImpl = comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>(xSupplier); + auto pSupplierImpl = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>(xSupplier); m_pFormatter = pSupplierImpl ? pSupplierImpl->GetNumberFormatter() : nullptr; Reference<XPropertySet> xNumberFormatSettings = xSupplier->getNumberFormatSettings(); xNumberFormatSettings->getPropertyValue("NullDate") >>= m_aNullDate; diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index bde1e9a138a5..c0401f591a6f 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -862,7 +862,7 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat, sal_Int32 nWidthPixel, sal "=" + pChar; - SvNumberFormatsSupplierObj* pSupplierImpl = m_xFormatter.is() ? comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>(m_xFormatter->getNumberFormatsSupplier()) : nullptr; + SvNumberFormatsSupplierObj* pSupplierImpl = m_xFormatter.is() ? comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>(m_xFormatter->getNumberFormatsSupplier()) : nullptr; SvNumberFormatter* pFormatter = pSupplierImpl ? pSupplierImpl->GetNumberFormatter() : nullptr; if(pFormatter) { diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 2f60f2c33421..4086e7b442f2 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1036,7 +1036,7 @@ void setEvalDateFormatForFormatter(Reference< css::util::XNumberFormatter > cons Reference< css::util::XNumberFormatsSupplier > xSupplier = _rxFormatter->getNumberFormatsSupplier(); - auto pSupplierImpl = comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>(xSupplier); + auto pSupplierImpl = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>(xSupplier); OSL_ENSURE(pSupplierImpl,"No Supplier!"); if ( pSupplierImpl ) diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx index 2fda531e716c..d2c5c98b94e1 100644 --- a/dbaccess/source/ui/querydesign/JoinExchange.cxx +++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx @@ -56,7 +56,7 @@ namespace dbaui OJoinExchangeData OJoinExchObj::GetSourceDescription(const Reference< XTransferable >& _rxObject) { OJoinExchangeData aReturn; - auto pImplementation = comphelper::getUnoTunnelImplementation<OJoinExchObj>(_rxObject); + auto pImplementation = comphelper::getFromUnoTunnel<OJoinExchObj>(_rxObject); if (pImplementation) aReturn = pImplementation->m_jxdSourceDescription; return aReturn; @@ -71,7 +71,7 @@ namespace dbaui sal_Int64 SAL_CALL OJoinExchObj::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) { - if (isUnoTunnelId<OJoinExchObj>(_rIdentifier)) + if (comphelper::isUnoTunnelId<OJoinExchObj>(_rIdentifier)) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx index 19dddf59d8a4..51adc7d651fc 100644 --- a/dbaccess/source/ui/uno/ColumnControl.cxx +++ b/dbaccess/source/ui/uno/ColumnControl.cxx @@ -69,7 +69,7 @@ void SAL_CALL OColumnControl::createPeer(const Reference< XToolkit >& /*rToolkit vcl::Window* pParentWin = nullptr; if (rParentPeer.is()) { - VCLXWindow* pParent = comphelper::getUnoTunnelImplementation<VCLXWindow>(rParentPeer); + VCLXWindow* pParent = comphelper::getFromUnoTunnel<VCLXWindow>(rParentPeer); if (pParent) pParentWin = pParent->GetWindow(); } diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index c2b0aa5bdd8d..efe9165ea647 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -231,13 +231,13 @@ static tools::Time setTime( util::DateTime const & rDate ) const css::uno::Sequence< sal_Int8 > & SvxUnoTextField::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSvxUnoTextFieldUnoTunnelId; + static const comphelper::UnoIdInit theSvxUnoTextFieldUnoTunnelId; return theSvxUnoTextFieldUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SvxUnoTextField::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SvxUnoTextField>(rId) ) + if( comphelper::isUnoTunnelId<SvxUnoTextField>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } @@ -654,7 +654,7 @@ OUString SAL_CALL SvxUnoTextField::getPresentation( sal_Bool bShowCommand ) // Interface text::XTextContent void SAL_CALL SvxUnoTextField::attach( const uno::Reference< text::XTextRange >& xTextRange ) { - SvxUnoTextRangeBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextRange>( xTextRange ); + SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRange>( xTextRange ); if(pRange == nullptr) throw lang::IllegalArgumentException(); diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index 9f861b7f9c2a..5ac7c4c1ba41 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -474,7 +474,7 @@ void SvxUnoNumberingRules::setNumberingRuleByIndex(const Sequence<beans::Propert const SvxNumRule& SvxGetNumRule( Reference< XIndexReplace > const & xRule ) { - SvxUnoNumberingRules* pRule = comphelper::getUnoTunnelImplementation<SvxUnoNumberingRules>( xRule ); + SvxUnoNumberingRules* pRule = comphelper::getFromUnoTunnel<SvxUnoNumberingRules>( xRule ); if( pRule == nullptr ) throw IllegalArgumentException(); @@ -509,10 +509,10 @@ sal_Int16 SvxUnoNumberingRules::Compare( const Any& Any1, const Any& Any2 ) if( x1.get() == x2.get() ) return 0; - SvxUnoNumberingRules* pRule1 = comphelper::getUnoTunnelImplementation<SvxUnoNumberingRules>( x1 ); + SvxUnoNumberingRules* pRule1 = comphelper::getFromUnoTunnel<SvxUnoNumberingRules>( x1 ); if( pRule1 ) { - SvxUnoNumberingRules* pRule2 = comphelper::getUnoTunnelImplementation<SvxUnoNumberingRules>( x2 ); + SvxUnoNumberingRules* pRule2 = comphelper::getFromUnoTunnel<SvxUnoNumberingRules>( x2 ); if( pRule2 ) { const SvxNumRule& rRule1 = pRule1->getNumRule(); diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 76537f8b425b..7696a5dbd648 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -312,7 +312,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getStart() { CheckSelection( maSelection, pForwarder ); - SvxUnoTextBase* pText = comphelper::getUnoTunnelImplementation<SvxUnoTextBase>( getText() ); + SvxUnoTextBase* pText = comphelper::getFromUnoTunnel<SvxUnoTextBase>( getText() ); if(pText == nullptr) throw uno::RuntimeException(); @@ -340,7 +340,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getEnd() { CheckSelection( maSelection, pForwarder ); - SvxUnoTextBase* pText = comphelper::getUnoTunnelImplementation<SvxUnoTextBase>( getText() ); + SvxUnoTextBase* pText = comphelper::getFromUnoTunnel<SvxUnoTextBase>( getText() ); if(pText == nullptr) throw uno::RuntimeException(); @@ -1453,8 +1453,8 @@ uno::Sequence< OUString > SvxUnoTextRangeBase::getSupportedServiceNames_Static() // XTextRangeCompare sal_Int16 SAL_CALL SvxUnoTextRangeBase::compareRegionStarts( const uno::Reference< text::XTextRange >& xR1, const uno::Reference< text::XTextRange >& xR2 ) { - SvxUnoTextRangeBase* pR1 = comphelper::getUnoTunnelImplementation<SvxUnoTextRangeBase>( xR1 ); - SvxUnoTextRangeBase* pR2 = comphelper::getUnoTunnelImplementation<SvxUnoTextRangeBase>( xR2 ); + SvxUnoTextRangeBase* pR1 = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( xR1 ); + SvxUnoTextRangeBase* pR2 = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( xR2 ); if( (pR1 == nullptr) || (pR2 == nullptr) ) throw lang::IllegalArgumentException(); @@ -1477,8 +1477,8 @@ sal_Int16 SAL_CALL SvxUnoTextRangeBase::compareRegionStarts( const uno::Referenc sal_Int16 SAL_CALL SvxUnoTextRangeBase::compareRegionEnds( const uno::Reference< text::XTextRange >& xR1, const uno::Reference< text::XTextRange >& xR2 ) { - SvxUnoTextRangeBase* pR1 = comphelper::getUnoTunnelImplementation<SvxUnoTextRangeBase>( xR1 ); - SvxUnoTextRangeBase* pR2 = comphelper::getUnoTunnelImplementation<SvxUnoTextRangeBase>( xR2 ); + SvxUnoTextRangeBase* pR1 = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( xR1 ); + SvxUnoTextRangeBase* pR2 = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( xR2 ); if( (pR1 == nullptr) || (pR2 == nullptr) ) throw lang::IllegalArgumentException(); @@ -1688,7 +1688,7 @@ uno::Reference< text::XTextCursor > SAL_CALL SvxUnoTextBase::createTextCursorByR if( aTextPosition.is() ) { - SvxUnoTextRangeBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextRangeBase>( aTextPosition ); + SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( aTextPosition ); if(pRange) xCursor = createTextCursorBySelection( pRange->GetSelection() ); } @@ -1703,7 +1703,7 @@ void SAL_CALL SvxUnoTextBase::insertString( const uno::Reference< text::XTextRan if( !xRange.is() ) return; - SvxUnoTextRangeBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextRange>( xRange ); + SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRange>( xRange ); if(!pRange) return; @@ -1750,7 +1750,7 @@ void SAL_CALL SvxUnoTextBase::insertControlCharacter( const uno::Reference< text } case text::ControlCharacter::LINE_BREAK: { - SvxUnoTextRangeBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextRange>( xRange ); + SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRange>( xRange ); if(pRange) { ESelection aRange = pRange->GetSelection(); @@ -1781,7 +1781,7 @@ void SAL_CALL SvxUnoTextBase::insertControlCharacter( const uno::Reference< text } case text::ControlCharacter::APPEND_PARAGRAPH: { - SvxUnoTextRangeBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextRange>( xRange ); + SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRange>( xRange ); if(pRange) { ESelection aRange = pRange->GetSelection(); @@ -2135,13 +2135,13 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextBase::getSupportedServiceNames_Stat const uno::Sequence< sal_Int8 > & SvxUnoTextBase::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSvxUnoTextBaseUnoTunnelId; + static const comphelper::UnoIdInit theSvxUnoTextBaseUnoTunnelId; return theSvxUnoTextBaseUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SvxUnoTextBase::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SvxUnoTextBase>(rId) ) + if( comphelper::isUnoTunnelId<SvxUnoTextBase>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } @@ -2209,13 +2209,13 @@ uno::Sequence< sal_Int8 > SAL_CALL SvxUnoText::getImplementationId( ) const uno::Sequence< sal_Int8 > & SvxUnoText::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSvxUnoTextUnoTunnelId; + static const comphelper::UnoIdInit theSvxUnoTextUnoTunnelId; return theSvxUnoTextUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SvxUnoText::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SvxUnoText>(rId) ) + if( comphelper::isUnoTunnelId<SvxUnoText>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 8ff342d915bb..12b56ca4c68e 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -554,7 +554,7 @@ void SAL_CALL SvxUnoTextCursor::gotoRange( const uno::Reference< text::XTextRang if( !xRange.is() ) return; - SvxUnoTextRangeBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextRangeBase>( xRange ); + SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( xRange ); if( !pRange ) return; diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index cd4a9529d6e9..f73ffd2b29da 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -881,7 +881,7 @@ bool ImplEESdrWriter::ImplInitPage( const SdrPage& rPage ) mpSolverContainer.reset( new EscherSolverContainer ); } else - pSvxDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>(mXDrawPage); + pSvxDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>(mXDrawPage); return pSvxDrawPage != nullptr; } diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 7e5f188e7725..4b81f491a204 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -690,7 +690,7 @@ bool SVGFilter::implExportImpressOrDraw( const Reference< XOutputStream >& rxOSt if( mxDefaultPage.is() ) { - SvxDrawPage* pSvxDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( mxDefaultPage ); + SvxDrawPage* pSvxDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>( mxDefaultPage ); if( pSvxDrawPage ) { @@ -812,7 +812,7 @@ bool SVGFilter::implExportWriterTextGraphic( const Reference< view::XSelectionSu Size aSize( OutputDevice::LogicToLogic(aGraphic.GetPrefSize(), aGraphic.GetPrefMapMode(), MapMode(MapUnit::Map100thMM)) ); assert(mSelectedPages.size() == 1); - SvxDrawPage* pSvxDrawPage(comphelper::getUnoTunnelImplementation<SvxDrawPage>(mSelectedPages[0])); + SvxDrawPage* pSvxDrawPage(comphelper::getFromUnoTunnel<SvxDrawPage>(mSelectedPages[0])); if(pSvxDrawPage == nullptr || pSvxDrawPage->GetSdrPage() == nullptr) return false; @@ -1169,7 +1169,7 @@ void SVGFilter::implGenerateMetaData() // NOTE: at present pSdrModel->GetPageNumType() returns always css::style::NumberingType::ARABIC // so the following code fragment is pretty useless sal_Int32 nPageNumberingType = css::style::NumberingType::ARABIC; - SvxDrawPage* pSvxDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( mSelectedPages[0] ); + SvxDrawPage* pSvxDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>( mSelectedPages[0] ); if( pSvxDrawPage ) { SdrPage* pSdrPage = pSvxDrawPage->GetSdrPage(); @@ -1763,7 +1763,7 @@ void SVGFilter::implGetPagePropSet( const Reference< css::drawing::XDrawPage > & if( mVisiblePagePropSet.bIsPageNumberFieldVisible ) { - SvxDrawPage* pSvxDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( rxPage ); + SvxDrawPage* pSvxDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>( rxPage ); if( pSvxDrawPage ) { SdrPage* pSdrPage = pSvxDrawPage->GetSdrPage(); diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 2843e7df9637..830767a33458 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -198,7 +198,7 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto } // get that DrawPage's UNO API implementation - SvxDrawPage* pSvxDrawPage(comphelper::getUnoTunnelImplementation<SvxDrawPage>(xDrawPage)); + SvxDrawPage* pSvxDrawPage(comphelper::getFromUnoTunnel<SvxDrawPage>(xDrawPage)); if(nullptr == pSvxDrawPage || nullptr == pSvxDrawPage->GetSdrPage()) { diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 8b3748e99ecc..0dbe216cc506 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -108,7 +108,7 @@ sal_Int32 getColumnTypeByModelName(const OUString& aModelName) const Sequence<sal_Int8>& OGridColumn::getUnoTunnelId() { - static const UnoTunnelIdInit theOGridColumnImplementationId; + static const comphelper::UnoIdInit theOGridColumnImplementationId; return theOGridColumnImplementationId.getSeq(); } @@ -117,7 +117,7 @@ sal_Int64 SAL_CALL OGridColumn::getSomething( const Sequence<sal_Int8>& _rIdenti { sal_Int64 nReturn(0); - if ( isUnoTunnelId<OGridColumn>(_rIdentifier) ) + if ( comphelper::isUnoTunnelId<OGridColumn>(_rIdentifier) ) { nReturn = reinterpret_cast<sal_Int64>(this); } diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index 041fd89c77d0..b92f763d578e 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -739,7 +739,7 @@ ElementDescription* OGridControlModel::createElementMetaData( ) void OGridControlModel::approveNewElement( const Reference< XPropertySet >& _rxObject, ElementDescription* _pElement ) { - OGridColumn* pCol = comphelper::getUnoTunnelImplementation<OGridColumn>( _rxObject ); + OGridColumn* pCol = comphelper::getFromUnoTunnel<OGridColumn>( _rxObject ); if ( !pCol ) throw IllegalArgumentException(); OInterfaceContainer::approveNewElement( _rxObject, _pElement ); @@ -763,7 +763,7 @@ void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream for (sal_Int32 i = 0; i < nLen; i++) { // first the service name for the underlying model - OGridColumn* pCol = comphelper::getUnoTunnelImplementation<OGridColumn>(m_aItems[i]); + OGridColumn* pCol = comphelper::getFromUnoTunnel<OGridColumn>(m_aItems[i]); DBG_ASSERT(pCol != nullptr, "OGridControlModel::write : such items should never reach it into my container !"); _rxOutStream << pCol->getModelName(); // then the object itself @@ -867,7 +867,7 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) sal_Int32 nMark = xMark->createMark(); if (xCol.is()) { - OGridColumn* pCol = comphelper::getUnoTunnelImplementation<OGridColumn>(xCol); + OGridColumn* pCol = comphelper::getFromUnoTunnel<OGridColumn>(xCol); pCol->read(_rxInStream); } xMark->jumpToMark(nMark); diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index e6416ca2d0da..bc3dbfe6002b 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -176,7 +176,7 @@ namespace frm vcl::Window* pParentWin = nullptr; if ( _rParentPeer.is() ) { - VCLXWindow* pParentXWin = comphelper::getUnoTunnelImplementation<VCLXWindow>( _rParentPeer ); + VCLXWindow* pParentXWin = comphelper::getFromUnoTunnel<VCLXWindow>( _rParentPeer ); if ( pParentXWin ) pParentWin = pParentXWin->GetWindow(); DBG_ASSERT( pParentWin, "ORichTextControl::createPeer: could not obtain the VCL-level parent window!" ); diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index 4c5f0c6af706..3e2930d1bfeb 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -548,7 +548,7 @@ namespace frm sal_Int64 SAL_CALL ORichTextModel::getSomething( const Sequence< sal_Int8 >& _rId ) { - if (isUnoTunnelId<ORichTextModel>(_rId)) + if (comphelper::isUnoTunnelId<ORichTextModel>(_rId)) return reinterpret_cast< sal_Int64 >( m_pEngine.get() ); Reference< XUnoTunnel > xAggTunnel; diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index 92d7ac4635cc..af8c6d561d55 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -123,7 +123,7 @@ namespace frm vcl::Window* pParentWin = nullptr; if ( _rParentPeer.is() ) { - VCLXWindow* pParentXWin = comphelper::getUnoTunnelImplementation<VCLXWindow>( _rParentPeer ); + VCLXWindow* pParentXWin = comphelper::getFromUnoTunnel<VCLXWindow>( _rParentPeer ); if ( pParentXWin ) pParentWin = pParentXWin->GetWindow(); DBG_ASSERT( pParentWin, "ONavigationBarControl::createPeer: could not obtain the VCL-level parent window!" ); diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index adb66aba283c..6b29e26685b7 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -449,7 +449,7 @@ bool Binding::isLive() const Model* Binding::getModelImpl() const { - return comphelper::getUnoTunnelImplementation<Model>( mxModel ); + return comphelper::getFromUnoTunnel<Model>( mxModel ); } static void lcl_addListenerToNode( const Reference<XNode>& xNode, diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 6320ff732229..f3bad8a5f323 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -230,7 +230,7 @@ void Model::rebind() sal_Int32 nCount = mxBindings->countItems(); for( sal_Int32 i = 0; i < nCount; i++ ) { - Binding* pBind = comphelper::getUnoTunnelImplementation<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) ); + Binding* pBind = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) ); OSL_ENSURE( pBind != nullptr, "binding?" ); pBind->update(); } @@ -243,7 +243,7 @@ void Model::deferNotifications( bool bDefer ) sal_Int32 nCount = mxBindings->countItems(); for( sal_Int32 i = 0; i < nCount; i++ ) { - Binding* pBind = comphelper::getUnoTunnelImplementation<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) ); + Binding* pBind = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) ); OSL_ENSURE( pBind != nullptr, "binding?" ); pBind->deferNotifications( bDefer ); } @@ -366,7 +366,7 @@ bool Model::isValid() const sal_Int32 nCount = mxBindings->countItems(); for( sal_Int32 i = 0; bValid && i < nCount; i++ ) { - Binding* pBind = comphelper::getUnoTunnelImplementation<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) ); + Binding* pBind = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) ); OSL_ENSURE( pBind != nullptr, "binding?" ); bValid = pBind->isValid(); } @@ -434,7 +434,7 @@ void SAL_CALL Model::submitWithInteraction( if( mxSubmissions->hasItem( sID ) ) { Submission* pSubmission = - comphelper::getUnoTunnelImplementation<Submission>( mxSubmissions->getItem( sID ) ); + comphelper::getFromUnoTunnel<Submission>( mxSubmissions->getItem( sID ) ); OSL_ENSURE( pSubmission != nullptr, "no submission?" ); OSL_ENSURE( pSubmission->getModel() == Reference<XModel>( this ), "wrong model" ); diff --git a/forms/source/xforms/model_helper.hxx b/forms/source/xforms/model_helper.hxx index 6e0c90a07fd8..d8e98c98ec26 100644 --- a/forms/source/xforms/model_helper.hxx +++ b/forms/source/xforms/model_helper.hxx @@ -56,20 +56,20 @@ public: virtual bool isValid( const T& t ) const override { - return comphelper::getUnoTunnelImplementation<Binding>( t ) != nullptr; + return comphelper::getFromUnoTunnel<Binding>( t ) != nullptr; } protected: virtual void _insert( const T& t ) override { - auto pBinding = comphelper::getUnoTunnelImplementation<Binding>( t ); + auto pBinding = comphelper::getFromUnoTunnel<Binding>( t ); OSL_ENSURE( pBinding != nullptr, "invalid item?" ); pBinding->_setModel( css::uno::Reference<css::xforms::XModel>( mpModel ) ); } virtual void _remove( const T& t ) override { - auto pBinding = comphelper::getUnoTunnelImplementation<Binding>( t ); + auto pBinding = comphelper::getFromUnoTunnel<Binding>( t ); OSL_ENSURE( pBinding != nullptr, "invalid item?" ); pBinding->_setModel( css::uno::Reference<css::xforms::XModel>() ); } @@ -84,20 +84,20 @@ public: virtual bool isValid( const T& t ) const override { - return comphelper::getUnoTunnelImplementation<Submission>( t ) != nullptr; + return comphelper::getFromUnoTunnel<Submission>( t ) != nullptr; } protected: virtual void _insert( const T& t ) override { - auto pSubmission = comphelper::getUnoTunnelImplementation<Submission>( t ); + auto pSubmission = comphelper::getFromUnoTunnel<Submission>( t ); OSL_ENSURE( pSubmission != nullptr, "invalid item?" ); pSubmission->setModel( css::uno::Reference<css::xforms::XModel>( mpModel ) ); } virtual void _remove( const T& t ) override { - auto pSubmission = comphelper::getUnoTunnelImplementation<Submission>( t ); + auto pSubmission = comphelper::getFromUnoTunnel<Submission>( t ); OSL_ENSURE( pSubmission != nullptr, "invalid item?" ); pSubmission->setModel( css::uno::Reference<css::xforms::XModel>( ) ); } diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index 7f39a9f6ed99..890e18ea73ae 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -380,7 +380,7 @@ css::uno::Reference< ::css::beans::XPropertySet > Model::cloneBindingAsGhost( co void Model::removeBindingIfUseless( const css::uno::Reference< ::css::beans::XPropertySet >& xBinding ) { - Binding* pBinding = comphelper::getUnoTunnelImplementation<Binding>( xBinding ); + Binding* pBinding = comphelper::getFromUnoTunnel<Binding>( xBinding ); if( pBinding != nullptr ) { if( ! pBinding->isUseful() ) @@ -652,7 +652,7 @@ css::uno::Reference<css::xml::dom::XNode> Model::renameNode( const css::uno::Ref getDefaultBindingExpressionForNode( xNew ); for( sal_Int32 n = 0; n < mxBindings->countItems(); n++ ) { - Binding* pBinding = comphelper::getUnoTunnelImplementation<Binding>( + Binding* pBinding = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( n ) ); if( pBinding->getBindingExpression() @@ -679,7 +679,7 @@ css::uno::Reference< ::css::beans::XPropertySet > Model::getBindingForNode( cons for( sal_Int32 n = 0; n < mxBindings->countItems(); n++ ) { - Binding* pBinding = comphelper::getUnoTunnelImplementation<Binding>( + Binding* pBinding = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( n ) ); OSL_ENSURE( pBinding != nullptr, "no binding?" ); @@ -862,7 +862,7 @@ OUString Model::getResultForExpression( sal_Bool bIsBindingExpression, const OUString& sExpression ) { - Binding* pBinding = comphelper::getUnoTunnelImplementation<Binding>( xBinding ); + Binding* pBinding = comphelper::getFromUnoTunnel<Binding>( xBinding ); if( pBinding == nullptr ) throw RuntimeException(); diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx index c8b28fc0c135..64d2e59524e9 100644 --- a/forms/source/xforms/submission.cxx +++ b/forms/source/xforms/submission.cxx @@ -192,7 +192,7 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler ) ComputedExpression aExpression; if( !msBind.isEmpty() ) { - Binding* pBinding = comphelper::getUnoTunnelImplementation<Binding>( mxModel->getBinding(msBind) ); + Binding* pBinding = comphelper::getFromUnoTunnel<Binding>( mxModel->getBinding(msBind) ); if( pBinding != nullptr ) { aExpression.setExpression( pBinding->getBindingExpression() ); @@ -203,12 +203,12 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler ) else if( !maRef.getExpression().isEmpty() ) { aExpression.setExpression( maRef.getExpression() ); - aEvalContext = comphelper::getUnoTunnelImplementation<Model>( mxModel )->getEvaluationContext(); + aEvalContext = comphelper::getFromUnoTunnel<Model>( mxModel )->getEvaluationContext(); } else { aExpression.setExpression( "/" ); - aEvalContext = comphelper::getUnoTunnelImplementation<Model>( mxModel )->getEvaluationContext(); + aEvalContext = comphelper::getFromUnoTunnel<Model>( mxModel )->getEvaluationContext(); } aExpression.evaluate( aEvalContext ); Reference<XXPathObject> xResult = aExpression.getXPath(); @@ -273,7 +273,7 @@ Model* Submission::getModelImpl() const { Model* pModel = nullptr; if( mxModel.is() ) - pModel = comphelper::getUnoTunnelImplementation<Model>( mxModel ); + pModel = comphelper::getFromUnoTunnel<Model>( mxModel ); return pModel; } @@ -391,7 +391,7 @@ void SAL_CALL Submission::submitWithInteraction( *this ); - Model* pModel = comphelper::getUnoTunnelImplementation<Model>( xModel ); + Model* pModel = comphelper::getFromUnoTunnel<Model>( xModel ); OSL_ENSURE( pModel != nullptr, "illegal model?" ); // #i36765# #i47248# warning on submission of illegal data diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx index a137a5f8c6b1..8c39d7ee763d 100644 --- a/framework/source/fwi/uielement/constitemcontainer.cxx +++ b/framework/source/fwi/uielement/constitemcontainer.cxx @@ -147,7 +147,7 @@ Reference< XIndexAccess > ConstItemContainer::deepCopyContainer( const Reference Reference< XIndexAccess > xReturn; if ( rSubContainer.is() ) { - ItemContainer* pSource = comphelper::getUnoTunnelImplementation<ItemContainer>( rSubContainer ); + ItemContainer* pSource = comphelper::getFromUnoTunnel<ItemContainer>( rSubContainer ); rtl::Reference<ConstItemContainer> pSubContainer; if ( pSource ) pSubContainer = new ConstItemContainer( *pSource ); @@ -162,7 +162,7 @@ Reference< XIndexAccess > ConstItemContainer::deepCopyContainer( const Reference // XUnoTunnel sal_Int64 ConstItemContainer::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) { - if( isUnoTunnelId<ConstItemContainer>(rIdentifier) ) + if( comphelper::isUnoTunnelId<ConstItemContainer>(rIdentifier) ) { return reinterpret_cast< sal_Int64 >( this ); } @@ -171,7 +171,7 @@ sal_Int64 ConstItemContainer::getSomething( const css::uno::Sequence< sal_Int8 > const Sequence< sal_Int8 >& ConstItemContainer::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theConstItemContainerUnoTunnelId; + static const comphelper::UnoIdInit theConstItemContainerUnoTunnelId; return theConstItemContainerUnoTunnelId.getSeq(); } diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx index b30791b3067f..1f690452aee2 100644 --- a/framework/source/fwi/uielement/itemcontainer.cxx +++ b/framework/source/fwi/uielement/itemcontainer.cxx @@ -122,7 +122,7 @@ Reference< XIndexAccess > ItemContainer::deepCopyContainer( const Reference< XIn Reference< XIndexAccess > xReturn; if ( rSubContainer.is() ) { - ConstItemContainer* pSource = comphelper::getUnoTunnelImplementation<ConstItemContainer>( rSubContainer ); + ConstItemContainer* pSource = comphelper::getFromUnoTunnel<ConstItemContainer>( rSubContainer ); rtl::Reference<ItemContainer> pSubContainer; if ( pSource ) pSubContainer = new ItemContainer( *pSource, rMutex ); @@ -136,7 +136,7 @@ Reference< XIndexAccess > ItemContainer::deepCopyContainer( const Reference< XIn const Sequence< sal_Int8 >& ItemContainer::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theItemContainerUnoTunnelId; + static const comphelper::UnoIdInit theItemContainerUnoTunnelId; return theItemContainerUnoTunnelId.getSeq(); } diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index af754788de8a..2dacda65fe3b 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -126,7 +126,7 @@ Reference< XIndexAccess > RootItemContainer::deepCopyContainer( const Reference< Reference< XIndexAccess > xReturn; if ( rSubContainer.is() ) { - ConstItemContainer* pSource = comphelper::getUnoTunnelImplementation<ConstItemContainer>( rSubContainer ); + ConstItemContainer* pSource = comphelper::getFromUnoTunnel<ConstItemContainer>( rSubContainer ); rtl::Reference<ItemContainer> pSubContainer; if ( pSource ) pSubContainer = new ItemContainer( *pSource, m_aShareMutex ); @@ -141,14 +141,14 @@ Reference< XIndexAccess > RootItemContainer::deepCopyContainer( const Reference< // XUnoTunnel sal_Int64 RootItemContainer::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) { - if( isUnoTunnelId<RootItemContainer>(rIdentifier) ) + if( comphelper::isUnoTunnelId<RootItemContainer>(rIdentifier) ) return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); return 0; } const Sequence< sal_Int8 >& RootItemContainer::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theRootItemContainerUnoTunnelId; + static const comphelper::UnoIdInit theRootItemContainerUnoTunnelId; return theRootItemContainerUnoTunnelId.getSeq(); } diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 3b0de8bdca71..788e0796c8df 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -179,7 +179,7 @@ void LayoutManager::implts_createMenuBar(const OUString& rMenuBarName) if ( !xMenuBar.is() ) return; - VCLXMenu* pAwtMenuBar = comphelper::getUnoTunnelImplementation<VCLXMenu>( xMenuBar ); + VCLXMenu* pAwtMenuBar = comphelper::getFromUnoTunnel<VCLXMenu>( xMenuBar ); if ( pAwtMenuBar ) { MenuBar* pMenuBar = static_cast<MenuBar*>(pAwtMenuBar->GetMenu()); @@ -227,7 +227,7 @@ void LayoutManager::impl_clearUpMenuBar() } } - VCLXMenu* pAwtMenuBar = comphelper::getUnoTunnelImplementation<VCLXMenu>( xMenuBar ); + VCLXMenu* pAwtMenuBar = comphelper::getFromUnoTunnel<VCLXMenu>( xMenuBar ); if ( pAwtMenuBar ) pSetMenuBar = static_cast<MenuBar*>(pAwtMenuBar->GetMenu()); } diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 889b90cae936..ef141701cb6c 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -424,7 +424,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement { MenuConfiguration aMenuCfg( m_xContext ); Reference< XIndexAccess > xContainer( aMenuCfg.CreateMenuBarConfigurationFromXML( xInputStream )); - auto pRootItemContainer = comphelper::getUnoTunnelImplementation<RootItemContainer>( xContainer ); + auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xContainer ); if ( pRootItemContainer ) aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); else @@ -443,7 +443,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement { Reference< XIndexContainer > xIndexContainer( new RootItemContainer() ); ToolBoxConfiguration::LoadToolBox( m_xContext, xInputStream, xIndexContainer ); - auto pRootItemContainer = comphelper::getUnoTunnelImplementation<RootItemContainer>( xIndexContainer ); + auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xIndexContainer ); aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); return; } @@ -460,7 +460,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement { Reference< XIndexContainer > xIndexContainer( new RootItemContainer() ); StatusBarConfiguration::LoadStatusBar( m_xContext, xInputStream, xIndexContainer ); - auto pRootItemContainer = comphelper::getUnoTunnelImplementation<RootItemContainer>( xIndexContainer ); + auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xIndexContainer ); aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); return; } diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index b1dd9b24f37b..eebfad2fb5a7 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -347,7 +347,7 @@ void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, { MenuConfiguration aMenuCfg( m_xContext ); Reference< XIndexAccess > xContainer( aMenuCfg.CreateMenuBarConfigurationFromXML( xInputStream )); - auto pRootItemContainer = comphelper::getUnoTunnelImplementation<RootItemContainer>( xContainer ); + auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xContainer ); if ( pRootItemContainer ) aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); else @@ -366,7 +366,7 @@ void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, { Reference< XIndexContainer > xIndexContainer( new RootItemContainer() ); ToolBoxConfiguration::LoadToolBox( m_xContext, xInputStream, xIndexContainer ); - auto pRootItemContainer = comphelper::getUnoTunnelImplementation<RootItemContainer>( xIndexContainer ); + auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xIndexContainer ); aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); return; } @@ -383,7 +383,7 @@ void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, { Reference< XIndexContainer > xIndexContainer( new RootItemContainer() ); StatusBarConfiguration::LoadStatusBar( m_xContext, xInputStream, xIndexContainer ); - auto pRootItemContainer = comphelper::getUnoTunnelImplementation<RootItemContainer>( xIndexContainer ); + auto pRootItemContainer = comphelper::getFromUnoTunnel<RootItemContainer>( xIndexContainer ); aUIElementData.xSettings = new ConstItemContainer( pRootItemContainer, true ); return; } diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx index 0e3466992ab7..0ddfb458f7e0 100644 --- a/framework/source/uielement/fontmenucontroller.cxx +++ b/framework/source/uielement/fontmenucontroller.cxx @@ -85,7 +85,7 @@ FontMenuController::~FontMenuController() // private function void FontMenuController::fillPopupMenu( const Sequence< OUString >& rFontNameSeq, Reference< css::awt::XPopupMenu > const & rPopupMenu ) { - VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 684128d8008f..4a70e0ab2e5f 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -129,7 +129,7 @@ void FontSizeMenuController::setCurHeight( tools::Long nHeight, Reference< css:: // private function void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu ) { - VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; resetPopupMenu( rPopupMenu ); diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index f0c443b299c2..2851295c7c0a 100644 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -80,7 +80,7 @@ HeaderMenuController::~HeaderMenuController() // private function void HeaderMenuController::fillPopupMenu( const Reference< css::frame::XModel >& rModel, Reference< css::awt::XPopupMenu > const & rPopupMenu ) { - VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index d9458a895788..09ce859f43db 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -159,7 +159,7 @@ void LanguageSelectionMenuController::impl_setPopupMenu() void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu , const Mode eMode ) { - VCLXPopupMenu* pVCLPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( rPopupMenu )); + VCLXPopupMenu* pVCLPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( rPopupMenu )); PopupMenu* pPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index 89f3b32a86ac..a4c5123f50c7 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -74,7 +74,7 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > cons if (bMacrosDisabled) return; - VCLXPopupMenu* pVCLPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( rPopupMenu )); + VCLXPopupMenu* pVCLPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( rPopupMenu )); PopupMenu* pPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index b6636330899b..1e6d88e9c286 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -305,7 +305,7 @@ NewMenuController::~NewMenuController() // private function void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu ) { - VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; @@ -388,7 +388,7 @@ void SAL_CALL NewMenuController::itemSelected( const css::awt::MenuEvent& rEvent if ( !xPopupMenu.is() ) return; - VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( xPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( xPopupMenu )); if ( !pPopupMenu ) return; @@ -418,7 +418,7 @@ void SAL_CALL NewMenuController::itemActivated( const css::awt::MenuEvent& ) if ( !(m_xFrame.is() && m_xPopupMenu.is()) ) return; - VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu )); if ( !pPopupMenu ) return; diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx index 74c3b2436602..7300eab60030 100644 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -81,7 +81,7 @@ ObjectMenuController::ObjectMenuController( const css::uno::Reference< css::uno: void ObjectMenuController::fillPopupMenu( const Sequence< css::embed::VerbDescriptor >& rVerbCommandSeq, Reference< css::awt::XPopupMenu > const & rPopupMenu ) { const css::embed::VerbDescriptor* pVerbCommandArray = rVerbCommandSeq.getConstArray(); - VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index 7048778029e4..d4f702d84e50 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -352,7 +352,7 @@ void GenericPopupToolbarController::statusChanged( const css::frame::FeatureStat if ( m_bReplaceWithLast && !rEvent.IsEnabled && m_xPopupMenu.is() ) { - Menu* pVclMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu )->GetMenu(); + Menu* pVclMenu = comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu )->GetMenu(); ToolBox* pToolBox = nullptr; ToolBoxItemId nId; @@ -695,7 +695,7 @@ void SAL_CALL NewToolbarController::execute( sal_Int16 /*KeyModifier*/ ) { // TODO investigate how to wrap Get/SetUserValue in css::awt::XMenu SolarMutexGuard aSolarMutexGuard; - Menu* pVclMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu )->GetMenu(); + Menu* pVclMenu = comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu )->GetMenu(); aURL = pVclMenu->GetItemCommand( m_nMenuId ); MenuAttributes* pMenuAttributes( static_cast<MenuAttributes*>( pVclMenu->GetUserValue( m_nMenuId ) ) ); @@ -724,7 +724,7 @@ sal_uInt16 NewToolbarController::getMenuIdForCommand( std::u16string_view rComma { if ( m_xPopupMenu.is() && !rCommand.empty() ) { - Menu* pVclMenu( comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu )->GetMenu() ); + Menu* pVclMenu( comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu )->GetMenu() ); sal_uInt16 nCount = pVclMenu->GetItemCount(); for ( sal_uInt16 n = 0; n < nCount; ++n ) { @@ -751,7 +751,7 @@ void SAL_CALL NewToolbarController::updateImage() OUString aURL, aImageId; if ( m_xPopupMenu.is() && m_nMenuId ) { - Menu* pVclMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu )->GetMenu(); + Menu* pVclMenu = comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu )->GetMenu(); aURL = pVclMenu->GetItemCommand( m_nMenuId ); MenuAttributes* pMenuAttributes( static_cast<MenuAttributes*>( pVclMenu->GetUserValue( m_nMenuId ) ) ); diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 9bf31b03c16c..87701f8b9ba6 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -118,7 +118,7 @@ RecentFilesMenuController::RecentFilesMenuController( const uno::Reference< uno: // private function void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > const & rPopupMenu ) { - VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( rPopupMenu )); PopupMenu* pVCLPopupMenu = nullptr; SolarMutexGuard aSolarMutexGuard; diff --git a/framework/source/uielement/resourcemenucontroller.cxx b/framework/source/uielement/resourcemenucontroller.cxx index 81bacc75ae70..6e83ca846977 100644 --- a/framework/source/uielement/resourcemenucontroller.cxx +++ b/framework/source/uielement/resourcemenucontroller.cxx @@ -225,7 +225,7 @@ void ResourceMenuController::updatePopupMenu() m_nNewMenuId = 1; // Now fill the menu with the configuration data. - framework::MenuBarManager::FillMenu( m_nNewMenuId, comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu )->GetMenu(), m_aModuleName, m_xMenuContainer, m_xDispatchProvider ); + framework::MenuBarManager::FillMenu( m_nNewMenuId, comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu )->GetMenu(), m_aModuleName, m_xMenuContainer, m_xDispatchProvider ); // For context menus, add object verbs. if ( !m_bContextMenu ) @@ -259,7 +259,7 @@ void ResourceMenuController::addVerbs( const css::uno::Sequence< css::embed::Ver xStorable.set( xController->getModel(), css::uno::UNO_QUERY ); bool bReadOnly = xStorable.is() && xStorable->isReadonly(); - VCLXMenu* pAwtMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu ); + VCLXMenu* pAwtMenu = comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu ); Menu* pVCLMenu = pAwtMenu->GetMenu(); for ( const auto& rVerb : rVerbs ) @@ -279,7 +279,7 @@ void ResourceMenuController::itemActivated( const css::awt::MenuEvent& /*rEvent* // Must initialize MenuBarManager here, because we want to let the app do context menu interception before. if ( !m_xMenuBarManager.is() ) { - VCLXMenu* pAwtMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu ); + VCLXMenu* pAwtMenu = comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu ); m_xMenuBarManager.set( new framework::MenuBarManager( m_xContext, m_xFrame, m_xURLTransformer, m_xDispatchProvider, m_aModuleName, pAwtMenu->GetMenu(), false, !m_bContextMenu && !m_bInToolbar ) ); m_xFrame->addFrameActionListener( m_xMenuBarManager ); @@ -387,7 +387,7 @@ SaveAsMenuController::SaveAsMenuController( const css::uno::Reference< css::uno: void SaveAsMenuController::impl_setPopupMenu() { - VCLXMenu* pPopupMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu ); + VCLXMenu* pPopupMenu = comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu ); Menu* pVCLPopupMenu = nullptr; SolarMutexGuard aGuard; @@ -475,7 +475,7 @@ void WindowListMenuController::itemActivated( const css::awt::MenuEvent& rEvent { SolarMutexGuard g; - VCLXMenu* pAwtMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu ); + VCLXMenu* pAwtMenu = comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu ); Menu* pVCLMenu = pAwtMenu->GetMenu(); int nItemCount = pVCLMenu->GetItemCount(); diff --git a/framework/source/uielement/thesaurusmenucontroller.cxx b/framework/source/uielement/thesaurusmenucontroller.cxx index 492da8593ac2..85500186c835 100644 --- a/framework/source/uielement/thesaurusmenucontroller.cxx +++ b/framework/source/uielement/thesaurusmenucontroller.cxx @@ -81,7 +81,7 @@ void ThesaurusMenuController::fillPopupMenu() css::lang::Locale aLocale = LanguageTag::convertToLocale( aIsoLang ); getMeanings( aSynonyms, aText, aLocale, 7 /*max number of synonyms to retrieve*/ ); - VCLXMenu* pAwtMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu ); + VCLXMenu* pAwtMenu = comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu ); Menu* pVCLMenu = pAwtMenu->GetMenu(); pVCLMenu->SetMenuFlags( MenuFlags::NoAutoMnemonics ); if ( aSynonyms.empty() ) diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx index 296db7c1bf20..653f0c5a6cca 100644 --- a/framework/source/uielement/toolbarmodemenucontroller.cxx +++ b/framework/source/uielement/toolbarmodemenucontroller.cxx @@ -183,7 +183,7 @@ void SAL_CALL ToolbarModeMenuController::statusChanged( const FeatureStateEvent& return; SolarMutexGuard aGuard; - VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( xPopupMenu )); + VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( xPopupMenu )); PopupMenu* pVCLPopupMenu = pXPopupMenu ? static_cast<PopupMenu *>(pXPopupMenu->GetMenu()) : nullptr; SAL_WARN_IF(!pVCLPopupMenu, "fwk.uielement", "worrying lack of popup menu"); diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 33f896781696..7806acb53443 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -190,7 +190,7 @@ void ToolbarsMenuController::addCommand( if ( rSettings.GetUseImagesInMenus() ) aImage = vcl::CommandInfoProvider::GetImageForCommand(rCommandURL, m_xFrame); - VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( rPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( rPopupMenu )); if ( pPopupMenu ) { PopupMenu* pVCLPopupMenu = static_cast<PopupMenu *>(pPopupMenu->GetMenu()); @@ -404,7 +404,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co { SolarMutexGuard aGuard; - VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu )); + VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu )); PopupMenu* pVCLPopupMenu = pXPopupMenu ? static_cast<PopupMenu *>(pXPopupMenu->GetMenu()) : nullptr; assert(pVCLPopupMenu); if (pVCLPopupMenu) @@ -498,7 +498,7 @@ void SAL_CALL ToolbarsMenuController::statusChanged( const FeatureStateEvent& Ev return; SolarMutexGuard aGuard; - VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( xPopupMenu )); + VCLXPopupMenu* pXPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( xPopupMenu )); PopupMenu* pVCLPopupMenu = pXPopupMenu ? static_cast<PopupMenu *>(pXPopupMenu->GetMenu()) : nullptr; SAL_WARN_IF(!pVCLPopupMenu, "fwk.uielement", "worrying lack of popup menu"); @@ -557,7 +557,7 @@ void SAL_CALL ToolbarsMenuController::itemSelected( const css::awt::MenuEvent& r if ( !xPopupMenu.is() ) return; - VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getUnoTunnelImplementation<VCLXMenu>( xPopupMenu )); + VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( xPopupMenu )); if ( !pPopupMenu ) return; diff --git a/include/comphelper/servicehelper.hxx b/include/comphelper/servicehelper.hxx index 8be9ee975178..fa906075e1b6 100644 --- a/include/comphelper/servicehelper.hxx +++ b/include/comphelper/servicehelper.hxx @@ -25,37 +25,89 @@ #include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/uno/Sequence.hxx> -class UnoTunnelIdInit -{ -private: - css::uno::Sequence< sal_Int8 > m_aSeq; -public: - UnoTunnelIdInit() : m_aSeq(16) +#include <type_traits> + +namespace comphelper { + + // Class incapsulating UIDs used as e.g. tunnel IDs for css::lang::XUnoTunnel, + // or implementation IDs for css::lang::XTypeProvider + class UnoIdInit { - rtl_createUuid( reinterpret_cast<sal_uInt8*>(m_aSeq.getArray()), nullptr, true ); + private: + css::uno::Sequence< sal_Int8 > m_aSeq; + public: + UnoIdInit() : m_aSeq(16) + { + rtl_createUuid(reinterpret_cast<sal_uInt8*>(m_aSeq.getArray()), nullptr, true); + } + const css::uno::Sequence< sal_Int8 >& getSeq() const { return m_aSeq; } + }; + + inline sal_Int64 getSomething_cast(void* p) + { + return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(p)); } - const css::uno::Sequence< sal_Int8 >& getSeq() const { return m_aSeq; } -}; -namespace comphelper { + template<class T> inline T* getSomething_cast(sal_Int64 n) + { + return reinterpret_cast<T*>(sal::static_int_cast<sal_IntPtr>(n)); + } - template<class T> - T* getUnoTunnelImplementation( const css::uno::Reference< css::uno::XInterface >& xIface ) + template <class T> T* getFromUnoTunnel(const css::uno::Reference<css::lang::XUnoTunnel>& xUT) { - css::uno::Reference< css::lang::XUnoTunnel > xUT( xIface, css::uno::UNO_QUERY ); if (!xUT.is()) return nullptr; - return reinterpret_cast<T*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething( T::getUnoTunnelId() ))); + return getSomething_cast<T>(xUT->getSomething(T::getUnoTunnelId())); } -} + // Takes an interface + template <class T> T* getFromUnoTunnel(const css::uno::Reference<css::uno::XInterface>& xIface) + { + return getFromUnoTunnel<T>( + css::uno::Reference<css::lang::XUnoTunnel>{ xIface, css::uno::UNO_QUERY }); + } + + // Takes an Any + template <class T> T* getFromUnoTunnel(const css::uno::Any& rAny) + { + // For unclear reason, using a Reference ctor taking an Any + // gives different results compared to use of operator >>=. + css::uno::Reference<css::lang::XUnoTunnel> xUnoTunnel; + rAny >>= xUnoTunnel; + return getFromUnoTunnel<T>(xUnoTunnel); + } + + template <typename T> + inline bool isUnoTunnelId(const css::uno::Sequence< sal_Int8 >& rId) + { + return rId.getLength() == 16 + && memcmp(T::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0; + } + + template <class Base> struct FallbackToGetSomethingOf + { + static sal_Int64 get(const css::uno::Sequence<sal_Int8>& rId, Base* p) + { + return p->Base::getSomething(rId); + } + }; + + template <> struct FallbackToGetSomethingOf<void> + { + static sal_Int64 get(const css::uno::Sequence<sal_Int8>&, void*) { return 0; } + }; + + template <class T, class Base = void> + sal_Int64 getSomethingImpl(const css::uno::Sequence<sal_Int8>& rId, T* pThis, + FallbackToGetSomethingOf<Base> = {}) + { + if (isUnoTunnelId<T>(rId)) + return getSomething_cast(pThis); + + return FallbackToGetSomethingOf<Base>::get(rId, pThis); + } -template <typename T> -inline bool isUnoTunnelId(const css::uno::Sequence< sal_Int8 >& rId) -{ - return rId.getLength() == 16 - && memcmp( T::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) == 0; } /** the UNO3_GETIMPLEMENTATION_* macros implement a static helper function @@ -63,7 +115,7 @@ inline bool isUnoTunnelId(const css::uno::Sequence< sal_Int8 >& rId) if possible. Example: - MyClass* pClass = comphelper::getUnoTunnelImplementation<MyClass>( xRef ); + MyClass* pClass = comphelper::getFromUnoTunnel<MyClass>( xRef ); Usage: Put a UNO3_GETIMPLEMENTATION_DECL( classname ) inside your class @@ -79,7 +131,7 @@ inline bool isUnoTunnelId(const css::uno::Sequence< sal_Int8 >& rId) #define UNO3_GETIMPLEMENTATION_BASE_IMPL( classname ) \ const css::uno::Sequence< sal_Int8 > & classname::getUnoTunnelId() noexcept \ { \ - static const UnoTunnelIdInit aId; \ + static const comphelper::UnoIdInit aId; \ return aId.getSeq(); \ } @@ -87,25 +139,14 @@ const css::uno::Sequence< sal_Int8 > & classname::getUnoTunnelId() noexcept \ UNO3_GETIMPLEMENTATION_BASE_IMPL(classname)\ sal_Int64 SAL_CALL classname::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) \ { \ - if( isUnoTunnelId<classname>(rId) ) \ - { \ - return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); \ - } \ - return 0; \ + return comphelper::getSomethingImpl(rId, this); \ } #define UNO3_GETIMPLEMENTATION2_IMPL( classname, baseclass )\ UNO3_GETIMPLEMENTATION_BASE_IMPL(classname)\ sal_Int64 SAL_CALL classname::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) \ { \ - if( isUnoTunnelId<classname>(rId) ) \ - { \ - return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); \ - } \ - else \ - { \ - return baseclass::getSomething( rId ); \ - } \ + return comphelper::getSomethingImpl(rId, this, comphelper::FallbackToGetSomethingOf<baseclass>{}); \ } diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 5229fef8188d..0e905ee7ba15 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -4671,7 +4671,7 @@ OUString ChartExport::getNumberFormatCode(sal_Int32 nKey) const OUString aCode("General"); // init with fallback uno::Reference<util::XNumberFormatsSupplier> xNumberFormatsSupplier(mxChartModel, uno::UNO_QUERY_THROW); - SvNumberFormatsSupplierObj* pSupplierObj = comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>( xNumberFormatsSupplier); + SvNumberFormatsSupplierObj* pSupplierObj = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( xNumberFormatsSupplier); if (!pSupplierObj) return aCode; diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 527dcbe203dd..a64413ae4e11 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -1683,7 +1683,7 @@ Sequence< sal_Int8 > ZipPackage::getUnoTunnelId() sal_Int64 SAL_CALL ZipPackage::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier ) { - if ( isUnoTunnelId<ZipPackage>(aIdentifier) ) + if ( comphelper::isUnoTunnelId<ZipPackage>(aIdentifier) ) return reinterpret_cast < sal_Int64 > ( this ); return 0; } diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index 838bed728069..8733fc5c6ac6 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -345,7 +345,7 @@ void ZipPackageFolder::saveContents( sal_Int64 SAL_CALL ZipPackageFolder::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier ) { sal_Int64 nMe = 0; - if ( isUnoTunnelId<ZipPackageFolder>(aIdentifier) ) + if ( comphelper::isUnoTunnelId<ZipPackageFolder>(aIdentifier) ) nMe = reinterpret_cast < sal_Int64 > ( this ); return nMe; } diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 2077e2f9a77a..13c5758107a8 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -1108,7 +1108,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getPlainRawStream( sal_Int64 SAL_CALL ZipPackageStream::getSomething( const Sequence< sal_Int8 >& aIdentifier ) { sal_Int64 nMe = 0; - if ( isUnoTunnelId<ZipPackageStream>(aIdentifier) ) + if ( comphelper::isUnoTunnelId<ZipPackageStream>(aIdentifier) ) nMe = reinterpret_cast < sal_Int64 > ( this ); return nMe; } diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index 60bb6b3f5f92..a177be410c79 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -1692,7 +1692,7 @@ PyRef PyUNO_new ( xInvocation.set( ssf->createInstanceWithArguments( Sequence<Any>( &targetInterface, 1 ) ), css::uno::UNO_QUERY_THROW ); - auto that = comphelper::getUnoTunnelImplementation<Adapter>( + auto that = comphelper::getFromUnoTunnel<Adapter>( xInvocation->getIntrospection()->queryAdapter(cppu::UnoType<XUnoTunnel>::get())); if( that ) return that->getWrappedObject(); diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx index 53e012a8e78f..a6d10da1d779 100644 --- a/pyuno/source/module/pyuno_adapter.cxx +++ b/pyuno/source/module/pyuno_adapter.cxx @@ -75,7 +75,7 @@ Sequence<sal_Int8> Adapter::getUnoTunnelId() sal_Int64 Adapter::getSomething( const Sequence< sal_Int8 > &id) { - if (isUnoTunnelId<Adapter>(id)) + if (comphelper::isUnoTunnelId<Adapter>(id)) return reinterpret_cast<sal_Int64>(this); return 0; } diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 10257a8ef69e..8c14bc0d2953 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -809,7 +809,7 @@ Any Runtime::pyObject2Any(const PyRef & source, enum ConversionMode mode) const if( adapterObject.is() ) { // object got already bridged ! - auto pAdapter = comphelper::getUnoTunnelImplementation<Adapter>(adapterObject); + auto pAdapter = comphelper::getFromUnoTunnel<Adapter>(adapterObject); mappedObject = impl->cargo->xAdapterFactory->createAdapter( adapterObject, pAdapter->getWrappedTypes() ); diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 6515672d7d5b..34b1140b0a9d 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -1937,7 +1937,7 @@ uno::Sequence< OUString > SAL_CALL OReportDefinition::getAvailableMimeTypes( ) sal_Int64 SAL_CALL OReportDefinition::getSomething( const uno::Sequence< sal_Int8 >& rId ) { sal_Int64 nRet = 0; - if (isUnoTunnelId<OReportDefinition>(rId) ) + if (comphelper::isUnoTunnelId<OReportDefinition>(rId) ) nRet = reinterpret_cast<sal_Int64>(this); else { @@ -1978,7 +1978,7 @@ uno::Reference< uno::XComponentContext > OReportDefinition::getContext() std::shared_ptr<rptui::OReportModel> OReportDefinition::getSdrModel(const uno::Reference< report::XReportDefinition >& _xReportDefinition) { std::shared_ptr<rptui::OReportModel> pReportModel; - auto pReportDefinition = comphelper::getUnoTunnelImplementation<OReportDefinition>(_xReportDefinition); + auto pReportDefinition = comphelper::getFromUnoTunnel<OReportDefinition>(_xReportDefinition); if (pReportDefinition) pReportModel = pReportDefinition->m_pImpl->m_pReportModel; return pReportModel; diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx index 4744eff5cfa2..73dcd20a1b6a 100644 --- a/reportdesign/source/core/api/Section.cxx +++ b/reportdesign/source/core/api/Section.cxx @@ -566,7 +566,7 @@ sal_Bool SAL_CALL OSection::hasForms() sal_Int64 OSection::getSomething( const uno::Sequence< sal_Int8 > & rId ) { - if (isUnoTunnelId<OSection>(rId) ) + if (comphelper::isUnoTunnelId<OSection>(rId) ) return reinterpret_cast<sal_Int64>(this); return (m_xDrawPage_Tunnel.is()) ? m_xDrawPage_Tunnel->getSomething(rId) : 0; } diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index 731ac9c8911c..cdcb355e7729 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -426,7 +426,7 @@ void OObjectBase::ensureSdrObjectOwnership( const uno::Reference< uno::XInterfac // which are removed from it, which is deadly for us. To prevent this, // we give the XShape implementation the ownership of the SdrObject, which // ensures the SvxDrawPage won't delete it. - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( _rxShape ); + SvxShape* pShape = comphelper::getFromUnoTunnel<SvxShape>( _rxShape ); OSL_ENSURE( pShape, "OObjectBase::ensureSdrObjectOwnership: can't access the SvxShape!" ); if ( pShape ) { diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx index 0b856322796c..d774f37100a1 100644 --- a/reportdesign/source/core/sdr/RptPage.cxx +++ b/reportdesign/source/core/sdr/RptPage.cxx @@ -91,7 +91,7 @@ SdrObject* OReportPage::RemoveObject(size_t nObjNum) } // this code is evil, but what else shall I do - reportdesign::OSection* pSection = comphelper::getUnoTunnelImplementation<reportdesign::OSection>(m_xSection); + reportdesign::OSection* pSection = comphelper::getFromUnoTunnel<reportdesign::OSection>(m_xSection); uno::Reference< drawing::XShape> xShape(pObj->getUnoShape(),uno::UNO_QUERY); pSection->notifyElementRemoved(xShape); if (dynamic_cast< const OUnoObject *>( pObj ) != nullptr) @@ -175,7 +175,7 @@ void OReportPage::NbcInsertObject(SdrObject* pObj, size_t nPos) } // this code is evil, but what else shall I do - reportdesign::OSection* pSection = comphelper::getUnoTunnelImplementation<reportdesign::OSection>(m_xSection); + reportdesign::OSection* pSection = comphelper::getFromUnoTunnel<reportdesign::OSection>(m_xSection); uno::Reference< drawing::XShape> xShape(pObj->getUnoShape(),uno::UNO_QUERY); pSection->notifyElementAdded(xShape); diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx index 21332691bfb7..5086bc1f92c1 100644 --- a/reportdesign/source/core/sdr/UndoActions.cxx +++ b/reportdesign/source/core/sdr/UndoActions.cxx @@ -119,7 +119,7 @@ OUndoContainerAction::~OUndoContainerAction() rEnv.RemoveElement( m_xOwnElement ); #if OSL_DEBUG_LEVEL > 0 - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xChild ); + SvxShape* pShape = comphelper::getFromUnoTunnel<SvxShape>( xChild ); SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr; OSL_ENSURE( pObject == nullptr || (pShape->HasSdrObjectOwnership() && !pObject->IsInserted()), "OUndoContainerAction::~OUndoContainerAction: inconsistency in the shape/object ownership!" ); diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index 19fdbbc119a9..ec1796a56db1 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -58,7 +58,7 @@ OUString lcl_createAttribute(const xmloff::token::XMLTokenEnum& _eNamespace,cons static void lcl_correctCellAddress(const OUString & _sName, const uno::Reference< xml::sax::XAttributeList > & xAttribs) { - SvXMLAttributeList* pList = comphelper::getUnoTunnelImplementation<SvXMLAttributeList>(xAttribs); + SvXMLAttributeList* pList = comphelper::getFromUnoTunnel<SvXMLAttributeList>(xAttribs); OUString sCellAddress = pList->getValueByName(_sName); const sal_Int32 nPos = sCellAddress.lastIndexOf('$'); if ( nPos != -1 ) @@ -186,7 +186,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const bExport = false; else if ( _sName == "chart:plot-area" ) { - SvXMLAttributeList* pList = comphelper::getUnoTunnelImplementation<SvXMLAttributeList>(xAttribs); + SvXMLAttributeList* pList = comphelper::getFromUnoTunnel<SvXMLAttributeList>(xAttribs); pList->RemoveAttribute("table:cell-range-address"); } else if ( _sName == "chart:categories" ) @@ -201,7 +201,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const } else if ( m_bTableRowsStarted && !m_bFirstRowExported && _sName == "table:table-cell" ) { - SvXMLAttributeList* pList = comphelper::getUnoTunnelImplementation<SvXMLAttributeList>(xAttribs); + SvXMLAttributeList* pList = comphelper::getFromUnoTunnel<SvXMLAttributeList>(xAttribs); static OUString s_sValue(lcl_createAttribute(XML_NP_OFFICE,XML_VALUE)); pList->RemoveAttribute(s_sValue); } diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx index 29d3945bedc3..d56171ec53c3 100644 --- a/reportdesign/source/ui/misc/RptUndo.cxx +++ b/reportdesign/source/ui/misc/RptUndo.cxx @@ -132,7 +132,7 @@ OSectionUndo::~OSectionUndo() rEnv.RemoveElement(xShape); #if OSL_DEBUG_LEVEL > 0 - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape ); + SvxShape* pShape = comphelper::getFromUnoTunnel<SvxShape>( xShape ); SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr; OSL_ENSURE( pShape && pShape->HasSdrObjectOwnership() && pObject && !pObject->IsInserted(), "OSectionUndo::~OSectionUndo: inconsistency in the shape/object ownership!" ); diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx index b9476b018c06..7b8bffdf069d 100644 --- a/sc/qa/unit/copy_paste_test.cxx +++ b/sc/qa/unit/copy_paste_test.cxx @@ -250,7 +250,7 @@ void ScCopyPasteTest::testTdf84411() // 3. Disable OpenCL - ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>(pFoundShell->GetModel()); + ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>(pFoundShell->GetModel()); CPPUNIT_ASSERT(pModel != nullptr); bool bOpenCLState = ScCalcConfig::isOpenCLEnabled(); pModel->enableOpenCL(false); diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 419b1145cc4d..02148af2fdbd 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -692,7 +692,7 @@ void ScDocument::RepaintRange( const ScRange& rRange ) { if ( bIsVisible && mpShell ) { - ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>( mpShell->GetModel() ); + ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>( mpShell->GetModel() ); if ( pModel ) pModel->RepaintRange( rRange ); // locked repaints are checked there } @@ -702,7 +702,7 @@ void ScDocument::RepaintRange( const ScRangeList& rRange ) { if ( bIsVisible && mpShell ) { - ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>( mpShell->GetModel() ); + ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>( mpShell->GetModel() ); if ( pModel ) pModel->RepaintRange( rRange ); // locked repaints are checked there } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index eda21d7baca5..87567274e700 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -581,7 +581,7 @@ bool ScDocument::InsertTab( if (comphelper::LibreOfficeKit::isActive() && GetDrawLayer()) { - ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>(this->GetDocumentShell()->GetModel()); + ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>(this->GetDocumentShell()->GetModel()); SfxLokHelper::notifyDocumentSizeChangedAllViews(pModel); } } @@ -747,7 +747,7 @@ bool ScDocument::DeleteTab( SCTAB nTab ) if (comphelper::LibreOfficeKit::isActive()) { - ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>(this->GetDocumentShell()->GetModel()); + ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>(this->GetDocumentShell()->GetModel()); SfxLokHelper::notifyDocumentSizeChangedAllViews(pModel); } @@ -839,7 +839,7 @@ bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets ) if (comphelper::LibreOfficeKit::isActive()) { - ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>(this->GetDocumentShell()->GetModel()); + ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>(this->GetDocumentShell()->GetModel()); SfxLokHelper::notifyDocumentSizeChangedAllViews(pModel); } @@ -886,7 +886,7 @@ bool ScDocument::RenameTab( SCTAB nTab, const OUString& rName, bool bExternalDoc if (comphelper::LibreOfficeKit::isActive() && GetDrawLayer()) { - ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>(this->GetDocumentShell()->GetModel()); + ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>(this->GetDocumentShell()->GetModel()); SfxLokHelper::notifyDocumentSizeChangedAllViews(pModel); } } diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index 59a1f7fd887f..8c0097b720b9 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -287,7 +287,7 @@ SfxObjectShell* XclRoot::GetDocShell() const ScModelObj* XclRoot::GetDocModelObj() const { SfxObjectShell* pDocShell = GetDocShell(); - return pDocShell ? comphelper::getUnoTunnelImplementation<ScModelObj>( pDocShell->GetModel() ) : nullptr; + return pDocShell ? comphelper::getFromUnoTunnel<ScModelObj>( pDocShell->GetModel() ) : nullptr; } OutputDevice* XclRoot::GetPrinter() const diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx index 46d8075197db..712a2dcb37ac 100644 --- a/sc/source/filter/oox/pivottablebuffer.cxx +++ b/sc/source/filter/oox/pivottablebuffer.cxx @@ -1237,7 +1237,7 @@ void PivotTable::finalizeImport() mxDPDescriptor->setTag( maDefModel.maTag ); // TODO: This is a hack. Eventually we need to convert the whole thing to the internal API. - auto pImpl = comphelper::getUnoTunnelImplementation<ScDataPilotDescriptorBase>(mxDPDescriptor); + auto pImpl = comphelper::getFromUnoTunnel<ScDataPilotDescriptorBase>(mxDPDescriptor); if (!pImpl) return; diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx index 02d4eca32f24..69be949247ed 100644 --- a/sc/source/filter/xml/XMLConverter.cxx +++ b/sc/source/filter/xml/XMLConverter.cxx @@ -35,7 +35,7 @@ ScDocument* ScXMLConverter::GetScDocument( const uno::Reference< frame::XModel > { if (xModel.is()) { - ScModelObj* pDocObj = comphelper::getUnoTunnelImplementation<ScModelObj>( xModel ); + ScModelObj* pDocObj = comphelper::getFromUnoTunnel<ScModelObj>( xModel ); return pDocObj ? pDocObj->GetDocument() : nullptr; } return nullptr; diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx index e6066acebc85..51b35a2d70a4 100644 --- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx +++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx @@ -222,7 +222,7 @@ void XMLTableShapeImportHelper::finishShape( if (!bNote) { // any shape other than a note prevents copying the sheet - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(mrImporter.GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(mrImporter.GetModel())->GetSheetSaveData(); pSheetData->BlockSheet( rTables.GetCurrentSheet() ); } diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx index 817dcea890be..2234f569746c 100644 --- a/sc/source/filter/xml/xmlbodyi.cxx +++ b/sc/source/filter/xml/xmlbodyi.cxx @@ -121,7 +121,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLBodyContext::createFastChildContext( sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList > & xAttrList ) { - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(GetScImport().GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(GetScImport().GetModel())->GetSheetSaveData(); if ( pSheetData && pSheetData->HasStartPos() ) { // stream part to copy ends before the next child element @@ -195,7 +195,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL void SAL_CALL ScXMLBodyContext::characters(const OUString &) { - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(GetScImport().GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(GetScImport().GetModel())->GetSheetSaveData(); if ( pSheetData && pSheetData->HasStartPos() ) { // stream part to copy ends before any content (whitespace) within the spreadsheet element @@ -207,7 +207,7 @@ void SAL_CALL ScXMLBodyContext::characters(const OUString &) void SAL_CALL ScXMLBodyContext::endFastElement(sal_Int32 nElement) { - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(GetScImport().GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(GetScImport().GetModel())->GetSheetSaveData(); if ( pSheetData && pSheetData->HasStartPos() ) { // stream part to copy ends before the closing tag of spreadsheet element diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 19ba725036b9..238befc186a5 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -374,7 +374,7 @@ void ScXMLTableRowCellContext::PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, cons rFmt.maSelection.nEndPos = nEnd; // Store the used text styles for export. - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(rXMLImport.GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(rXMLImport.GetModel())->GetSheetSaveData(); ScAddress aCellPos = rXMLImport.GetTables().GetCurrentCellPos(); pSheetData->AddTextStyle(rStyleName, aCellPos, rFmt.maSelection); @@ -812,7 +812,7 @@ void ScXMLTableRowCellContext::SetContentValidation( const ScRange& rScRange ) // is the below still needed? // For now, any sheet with validity is blocked from stream-copying. // Later, the validation names could be stored along with the style names. - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(GetImport().GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(GetImport().GetModel())->GetSheetSaveData(); pSheetData->BlockSheet( GetScImport().GetTables().GetCurrentSheet() ); } @@ -925,7 +925,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos) } // store the style names for stream copying - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(rXMLImport.GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(rXMLImport.GetModel())->GetSheetSaveData(); pSheetData->HandleNoteStyles( mxAnnotationData->maStyleName, mxAnnotationData->maTextStyle, rPos ); for (const auto& rContentStyle : mxAnnotationData->maContentStyles) diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx index 8bec39546541..09224bb757a3 100644 --- a/sc/source/filter/xml/xmlcoli.cxx +++ b/sc/source/filter/xml/xmlcoli.cxx @@ -112,7 +112,7 @@ void SAL_CALL ScXMLTableColContext::endFastElement( sal_Int32 /*nElement*/ ) if ( nSheet != pStyle->GetLastSheet() ) { - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(rXMLImport.GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(rXMLImport.GetModel())->GetSheetSaveData(); pSheetData->AddColumnStyle( sStyleName, ScAddress( static_cast<SCCOL>(nCurrentColumn), 0, nSheet ) ); pStyle->SetLastSheet(nSheet); } diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 1821eefbbd53..79ea4631d5ac 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -458,7 +458,7 @@ void ScXMLExport::SetSourceStream( const uno::Reference<io::XInputStream>& xNewS // keep track of the bytes already read nSourceStreamPos = nRead; - const ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(GetModel())->GetSheetSaveData(); + const ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(GetModel())->GetSheetSaveData(); if (pSheetData) { // add the loaded namespaces to the name space map @@ -1849,7 +1849,7 @@ const ScXMLEditAttributeMap& ScXMLExport::GetEditAttributeMap() const void ScXMLExport::RegisterDefinedStyleNames( const uno::Reference< css::sheet::XSpreadsheetDocument > & xSpreadDoc ) { - ScFormatSaveData* pFormatData = comphelper::getUnoTunnelImplementation<ScModelObj>(xSpreadDoc)->GetFormatSaveData(); + ScFormatSaveData* pFormatData = comphelper::getFromUnoTunnel<ScModelObj>(xSpreadDoc)->GetFormatSaveData(); auto xAutoStylePool = GetAutoStylePool(); for (const auto& rFormatInfo : pFormatData->maIDToName) { @@ -1877,7 +1877,7 @@ void ScXMLExport::ExportContent_() if ( !xSpreadDoc.is() ) return; - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(xSpreadDoc)->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(xSpreadDoc)->GetSheetSaveData(); if (pSheetData) pSheetData->ResetSaveEntries(); @@ -2078,7 +2078,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x if (nKey) { uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( GetModel(), uno::UNO_QUERY ); - ScFormatSaveData* pFormatData = comphelper::getUnoTunnelImplementation<ScModelObj>(xSpreadDoc)->GetFormatSaveData(); + ScFormatSaveData* pFormatData = comphelper::getFromUnoTunnel<ScModelObj>(xSpreadDoc)->GetFormatSaveData(); auto itr = pFormatData->maIDToName.find(nKey); if (itr != pFormatData->maIDToName.end()) { @@ -2243,7 +2243,7 @@ void ScXMLExport::collectAutoStyles() RegisterDefinedStyleNames( xSpreadDoc); // re-create automatic styles with old names from stored data - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(xSpreadDoc)->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(xSpreadDoc)->GetSheetSaveData(); if (pSheetData && pDoc) { // formulas have to be calculated now, to detect changed results @@ -2422,7 +2422,7 @@ void ScXMLExport::collectAutoStyles() SdrCaptionObj* pDrawObj = pNote->GetOrCreateCaption( aPos ); uno::Reference<text::XSimpleText> xCellText(pDrawObj->getUnoShape(), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xCursorProp(xCellText->createTextCursor(), uno::UNO_QUERY); - ScDrawTextCursor* pCursor = comphelper::getUnoTunnelImplementation<ScDrawTextCursor>( xCursorProp ); + ScDrawTextCursor* pCursor = comphelper::getFromUnoTunnel<ScDrawTextCursor>( xCursorProp ); if (pCursor) { pCursor->SetSelection( rNoteTextEntry.maSelection ); @@ -2463,7 +2463,7 @@ void ScXMLExport::collectAutoStyles() uno::Reference<text::XSimpleText> xCellText(xCellRange->getCellByPosition(aPos.Col(), aPos.Row()), uno::UNO_QUERY); xCursorProp.set(xCellText->createTextCursor(), uno::UNO_QUERY); } - ScCellTextCursor* pCursor = comphelper::getUnoTunnelImplementation<ScCellTextCursor>( xCursorProp ); + ScCellTextCursor* pCursor = comphelper::getFromUnoTunnel<ScCellTextCursor>( xCursorProp ); if (!pCursor) continue; pCursor->SetSelection( rTextEntry.maSelection ); @@ -5170,7 +5170,7 @@ void ScXMLExport::GetViewSettings(uno::Sequence<beans::PropertyValue>& rProps) { rProps.realloc(4); beans::PropertyValue* pProps(rProps.getArray()); - ScModelObj* pDocObj(comphelper::getUnoTunnelImplementation<ScModelObj>( GetModel() )); + ScModelObj* pDocObj(comphelper::getFromUnoTunnel<ScModelObj>( GetModel() )); if (pDocObj) { SfxObjectShell* pEmbeddedObj = pDocObj->GetEmbeddedObject(); @@ -5322,7 +5322,7 @@ ErrCode ScXMLExport::exportDoc( enum XMLTokenEnum eClass ) uno::Reference< frame::XModel > xModel = GetModel(); if ( xModel.is() ) { - auto pFoundShell = comphelper::getUnoTunnelImplementation<SfxObjectShell>(xModel); + auto pFoundShell = comphelper::getFromUnoTunnel<SfxObjectShell>(xModel); if ( pFoundShell && ooo::vba::isAlienExcelDoc( *pFoundShell ) ) { xRowStylesPropertySetMapper = new XMLPropertySetMapper(aXMLScFromXLSRowStylesProperties, xScPropHdlFactory, true); diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 967f1049f811..f4cafc7cf264 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -724,7 +724,7 @@ void ScXMLImport::SetViewSettings(const uno::Sequence<beans::PropertyValue>& aVi if (!(nHeight && nWidth && GetModel().is())) return; - ScModelObj* pDocObj(comphelper::getUnoTunnelImplementation<ScModelObj>( GetModel() )); + ScModelObj* pDocObj(comphelper::getFromUnoTunnel<ScModelObj>( GetModel() )); if (!pDocObj) return; @@ -1001,7 +1001,7 @@ void ScXMLImport::SetStyleToRanges() sal_uInt64 nKey = 0; if ((aAny >>= nKey) && nKey) { - ScFormatSaveData* pFormatSaveData = comphelper::getUnoTunnelImplementation<ScModelObj>(GetModel())->GetFormatSaveData(); + ScFormatSaveData* pFormatSaveData = comphelper::getFromUnoTunnel<ScModelObj>(GetModel())->GetFormatSaveData(); pFormatSaveData->maIDToName.insert(std::pair<sal_uInt64, OUString>(nKey, sPrevStyleName)); } @@ -1013,7 +1013,7 @@ void ScXMLImport::SetStyleToRanges() const table::CellRangeAddress& rRange = aAddresses[0]; if ( rRange.Sheet != pStyle->GetLastSheet() ) { - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(GetModel())->GetSheetSaveData(); pSheetData->AddCellStyle( sPrevStyleName, ScAddress( static_cast<SCCOL>(rRange.StartColumn), static_cast<SCROW>(rRange.StartRow), static_cast<SCTAB>(rRange.Sheet) ) ); pStyle->SetLastSheet(rRange.Sheet); @@ -1145,7 +1145,7 @@ void SAL_CALL ScXMLImport::startDocument() SvXMLImport::startDocument(); if (pDoc && !pDoc->IsImportingXML()) { - comphelper::getUnoTunnelImplementation<ScModelObj>(GetModel())->BeforeXMLLoading(); + comphelper::getFromUnoTunnel<ScModelObj>(GetModel())->BeforeXMLLoading(); bSelfImportingXMLSet = true; } @@ -1160,7 +1160,7 @@ void SAL_CALL ScXMLImport::startDocument() if (GetModel().is()) { // store initial namespaces, to find the ones that were added from the file later - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(GetModel())->GetSheetSaveData(); const SvXMLNamespaceMap& rNamespaces = GetNamespaceMap(); pSheetData->StoreInitialNamespaces(rNamespaces); } @@ -1408,7 +1408,7 @@ void SAL_CALL ScXMLImport::endDocument() { // set "valid stream" flags after loading (before UpdateRowHeights, so changed formula results // in UpdateRowHeights can already clear the flags again) - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(GetModel())->GetSheetSaveData(); SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTab<nTabCount; ++nTab) @@ -1484,7 +1484,7 @@ void SAL_CALL ScXMLImport::endDocument() } if(pDoc && bSelfImportingXMLSet) - comphelper::getUnoTunnelImplementation<ScModelObj>(GetModel())->AfterXMLLoading(); + comphelper::getFromUnoTunnel<ScModelObj>(GetModel())->AfterXMLLoading(); } // XEventListener diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx index 585eaa4cfe9f..7bfee20239ee 100644 --- a/sc/source/filter/xml/xmlrowi.cxx +++ b/sc/source/filter/xml/xmlrowi.cxx @@ -179,7 +179,7 @@ void SAL_CALL ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/) if ( nSheet != pStyle->GetLastSheet() ) { - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(rXMLImport.GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(rXMLImport.GetModel())->GetSheetSaveData(); pSheetData->AddRowStyle( sStyleName, ScAddress( 0, static_cast<SCROW>(nFirstRow), nSheet ) ); pStyle->SetLastSheet(nSheet); } diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 34a24a81f68e..08e2d94538ba 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -1004,7 +1004,7 @@ void ScCellTextStyleContext::FillPropertySet( const uno::Reference<beans::XPrope ScXMLImport& rXMLImport = GetScImport(); - ScCellTextCursor* pCellImp = comphelper::getUnoTunnelImplementation<ScCellTextCursor>( xPropSet ); + ScCellTextCursor* pCellImp = comphelper::getFromUnoTunnel<ScCellTextCursor>( xPropSet ); if (pCellImp) { ScAddress aPos = pCellImp->GetCellObj().GetPosition(); @@ -1012,7 +1012,7 @@ void ScCellTextStyleContext::FillPropertySet( const uno::Reference<beans::XPrope { ESelection aSel = pCellImp->GetSelection(); - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(GetImport().GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(GetImport().GetModel())->GetSheetSaveData(); pSheetData->AddTextStyle( GetName(), aPos, aSel ); nLastSheet = aPos.Tab(); @@ -1020,7 +1020,7 @@ void ScCellTextStyleContext::FillPropertySet( const uno::Reference<beans::XPrope } else if ( rXMLImport.GetTables().GetCurrentSheet() != nLastSheet ) { - ScDrawTextCursor* pDrawImp = comphelper::getUnoTunnelImplementation<ScDrawTextCursor>( xPropSet ); + ScDrawTextCursor* pDrawImp = comphelper::getFromUnoTunnel<ScDrawTextCursor>( xPropSet ); if (pDrawImp) { XMLTableShapeImportHelper* pTableShapeImport = static_cast<XMLTableShapeImportHelper*>(GetScImport().GetShapeImport().get()); diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx index 1b8ce5ae575c..a446f4371275 100644 --- a/sc/source/filter/xml/xmlsubti.cxx +++ b/sc/source/filter/xml/xmlsubti.cxx @@ -155,7 +155,7 @@ void ScMyTables::SetTableStyle(const OUString& sStyleName) { pStyle->FillPropertySet(xProperties); - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(rImport.GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(rImport.GetModel())->GetSheetSaveData(); pSheetData->AddTableStyle( sStyleName, ScAddress( 0, 0, maCurrentCellPos.Tab() ) ); } } diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index cab64260f9c0..ddec732b01c0 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -396,7 +396,7 @@ void SAL_CALL ScXMLTableContext::endFastElement(sal_Int32 /*nElement*/) // store stream positions if (!pExternalRefInfo && nStartOffset >= 0 /* && nEndOffset >= 0 */) { - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(rImport.GetModel())->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(rImport.GetModel())->GetSheetSaveData(); SCTAB nTab = rTables.GetCurrentSheet(); // pSheetData->AddStreamPos( nTab, nStartOffset, nEndOffset ); pSheetData->StartStreamPos( nTab, nStartOffset ); diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 006d33bc0861..1b275ea828d9 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -663,7 +663,7 @@ bool ScXMLImportWrapper::ExportToComponent(const uno::Reference<uno::XComponentC if ( xFilter.is() ) { - ScXMLExport* pExport = static_cast<ScXMLExport*>(comphelper::getUnoTunnelImplementation<SvXMLExport>(xFilter)); + ScXMLExport* pExport = static_cast<ScXMLExport*>(comphelper::getFromUnoTunnel<SvXMLExport>(xFilter)); pExport->SetSharedData(std::move(pSharedData)); // if there are sheets to copy, get the source stream @@ -678,7 +678,7 @@ bool ScXMLImportWrapper::ExportToComponent(const uno::Reference<uno::XComponentC // #i108978# If an embedded object is saved and no events are notified, don't use the stream // because without the ...DONE events, stream positions aren't updated. - ScSheetSaveData* pSheetData = comphelper::getUnoTunnelImplementation<ScModelObj>(xModel)->GetSheetSaveData(); + ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(xModel)->GetSheetSaveData(); if (pSheetData && pSheetData->IsInSupportedSave()) { try diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index 19081a32e067..ed18de670554 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -737,14 +737,14 @@ void ScDrawTransferObj::InitDocShell() const css::uno::Sequence< sal_Int8 >& ScDrawTransferObj::getUnoTunnelId() { - static const UnoTunnelIdInit theScDrawTransferObjUnoTunnelId; + static const comphelper::UnoIdInit theScDrawTransferObjUnoTunnelId; return theScDrawTransferObjUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL ScDrawTransferObj::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) { sal_Int64 nRet; - if( isUnoTunnelId<ScDrawTransferObj>(rId) ) + if( comphelper::isUnoTunnelId<ScDrawTransferObj>(rId) ) { nRet = reinterpret_cast< sal_Int64 >( this ); } diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 7d1c50594e4c..a9bc88b03e83 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -648,7 +648,7 @@ ScDocument* ScTransferObj::GetSourceDocument() ScDocShell* ScTransferObj::GetSourceDocShell() { - ScCellRangesBase* pRangesObj = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( m_xDragSourceRanges ); + ScCellRangesBase* pRangesObj = comphelper::getFromUnoTunnel<ScCellRangesBase>( m_xDragSourceRanges ); if (pRangesObj) return pRangesObj->GetDocShell(); @@ -658,7 +658,7 @@ ScDocShell* ScTransferObj::GetSourceDocShell() ScMarkData ScTransferObj::GetSourceMarkData() const { ScMarkData aMarkData(m_pDoc->GetSheetLimits()); - ScCellRangesBase* pRangesObj = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( m_xDragSourceRanges ); + ScCellRangesBase* pRangesObj = comphelper::getFromUnoTunnel<ScCellRangesBase>( m_xDragSourceRanges ); if (pRangesObj) { const ScRangeList& rRanges = pRangesObj->GetRangeList(); @@ -922,14 +922,14 @@ void ScTransferObj::StripRefs( ScDocument& rDoc, const css::uno::Sequence< sal_Int8 >& ScTransferObj::getUnoTunnelId() { - static const UnoTunnelIdInit theScTransferUnoTunnelId; + static const comphelper::UnoIdInit theScTransferUnoTunnelId; return theScTransferUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL ScTransferObj::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) { sal_Int64 nRet; - if( isUnoTunnelId<ScTransferObj>(rId) ) + if( comphelper::isUnoTunnelId<ScTransferObj>(rId) ) { nRet = reinterpret_cast< sal_Int64 >( this ); } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 47d8adc1843b..d6bb0d9f5f6f 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -793,7 +793,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) // check if shared flag is set in shared file bool bShared = false; - ScModelObj* pDocObj = comphelper::getUnoTunnelImplementation<ScModelObj>( xModel ); + ScModelObj* pDocObj = comphelper::getFromUnoTunnel<ScModelObj>( xModel ); ScDocShell* pSharedDocShell = ( pDocObj ? dynamic_cast< ScDocShell* >( pDocObj->GetObjectShell() ) : nullptr ); if ( pSharedDocShell ) { diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 9d7a5170fade..8120aba0662f 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -175,7 +175,7 @@ void ScDocShell::PostPaint( const ScRangeList& rRanges, PaintPartFlags nPart, sa // the document size too - cell size affects that, obviously) if ((nPart & (PaintPartFlags::Top | PaintPartFlags::Left)) && comphelper::LibreOfficeKit::isActive()) { - ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>(this->GetModel()); + ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>(this->GetModel()); SfxLokHelper::notifyDocumentSizeChangedAllViews(pModel); } } diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 8be67a6e0461..cba881387d26 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1042,7 +1042,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) // check if shared flag is set in shared file bool bShared = false; - ScModelObj* pDocObj = comphelper::getUnoTunnelImplementation<ScModelObj>( xModel ); + ScModelObj* pDocObj = comphelper::getFromUnoTunnel<ScModelObj>( xModel ); if ( pDocObj ) { ScDocShell* pDocShell = dynamic_cast< ScDocShell* >( pDocObj->GetEmbeddedObject() ); diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index f32249d4ff3e..b59059786d69 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -519,7 +519,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) if ( bCopy && pPage ) { ScDocShell* pDocShell = rViewData.GetDocShell(); - ScModelObj* pModelObj = ( pDocShell ? comphelper::getUnoTunnelImplementation<ScModelObj>( pDocShell->GetModel() ) : nullptr ); + ScModelObj* pModelObj = ( pDocShell ? comphelper::getFromUnoTunnel<ScModelObj>( pDocShell->GetModel() ) : nullptr ); if ( pModelObj ) { SCTAB nTab = rViewData.GetTabNo(); diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index c8267ef02222..8c353d0087c7 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -470,7 +470,7 @@ namespace HelperNotifyChanges { inline ScModelObj* getMustPropagateChangesModel(const ScDocShell &rDocShell) { - ScModelObj* pModelObj = comphelper::getUnoTunnelImplementation<ScModelObj>(rDocShell.GetModel()); + ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>(rDocShell.GetModel()); if (pModelObj && pModelObj->HasChangesListeners()) return pModelObj; return nullptr; diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 5880cfe875e8..3dff452b5859 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -192,7 +192,7 @@ void SAL_CALL ScAutoFormatsObj::insertByName( const OUString& aName, const uno:: uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY); if ( xInterface.is() ) { - ScAutoFormatObj* pFormatObj = comphelper::getUnoTunnelImplementation<ScAutoFormatObj>( xInterface ); + ScAutoFormatObj* pFormatObj = comphelper::getFromUnoTunnel<ScAutoFormatObj>( xInterface ); if ( pFormatObj && !pFormatObj->IsInserted() ) { ScAutoFormat* pFormats = ScGlobal::GetOrCreateAutoFormat(); diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 5062daaee85c..0d9e076269bc 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -2243,7 +2243,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMapEntry* pEntr if ( !aRanges.empty() && xInterface.is() ) // empty = nothing to do { ScTableConditionalFormat* pFormat = - comphelper::getUnoTunnelImplementation<ScTableConditionalFormat>( xInterface ); + comphelper::getFromUnoTunnel<ScTableConditionalFormat>( xInterface ); if (pFormat) { ScDocument& rDoc = pDocShell->GetDocument(); @@ -2290,7 +2290,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMapEntry* pEntr if ( !aRanges.empty() && xInterface.is() ) // empty = nothing to do { ScTableValidationObj* pValidObj = - comphelper::getUnoTunnelImplementation<ScTableValidationObj>( xInterface ); + comphelper::getFromUnoTunnel<ScTableValidationObj>( xInterface ); if (pValidObj) { ScDocument& rDoc = pDocShell->GetDocument(); @@ -3749,7 +3749,7 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangesBase::findAll( uno::Reference<container::XIndexAccess> xRet; if ( pDocShell && xDesc.is() ) { - ScCellSearchObj* pSearch = comphelper::getUnoTunnelImplementation<ScCellSearchObj>( xDesc ); + ScCellSearchObj* pSearch = comphelper::getFromUnoTunnel<ScCellSearchObj>( xDesc ); if (pSearch) { SvxSearchItem* pSearchItem = pSearch->GetSearchItem(); @@ -3787,7 +3787,7 @@ uno::Reference<uno::XInterface> ScCellRangesBase::Find_Impl( uno::Reference<uno::XInterface> xRet; if ( pDocShell && xDesc.is() ) { - ScCellSearchObj* pSearch = comphelper::getUnoTunnelImplementation<ScCellSearchObj>( xDesc ); + ScCellSearchObj* pSearch = comphelper::getFromUnoTunnel<ScCellSearchObj>( xDesc ); if (pSearch) { SvxSearchItem* pSearchItem = pSearch->GetSearchItem(); @@ -3840,7 +3840,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findNext( SolarMutexGuard aGuard; if ( xStartAt.is() ) { - ScCellRangesBase* pRangesImp = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xStartAt ); + ScCellRangesBase* pRangesImp = comphelper::getFromUnoTunnel<ScCellRangesBase>( xStartAt ); if ( pRangesImp && pRangesImp->GetDocShell() == pDocShell ) { const ScRangeList& rStartRanges = pRangesImp->GetRangeList(); @@ -3868,7 +3868,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea sal_Int32 nReplaced = 0; if ( pDocShell && xDesc.is() ) { - ScCellSearchObj* pSearch = comphelper::getUnoTunnelImplementation<ScCellSearchObj>( xDesc ); + ScCellSearchObj* pSearch = comphelper::getFromUnoTunnel<ScCellSearchObj>( xDesc ); if (pSearch) { SvxSearchItem* pSearchItem = pSearch->GetSearchItem(); @@ -4185,7 +4185,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const OUString& aName, const uno::A uno::Reference<uno::XInterface> xInterface(aElement, uno::UNO_QUERY); if ( pDocSh && xInterface.is() ) { - ScCellRangesBase* pRangesImp = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xInterface ); + ScCellRangesBase* pRangesImp = comphelper::getFromUnoTunnel<ScCellRangesBase>( xInterface ); if ( pRangesImp && pRangesImp->GetDocShell() == pDocSh ) { // if explicit name is given and already existing, throw exception @@ -4815,7 +4815,7 @@ void ScCellRangeObj::SetArrayFormula_Impl(const OUString& rFormula, if ( !rFormula.isEmpty() ) { - if ( comphelper::getUnoTunnelImplementation<ScTableSheetObj>( static_cast<cppu::OWeakObject*>(this) ) ) + if ( comphelper::getFromUnoTunnel<ScTableSheetObj>( static_cast<cppu::OWeakObject*>(this) ) ) { // don't set array formula for sheet object throw uno::RuntimeException(); @@ -4884,7 +4884,7 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::Formula if ( rTokens.hasElements() ) { - if ( comphelper::getUnoTunnelImplementation<ScTableSheetObj>( static_cast<cppu::OWeakObject*>(this) ) ) + if ( comphelper::getFromUnoTunnel<ScTableSheetObj>( static_cast<cppu::OWeakObject*>(this) ) ) { throw uno::RuntimeException(); } @@ -4914,7 +4914,7 @@ uno::Sequence< uno::Sequence<uno::Any> > SAL_CALL ScCellRangeObj::getDataArray() { SolarMutexGuard aGuard; - if ( comphelper::getUnoTunnelImplementation<ScTableSheetObj>( static_cast<cppu::OWeakObject*>(this) ) ) + if ( comphelper::getFromUnoTunnel<ScTableSheetObj>( static_cast<cppu::OWeakObject*>(this) ) ) { // don't create a data array for the sheet throw uno::RuntimeException(); @@ -4959,7 +4959,7 @@ uno::Sequence< uno::Sequence<OUString> > SAL_CALL ScCellRangeObj::getFormulaArra { SolarMutexGuard aGuard; - if ( comphelper::getUnoTunnelImplementation<ScTableSheetObj>( static_cast<cppu::OWeakObject*>(this) ) ) + if ( comphelper::getFromUnoTunnel<ScTableSheetObj>( static_cast<cppu::OWeakObject*>(this) ) ) { // don't create a data array for the sheet throw uno::RuntimeException(); @@ -5520,7 +5520,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals( ScDocShell* pDocSh = GetDocShell(); ScSubTotalDescriptorBase* pImp = - comphelper::getUnoTunnelImplementation<ScSubTotalDescriptorBase>( xDescriptor ); + comphelper::getFromUnoTunnel<ScSubTotalDescriptorBase>( xDescriptor ); if (!(pDocSh && pImp)) return; @@ -5953,12 +5953,12 @@ uno::Reference<text::XTextCursor> SAL_CALL ScCellObj::createTextCursorByRange( SolarMutexGuard aGuard; rtl::Reference<SvxUnoTextCursor> pCursor = new ScCellTextCursor( *this ); - SvxUnoTextRangeBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextRangeBase>( aTextPosition ); + SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( aTextPosition ); if(pRange) pCursor->SetSelection( pRange->GetSelection() ); else { - ScCellTextCursor* pOther = comphelper::getUnoTunnelImplementation<ScCellTextCursor>( aTextPosition ); + ScCellTextCursor* pOther = comphelper::getFromUnoTunnel<ScCellTextCursor>( aTextPosition ); if(!pOther) throw uno::RuntimeException(); @@ -6010,8 +6010,8 @@ void SAL_CALL ScCellObj::insertTextContent( const uno::Reference<text::XTextRang ScDocShell* pDocSh = GetDocShell(); if ( pDocSh && xContent.is() ) { - ScEditFieldObj* pCellField = comphelper::getUnoTunnelImplementation<ScEditFieldObj>(xContent); - SvxUnoTextRangeBase* pTextRange = comphelper::getUnoTunnelImplementation<ScCellTextCursor>( xRange ); + ScEditFieldObj* pCellField = comphelper::getFromUnoTunnel<ScEditFieldObj>(xContent); + SvxUnoTextRangeBase* pTextRange = comphelper::getFromUnoTunnel<ScCellTextCursor>( xRange ); if ( pCellField && !pCellField->IsInserted() && pTextRange ) { @@ -6060,7 +6060,7 @@ void SAL_CALL ScCellObj::removeTextContent( const uno::Reference<text::XTextCont SolarMutexGuard aGuard; if ( xContent.is() ) { - ScEditFieldObj* pCellField = comphelper::getUnoTunnelImplementation<ScEditFieldObj>(xContent); + ScEditFieldObj* pCellField = comphelper::getFromUnoTunnel<ScEditFieldObj>(xContent); if ( pCellField && pCellField->IsInserted() ) { //! Check if field is in this cell @@ -6701,7 +6701,7 @@ uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursorBy ScDocShell* pDocSh = GetDocShell(); if ( pDocSh && xCellRange.is() ) { - ScCellRangesBase* pRangesImp = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xCellRange ); + ScCellRangesBase* pRangesImp = comphelper::getFromUnoTunnel<ScCellRangesBase>( xCellRange ); if (pRangesImp) { const ScRangeList& rRanges = pRangesImp->GetRangeList(); diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index ff370151ff3c..1ce82e6bc1d0 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -415,7 +415,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName, if (!pDocShell) throw RuntimeException("DocShell is null", static_cast<cppu::OWeakObject*>(this)); - auto pImp = comphelper::getUnoTunnelImplementation<ScDataPilotDescriptorBase>( xDescriptor ); + auto pImp = comphelper::getFromUnoTunnel<ScDataPilotDescriptorBase>( xDescriptor ); if (!pImp) throw RuntimeException("Failed to get ScDataPilotDescriptor", static_cast<cppu::OWeakObject*>(this)); @@ -980,7 +980,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotDescriptorBase::getDataLayoutFi sal_Int64 SAL_CALL ScDataPilotDescriptorBase::getSomething( const Sequence<sal_Int8 >& rId ) { - if ( isUnoTunnelId<ScDataPilotDescriptorBase>(rId) ) + if ( comphelper::isUnoTunnelId<ScDataPilotDescriptorBase>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } @@ -989,7 +989,7 @@ sal_Int64 SAL_CALL ScDataPilotDescriptorBase::getSomething( const Sequence<sal_Int8>& ScDataPilotDescriptorBase::getUnoTunnelId() { - static const UnoTunnelIdInit theScDataPilotDescriptorBaseUnoTunnelId; + static const comphelper::UnoIdInit theScDataPilotDescriptorBaseUnoTunnelId; return theScDataPilotDescriptorBaseUnoTunnelId.getSeq(); } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 40d2b639738f..2f814cd37f3e 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1328,7 +1328,7 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if (xNumberAgg.is()) { SvNumberFormatsSupplierObj* pNumFmt = - comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>( + comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( uno::Reference<util::XNumberFormatsSupplier>(xNumberAgg, uno::UNO_QUERY) ); if ( pNumFmt ) pNumFmt->SetNumberFormatter( nullptr ); @@ -1411,7 +1411,7 @@ static OutputDevice* lcl_GetRenderDevice( const uno::Sequence<beans::PropertyVal uno::Reference<awt::XDevice> xRenderDevice(rProp.Value, uno::UNO_QUERY); if ( xRenderDevice.is() ) { - VCLXDevice* pDevice = comphelper::getUnoTunnelImplementation<VCLXDevice>( xRenderDevice ); + VCLXDevice* pDevice = comphelper::getFromUnoTunnel<VCLXDevice>( xRenderDevice ); if ( pDevice ) { pRet = pDevice->GetOutputDevice().get(); @@ -1570,11 +1570,11 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection, uno::Reference<uno::XInterface> xInterface(aSelection, uno::UNO_QUERY); if ( xInterface.is() ) { - ScCellRangesBase* pSelObj = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xInterface ); + ScCellRangesBase* pSelObj = comphelper::getFromUnoTunnel<ScCellRangesBase>( xInterface ); uno::Reference< drawing::XShapes > xShapes( xInterface, uno::UNO_QUERY ); if ( pSelObj && pSelObj->GetDocShell() == pDocShell ) { - bool bSheet = ( comphelper::getUnoTunnelImplementation<ScTableSheetObj>( xInterface ) != nullptr ); + bool bSheet = ( comphelper::getFromUnoTunnel<ScTableSheetObj>( xInterface ) != nullptr ); bool bCursor = pSelObj->IsCursorOnly(); const ScRangeList& rRanges = pSelObj->GetRangeList(); @@ -1629,7 +1629,7 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection, } } } - else if ( comphelper::getUnoTunnelImplementation<ScModelObj>( xInterface ) == this ) + else if ( comphelper::getFromUnoTunnel<ScModelObj>( xInterface ) == this ) { // render the whole document // -> no selection, all sheets @@ -3092,12 +3092,12 @@ uno::Sequence<OUString> SAL_CALL ScModelObj::getSupportedServiceNames() sal_Int64 SAL_CALL ScModelObj::getSomething( const uno::Sequence<sal_Int8 >& rId ) { - if ( isUnoTunnelId<ScModelObj>(rId) ) + if ( comphelper::isUnoTunnelId<ScModelObj>(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>(pDocShell )); } @@ -3125,7 +3125,7 @@ sal_Int64 SAL_CALL ScModelObj::getSomething( const uno::Sequence<sal_Int8>& ScModelObj::getUnoTunnelId() { - static const UnoTunnelIdInit theScModelObjUnoTunnelId; + static const comphelper::UnoIdInit theScModelObjUnoTunnelId; return theScModelObjUnoTunnelId.getSeq(); } @@ -3527,7 +3527,7 @@ uno::Reference<drawing::XDrawPage> SAL_CALL ScDrawPagesObj::insertNewByIndex( sa void SAL_CALL ScDrawPagesObj::remove( const uno::Reference<drawing::XDrawPage>& xPage ) { SolarMutexGuard aGuard; - SvxDrawPage* pImp = comphelper::getUnoTunnelImplementation<SvxDrawPage>( xPage ); + SvxDrawPage* pImp = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage ); if ( pDocShell && pImp ) { SdrPage* pPage = pImp->GetSdrPage(); @@ -3683,7 +3683,7 @@ void SAL_CALL ScTableSheetsObj::insertByName( const OUString& aName, const uno:: uno::Reference<uno::XInterface> xInterface(aElement, uno::UNO_QUERY); if ( xInterface.is() ) { - ScTableSheetObj* pSheetObj = comphelper::getUnoTunnelImplementation<ScTableSheetObj>( xInterface ); + ScTableSheetObj* pSheetObj = comphelper::getFromUnoTunnel<ScTableSheetObj>( xInterface ); if ( pSheetObj && !pSheetObj->GetDocShell() ) // not inserted yet? { ScDocument& rDoc = pDocShell->GetDocument(); @@ -3729,7 +3729,7 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const OUString& aName, const uno: uno::Reference<uno::XInterface> xInterface(aElement, uno::UNO_QUERY); if ( xInterface.is() ) { - ScTableSheetObj* pSheetObj = comphelper::getUnoTunnelImplementation<ScTableSheetObj>( xInterface ); + ScTableSheetObj* pSheetObj = comphelper::getFromUnoTunnel<ScTableSheetObj>( xInterface ); if ( pSheetObj && !pSheetObj->GetDocShell() ) // not inserted yet? { SCTAB nPosition; @@ -3790,7 +3790,7 @@ sal_Int32 ScTableSheetsObj::importSheet( // Source document docShell if ( !xDocSrc.is() ) throw uno::RuntimeException(); - ScModelObj* pObj = comphelper::getUnoTunnelImplementation<ScModelObj>(xDocSrc); + ScModelObj* pObj = comphelper::getFromUnoTunnel<ScModelObj>(xDocSrc); ScDocShell* pDocShellSrc = static_cast<ScDocShell*>(pObj->GetEmbeddedObject()); // SourceSheet Position and does srcName exists ? diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index bdd4752d4cd6..e9b57ddb3e63 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -548,7 +548,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName, // currently, only our own cell ranges are supported uno::Reference<table::XCellRange> xRange(rArg, uno::UNO_QUERY); - ScCellRangesBase* pImpl = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xRange ); + ScCellRangesBase* pImpl = comphelper::getFromUnoTunnel<ScCellRangesBase>( xRange ); if ( pImpl ) { ScDocument* pSrcDoc = pImpl->GetDocument(); diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index c09361754372..f1b439cb54cb 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -426,7 +426,7 @@ uno::Sequence<OUString> SAL_CALL ScNamedRangeObj::getSupportedServiceNames() sal_Int64 SAL_CALL ScNamedRangeObj::getSomething( const uno::Sequence<sal_Int8 >& rId ) { - if ( isUnoTunnelId<ScNamedRangeObj>(rId) ) + if ( comphelper::isUnoTunnelId<ScNamedRangeObj>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } @@ -435,7 +435,7 @@ sal_Int64 SAL_CALL ScNamedRangeObj::getSomething( const uno::Sequence<sal_Int8>& ScNamedRangeObj::getUnoTunnelId() { - static const UnoTunnelIdInit theScNamedRangeObjUnoTunnelId; + static const comphelper::UnoIdInit theScNamedRangeObjUnoTunnelId; return theScNamedRangeObjUnoTunnelId.getSeq(); } diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 0de4d26c075f..97fcb17b01b7 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -101,7 +101,7 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) : xShape.set(uno::Reference<drawing::XShape>( mxShapeAgg, uno::UNO_QUERY )); - bIsTextShape = ( comphelper::getUnoTunnelImplementation<SvxUnoTextBase>( mxShapeAgg ) != nullptr ); + bIsTextShape = ( comphelper::getFromUnoTunnel<SvxUnoTextBase>( mxShapeAgg ) != nullptr ); } { @@ -1090,7 +1090,7 @@ void SAL_CALL ScShapeObj::insertTextContent( const uno::Reference<text::XTextRan uno::Reference<text::XTextContent> xEffContent; - ScEditFieldObj* pCellField = comphelper::getUnoTunnelImplementation<ScEditFieldObj>( xContent ); + ScEditFieldObj* pCellField = comphelper::getFromUnoTunnel<ScEditFieldObj>( xContent ); if ( pCellField ) { // createInstance("TextField.URL") from the document creates a ScCellFieldObj. @@ -1133,7 +1133,7 @@ uno::Reference<text::XTextCursor> SAL_CALL ScShapeObj::createTextCursor() { // ScDrawTextCursor must be used to ensure the ScShapeObj is returned by getText - SvxUnoTextBase* pText = comphelper::getUnoTunnelImplementation<SvxUnoTextBase>( mxShapeAgg ); + SvxUnoTextBase* pText = comphelper::getFromUnoTunnel<SvxUnoTextBase>( mxShapeAgg ); if (pText) return new ScDrawTextCursor( this, *pText ); } @@ -1150,8 +1150,8 @@ uno::Reference<text::XTextCursor> SAL_CALL ScShapeObj::createTextCursorByRange( { // ScDrawTextCursor must be used to ensure the ScShapeObj is returned by getText - SvxUnoTextBase* pText = comphelper::getUnoTunnelImplementation<SvxUnoTextBase>( mxShapeAgg ); - SvxUnoTextRangeBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextRangeBase>( aTextPosition ); + SvxUnoTextBase* pText = comphelper::getFromUnoTunnel<SvxUnoTextBase>( mxShapeAgg ); + SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( aTextPosition ); if ( pText && pRange ) { rtl::Reference<SvxUnoTextCursor> pCursor = new ScDrawTextCursor( this, *pText ); diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index e6f0eb1661ad..58924e653e46 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -681,7 +681,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno:: uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY); if ( xInterface.is() ) { - ScStyleObj* pStyleObj = comphelper::getUnoTunnelImplementation<ScStyleObj>( xInterface ); + ScStyleObj* pStyleObj = comphelper::getFromUnoTunnel<ScStyleObj>( xInterface ); if ( pStyleObj && pStyleObj->GetFamily() == eFamily && !pStyleObj->IsInserted() ) // not yet inserted? { diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index 27c46f7513c2..bb1135ac3d87 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -135,7 +135,7 @@ uno::Reference<text::XText> SAL_CALL ScHeaderFooterContentObj::getRightText() sal_Int64 SAL_CALL ScHeaderFooterContentObj::getSomething( const uno::Sequence<sal_Int8 >& rId ) { - if ( isUnoTunnelId<ScHeaderFooterContentObj>(rId) ) + if ( comphelper::isUnoTunnelId<ScHeaderFooterContentObj>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } @@ -144,14 +144,14 @@ sal_Int64 SAL_CALL ScHeaderFooterContentObj::getSomething( const uno::Sequence<sal_Int8>& ScHeaderFooterContentObj::getUnoTunnelId() { - static const UnoTunnelIdInit theScHeaderFooterContentObjUnoTunnelId; + static const comphelper::UnoIdInit theScHeaderFooterContentObjUnoTunnelId; return theScHeaderFooterContentObjUnoTunnelId.getSeq(); } rtl::Reference<ScHeaderFooterContentObj> ScHeaderFooterContentObj::getImplementation( const uno::Reference<sheet::XHeaderFooterContent>& rObj) { - return comphelper::getUnoTunnelImplementation<ScHeaderFooterContentObj>(rObj); + return comphelper::getFromUnoTunnel<ScHeaderFooterContentObj>(rObj); } void ScHeaderFooterContentObj::Init( const EditTextObject* pLeft, @@ -379,10 +379,10 @@ void SAL_CALL ScHeaderFooterTextObj::insertTextContent( SolarMutexGuard aGuard; if ( xContent.is() && xRange.is() ) { - ScEditFieldObj* pHeaderField = comphelper::getUnoTunnelImplementation<ScEditFieldObj>( xContent ); + ScEditFieldObj* pHeaderField = comphelper::getFromUnoTunnel<ScEditFieldObj>( xContent ); SvxUnoTextRangeBase* pTextRange = - comphelper::getUnoTunnelImplementation<ScHeaderFooterTextCursor>( xRange ); + comphelper::getFromUnoTunnel<ScHeaderFooterTextCursor>( xRange ); if ( pHeaderField && !pHeaderField->IsInserted() && pTextRange ) { @@ -446,7 +446,7 @@ void SAL_CALL ScHeaderFooterTextObj::removeTextContent( SolarMutexGuard aGuard; if ( xContent.is() ) { - ScEditFieldObj* pHeaderField = comphelper::getUnoTunnelImplementation<ScEditFieldObj>(xContent); + ScEditFieldObj* pHeaderField = comphelper::getFromUnoTunnel<ScEditFieldObj>(xContent); if ( pHeaderField && pHeaderField->IsInserted() ) { //! check if the field is in this cell diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index e75e522af786..3d2df9af72df 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -678,10 +678,10 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) if (bRet) return bRet; - ScCellRangesBase* pRangesImp = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xInterface ); + ScCellRangesBase* pRangesImp = comphelper::getFromUnoTunnel<ScCellRangesBase>( xInterface ); uno::Reference<drawing::XShapes> xShapeColl( xInterface, uno::UNO_QUERY ); uno::Reference<drawing::XShape> xShapeSel( xInterface, uno::UNO_QUERY ); - SvxShape* pShapeImp = comphelper::getUnoTunnelImplementation<SvxShape>( xShapeSel ); + SvxShape* pShapeImp = comphelper::getFromUnoTunnel<SvxShape>( xShapeSel ); if (pRangesImp) // Cell ranges { @@ -1051,7 +1051,7 @@ void SAL_CALL ScTabViewObj::setActiveSheet( const uno::Reference<sheet::XSpreads // XSpreadsheet and ScCellRangesBase -> has to be the same sheet - ScCellRangesBase* pRangesImp = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xActiveSheet ); + ScCellRangesBase* pRangesImp = comphelper::getFromUnoTunnel<ScCellRangesBase>( xActiveSheet ); if ( pRangesImp && pViewSh->GetViewData().GetDocShell() == pRangesImp->GetDocShell() ) { const ScRangeList& rRanges = pRangesImp->GetRangeList(); diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index aa2c16378700..0453f6b4bb44 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -82,7 +82,7 @@ GetAutoFiltRange( const ScDocShell* pShell, sal_Int16 nSheet ) ScDocShell* GetDocShellFromRange( const uno::Reference< uno::XInterface >& xRange ) { - ScCellRangesBase* pScCellRangesBase = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xRange ); + ScCellRangesBase* pScCellRangesBase = comphelper::getFromUnoTunnel<ScCellRangesBase>( xRange ); if ( !pScCellRangesBase ) { throw uno::RuntimeException("Failed to access underlying doc shell uno range object" ); diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index 760d1002c868..8eec39dca899 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -844,8 +844,8 @@ bool ScVbaEventsHelper::isSelectionChanged( const uno::Sequence< uno::Any >& rAr { uno::Reference< uno::XInterface > xOldSelection( maOldSelection, uno::UNO_QUERY ); uno::Reference< uno::XInterface > xNewSelection = getXSomethingFromArgs< uno::XInterface >( rArgs, nIndex, false ); - ScCellRangesBase* pOldCellRanges = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xOldSelection ); - ScCellRangesBase* pNewCellRanges = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xNewSelection ); + ScCellRangesBase* pOldCellRanges = comphelper::getFromUnoTunnel<ScCellRangesBase>( xOldSelection ); + ScCellRangesBase* pNewCellRanges = comphelper::getFromUnoTunnel<ScCellRangesBase>( xNewSelection ); bool bChanged = !pOldCellRanges || !pNewCellRanges || lclSelectionChanged( pOldCellRanges->GetRangeList(), pNewCellRanges->GetRangeList() ); maOldSelection <<= xNewSelection; return bChanged; diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index 8db4a9b1c4ff..f3fd768f16e3 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -795,7 +795,7 @@ template< typename... Ifc > ScCellRangesBase* ScVbaFormat< Ifc... >::getCellRangesBase() { - return comphelper::getUnoTunnelImplementation<ScCellRangesBase>( mxPropertySet ); + return comphelper::getFromUnoTunnel<ScCellRangesBase>( mxPropertySet ); } template< typename... Ifc > diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 9aa5213a3bce..1ad91d3b811c 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -225,9 +225,9 @@ static uno::Reference< excel::XRange > lcl_makeXRangeFromSheetCellRanges( const ScCellRangesBase* ScVbaRange::getCellRangesBase() { if( mxRanges.is() ) - return comphelper::getUnoTunnelImplementation<ScCellRangesBase>( mxRanges ); + return comphelper::getFromUnoTunnel<ScCellRangesBase>( mxRanges ); if( mxRange.is() ) - return comphelper::getUnoTunnelImplementation<ScCellRangesBase>( mxRange ); + return comphelper::getFromUnoTunnel<ScCellRangesBase>( mxRange ); throw uno::RuntimeException("General Error creating range - Unknown" ); } @@ -362,7 +362,7 @@ ScVbaRangeAreas::createCollectionObject( const uno::Any& aSource ) static ScDocShell* getDocShellFromIf( const uno::Reference< uno::XInterface >& xIf ) { - ScCellRangesBase* pUno = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xIf ); + ScCellRangesBase* pUno = comphelper::getFromUnoTunnel<ScCellRangesBase>( xIf ); if ( !pUno ) throw uno::RuntimeException("Failed to access underlying uno range object" ); return pUno->GetDocShell(); @@ -509,7 +509,7 @@ public: OUString getNumberFormatString() { uno::Reference< uno::XInterface > xIf( mxRangeProps, uno::UNO_QUERY_THROW ); - ScCellRangesBase* pUnoCellRange = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xIf ); + ScCellRangesBase* pUnoCellRange = comphelper::getFromUnoTunnel<ScCellRangesBase>( xIf ); if ( pUnoCellRange ) { diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx index d5fbb6b0e070..07e35344a371 100644 --- a/sc/source/ui/vba/vbaworkbook.cxx +++ b/sc/source/ui/vba/vbaworkbook.cxx @@ -408,7 +408,7 @@ ScVbaWorkbook::getCodeName() sal_Int64 ScVbaWorkbook::getSomething(const uno::Sequence<sal_Int8 >& rId ) { - if (isUnoTunnelId<ScVbaWorksheet>(rId)) + if (comphelper::isUnoTunnelId<ScVbaWorksheet>(rId)) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index f4ec5ca04e04..ef5c851ed938 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -172,7 +172,7 @@ ScVbaWorksheet::~ScVbaWorksheet() const uno::Sequence<sal_Int8>& ScVbaWorksheet::getUnoTunnelId() { - static const UnoTunnelIdInit theScVbaWorksheetUnoTunnelId; + static const comphelper::UnoIdInit theScVbaWorksheetUnoTunnelId; return theScVbaWorksheetUnoTunnelId.getSeq(); } @@ -1039,7 +1039,7 @@ ScVbaWorksheet::PrintOut( const uno::Any& From, const uno::Any& To, const uno::A sal_Int64 SAL_CALL ScVbaWorksheet::getSomething(const uno::Sequence<sal_Int8 > & rId) { - if (isUnoTunnelId<ScVbaWorksheet>(rId)) + if (comphelper::isUnoTunnelId<ScVbaWorksheet>(rId)) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 6e500e84b142..0fffffa0661b 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -528,7 +528,7 @@ void ScDrawView::MarkListHasChanged() uno::Reference<frame::XController> xController = rFrame.GetController(); if (xController.is()) { - ScTabViewObj* pImp = comphelper::getUnoTunnelImplementation<ScTabViewObj>( xController ); + ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController ); if (pImp) pImp->SelectionChanged(); } @@ -578,7 +578,7 @@ bool ScDrawView::SdrBeginTextEdit( uno::Reference< frame::XController > xController = rFrame.GetController(); if (xController.is()) { - ScTabViewObj* pImp = comphelper::getUnoTunnelImplementation<ScTabViewObj>( xController ); + ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController ); if (pImp) pImp->SelectionChanged(); } @@ -602,7 +602,7 @@ SdrEndTextEditKind ScDrawView::SdrEndTextEdit( bool bDontDeleteReally ) uno::Reference< frame::XController > xController = rFrame.GetController(); if (xController.is()) { - ScTabViewObj* pImp = comphelper::getUnoTunnelImplementation<ScTabViewObj>( xController ); + ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController ); if (pImp) pImp->SelectionChanged(); } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 662ba153c4d6..877da1760bd4 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -2713,7 +2713,7 @@ bool ScGridWindow::PreNotify( NotifyEvent& rNEvt ) css::uno::Reference<css::frame::XController> xController = pViewFrame->GetFrame().GetController(); if (xController.is()) { - ScTabViewObj* pImp = comphelper::getUnoTunnelImplementation<ScTabViewObj>( xController ); + ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController ); if (pImp && pImp->IsMouseListening()) { css::awt::MouseEvent aEvent; diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 8f885ccfc26a..530d78ec81ed 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -2157,7 +2157,7 @@ void ScTabView::SetNewVisArea() css::uno::Reference<css::frame::XController> xController = rFrame.GetController(); if (xController.is()) { - ScTabViewObj* pImp = comphelper::getUnoTunnelImplementation<ScTabViewObj>( xController ); + ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController ); if (pImp) pImp->VisAreaChanged(); } @@ -2554,7 +2554,7 @@ void lcl_ExtendTiledDimension(bool bColumn, const SCCOLROW nEnd, const SCCOLROW ScDocShell* pDocSh = rViewData.GetDocShell(); ScModelObj* pModelObj = pDocSh ? - comphelper::getUnoTunnelImplementation<ScModelObj>( pDocSh->GetModel() ) : nullptr; + comphelper::getFromUnoTunnel<ScModelObj>( pDocSh->GetModel() ) : nullptr; Size aOldSize(0, 0); if (pModelObj) aOldSize = pModelObj->getDocumentSize(); @@ -2593,7 +2593,7 @@ void lcl_ExtendTiledDimension(bool bColumn, const SCCOLROW nEnd, const SCCOLROW std::stringstream ss; ss << aNewSize.Width() << ", " << aNewSize.Height(); OString sSize = ss.str().c_str(); - ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>( + ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>( rViewData.GetViewShell()->GetCurrentDocument()); SfxLokHelper::notifyDocumentSizeChanged(rViewData.GetViewShell(), sSize, pModel, false); } diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 6133b506c955..c44db32ce716 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -403,7 +403,7 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew ) ScDocument& rDoc = aViewData.GetDocument(); ScDocShell* pDocSh = aViewData.GetDocShell(); - ScModelObj* pModelObj = pDocSh ? comphelper::getUnoTunnelImplementation<ScModelObj>( pDocSh->GetModel() ) : nullptr; + ScModelObj* pModelObj = pDocSh ? comphelper::getFromUnoTunnel<ScModelObj>( pDocSh->GetModel() ) : nullptr; Size aOldSize(0, 0); if (pModelObj) aOldSize = pModelObj->getDocumentSize(); @@ -445,7 +445,7 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew ) std::stringstream ss; ss << aNewSize.Width() << ", " << aNewSize.Height(); OString sSize = ss.str().c_str(); - ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>(aViewData.GetViewShell()->GetCurrentDocument()); + ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>(aViewData.GetViewShell()->GetCurrentDocument()); SfxLokHelper::notifyDocumentSizeChanged(aViewData.GetViewShell(), sSize, pModel, false); } @@ -538,7 +538,7 @@ void ScTabView::SelectionChanged(bool bFromPaste) uno::Reference<frame::XController> xController = pViewFrame->GetFrame().GetController(); if (xController.is()) { - ScTabViewObj* pImp = comphelper::getUnoTunnelImplementation<ScTabViewObj>( xController ); + ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController ); if (pImp) pImp->SelectionChanged(); } diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index bfb2f6c82ed1..fc5bd4ccf6f0 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -314,7 +314,7 @@ void ScTabView::TabChanged( bool bSameTabButMoved ) uno::Reference<frame::XController> xController = pViewFrame->GetFrame().GetController(); if (xController.is()) { - ScTabViewObj* pImp = comphelper::getUnoTunnelImplementation<ScTabViewObj>( xController ); + ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController ); if (pImp) pImp->SheetChanged( bSameTabButMoved ); } @@ -334,7 +334,7 @@ void ScTabView::TabChanged( bool bSameTabButMoved ) return; ScDocShell* pDocSh = GetViewData().GetDocShell(); - ScModelObj* pModelObj = pDocSh ? comphelper::getUnoTunnelImplementation<ScModelObj>( pDocSh->GetModel()) : nullptr; + ScModelObj* pModelObj = pDocSh ? comphelper::getFromUnoTunnel<ScModelObj>( pDocSh->GetModel()) : nullptr; if (!pModelObj) return; @@ -350,7 +350,7 @@ void ScTabView::TabChanged( bool bSameTabButMoved ) OString sPayload = aRectangle.toString() + ", " + OString::number(aViewData.GetTabNo()); pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, sPayload.getStr()); - ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>(pViewShell->GetCurrentDocument()); + ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>(pViewShell->GetCurrentDocument()); SfxLokHelper::notifyDocumentSizeChanged(pViewShell, sRect, pModel, false); } diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 169b5e9b1348..e32bc217b090 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1098,7 +1098,7 @@ static ScTabViewObj* lcl_GetViewObj( const ScTabViewShell& rShell ) SfxFrame& rFrame = pViewFrame->GetFrame(); uno::Reference<frame::XController> xController = rFrame.GetController(); if (xController.is()) - pRet = comphelper::getUnoTunnelImplementation<ScTabViewObj>( xController ); + pRet = comphelper::getFromUnoTunnel<ScTabViewObj>( xController ); } return pRet; } diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index b4e8744cfe0d..1b4efb7cea77 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -1453,7 +1453,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, if ( nFlags & InsertDeleteFlags::OBJECTS ) { - ScModelObj* pModelObj = comphelper::getUnoTunnelImplementation<ScModelObj>( pDocSh->GetModel() ); + ScModelObj* pModelObj = comphelper::getFromUnoTunnel<ScModelObj>( pDocSh->GetModel() ); if ( pPage && pModelObj ) { bool bSameDoc = ( rClipParam.getSourceDocID() == rDoc.GetDocumentID() ); diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index 9dafd25a64a1..d83d6867fd87 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -178,7 +178,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, ScDocument& rDocument = GetViewData().GetDocument(); ScDocShell* pDocShell = GetViewData().GetDocShell(); - ScModelObj* pModelObj = ( pDocShell ? comphelper::getUnoTunnelImplementation<ScModelObj>( pDocShell->GetModel() ) : nullptr ); + ScModelObj* pModelObj = ( pDocShell ? comphelper::getFromUnoTunnel<ScModelObj>( pDocShell->GetModel() ) : nullptr ); if ( pDestPage && pModelObj && pDrawTrans ) { const ScRangeListVector& rProtectedChartRangesVector( pDrawTrans->GetProtectedChartRangesVector() ); @@ -247,7 +247,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, ScDocument& rDocument = GetViewData().GetDocument(); ScDocShell* pDocShell = GetViewData().GetDocShell(); - ScModelObj* pModelObj = ( pDocShell ? comphelper::getUnoTunnelImplementation<ScModelObj>( pDocShell->GetModel() ) : nullptr ); + ScModelObj* pModelObj = ( pDocShell ? comphelper::getFromUnoTunnel<ScModelObj>( pDocShell->GetModel() ) : nullptr ); const ScDrawTransferObj* pTransferObj = ScDrawTransferObj::GetOwnClipboard(ScTabViewShell::GetClipData(GetViewData().GetActiveWin())); if ( pPage && pModelObj && ( pTransferObj || pDrawTrans ) ) { diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 3c3d4988d236..2f6fbfaccb47 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -392,7 +392,7 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos) if (comphelper::LibreOfficeKit::isActive() && static_cast<SdPage*>(pPage)->GetPageKind() == PageKind::Standard) { - SdXImpressDocument* pDoc = comphelper::getUnoTunnelImplementation<SdXImpressDocument>(this->getUnoModel()); + SdXImpressDocument* pDoc = comphelper::getFromUnoTunnel<SdXImpressDocument>(this->getUnoModel()); SfxLokHelper::notifyDocumentSizeChangedAllViews(pDoc); } } @@ -422,7 +422,7 @@ rtl::Reference<SdrPage> SdDrawDocument::RemovePage(sal_uInt16 nPgNum) if (comphelper::LibreOfficeKit::isActive() && pSdPage->GetPageKind() == PageKind::Standard) { - SdXImpressDocument* pDoc = comphelper::getUnoTunnelImplementation<SdXImpressDocument>(this->getUnoModel()); + SdXImpressDocument* pDoc = comphelper::getFromUnoTunnel<SdXImpressDocument>(this->getUnoModel()); SfxLokHelper::notifyDocumentSizeChangedAllViews(pDoc); } diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 7dd4d94493bf..b6a5a2fd005e 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2689,7 +2689,7 @@ SdPage* SdPage::getImplementation( const css::uno::Reference< css::drawing::XDra { try { - auto pUnoPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>(xPage); + auto pUnoPage = comphelper::getFromUnoTunnel<SvxDrawPage>(xPage); if( pUnoPage ) return static_cast< SdPage* >( pUnoPage->GetSdrPage() ); } diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx index f9f0d9ba91a7..2499588f888e 100644 --- a/sd/source/core/text/textapi.cxx +++ b/sd/source/core/text/textapi.cxx @@ -185,7 +185,7 @@ TextApiObject* TextApiObject::getImplementation( const css::uno::Reference< css: TextApiObject* pImpl = dynamic_cast< TextApiObject* >( xText.get() ); if( !pImpl ) - pImpl = dynamic_cast< TextApiObject* >( comphelper::getUnoTunnelImplementation<SvxUnoTextBase>( xText ) ); + pImpl = dynamic_cast< TextApiObject* >( comphelper::getFromUnoTunnel<SvxUnoTextBase>( xText ) ); return pImpl; } diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index 3286fa857fa5..260a41a118d1 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -431,7 +431,7 @@ uno::Sequence< sal_Int32 > SAL_CALL { return aRet; } - AccessibleShape* pAcc = comphelper::getUnoTunnelImplementation<AccessibleShape>( xAccContent ); + AccessibleShape* pAcc = comphelper::getFromUnoTunnel<AccessibleShape>( xAccContent ); if ( !pAcc ) { return aRet; @@ -495,7 +495,7 @@ OUString AccessibleDrawDocumentView::getObjectLink( const uno::Any& rAny ) { return aRet; } - AccessibleShape* pAcc = comphelper::getUnoTunnelImplementation<AccessibleShape>( xAccContent ); + AccessibleShape* pAcc = comphelper::getFromUnoTunnel<AccessibleShape>( xAccContent ); if ( !pAcc ) { return aRet; @@ -584,7 +584,7 @@ bool if( xShapes.is() ) { - AccessibleShape* pAcc = comphelper::getUnoTunnelImplementation<AccessibleShape>( getAccessibleChild( nAccessibleChildIndex ) ); + AccessibleShape* pAcc = comphelper::getFromUnoTunnel<AccessibleShape>( getAccessibleChild( nAccessibleChildIndex ) ); if( pAcc ) { @@ -631,7 +631,7 @@ void for(sal_Int32 i = 0, nCount = getAccessibleChildCount(); i < nCount; ++i ) { - AccessibleShape* pAcc = comphelper::getUnoTunnelImplementation<AccessibleShape>( getAccessibleChild( i ) ); + AccessibleShape* pAcc = comphelper::getFromUnoTunnel<AccessibleShape>( getAccessibleChild( i ) ); if( pAcc && pAcc->GetXShape().is() ) xShapes->add( pAcc->GetXShape() ); @@ -648,7 +648,7 @@ void // Select or deselect only the child with index // nAccessibleChildIndex. - AccessibleShape* pAcc = comphelper::getUnoTunnelImplementation<AccessibleShape>( + AccessibleShape* pAcc = comphelper::getFromUnoTunnel<AccessibleShape>( getAccessibleChild( nAccessibleChildIndex )); // Add or remove the shape that is made accessible from the diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 067515bdcea2..ea67e78c6adc 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -712,7 +712,7 @@ sal_Int64 SAL_CALL SdTransferable::getSomething( const css::uno::Sequence< sal_I { sal_Int64 nRet; - if( isUnoTunnelId<SdTransferable>(rId) ) + if( comphelper::isUnoTunnelId<SdTransferable>(rId) ) { nRet = sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } @@ -744,7 +744,7 @@ std::shared_ptr<SdTransferable::UserData> SdTransferable::GetUserData (const sal const css::uno::Sequence< sal_Int8 >& SdTransferable::getUnoTunnelId() { - static const UnoTunnelIdInit theSdTransferableUnoTunnelId; + static const comphelper::UnoIdInit theSdTransferableUnoTunnelId; return theSdTransferableUnoTunnelId.getSeq(); } diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 6768fc2fe30b..e4ce13798207 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -116,7 +116,7 @@ sal_Int64 SAL_CALL SdPageObjsTLV::SdPageObjsTransferable::getSomething( const cs { sal_Int64 nRet; - if (isUnoTunnelId<SdPageObjsTLV::SdPageObjsTransferable>(rId)) + if (comphelper::isUnoTunnelId<SdPageObjsTLV::SdPageObjsTransferable>(rId)) { nRet = static_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } @@ -128,7 +128,7 @@ sal_Int64 SAL_CALL SdPageObjsTLV::SdPageObjsTransferable::getSomething( const cs const css::uno::Sequence<sal_Int8>& SdPageObjsTLV::SdPageObjsTransferable::getUnoTunnelId() { - static const UnoTunnelIdInit theSdPageObjsTLBUnoTunnelId; + static const comphelper::UnoIdInit theSdPageObjsTLBUnoTunnelId; return theSdPageObjsTLBUnoTunnelId.getSeq(); } diff --git a/sd/source/ui/framework/factories/Pane.cxx b/sd/source/ui/framework/factories/Pane.cxx index 4596bd73d6f8..bbf081c85c16 100644 --- a/sd/source/ui/framework/factories/Pane.cxx +++ b/sd/source/ui/framework/factories/Pane.cxx @@ -140,7 +140,7 @@ sal_Bool SAL_CALL Pane::isAnchorOnly() const Sequence<sal_Int8>& Pane::getUnoTunnelId() { - static const UnoTunnelIdInit thePaneUnoTunnelId; + static const comphelper::UnoIdInit thePaneUnoTunnelId; return thePaneUnoTunnelId.getSeq(); } @@ -148,7 +148,7 @@ sal_Int64 SAL_CALL Pane::getSomething (const Sequence<sal_Int8>& rId) { sal_Int64 nResult = 0; - if (isUnoTunnelId<Pane>(rId)) + if (comphelper::isUnoTunnelId<Pane>(rId)) { nResult = reinterpret_cast<sal_Int64>(this); } diff --git a/sd/source/ui/framework/factories/PresentationFactory.cxx b/sd/source/ui/framework/factories/PresentationFactory.cxx index 44d46ded8ab7..745b9733e4c1 100644 --- a/sd/source/ui/framework/factories/PresentationFactory.cxx +++ b/sd/source/ui/framework/factories/PresentationFactory.cxx @@ -122,7 +122,7 @@ void SAL_CALL PresentationFactory::releaseResource ( { ThrowIfDisposed(); - auto pController = comphelper::getUnoTunnelImplementation<sd::DrawController>(mxController); + auto pController = comphelper::getFromUnoTunnel<sd::DrawController>(mxController); if (pController != nullptr) { ViewShellBase* pBase = pController->GetViewShellBase(); diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx index 4e285eeae9cb..a689f8882842 100644 --- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx +++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx @@ -213,7 +213,7 @@ sal_Bool SAL_CALL ViewShellWrapper::relocateToAnchor ( const Sequence<sal_Int8>& ViewShellWrapper::getUnoTunnelId() { - static const UnoTunnelIdInit theViewShellWrapperUnoTunnelId; + static const comphelper::UnoIdInit theViewShellWrapperUnoTunnelId; return theViewShellWrapperUnoTunnelId.getSeq(); } @@ -221,7 +221,7 @@ sal_Int64 SAL_CALL ViewShellWrapper::getSomething (const Sequence<sal_Int8>& rId { sal_Int64 nResult = 0; - if (isUnoTunnelId<ViewShellWrapper>(rId)) + if (comphelper::isUnoTunnelId<ViewShellWrapper>(rId)) { nResult = reinterpret_cast<sal_Int64>(this); } diff --git a/sd/source/ui/framework/module/CenterViewFocusModule.cxx b/sd/source/ui/framework/module/CenterViewFocusModule.cxx index afb350666dfe..dbecd4742125 100644 --- a/sd/source/ui/framework/module/CenterViewFocusModule.cxx +++ b/sd/source/ui/framework/module/CenterViewFocusModule.cxx @@ -51,7 +51,7 @@ CenterViewFocusModule::CenterViewFocusModule (Reference<frame::XController> cons mxConfigurationController = xControllerManager->getConfigurationController(); // Tunnel through the controller to obtain a ViewShellBase. - auto pController = comphelper::getUnoTunnelImplementation<sd::DrawController>(rxController); + auto pController = comphelper::getFromUnoTunnel<sd::DrawController>(rxController); if (pController != nullptr) mpBase = pController->GetViewShellBase(); @@ -125,7 +125,7 @@ void CenterViewFocusModule::HandleNewView ( xView.set( mxConfigurationController->getResource(xViewIds[0]),UNO_QUERY); if (mpBase!=nullptr) { - auto pViewShellWrapper = comphelper::getUnoTunnelImplementation<ViewShellWrapper>(xView); + auto pViewShellWrapper = comphelper::getFromUnoTunnel<ViewShellWrapper>(xView); if (pViewShellWrapper != nullptr) { std::shared_ptr<ViewShell> pViewShell = pViewShellWrapper->GetViewShell(); diff --git a/sd/source/ui/framework/module/ShellStackGuard.cxx b/sd/source/ui/framework/module/ShellStackGuard.cxx index 289788baebd6..95712cc43ab9 100644 --- a/sd/source/ui/framework/module/ShellStackGuard.cxx +++ b/sd/source/ui/framework/module/ShellStackGuard.cxx @@ -49,7 +49,7 @@ ShellStackGuard::ShellStackGuard (Reference<frame::XController> const & rxContro mxConfigurationController = xControllerManager->getConfigurationController(); // Tunnel through the controller to obtain a ViewShellBase. - auto pController = comphelper::getUnoTunnelImplementation<sd::DrawController>(rxController); + auto pController = comphelper::getFromUnoTunnel<sd::DrawController>(rxController); if (pController != nullptr) mpBase = pController->GetViewShellBase(); } diff --git a/sd/source/ui/framework/module/ToolBarModule.cxx b/sd/source/ui/framework/module/ToolBarModule.cxx index f5cb3f8078fa..e513439128f0 100644 --- a/sd/source/ui/framework/module/ToolBarModule.cxx +++ b/sd/source/ui/framework/module/ToolBarModule.cxx @@ -47,7 +47,7 @@ ToolBarModule::ToolBarModule ( mbMainViewSwitchUpdatePending(false) { // Tunnel through the controller to obtain a ViewShellBase. - auto pController = comphelper::getUnoTunnelImplementation<sd::DrawController>(rxController); + auto pController = comphelper::getFromUnoTunnel<sd::DrawController>(rxController); if (pController != nullptr) mpBase = pController->GetViewShellBase(); diff --git a/sd/source/ui/sidebar/PanelFactory.cxx b/sd/source/ui/sidebar/PanelFactory.cxx index 34e52212cab6..04df3580adb6 100644 --- a/sd/source/ui/sidebar/PanelFactory.cxx +++ b/sd/source/ui/sidebar/PanelFactory.cxx @@ -84,7 +84,7 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( // Tunnel through the controller to obtain a ViewShellBase. ViewShellBase* pBase = nullptr; - auto pController = comphelper::getUnoTunnelImplementation<sd::DrawController>(xFrame->getController()); + auto pController = comphelper::getFromUnoTunnel<sd::DrawController>(xFrame->getController()); if (pController != nullptr) pBase = pController->GetViewShellBase(); if (pBase == nullptr) diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index 4f02a5864ef6..8ae9d0a9b8aa 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -1082,7 +1082,7 @@ IMPL_LINK_NOARG(SlideBackground, PaperSizeModifyHdl, weld::ComboBox&, void) { if (pViewShell->GetDocId() == mrBase.GetDocId()) { - SdXImpressDocument* pDoc = comphelper::getUnoTunnelImplementation<SdXImpressDocument>(pViewShell->GetCurrentDocument()); + SdXImpressDocument* pDoc = comphelper::getFromUnoTunnel<SdXImpressDocument>(pViewShell->GetCurrentDocument()); SfxLokHelper::notifyDocumentSizeChangedAllViews(pDoc); } pViewShell = SfxViewShell::GetNext(*pViewShell); diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index e477f8b9b725..39a763ec8c45 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -555,7 +555,7 @@ Reference<XModuleController> SAL_CALL const Sequence<sal_Int8>& DrawController::getUnoTunnelId() { - static const UnoTunnelIdInit theDrawControllerUnoTunnelId; + static const comphelper::UnoIdInit theDrawControllerUnoTunnelId; return theDrawControllerUnoTunnelId.getSeq(); } @@ -563,7 +563,7 @@ sal_Int64 SAL_CALL DrawController::getSomething (const Sequence<sal_Int8>& rId) { sal_Int64 nResult = 0; - if (isUnoTunnelId<DrawController>(rId)) + if (comphelper::isUnoTunnelId<DrawController>(rId)) { nResult = sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx index 7c0de17775ce..6a5f76a6a55c 100644 --- a/sd/source/ui/unoidl/SdUnoDrawView.cxx +++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx @@ -116,7 +116,7 @@ Reference<drawing::XLayer> SdUnoDrawView::getActiveLayer() const // Get the corresponding XLayer object from the implementation // object of the layer manager. Reference<drawing::XLayerManager> xManager (pModel->getLayerManager(), uno::UNO_QUERY); - SdLayerManager* pManager = comphelper::getUnoTunnelImplementation<SdLayerManager> (xManager); + SdLayerManager* pManager = comphelper::getFromUnoTunnel<SdLayerManager> (xManager); if (pManager != nullptr) xCurrentLayer = pManager->GetLayer (pLayer); } @@ -131,7 +131,7 @@ void SdUnoDrawView::setActiveLayer (const Reference<drawing::XLayer>& rxLayer) if ( ! rxLayer.is()) return; - SdLayer* pLayer = comphelper::getUnoTunnelImplementation<SdLayer> (rxLayer); + SdLayer* pLayer = comphelper::getFromUnoTunnel<SdLayer> (rxLayer); if (pLayer == nullptr) return; @@ -265,7 +265,7 @@ Any SAL_CALL SdUnoDrawView::getSelection() if(!xPage.is()) continue; - SvxDrawPage* pDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( xPage ); + SvxDrawPage* pDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage ); if(pDrawPage==nullptr) continue; @@ -400,7 +400,7 @@ Any SAL_CALL SdUnoDrawView::getFastPropertyValue ( void SAL_CALL SdUnoDrawView::setCurrentPage ( const Reference< drawing::XDrawPage >& xPage ) { - SvxDrawPage* pDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( xPage ); + SvxDrawPage* pDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage ); SdrPage *pSdrPage = pDrawPage ? pDrawPage->GetSdrPage() : nullptr; if(pSdrPage) @@ -510,7 +510,7 @@ SdXImpressDocument* SdUnoDrawView::GetModel() const noexcept if (mrView.GetDocSh()!=nullptr) { Reference<frame::XModel> xModel (mrView.GetDocSh()->GetModel()); - return comphelper::getUnoTunnelImplementation<SdXImpressDocument>(xModel); + return comphelper::getFromUnoTunnel<SdXImpressDocument>(xModel); } else return nullptr; diff --git a/sd/source/ui/unoidl/SdUnoOutlineView.cxx b/sd/source/ui/unoidl/SdUnoOutlineView.cxx index 93c5bcc647cb..6b98f21401ed 100644 --- a/sd/source/ui/unoidl/SdUnoOutlineView.cxx +++ b/sd/source/ui/unoidl/SdUnoOutlineView.cxx @@ -73,7 +73,7 @@ void SAL_CALL SdUnoOutlineView::removeSelectionChangeListener ( void SAL_CALL SdUnoOutlineView::setCurrentPage ( const Reference< drawing::XDrawPage >& xPage) { - SvxDrawPage* pDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( xPage ); + SvxDrawPage* pDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage ); SdrPage *pSdrPage = pDrawPage ? pDrawPage->GetSdrPage() : nullptr; SdPage *pSdPage = dynamic_cast<SdPage*>(pSdrPage); diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx index 27716bd781a6..e5c9eb16e021 100644 --- a/sd/source/ui/unoidl/unocpres.cxx +++ b/sd/source/ui/unoidl/unocpres.cxx @@ -93,7 +93,7 @@ void SAL_CALL SdXCustomPresentation::insertByIndex( sal_Int32 Index, const uno:: if(!xPage.is()) throw lang::IllegalArgumentException(); - SdDrawPage* pPage = comphelper::getUnoTunnelImplementation<SdDrawPage>( xPage ); + SdDrawPage* pPage = comphelper::getFromUnoTunnel<SdDrawPage>( xPage ); if(pPage) { @@ -125,7 +125,7 @@ void SAL_CALL SdXCustomPresentation::removeByIndex( sal_Int32 Index ) if( xPage.is() ) { - SvxDrawPage* pPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( xPage ); + SvxDrawPage* pPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage ); if(pPage) { SdCustomShow::PageVec::iterator it = std::find( @@ -316,7 +316,7 @@ void SAL_CALL SdXCustomPresentationAccess::insertByName( const OUString& aName, uno::Reference< container::XIndexContainer > xContainer; if( (aElement >>= xContainer) && xContainer.is() ) - pXShow = comphelper::getUnoTunnelImplementation<SdXCustomPresentation>(xContainer); + pXShow = comphelper::getFromUnoTunnel<SdXCustomPresentation>(xContainer); if( nullptr == pXShow ) throw lang::IllegalArgumentException(); diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx index eb84735296da..3ffc7249d9a6 100644 --- a/sd/source/ui/unoidl/unolayer.cxx +++ b/sd/source/ui/unoidl/unolayer.cxx @@ -458,7 +458,7 @@ void SAL_CALL SdLayerManager::remove( const uno::Reference< drawing::XLayer >& x if( mpModel == nullptr ) throw lang::DisposedException(); - SdLayer* pSdLayer = comphelper::getUnoTunnelImplementation<SdLayer>(xLayer); + SdLayer* pSdLayer = comphelper::getFromUnoTunnel<SdLayer>(xLayer); if(pSdLayer && GetView()) { @@ -478,7 +478,7 @@ void SAL_CALL SdLayerManager::attachShapeToLayer( const uno::Reference< drawing: if( mpModel == nullptr ) throw lang::DisposedException(); - SdLayer* pSdLayer = comphelper::getUnoTunnelImplementation<SdLayer>(xLayer); + SdLayer* pSdLayer = comphelper::getFromUnoTunnel<SdLayer>(xLayer); SdrLayer* pSdrLayer = pSdLayer?pSdLayer->GetSdrLayer():nullptr; if(pSdrLayer==nullptr) return; @@ -664,7 +664,7 @@ bool compare_layers (const uno::WeakReference<uno::XInterface>& xRef, void const uno::Reference<uno::XInterface> xLayer (xRef); if (xLayer.is()) { - SdLayer* pSdLayer = comphelper::getUnoTunnelImplementation<SdLayer> (xRef); + SdLayer* pSdLayer = comphelper::getFromUnoTunnel<SdLayer> (xRef); if (pSdLayer != nullptr) { SdrLayer* pSdrLayer = pSdLayer->GetSdrLayer (); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 6d59720e7de5..55d1ff923d92 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -338,16 +338,16 @@ void SAL_CALL SdXImpressDocument::release() noexcept // XUnoTunnel const css::uno::Sequence< sal_Int8 > & SdXImpressDocument::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSdXImpressDocumentUnoTunnelId; + static const comphelper::UnoIdInit theSdXImpressDocumentUnoTunnelId; return theSdXImpressDocumentUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SdXImpressDocument::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) { - if( isUnoTunnelId<SdXImpressDocument>(rIdentifier) ) + if( comphelper::isUnoTunnelId<SdXImpressDocument>(rIdentifier) ) return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); - if( isUnoTunnelId<SdrModel>(rIdentifier) ) + if( comphelper::isUnoTunnelId<SdrModel>(rIdentifier) ) return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(mpDoc)); return SfxBaseModel::getSomething( rIdentifier ); @@ -665,7 +665,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdXImpressDocument::duplicate( con throw lang::DisposedException(); // get pPage from xPage and determine the Id (nPos ) afterwards - SvxDrawPage* pSvxPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( xPage ); + SvxDrawPage* pSvxPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage ); if( pSvxPage ) { SdPage* pPage = static_cast<SdPage*>( pSvxPage->GetSdrPage() ); @@ -1052,7 +1052,7 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create( } uno::Reference< drawing::XShape > xShape( xRet, uno::UNO_QUERY ); - SvxShape* pShape = xShape.is() ? comphelper::getUnoTunnelImplementation<SvxShape>(xShape) : nullptr; + SvxShape* pShape = xShape.is() ? comphelper::getFromUnoTunnel<SvxShape>(xShape) : nullptr; if (pShape) { xRet.clear(); @@ -1872,7 +1872,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r if( !(xRenderDevice.is() && nPageNumber && ( nPageNumber <= mpDoc->GetSdPageCount( ePageKind ) )) ) return; - VCLXDevice* pDevice = comphelper::getUnoTunnelImplementation<VCLXDevice>( xRenderDevice ); + VCLXDevice* pDevice = comphelper::getFromUnoTunnel<VCLXDevice>( xRenderDevice ); VclPtr< OutputDevice> pOut = pDevice ? pDevice->GetOutputDevice() : VclPtr< OutputDevice >(); if( !pOut ) @@ -2971,7 +2971,7 @@ void SAL_CALL SdDrawPagesAccess::remove( const uno::Reference< drawing::XDrawPag if( nPageCount > 1 ) { // get pPage from xPage and determine the Id (nPos ) afterwards - SdDrawPage* pSvxPage = comphelper::getUnoTunnelImplementation<SdDrawPage>( xPage ); + SdDrawPage* pSvxPage = comphelper::getFromUnoTunnel<SdDrawPage>( xPage ); if( pSvxPage ) { SdPage* pPage = static_cast<SdPage*>(pSvxPage->GetSdrPage()); @@ -3211,7 +3211,7 @@ void SAL_CALL SdMasterPagesAccess::remove( const uno::Reference< drawing::XDrawP if( nullptr == mpModel || mpModel->mpDoc == nullptr ) throw lang::DisposedException(); - SdMasterPage* pSdPage = comphelper::getUnoTunnelImplementation<SdMasterPage>( xPage ); + SdMasterPage* pSdPage = comphelper::getFromUnoTunnel<SdMasterPage>( xPage ); if(pSdPage == nullptr) return; diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index e80bf3f20591..9010a31f448d 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -324,13 +324,13 @@ static const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKin const css::uno::Sequence< sal_Int8 > & SdGenericDrawPage::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSdGenericDrawPageUnoTunnelId; + static const comphelper::UnoIdInit theSdGenericDrawPageUnoTunnelId; return theSdGenericDrawPageUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SdGenericDrawPage::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SdGenericDrawPage>(rId) ) + if( comphelper::isUnoTunnelId<SdGenericDrawPage>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } @@ -386,7 +386,7 @@ void SdGenericDrawPage::UpdateModel() if( mpSdrModel ) { uno::Reference< uno::XInterface > xModel( SvxFmDrawPage::mpModel->getUnoModel() ); - mpDocModel = comphelper::getUnoTunnelImplementation<SdXImpressDocument>( xModel ); + mpDocModel = comphelper::getFromUnoTunnel<SdXImpressDocument>( xModel ); } else { @@ -1467,13 +1467,13 @@ Reference< drawing::XShape > SdGenericDrawPage::CreateShape(SdrObject *pObj) co } if( !pShape ) - pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape ); + pShape = comphelper::getFromUnoTunnel<SvxShape>( xShape ); if( pShape ) pShape->SetShapeType( aShapeType ); } - SvxShape *pSdShape = comphelper::getUnoTunnelImplementation<SvxShape>(xShape); + SvxShape *pSdShape = comphelper::getFromUnoTunnel<SvxShape>(xShape); if (pSdShape) { // SdXShape aggregates SvxShape @@ -2327,7 +2327,7 @@ void SAL_CALL SdDrawPage::setMasterPage( const Reference< drawing::XDrawPage >& if(!SvxFmDrawPage::mpPage) return; - SdMasterPage* pMasterPage = comphelper::getUnoTunnelImplementation<SdMasterPage>( xMasterPage ); + SdMasterPage* pMasterPage = comphelper::getFromUnoTunnel<SdMasterPage>( xMasterPage ); if( !(pMasterPage && pMasterPage->isValid()) ) return; @@ -2432,7 +2432,7 @@ void SdDrawPage::setBackground( const Any& rValue ) } // is it our own implementation? - SdUnoPageBackground* pBack = comphelper::getUnoTunnelImplementation<SdUnoPageBackground>( xSet ); + SdUnoPageBackground* pBack = comphelper::getFromUnoTunnel<SdUnoPageBackground>( xSet ); SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST> ); @@ -2800,7 +2800,7 @@ void SdMasterPage::setBackground( const Any& rValue ) { // first fill an item set // is it our own implementation? - SdUnoPageBackground* pBack = comphelper::getUnoTunnelImplementation<SdUnoPageBackground>( xInputSet ); + SdUnoPageBackground* pBack = comphelper::getFromUnoTunnel<SdUnoPageBackground>( xInputSet ); SfxItemSet aSet( GetModel()->GetDoc()->GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST> ); @@ -3015,7 +3015,7 @@ Reference< uno::XInterface > createUnoPageImpl( SdPage* pPage ) if( pPage ) { - SdXImpressDocument* pModel = comphelper::getUnoTunnelImplementation<SdXImpressDocument>( pPage->getSdrModelFromSdrPage().getUnoModel() ); + SdXImpressDocument* pModel = comphelper::getFromUnoTunnel<SdXImpressDocument>( pPage->getSdrModelFromSdrPage().getUnoModel() ); if( pModel ) { if( pPage->IsMasterPage() ) diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx index 271429c8cdaf..b04bb3da754e 100644 --- a/sd/source/ui/unoidl/unosrch.cxx +++ b/sd/source/ui/unoidl/unosrch.cxx @@ -106,7 +106,7 @@ uno::Reference< util::XReplaceDescriptor > SAL_CALL SdUnoSearchReplaceShape::cre sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< util::XSearchDescriptor >& xDesc ) { - SdUnoSearchReplaceDescriptor* pDescr = comphelper::getUnoTunnelImplementation<SdUnoSearchReplaceDescriptor>( xDesc ); + SdUnoSearchReplaceDescriptor* pDescr = comphelper::getFromUnoTunnel<SdUnoSearchReplaceDescriptor>( xDesc ); if( pDescr == nullptr ) return 0; @@ -186,7 +186,7 @@ uno::Reference< css::util::XSearchDescriptor > SAL_CALL SdUnoSearchReplaceShape: uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape::findAll( const css::uno::Reference< css::util::XSearchDescriptor >& xDesc ) { - SdUnoSearchReplaceDescriptor* pDescr = comphelper::getUnoTunnelImplementation<SdUnoSearchReplaceDescriptor>( xDesc ); + SdUnoSearchReplaceDescriptor* pDescr = comphelper::getFromUnoTunnel<SdUnoSearchReplaceDescriptor>( xDesc ); if( pDescr == nullptr ) return uno::Reference< container::XIndexAccess > (); @@ -298,7 +298,7 @@ uno::Reference< drawing::XShape > SdUnoSearchReplaceShape::GetCurrentShape() co uno::Reference< css::uno::XInterface > SAL_CALL SdUnoSearchReplaceShape::findNext( const css::uno::Reference< css::uno::XInterface >& xStartAt, const css::uno::Reference< css::util::XSearchDescriptor >& xDesc ) { - SdUnoSearchReplaceDescriptor* pDescr = comphelper::getUnoTunnelImplementation<SdUnoSearchReplaceDescriptor>( xDesc ); + SdUnoSearchReplaceDescriptor* pDescr = comphelper::getFromUnoTunnel<SdUnoSearchReplaceDescriptor>( xDesc ); uno::Reference< uno::XInterface > xFound; @@ -546,7 +546,7 @@ uno::Reference< text::XTextRange > SdUnoSearchReplaceShape::Search( const uno:: ESelection aSelection( pConvertPara[nStartPos], pConvertPos[nStartPos], pConvertPara[nEndPos], pConvertPos[nEndPos] ); - SvxUnoTextBase* pParent = comphelper::getUnoTunnelImplementation<SvxUnoTextBase>( xParent ); + SvxUnoTextBase* pParent = comphelper::getFromUnoTunnel<SvxUnoTextBase>( xParent ); if(pParent) { @@ -600,7 +600,7 @@ bool SdUnoSearchReplaceShape::Search( const OUString& rText, sal_Int32& nStartPo ESelection SdUnoSearchReplaceShape::GetSelection( const uno::Reference< text::XTextRange >& xTextRange ) noexcept { ESelection aSel; - SvxUnoTextRangeBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextRangeBase>( xTextRange ); + SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( xTextRange ); if(pRange) aSel = pRange->GetSelection(); diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index feeb2c1b7b00..34c6c9c9336b 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1205,7 +1205,7 @@ public: if (aDev >>= xRenderDevice) { - VCLXDevice* pDevice = comphelper::getUnoTunnelImplementation<VCLXDevice>(xRenderDevice); + VCLXDevice* pDevice = comphelper::getFromUnoTunnel<VCLXDevice>(xRenderDevice); VclPtr< OutputDevice > pOut = pDevice ? pDevice->GetOutputDevice() : VclPtr< OutputDevice >(); mpPrinter = dynamic_cast<Printer*>(pOut.get()); diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx index 3760d34dcc5c..92bfd880ad55 100644 --- a/sd/source/ui/view/ViewTabBar.cxx +++ b/sd/source/ui/view/ViewTabBar.cxx @@ -275,7 +275,7 @@ sal_Bool SAL_CALL ViewTabBar::isAnchorOnly() const Sequence<sal_Int8>& ViewTabBar::getUnoTunnelId() { - static const UnoTunnelIdInit theViewTabBarUnoTunnelId; + static const comphelper::UnoIdInit theViewTabBarUnoTunnelId; return theViewTabBarUnoTunnelId.getSeq(); } @@ -283,7 +283,7 @@ sal_Int64 SAL_CALL ViewTabBar::getSomething (const Sequence<sal_Int8>& rId) { sal_Int64 nResult = 0; - if (isUnoTunnelId<ViewTabBar>(rId)) + if (comphelper::isUnoTunnelId<ViewTabBar>(rId)) { nResult = reinterpret_cast<sal_Int64>(this); } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 613b8cf0f7b7..111f39ec5593 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1732,7 +1732,7 @@ void SfxDispatcher::ExecutePopup( const OUString& rResName, vcl::Window* pWin, c aEvent.ExecutePosition.Y = aPos.Y(); xPopupController->setPopupMenu( xPopupMenu ); - VCLXMenu* pAwtMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( xPopupMenu ); + VCLXMenu* pAwtMenu = comphelper::getFromUnoTunnel<VCLXMenu>( xPopupMenu ); PopupMenu* pVCLMenu = static_cast< PopupMenu* >( pAwtMenu->GetMenu() ); if (comphelper::LibreOfficeKit::isActive()) { diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx index 468a93cf66f6..cc0fdd592617 100644 --- a/sfx2/source/control/thumbnailviewacc.cxx +++ b/sfx2/source/control/thumbnailviewacc.cxx @@ -48,7 +48,7 @@ ThumbnailViewAcc::~ThumbnailViewAcc() const uno::Sequence< sal_Int8 >& ThumbnailViewAcc::getUnoTunnelId() { - static const UnoTunnelIdInit theSfxValueSetAccUnoTunnelId; + static const comphelper::UnoIdInit theSfxValueSetAccUnoTunnelId; return theSfxValueSetAccUnoTunnelId.getSeq(); } @@ -57,7 +57,7 @@ ThumbnailViewAcc* ThumbnailViewAcc::getImplementation( const uno::Reference< uno { try { - return comphelper::getUnoTunnelImplementation<ThumbnailViewAcc>(rxData); + return comphelper::getFromUnoTunnel<ThumbnailViewAcc>(rxData); } catch(const css::uno::Exception&) { @@ -441,7 +441,7 @@ sal_Int64 SAL_CALL ThumbnailViewAcc::getSomething( const uno::Sequence< sal_Int8 { sal_Int64 nRet; - if( isUnoTunnelId<ThumbnailViewAcc>(rId) ) + if( comphelper::isUnoTunnelId<ThumbnailViewAcc>(rId) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; @@ -548,7 +548,7 @@ void ThumbnailViewAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOld const uno::Sequence< sal_Int8 >& ThumbnailViewItemAcc::getUnoTunnelId() { - static const UnoTunnelIdInit theValueItemAccUnoTunnelId; + static const comphelper::UnoIdInit theValueItemAccUnoTunnelId; return theValueItemAccUnoTunnelId.getSeq(); } @@ -557,7 +557,7 @@ ThumbnailViewItemAcc* ThumbnailViewItemAcc::getImplementation( const uno::Refere { try { - return comphelper::getUnoTunnelImplementation<ThumbnailViewItemAcc>(rxData); + return comphelper::getFromUnoTunnel<ThumbnailViewItemAcc>(rxData); } catch(const css::uno::Exception&) { @@ -873,7 +873,7 @@ sal_Int64 SAL_CALL ThumbnailViewItemAcc::getSomething( const uno::Sequence< sal_ { sal_Int64 nRet; - if( isUnoTunnelId<ThumbnailViewItemAcc>(rId) ) + if( comphelper::isUnoTunnelId<ThumbnailViewItemAcc>(rId) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 5da675a3dcb4..b38383e23a8f 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -626,7 +626,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) css::uno::Reference< css::uno::XInterface > xInterface; const SfxUnoAnyItem* pUnoAny = pReq->GetArg<SfxUnoAnyItem>(FN_PARAM_2); AsyncFunc* pAsyncFunc = pUnoAny && (pUnoAny->GetValue() >>= xInterface ) ? - comphelper::getUnoTunnelImplementation<AsyncFunc>(xInterface) : nullptr; + comphelper::getFromUnoTunnel<AsyncFunc>(xInterface) : nullptr; if (pAsyncFunc) pAsyncFunc->Execute(); @@ -2063,7 +2063,7 @@ void SfxObjectShell::SignScriptingContent(weld::Window* pDialogParent) const uno::Sequence<sal_Int8>& SfxObjectShell::getUnoTunnelId() { - static const UnoTunnelIdInit theSfxObjectShellUnoTunnelId; + static const comphelper::UnoIdInit theSfxObjectShellUnoTunnelId; return theSfxObjectShellUnoTunnelId.getSeq(); } diff --git a/starmath/source/mathml/export.cxx b/starmath/source/mathml/export.cxx index 11e91e35cbfc..a1e768bd71bd 100644 --- a/starmath/source/mathml/export.cxx +++ b/starmath/source/mathml/export.cxx @@ -83,7 +83,7 @@ bool SmMLExportWrapper::Export(SfxMedium& rMedium) //Get model uno::Reference<lang::XComponent> xModelComp = m_xModel; SAL_WARN_IF(xModelComp == nullptr, "starmath", "Missing model component"); - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(m_xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(m_xModel); SAL_WARN_IF(pModel == nullptr, "starmath", "Failed to get threw uno tunnel"); if (xModelComp == nullptr || pModel == nullptr) return false; @@ -251,7 +251,7 @@ OUString SmMLExportWrapper::Export(SmMlElement* pElementTree) //Get model uno::Reference<lang::XComponent> xModelComp = m_xModel; SAL_WARN_IF(xModelComp == nullptr, "starmath", "Missing model component"); - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(m_xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(m_xModel); SAL_WARN_IF(pModel == nullptr, "starmath", "Failed to get threw uno tunnel"); if (xModelComp == nullptr || pModel == nullptr) return u""; @@ -336,7 +336,7 @@ bool SmMLExportWrapper::WriteThroughComponentOS(const Reference<io::XOutputStrea // filter if (nSyntaxVersion == 5) { - SmXMLExport* pFilter = comphelper::getUnoTunnelImplementation<SmXMLExport>(xFilter); + SmXMLExport* pFilter = comphelper::getFromUnoTunnel<SmXMLExport>(xFilter); if (pFilter == nullptr) { SAL_WARN("starmath", "Failed to fetch SmMLExport"); @@ -347,7 +347,7 @@ bool SmMLExportWrapper::WriteThroughComponentOS(const Reference<io::XOutputStrea } // filter - SmMLExport* pFilter = comphelper::getUnoTunnelImplementation<SmMLExport>(xFilter); + SmMLExport* pFilter = comphelper::getFromUnoTunnel<SmMLExport>(xFilter); // Setup filter if (pFilter == nullptr) @@ -446,14 +446,14 @@ SmMLExportWrapper::WriteThroughComponentMS(const Reference<XComponent>& xCompone sal_Int64 SAL_CALL SmMLExport::getSomething(const uno::Sequence<sal_Int8>& rId) { - if (isUnoTunnelId<SmMLExport>(rId)) + if (comphelper::isUnoTunnelId<SmMLExport>(rId)) return reinterpret_cast<intptr_t>(this); return SvXMLExport::getSomething(rId); } const uno::Sequence<sal_Int8>& SmMLExport::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSmMLExportUnoTunnelId; + static const comphelper::UnoIdInit theSmMLExportUnoTunnelId; return theSmMLExportUnoTunnelId.getSeq(); } @@ -491,7 +491,7 @@ Math_MLContentExporter_get_implementation(css::uno::XComponentContext* context, SmDocShell* SmMLExport::getSmDocShell() { - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(GetModel()); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(GetModel()); if (pModel != nullptr) return static_cast<SmDocShell*>(pModel->GetObjectShell()); return nullptr; diff --git a/starmath/source/mathml/import.cxx b/starmath/source/mathml/import.cxx index b16933fbff22..b03f9cefbbdd 100644 --- a/starmath/source/mathml/import.cxx +++ b/starmath/source/mathml/import.cxx @@ -106,7 +106,7 @@ ErrCode SmMLImportWrapper::Import(SfxMedium& rMedium) uno::Reference<task::XStatusIndicator> xStatusIndicator; // Get model via uno - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(m_xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(m_xModel); if (pModel == nullptr) { SAL_WARN("starmath", "Failed to fetch sm model while file input"); @@ -331,7 +331,7 @@ ErrCode SmMLImportWrapper::Import(std::u16string_view aSource) } // Get model via uno - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(m_xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(m_xModel); if (pModel == nullptr) { SAL_WARN("starmath", "Failed to fetch sm model while file input"); @@ -437,7 +437,7 @@ ErrCode SmMLImportWrapper::ReadThroughComponentIS( if (nSyntaxVersion == 5) { - SmXMLImport* pXMlImport = comphelper::getUnoTunnelImplementation<SmXMLImport>(xFilter); + SmXMLImport* pXMlImport = comphelper::getFromUnoTunnel<SmXMLImport>(xFilter); if (pXMlImport != nullptr && pXMlImport->GetSuccess()) return ERRCODE_NONE; else @@ -447,7 +447,7 @@ ErrCode SmMLImportWrapper::ReadThroughComponentIS( } } - m_pMlImport = comphelper::getUnoTunnelImplementation<SmMLImport>(xFilter); + m_pMlImport = comphelper::getFromUnoTunnel<SmMLImport>(xFilter); if (m_pMlImport != nullptr && m_pMlImport->getSuccess()) return ERRCODE_NONE; else @@ -1207,13 +1207,13 @@ void SmMLImportContext::endFastElement(sal_Int32) { inheritStyleEnd(); } const uno::Sequence<sal_Int8>& SmMLImport::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSmMLImportUnoTunnelId; + static const comphelper::UnoIdInit theSmMLImportUnoTunnelId; return theSmMLImportUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SmMLImport::getSomething(const uno::Sequence<sal_Int8>& rId) { - if (isUnoTunnelId<SmMLImport>(rId)) + if (comphelper::isUnoTunnelId<SmMLImport>(rId)) return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); return SvXMLImport::getSomething(rId); @@ -1267,7 +1267,7 @@ void SmMLImport::endDocument() return; } - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(xModel); if (!pModel) { SAL_WARN("starmath", "Failed to set view settings because missing sm model"); @@ -1319,7 +1319,7 @@ void SmMLImport::SetViewSettings(const Sequence<PropertyValue>& aViewProps) return; } - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(xModel); if (!pModel) { SAL_WARN("starmath", "Failed to set view settings because missing sm model"); diff --git a/starmath/source/mathml/mathmlexport.cxx b/starmath/source/mathml/mathmlexport.cxx index e9fc5a3de11d..7e35757536b6 100644 --- a/starmath/source/mathml/mathmlexport.cxx +++ b/starmath/source/mathml/mathmlexport.cxx @@ -99,7 +99,7 @@ bool SmXMLExportWrapper::Export(SfxMedium& rMedium) uno::Reference<lang::XComponent> xModelComp = xModel; bool bEmbedded = false; - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(xModel); SmDocShell* pDocShell = pModel ? static_cast<SmDocShell*>(pModel->GetObjectShell()) : nullptr; if (pDocShell && SfxObjectCreateMode::EMBEDDED == pDocShell->GetCreateMode()) @@ -266,7 +266,7 @@ bool SmXMLExportWrapper::WriteThroughComponent(const Reference<io::XOutputStream uno::Sequence<PropertyValue> aProps(0); xFilter->filter(aProps); - auto pFilter = comphelper::getUnoTunnelImplementation<SmXMLExport>(xFilter); + auto pFilter = comphelper::getFromUnoTunnel<SmXMLExport>(xFilter); return pFilter == nullptr || pFilter->GetSuccess(); } @@ -324,7 +324,7 @@ SmXMLExport::SmXMLExport(const css::uno::Reference<css::uno::XComponentContext>& sal_Int64 SAL_CALL SmXMLExport::getSomething(const uno::Sequence<sal_Int8>& rId) { - if (isUnoTunnelId<SmXMLExport>(rId)) + if (comphelper::isUnoTunnelId<SmXMLExport>(rId)) return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); return SvXMLExport::getSomething(rId); @@ -332,7 +332,7 @@ sal_Int64 SAL_CALL SmXMLExport::getSomething(const uno::Sequence<sal_Int8>& rId) const uno::Sequence<sal_Int8>& SmXMLExport::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSmXMLExportUnoTunnelId; + static const comphelper::UnoIdInit theSmXMLExportUnoTunnelId; return theSmXMLExportUnoTunnelId.getSeq(); } @@ -393,7 +393,7 @@ ErrCode SmXMLExport::exportDoc(enum XMLTokenEnum eClass) else { uno::Reference<frame::XModel> xModel = GetModel(); - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(xModel); if (pModel) { @@ -428,7 +428,7 @@ ErrCode SmXMLExport::exportDoc(enum XMLTokenEnum eClass) void SmXMLExport::ExportContent_() { uno::Reference<frame::XModel> xModel = GetModel(); - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(xModel); SmDocShell* pDocShell = pModel ? static_cast<SmDocShell*>(pModel->GetObjectShell()) : nullptr; OSL_ENSURE(pDocShell, "doc shell missing"); @@ -487,7 +487,7 @@ void SmXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps) if (!xModel.is()) return; - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(xModel); if (!pModel) return; diff --git a/starmath/source/mathml/mathmlimport.cxx b/starmath/source/mathml/mathmlimport.cxx index 131eda86bb9f..db5426cd927b 100644 --- a/starmath/source/mathml/mathmlimport.cxx +++ b/starmath/source/mathml/mathmlimport.cxx @@ -106,7 +106,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium) uno::Reference<task::XStatusIndicator> xStatusIndicator; bool bEmbedded = false; - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(xModel); SmDocShell* pDocShell = pModel ? static_cast<SmDocShell*>(pModel->GetObjectShell()) : nullptr; if (pDocShell) @@ -296,7 +296,7 @@ ErrCode SmXMLImportWrapper::ReadThroughComponent(const Reference<io::XInputStrea xParser->parseStream(aParserInput); } - auto pFilter = comphelper::getUnoTunnelImplementation<SmXMLImport>(xFilter); + auto pFilter = comphelper::getFromUnoTunnel<SmXMLImport>(xFilter); if (pFilter && pFilter->GetSuccess()) nError = ERRCODE_NONE; } @@ -408,7 +408,7 @@ SmXMLImport::SmXMLImport(const css::uno::Reference<css::uno::XComponentContext>& const uno::Sequence<sal_Int8>& SmXMLImport::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSmXMLImportUnoTunnelId; + static const comphelper::UnoIdInit theSmXMLImportUnoTunnelId; return theSmXMLImportUnoTunnelId.getSeq(); } @@ -438,7 +438,7 @@ Math_XMLOasisSettingsImporter_get_implementation(uno::XComponentContext* pCtx, sal_Int64 SAL_CALL SmXMLImport::getSomething(const uno::Sequence<sal_Int8>& rId) { - if (isUnoTunnelId<SmXMLImport>(rId)) + if (comphelper::isUnoTunnelId<SmXMLImport>(rId)) return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); return SvXMLImport::getSomething(rId); @@ -451,7 +451,7 @@ void SmXMLImport::endDocument() if (pTree && pTree->GetType() == SmNodeType::Table) { uno::Reference<frame::XModel> xModel = GetModel(); - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(xModel); if (pModel) { @@ -2581,7 +2581,7 @@ void SmXMLImport::SetViewSettings(const Sequence<PropertyValue>& aViewProps) if (!xModel.is()) return; - SmModel* pModel = comphelper::getUnoTunnelImplementation<SmModel>(xModel); + SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(xModel); if (!pModel) return; diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 0009253fbcfe..c9f27f4dd082 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -357,13 +357,13 @@ uno::Sequence< uno::Type > SAL_CALL SmModel::getTypes( ) const uno::Sequence< sal_Int8 > & SmModel::getUnoTunnelId() { - static const UnoTunnelIdInit theSmModelUnoTunnelId; + static const comphelper::UnoIdInit theSmModelUnoTunnelId; return theSmModelUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SmModel::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SmModel>(rId) ) + if( comphelper::isUnoTunnelId<SmModel>(rId) ) { return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_uIntPtr >(this)); } @@ -988,7 +988,7 @@ void SAL_CALL SmModel::render( if (!xRenderDevice.is()) return; - VCLXDevice* pDevice = comphelper::getUnoTunnelImplementation<VCLXDevice>( xRenderDevice ); + VCLXDevice* pDevice = comphelper::getFromUnoTunnel<VCLXDevice>( xRenderDevice ); VclPtr< OutputDevice> pOut = pDevice ? pDevice->GetOutputDevice() : VclPtr< OutputDevice >(); if (!pOut) diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index ef05e243f798..a5d427d89cdc 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1585,7 +1585,7 @@ void SmViewShell::Execute(SfxRequest& rReq) Reference< datatransfer::XTransferable > xTrans( GetDoc()->GetModel(), uno::UNO_QUERY ); if( xTrans.is() ) { - auto pTrans = comphelper::getUnoTunnelImplementation<TransferableHelper>(xTrans); + auto pTrans = comphelper::getFromUnoTunnel<TransferableHelper>(xTrans); if (pTrans) { SmEditWindow *pEditWin = GetEditWindow(); diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 791a625a7219..206b20f10f97 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -887,7 +887,7 @@ SfxUnoStyleSheet* SfxUnoStyleSheet::getUnoStyleSheet( const css::uno::Reference< { SfxUnoStyleSheet* pRet = dynamic_cast< SfxUnoStyleSheet* >( xStyle.get() ); if( !pRet ) - pRet = comphelper::getUnoTunnelImplementation<SfxUnoStyleSheet>(xStyle); + pRet = comphelper::getFromUnoTunnel<SfxUnoStyleSheet>(xStyle); return pRet; } @@ -896,7 +896,7 @@ SfxUnoStyleSheet* SfxUnoStyleSheet::getUnoStyleSheet( const css::uno::Reference< */ ::sal_Int64 SAL_CALL SfxUnoStyleSheet::getSomething( const css::uno::Sequence< ::sal_Int8 >& rId ) { - if( isUnoTunnelId<SfxUnoStyleSheet>(rId) ) + if( comphelper::isUnoTunnelId<SfxUnoStyleSheet>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } @@ -912,7 +912,7 @@ SfxStyleSheetBasePool::StoreStyleSheet(const rtl::Reference< SfxStyleSheetBase > const css::uno::Sequence< ::sal_Int8 >& SfxUnoStyleSheet::getUnoTunnelId() { - static const UnoTunnelIdInit theSfxUnoStyleSheetIdentifier; + static const comphelper::UnoIdInit theSfxUnoStyleSheetIdentifier; return theSfxUnoStyleSheetIdentifier.getSeq(); } diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx index 8792597f54ff..679dbe16f7fc 100644 --- a/svl/source/numbers/numfmuno.cxx +++ b/svl/source/numbers/numfmuno.cxx @@ -122,7 +122,7 @@ void SAL_CALL SvNumberFormatterServiceObj::attachNumberFormatsSupplier( const un { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - SvNumberFormatsSupplierObj* pNew = comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>( _xSupplier ); + SvNumberFormatsSupplierObj* pNew = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( _xSupplier ); if (!pNew) throw uno::RuntimeException(); // wrong object diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 2f47f2616ae0..8915c319497d 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -79,7 +79,7 @@ void ValueItemAcc::ParentDestroyed() const uno::Sequence< sal_Int8 >& ValueItemAcc::getUnoTunnelId() { - static const UnoTunnelIdInit theValueItemAccUnoTunnelId; + static const comphelper::UnoIdInit theValueItemAccUnoTunnelId; return theValueItemAccUnoTunnelId.getSeq(); } @@ -89,7 +89,7 @@ ValueItemAcc* ValueItemAcc::getImplementation( const uno::Reference< uno::XInter { try { - return comphelper::getUnoTunnelImplementation<ValueItemAcc>(rxData); + return comphelper::getFromUnoTunnel<ValueItemAcc>(rxData); } catch(const css::uno::Exception&) { @@ -397,7 +397,7 @@ sal_Int64 SAL_CALL ValueItemAcc::getSomething( const uno::Sequence< sal_Int8 >& { sal_Int64 nRet; - if( isUnoTunnelId<ValueItemAcc>(rId) ) + if( comphelper::isUnoTunnelId<ValueItemAcc>(rId) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; @@ -464,7 +464,7 @@ void ValueSetAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldValue const uno::Sequence< sal_Int8 >& ValueSetAcc::getUnoTunnelId() { - static const UnoTunnelIdInit theValueSetAccUnoTunnelId; + static const comphelper::UnoIdInit theValueSetAccUnoTunnelId; return theValueSetAccUnoTunnelId.getSeq(); } @@ -474,7 +474,7 @@ ValueSetAcc* ValueSetAcc::getImplementation( const uno::Reference< uno::XInterfa { try { - return comphelper::getUnoTunnelImplementation<ValueSetAcc>(rxData); + return comphelper::getFromUnoTunnel<ValueSetAcc>(rxData); } catch(const css::uno::Exception&) { @@ -916,7 +916,7 @@ sal_Int64 SAL_CALL ValueSetAcc::getSomething( const uno::Sequence< sal_Int8 >& r { sal_Int64 nRet; - if( isUnoTunnelId<ValueSetAcc>(rId) ) + if( comphelper::isUnoTunnelId<ValueSetAcc>(rId) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index 9ac7eb8e03d5..d2645a188c7f 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -566,7 +566,7 @@ SvUnoImageMapObject* SvUnoImageMap::getObject( const Any& aElement ) Reference< XInterface > xObject; aElement >>= xObject; - SvUnoImageMapObject* pObject = comphelper::getUnoTunnelImplementation<SvUnoImageMapObject>( xObject ); + SvUnoImageMapObject* pObject = comphelper::getFromUnoTunnel<SvUnoImageMapObject>( xObject ); if( nullptr == pObject ) throw IllegalArgumentException(); @@ -712,7 +712,7 @@ Reference< XInterface > SvUnoImageMap_createInstance( const ImageMap& rMap, cons bool SvUnoImageMap_fillImageMap( const Reference< XInterface >& xImageMap, ImageMap& rMap ) { - SvUnoImageMap* pUnoImageMap = comphelper::getUnoTunnelImplementation<SvUnoImageMap>( xImageMap ); + SvUnoImageMap* pUnoImageMap = comphelper::getFromUnoTunnel<SvUnoImageMap>( xImageMap ); if( nullptr == pUnoImageMap ) return false; diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 6f280f3d7304..a4f3fc922fa0 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -252,7 +252,7 @@ void SetTemporary( uno::Reference< drawing::XShape > const & xShape ) { if ( xShape.is() ) { - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape ); + SvxShape* pShape = comphelper::getFromUnoTunnel<SvxShape>( xShape ); if ( pShape ) pShape->TakeSdrObjectOwnership(); } diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 52b05f086986..3134c0ce67a9 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -471,7 +471,7 @@ void SAL_CALL FmXGridControl::createPeer(const Reference< css::awt::XToolkit >& vcl::Window* pParentWin = nullptr; if (rParentPeer.is()) { - VCLXWindow* pParent = comphelper::getUnoTunnelImplementation<VCLXWindow>(rParentPeer); + VCLXWindow* pParent = comphelper::getFromUnoTunnel<VCLXWindow>(rParentPeer); if (pParent) pParentWin = pParent->GetWindow(); } @@ -494,7 +494,7 @@ void SAL_CALL FmXGridControl::createPeer(const Reference< css::awt::XToolkit >& // if (--m_nPeerCreationLevel == 0) { DBG_ASSERT(getPeer().is(), "FmXGridControl::createPeer : something went wrong ... no top level peer !"); - pPeer = comphelper::getUnoTunnelImplementation<FmXGridPeer>(getPeer()); + pPeer = comphelper::getFromUnoTunnel<FmXGridPeer>(getPeer()); setPosSize( maComponentInfos.nX, maComponentInfos.nY, maComponentInfos.nWidth, maComponentInfos.nHeight, css::awt::PosSize::POSSIZE ); @@ -966,7 +966,7 @@ sal_Bool SAL_CALL FmXGridControl::supportsMode(const OUString& Mode) void SAL_CALL FmXGridControl::setFocus() { - FmXGridPeer* pPeer = comphelper::getUnoTunnelImplementation<FmXGridPeer>(getPeer()); + FmXGridPeer* pPeer = comphelper::getFromUnoTunnel<FmXGridPeer>(getPeer()); if (pPeer) { VclPtr<FmGridControl> xGrid = pPeer->GetAs<FmGridControl>(); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index c0cb0d1e376c..fb932ef7809f 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1310,7 +1310,7 @@ void DbFormattedField::Init( BrowserDataWin& rParent, const Reference< XRowSet > SvNumberFormatter* pFormatterUsed = nullptr; if (m_xSupplier.is()) { - SvNumberFormatsSupplierObj* pImplementation = comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>(m_xSupplier); + SvNumberFormatsSupplierObj* pImplementation = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>(m_xSupplier); if (pImplementation) pFormatterUsed = pImplementation->GetNumberFormatter(); else @@ -1898,7 +1898,7 @@ void DbNumericField::implAdjustGenericFieldSetting( const Reference< XPropertySe SvNumberFormatter* pFormatterUsed = nullptr; if ( xSupplier.is() ) { - SvNumberFormatsSupplierObj* pImplementation = comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>( xSupplier ); + SvNumberFormatsSupplierObj* pImplementation = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( xSupplier ); pFormatterUsed = pImplementation ? pImplementation->GetNumberFormatter() : nullptr; } if ( nullptr == pFormatterUsed ) @@ -4407,7 +4407,7 @@ sal_Int64 SAL_CALL FmXFilterCell::getSomething( const Sequence< sal_Int8 >& _rId { sal_Int64 nReturn(0); - if ( isUnoTunnelId<FmXFilterCell>(_rIdentifier) ) + if ( comphelper::isUnoTunnelId<FmXFilterCell>(_rIdentifier) ) { nReturn = reinterpret_cast<sal_Int64>(this); } @@ -4417,7 +4417,7 @@ sal_Int64 SAL_CALL FmXFilterCell::getSomething( const Sequence< sal_Int8 >& _rId const Sequence<sal_Int8>& FmXFilterCell::getUnoTunnelId() { - static const UnoTunnelIdInit theFmXFilterCellUnoTunnelId; + static const comphelper::UnoIdInit theFmXFilterCellUnoTunnelId; return theFmXFilterCellUnoTunnelId.getSeq(); } diff --git a/svx/source/mnuctrls/smarttagmenu.cxx b/svx/source/mnuctrls/smarttagmenu.cxx index fda61882a42b..a918418cda78 100644 --- a/svx/source/mnuctrls/smarttagmenu.cxx +++ b/svx/source/mnuctrls/smarttagmenu.cxx @@ -111,7 +111,7 @@ void SmartTagMenuController::FillMenu() sal_uInt16 nMenuId = 1; sal_uInt16 nSubMenuId = MN_ST_INSERT_START; - VCLXMenu* pAwtMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( m_xPopupMenu ); + VCLXMenu* pAwtMenu = comphelper::getFromUnoTunnel<VCLXMenu>( m_xPopupMenu ); PopupMenu* pVCLMenu = static_cast< PopupMenu* >( pAwtMenu->GetMenu() ); const css::uno::Sequence< css::uno::Sequence< css::uno::Reference< css::smarttags::XSmartTagAction > > >& rActionComponentsSequence = m_pSmartTagItem->GetActionComponentsSequence(); diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 2d0b338b1cd8..273719218663 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2466,7 +2466,7 @@ void SdrObjEditView::getTextSelection(css::uno::Any& rSelection) css::uno::Reference<css::text::XText> xText(pObj->getUnoShape(), css::uno::UNO_QUERY); if (xText.is()) { - SvxUnoTextBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextBase>(xText); + SvxUnoTextBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextBase>(xText); if (pRange) { rSelection <<= pRange->createTextCursorBySelection(pOutlinerView->GetSelection()); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 5cd3e37dec4c..0212b99c7232 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -1880,7 +1880,7 @@ void SdrModel::dumpAsXml(xmlTextWriterPtr pWriter) const const css::uno::Sequence< sal_Int8 >& SdrModel::getUnoTunnelId() { - static const UnoTunnelIdInit theSdrModelUnoTunnelImplementationId; + static const comphelper::UnoIdInit theSdrModelUnoTunnelImplementationId; return theSdrModelUnoTunnelImplementationId.getSeq(); } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 17a2e0411cd3..27c2fb50b6c2 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2823,7 +2823,7 @@ void SdrObject::impl_setUnoShape( const uno::Reference< uno::XInterface >& _rxUn } maWeakUnoShape = _rxUnoShape; - mpSvxShape = comphelper::getUnoTunnelImplementation<SvxShape>( _rxUnoShape ); + mpSvxShape = comphelper::getFromUnoTunnel<SvxShape>( _rxUnoShape ); // I think this may never happen... But I am not sure enough .-) if ( bTransferOwnership ) @@ -2915,7 +2915,7 @@ css::uno::Reference< css::uno::XInterface > SdrObject::getUnoShape() uno::Reference< uno::XInterface > xPage(pPageCandidate->getUnoPage()); if( xPage.is() ) { - SvxDrawPage* pDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>(xPage); + SvxDrawPage* pDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>(xPage); if( pDrawPage ) { // create one diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 4393cd1ffbf5..12ac69f92411 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -547,7 +547,7 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto rDataValue.Value >>= xPage; if( xPage.is() ) { - SvxDrawPage* pUnoPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( xPage ); + SvxDrawPage* pUnoPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage ); if( pUnoPage && pUnoPage->GetSdrPage() ) mpCurrentPage = pUnoPage->GetSdrPage(); } @@ -1169,7 +1169,7 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon if( !mxPage.is() ) break; - mpUnoPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( mxPage ); + mpUnoPage = comphelper::getFromUnoTunnel<SvxDrawPage>( mxPage ); if( nullptr == mpUnoPage || nullptr == mpUnoPage->GetSdrPage() ) break; diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index b52b4b80a5b5..78e79bcf6836 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -619,7 +619,7 @@ void SAL_CALL SvxUnoDrawPagesAccess::remove( const uno::Reference< drawing::XDra return; // get pPage from xPage and get Id (nPos) - SvxDrawPage* pSvxPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( xPage ); + SvxDrawPage* pSvxPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage ); if( pSvxPage ) { SdrPage* pPage = pSvxPage->GetSdrPage(); diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index b094ed1ee08f..f7bc19864927 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -182,7 +182,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape if ( ( mpModel == nullptr ) || ( mpPage == nullptr ) ) throw lang::DisposedException(); - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape ); + SvxShape* pShape = comphelper::getFromUnoTunnel<SvxShape>( xShape ); if( nullptr == pShape ) return; @@ -253,7 +253,7 @@ void SAL_CALL SvxDrawPage::addBottom( const uno::Reference< drawing::XShape >& x if ( ( mpModel == nullptr ) || ( mpPage == nullptr ) ) throw lang::DisposedException(); - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape ); + SvxShape* pShape = comphelper::getFromUnoTunnel<SvxShape>( xShape ); if( nullptr == pShape ) return; @@ -884,7 +884,7 @@ SdrPage* GetSdrPageFromXDrawPage( const uno::Reference< drawing::XDrawPage >& xD { if(xDrawPage.is()) { - SvxDrawPage* pDrawPage = comphelper::getUnoTunnelImplementation<SvxDrawPage>( xDrawPage ); + SvxDrawPage* pDrawPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xDrawPage ); if(pDrawPage) { diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 22d719c204d1..ad441e7a725d 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -175,7 +175,7 @@ void SvxShapeGroup::addUnoShape( const uno::Reference< drawing::XShape >& xShape return; } - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape ); + SvxShape* pShape = comphelper::getFromUnoTunnel<SvxShape>( xShape ); if (!pShape) { OSL_FAIL("could not add XShape to group shape!"); diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index 6750f3370ef5..12cf5d1bf321 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -111,7 +111,7 @@ void SAL_CALL Svx3DSceneObject::add( const Reference< drawing::XShape >& xShape { SolarMutexGuard aGuard; - SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( xShape ); + SvxShape* pShape = comphelper::getFromUnoTunnel<SvxShape>( xShape ); if(!HasSdrObject() || !mxPage.is() || pShape == nullptr || nullptr != pShape->GetSdrObject() ) throw uno::RuntimeException(); diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 1fa0e7d109de..1afb2f8fa73a 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -304,13 +304,13 @@ uno::Any SAL_CALL SvxShape::queryAggregation( const uno::Type& rType ) const css::uno::Sequence< sal_Int8 > & SvxShape::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSvxShapeUnoTunnelId; + static const comphelper::UnoIdInit theSvxShapeUnoTunnelId; return theSvxShapeUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SvxShape::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SvxShape>(rId) ) + if( comphelper::isUnoTunnelId<SvxShape>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } @@ -4015,7 +4015,7 @@ uno::Reference< drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) noexc SdrObject* SdrObject::getSdrObjectFromXShape( const css::uno::Reference< css::uno::XInterface >& xInt ) { - SvxShape* pSvxShape = comphelper::getUnoTunnelImplementation<SvxShape>( xInt ); + SvxShape* pSvxShape = comphelper::getFromUnoTunnel<SvxShape>( xInt ); return pSvxShape ? pSvxShape->GetSdrObject() : nullptr; } diff --git a/svx/source/unogallery/unogaltheme.cxx b/svx/source/unogallery/unogaltheme.cxx index c25388bd264f..b40cbc3651ba 100644 --- a/svx/source/unogallery/unogaltheme.cxx +++ b/svx/source/unogallery/unogaltheme.cxx @@ -229,7 +229,7 @@ void SAL_CALL GalleryTheme::update( ) if( mpTheme ) { - GalleryDrawingModel* pModel = comphelper::getUnoTunnelImplementation<GalleryDrawingModel>( Drawing ); + GalleryDrawingModel* pModel = comphelper::getFromUnoTunnel<GalleryDrawingModel>( Drawing ); if( pModel && dynamic_cast<const FmFormModel*>(pModel->GetDoc()) ) { @@ -248,7 +248,7 @@ void SAL_CALL GalleryTheme::update( ) uno::Reference< drawing::XDrawPagesSupplier > xDrawPagesSupplier( Drawing, uno::UNO_QUERY_THROW ); uno::Reference< drawing::XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), uno::UNO_SET_THROW ); uno::Reference< drawing::XDrawPage > xPage( xDrawPages->getByIndex( 0 ), uno::UNO_QUERY_THROW ); - SvxDrawPage* pUnoPage = xPage.is() ? comphelper::getUnoTunnelImplementation<SvxDrawPage>( xPage ) : nullptr; + SvxDrawPage* pUnoPage = xPage.is() ? comphelper::getFromUnoTunnel<SvxDrawPage>( xPage ) : nullptr; SdrModel* pOrigModel = pUnoPage ? &pUnoPage->GetSdrPage()->getSdrModelFromSdrPage() : nullptr; SdrPage* pOrigPage = pUnoPage ? pUnoPage->GetSdrPage() : nullptr; 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)) diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index 5e9fc634bf39..c644afded55f 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -259,7 +259,7 @@ void VCLXGraphics::copy( const uno::Reference< awt::XDevice >& rxSource, sal_Int if ( mpOutputDevice ) { - VCLXDevice* pFromDev = comphelper::getUnoTunnelImplementation<VCLXDevice>( rxSource ); + VCLXDevice* pFromDev = comphelper::getFromUnoTunnel<VCLXDevice>( rxSource ); DBG_ASSERT( pFromDev, "VCLXGraphics::copy - invalid device" ); if ( pFromDev ) { diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index c6ebef12d18b..02f693ef64a7 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -385,7 +385,7 @@ void VCLXMenu::setPopupMenu( SolarMutexGuard aSolarGuard; ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); - VCLXMenu* pVCLMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( rxPopupMenu ); + VCLXMenu* pVCLMenu = comphelper::getFromUnoTunnel<VCLXMenu>( rxPopupMenu ); DBG_ASSERT( pVCLMenu && pVCLMenu->GetMenu() && pVCLMenu->IsPopupMenu(), "setPopupMenu: Invalid Menu!" ); if ( mpMenu && pVCLMenu && pVCLMenu->GetMenu() && pVCLMenu->IsPopupMenu() ) diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 344add1435c6..f617c9bf8dee 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1868,7 +1868,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( VclPtr<vcl::Window> pParent; if ( rDescriptor.Parent.is() ) { - VCLXWindow* pParentComponent = comphelper::getUnoTunnelImplementation<VCLXWindow>( rDescriptor.Parent ); + VCLXWindow* pParentComponent = comphelper::getFromUnoTunnel<VCLXWindow>( rDescriptor.Parent ); // #103939# Don't throw assertion, may be it's a system dependent window, used in ImplCreateWindow. // DBG_ASSERT( pParentComponent, "ParentComponent not valid" ); diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx index 010659a06985..7550ddca083e 100644 --- a/toolkit/source/awt/vclxtopwindow.cxx +++ b/toolkit/source/awt/vclxtopwindow.cxx @@ -128,7 +128,7 @@ void VCLXTopWindow::setMenuBar( const css::uno::Reference< css::awt::XMenuBar >& pSystemWindow->SetMenuBar( nullptr ); if ( rxMenu.is() ) { - VCLXMenu* pMenu = comphelper::getUnoTunnelImplementation<VCLXMenu>( rxMenu ); + VCLXMenu* pMenu = comphelper::getFromUnoTunnel<VCLXMenu>( rxMenu ); if ( pMenu && !pMenu->IsPopupMenu() ) pSystemWindow->SetMenuBar( static_cast<MenuBar*>( pMenu->GetMenu() )); } diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index b864ba6da517..b6cb0c90ecb5 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -1149,7 +1149,7 @@ void VCLXWindow::setPointer( const css::uno::Reference< css::awt::XPointer >& rx { SolarMutexGuard aGuard; - VCLXPointer* pPointer = comphelper::getUnoTunnelImplementation<VCLXPointer>( rxPointer ); + VCLXPointer* pPointer = comphelper::getFromUnoTunnel<VCLXPointer>( rxPointer ); if ( pPointer && GetWindow() ) GetWindow()->SetPointer( pPointer->GetPointer() ); } diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index b26c8472dbd1..fc9dd90095ac 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -7289,7 +7289,7 @@ void SVTXFormattedField::setFormatsSupplier(const css::uno::Reference< css::util } else { - pNew = comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>(xSupplier); + pNew = comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>(xSupplier); bIsStandardSupplier = false; } diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 5815810cebca..d93d10c5b2c9 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -115,7 +115,7 @@ private: Reference< css::util::XCloneable > const xCloneable( *col, UNO_QUERY_THROW ); Reference< XGridColumn > const xClone( xCloneable->createClone(), UNO_QUERY_THROW ); - GridColumn* const pGridColumn = comphelper::getUnoTunnelImplementation<GridColumn>( xClone ); + GridColumn* const pGridColumn = comphelper::getFromUnoTunnel<GridColumn>( xClone ); if ( pGridColumn == nullptr ) throw RuntimeException( "invalid clone source implementation", *this ); // that's indeed a RuntimeException, not an IllegalArgumentException or some such: @@ -151,7 +151,7 @@ private: { ::comphelper::ComponentGuard aGuard( *this, rBHelper ); - GridColumn* const pGridColumn = comphelper::getUnoTunnelImplementation<GridColumn>( i_column ); + GridColumn* const pGridColumn = comphelper::getFromUnoTunnel<GridColumn>( i_column ); if ( pGridColumn == nullptr ) throw css::lang::IllegalArgumentException( "invalid column implementation", *this, 1 ); @@ -190,7 +190,7 @@ private: ++updatePos, ++columnIndex ) { - GridColumn* pColumnImpl = comphelper::getUnoTunnelImplementation<GridColumn>( *updatePos ); + GridColumn* pColumnImpl = comphelper::getFromUnoTunnel<GridColumn>( *updatePos ); if ( !pColumnImpl ) { SAL_WARN( "toolkit.controls", "DefaultGridColumnModel::removeColumn: invalid column implementation!" ); diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 1952c1faa31d..af61a578d135 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -285,7 +285,7 @@ namespace toolkit sal_Int64 SAL_CALL GridColumn::getSomething( const Sequence< sal_Int8 >& i_identifier ) { - if ( isUnoTunnelId<GridColumn>(i_identifier) ) + if ( comphelper::isUnoTunnelId<GridColumn>(i_identifier) ) return ::sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ) ); return 0; } diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx index f762ff805c0d..d4f5d64b04ef 100644 --- a/toolkit/source/controls/stdtabcontroller.cxx +++ b/toolkit/source/controls/stdtabcontroller.cxx @@ -142,7 +142,7 @@ void StdTabController::ImplActivateControl( bool bFirst ) const Reference< XWindowPeer > xCP = pControls[nCtrl]->getPeer(); if ( xCP.is() ) { - VCLXWindow* pC = comphelper::getUnoTunnelImplementation<VCLXWindow>( xCP ); + VCLXWindow* pC = comphelper::getFromUnoTunnel<VCLXWindow>( xCP ); if ( pC && pC->GetWindow() && ( pC->GetWindow()->GetStyle() & WB_TABSTOP ) ) { pC->GetWindow()->GrabFocus(); diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index 44ff22c53efe..c30c5c6b3788 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -423,13 +423,13 @@ css::uno::Any UnoControlModel::queryAggregation( const css::uno::Type & rType ) const css::uno::Sequence< sal_Int8 >& UnoControlModel::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theUnoControlModelUnoTunnelId; + static const comphelper::UnoIdInit theUnoControlModelUnoTunnelId; return theUnoControlModelUnoTunnelId.getSeq(); } sal_Int64 UnoControlModel::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) { - if( isUnoTunnelId<UnoControlModel>(rIdentifier) ) + if( comphelper::isUnoTunnelId<UnoControlModel>(rIdentifier) ) return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this)); return 0; diff --git a/toolkit/source/hatchwindow/hatchwindow.cxx b/toolkit/source/hatchwindow/hatchwindow.cxx index 510d1030b294..31b017d77fef 100644 --- a/toolkit/source/hatchwindow/hatchwindow.cxx +++ b/toolkit/source/hatchwindow/hatchwindow.cxx @@ -47,7 +47,7 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer > SolarMutexGuard aGuard; VclPtr<vcl::Window> pParent; - VCLXWindow* pParentComponent = comphelper::getUnoTunnelImplementation<VCLXWindow>( xParent ); + VCLXWindow* pParentComponent = comphelper::getFromUnoTunnel<VCLXWindow>( xParent ); if ( pParentComponent ) pParent = pParentComponent->GetWindow(); diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index 4f3f3b22b604..5d5ce94a9b8f 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -165,7 +165,7 @@ VclPtr<vcl::Window> UnoWrapper::GetWindow(const css::uno::Reference<css::awt::XW void UnoWrapper::SetWindowInterface( vcl::Window* pWindow, const css::uno::Reference< css::awt::XWindowPeer> & xIFace ) { - VCLXWindow* pVCLXWindow = comphelper::getUnoTunnelImplementation<VCLXWindow>( xIFace ); + VCLXWindow* pVCLXWindow = comphelper::getFromUnoTunnel<VCLXWindow>( xIFace ); assert( pVCLXWindow && "must be a VCLXWindow subclass" ); if ( !pVCLXWindow ) diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index 3a7cc7446c1f..ec9d3ddf368e 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -73,7 +73,7 @@ BitmapEx VCLUnoHelper::GetBitmap( const css::uno::Reference< css::awt::XBitmap>& } else if ( rxBitmap.is() ) { - VCLXBitmap* pVCLBitmap = comphelper::getUnoTunnelImplementation<VCLXBitmap>( rxBitmap ); + VCLXBitmap* pVCLBitmap = comphelper::getFromUnoTunnel<VCLXBitmap>( rxBitmap ); if ( pVCLBitmap ) aBmp = pVCLBitmap->GetBitmap(); else @@ -109,26 +109,26 @@ css::uno::Reference< css::awt::XBitmap> VCLUnoHelper::CreateVCLXBitmap( const Bi vcl::Window* VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWindow>& rxWindow ) { - VCLXWindow* pVCLXWindow = comphelper::getUnoTunnelImplementation<VCLXWindow>( rxWindow ); + VCLXWindow* pVCLXWindow = comphelper::getFromUnoTunnel<VCLXWindow>( rxWindow ); return pVCLXWindow ? pVCLXWindow->GetWindow() : nullptr; } vcl::Window* VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWindow2>& rxWindow ) { - VCLXWindow* pVCLXWindow = comphelper::getUnoTunnelImplementation<VCLXWindow>( rxWindow ); + VCLXWindow* pVCLXWindow = comphelper::getFromUnoTunnel<VCLXWindow>( rxWindow ); return pVCLXWindow ? pVCLXWindow->GetWindow() : nullptr; } vcl::Window* VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWindowPeer>& rxWindow ) { - VCLXWindow* pVCLXWindow = comphelper::getUnoTunnelImplementation<VCLXWindow>( rxWindow ); + VCLXWindow* pVCLXWindow = comphelper::getFromUnoTunnel<VCLXWindow>( rxWindow ); return pVCLXWindow ? pVCLXWindow->GetWindow() : nullptr; } vcl::Region VCLUnoHelper::GetRegion( const css::uno::Reference< css::awt::XRegion >& rxRegion ) { vcl::Region aRegion; - VCLXRegion* pVCLRegion = comphelper::getUnoTunnelImplementation<VCLXRegion>( rxRegion ); + VCLXRegion* pVCLRegion = comphelper::getFromUnoTunnel<VCLXRegion>( rxRegion ); if ( pVCLRegion ) aRegion = pVCLRegion->GetRegion(); else @@ -154,7 +154,7 @@ css::uno::Reference< css::awt::XWindow> VCLUnoHelper::GetInterface( vcl::Window* OutputDevice* VCLUnoHelper::GetOutputDevice( const css::uno::Reference< css::awt::XDevice>& rxDevice ) { VclPtr<OutputDevice> pOutDev; - VCLXDevice* pDev = comphelper::getUnoTunnelImplementation<VCLXDevice>( rxDevice ); + VCLXDevice* pDev = comphelper::getFromUnoTunnel<VCLXDevice>( rxDevice ); if ( pDev ) pOutDev = pDev->GetOutputDevice(); return pOutDev; @@ -163,7 +163,7 @@ OutputDevice* VCLUnoHelper::GetOutputDevice( const css::uno::Reference< css::awt OutputDevice* VCLUnoHelper::GetOutputDevice( const css::uno::Reference< css::awt::XGraphics>& rxGraphics ) { OutputDevice* pOutDev = nullptr; - VCLXGraphics* pGrf = comphelper::getUnoTunnelImplementation<VCLXGraphics>( rxGraphics ); + VCLXGraphics* pGrf = comphelper::getFromUnoTunnel<VCLXGraphics>( rxGraphics ); if ( pGrf ) pOutDev = pGrf->GetOutputDevice(); return pOutDev; @@ -255,7 +255,7 @@ vcl::Font VCLUnoHelper::CreateFont( const css::awt::FontDescriptor& rDescr, cons vcl::Font VCLUnoHelper::CreateFont( const css::uno::Reference< css::awt::XFont >& rxFont ) { vcl::Font aFont; - VCLXFont* pVCLXFont = comphelper::getUnoTunnelImplementation<VCLXFont>( rxFont ); + VCLXFont* pVCLXFont = comphelper::getFromUnoTunnel<VCLXFont>( rxFont ); if ( pVCLXFont ) aFont = pVCLXFont->GetFont(); return aFont; diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx index e82f2edab4f2..481b071e62e5 100644 --- a/unoxml/source/dom/element.cxx +++ b/unoxml/source/dom/element.cxx @@ -471,7 +471,7 @@ namespace DOM } ::rtl::Reference<CNode> const pCNode( - comphelper::getUnoTunnelImplementation<CNode>(Reference<XNode>(oldAttr))); + comphelper::getFromUnoTunnel<CNode>(Reference<XNode>(oldAttr))); if (!pCNode.is()) { throw RuntimeException(); } xmlNodePtr const pNode = pCNode->GetNodePtr(); @@ -531,7 +531,7 @@ namespace DOM // get the implementation CAttr *const pCAttr = dynamic_cast<CAttr*>( - comphelper::getUnoTunnelImplementation<CNode>(xNewAttr)); + comphelper::getFromUnoTunnel<CNode>(xNewAttr)); if (!pCAttr) { throw RuntimeException(); } xmlAttrPtr const pAttr = reinterpret_cast<xmlAttrPtr>(pCAttr->GetNodePtr()); diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx index a6809cf7df47..64545d877753 100644 --- a/unoxml/source/dom/node.cxx +++ b/unoxml/source/dom/node.cxx @@ -164,7 +164,7 @@ namespace DOM const css::uno::Sequence< sal_Int8 > & CNode::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theCNodeUnoTunnelId; + static const comphelper::UnoIdInit theCNodeUnoTunnelId; return theCNodeUnoTunnelId.getSeq(); } @@ -279,7 +279,7 @@ namespace DOM if (nullptr == m_aNodePtr) { return nullptr; } - CNode *const pNewChild(comphelper::getUnoTunnelImplementation<CNode>(xNewChild)); + CNode *const pNewChild(comphelper::getFromUnoTunnel<CNode>(xNewChild)); if (!pNewChild) { throw RuntimeException(); } xmlNodePtr const cur = pNewChild->GetNodePtr(); if (!cur) { throw RuntimeException(); } @@ -624,8 +624,8 @@ namespace DOM ::osl::ClearableMutexGuard guard(m_rMutex); - CNode *const pNewNode(comphelper::getUnoTunnelImplementation<CNode>(newChild)); - CNode *const pRefNode(comphelper::getUnoTunnelImplementation<CNode>(refChild)); + CNode *const pNewNode(comphelper::getFromUnoTunnel<CNode>(newChild)); + CNode *const pRefNode(comphelper::getFromUnoTunnel<CNode>(refChild)); if (!pNewNode || !pRefNode) { throw RuntimeException(); } xmlNodePtr const pNewChild(pNewNode->GetNodePtr()); xmlNodePtr const pRefChild(pRefNode->GetNodePtr()); @@ -732,7 +732,7 @@ namespace DOM Reference<XNode> xReturn( xOldChild ); - ::rtl::Reference<CNode> const pOld(comphelper::getUnoTunnelImplementation<CNode>(xOldChild)); + ::rtl::Reference<CNode> const pOld(comphelper::getFromUnoTunnel<CNode>(xOldChild)); if (!pOld.is()) { throw RuntimeException(); } xmlNodePtr const old = pOld->GetNodePtr(); if (!old) { throw RuntimeException(); } @@ -804,9 +804,9 @@ namespace DOM ::osl::ClearableMutexGuard guard(m_rMutex); ::rtl::Reference<CNode> const pOldNode( - comphelper::getUnoTunnelImplementation<CNode>(xOldChild)); + comphelper::getFromUnoTunnel<CNode>(xOldChild)); ::rtl::Reference<CNode> const pNewNode( - comphelper::getUnoTunnelImplementation<CNode>(xNewChild)); + comphelper::getFromUnoTunnel<CNode>(xNewChild)); if (!pOldNode.is() || !pNewNode.is()) { throw RuntimeException(); } xmlNodePtr const pOld = pOldNode->GetNodePtr(); xmlNodePtr const pNew = pNewNode->GetNodePtr(); @@ -978,7 +978,7 @@ namespace DOM ::sal_Int64 SAL_CALL CNode::getSomething(Sequence< ::sal_Int8 > const& rId) { - if (isUnoTunnelId<CNode>(rId)) + if (comphelper::isUnoTunnelId<CNode>(rId)) { return ::sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(this) ); diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx index 28c733490b04..f1968c208860 100644 --- a/unoxml/source/xpath/xpathapi.cxx +++ b/unoxml/source/xpath/xpathapi.cxx @@ -109,7 +109,7 @@ namespace XPath static void lcl_collectNamespaces( nsmap_t & rNamespaces, Reference< XNode > const& xNamespaceNode) { - DOM::CNode *const pCNode(comphelper::getUnoTunnelImplementation<DOM::CNode>(xNamespaceNode)); + DOM::CNode *const pCNode(comphelper::getFromUnoTunnel<DOM::CNode>(xNamespaceNode)); if (!pCNode) { throw RuntimeException(); } ::osl::MutexGuard const g(pCNode->GetOwnerDocument().GetMutex()); @@ -291,11 +291,11 @@ namespace XPath // get the node and document ::rtl::Reference<DOM::CDocument> const pCDoc( - dynamic_cast<DOM::CDocument*>( comphelper::getUnoTunnelImplementation<DOM::CNode>( + dynamic_cast<DOM::CDocument*>( comphelper::getFromUnoTunnel<DOM::CNode>( xContextNode->getOwnerDocument()))); if (!pCDoc.is()) { throw RuntimeException(); } - DOM::CNode *const pCNode = comphelper::getUnoTunnelImplementation<DOM::CNode>(xContextNode); + DOM::CNode *const pCNode = comphelper::getFromUnoTunnel<DOM::CNode>(xContextNode); if (!pCNode) { throw RuntimeException(); } ::osl::MutexGuard const g(pCDoc->GetMutex()); // lock the document! diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 283cca42026b..9a7073740c7c 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -220,7 +220,7 @@ Graphic::Graphic(const GDIMetaFile& rMtf) Graphic::Graphic( const css::uno::Reference< css::graphic::XGraphic >& rxGraphic ) { - const ::Graphic* pGraphic = comphelper::getUnoTunnelImplementation<::Graphic>(rxGraphic); + const ::Graphic* pGraphic = comphelper::getFromUnoTunnel<::Graphic>(rxGraphic); if( pGraphic ) { diff --git a/vcl/source/graphic/BinaryDataContainerTools.cxx b/vcl/source/graphic/BinaryDataContainerTools.cxx index 3921e075cea2..359a8664daa6 100644 --- a/vcl/source/graphic/BinaryDataContainerTools.cxx +++ b/vcl/source/graphic/BinaryDataContainerTools.cxx @@ -18,7 +18,7 @@ BinaryDataContainer convertUnoBinaryDataContainer( { BinaryDataContainer aBinaryDataContainer; UnoBinaryDataContainer* pUnoBinaryDataContainer - = comphelper::getUnoTunnelImplementation<UnoBinaryDataContainer>(rxBinaryDataContainer); + = comphelper::getFromUnoTunnel<UnoBinaryDataContainer>(rxBinaryDataContainer); if (pUnoBinaryDataContainer) aBinaryDataContainer = pUnoBinaryDataContainer->getBinaryDataContainer(); return aBinaryDataContainer; diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx index 7792f6b17165..bfb7fd1853c8 100644 --- a/vcl/source/graphic/UnoGraphic.cxx +++ b/vcl/source/graphic/UnoGraphic.cxx @@ -184,7 +184,7 @@ uno::Sequence<sal_Int8> SAL_CALL Graphic::getMaskDIB() sal_Int64 SAL_CALL Graphic::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - return( ( isUnoTunnelId<::Graphic>(rId) ) ? + return( ( comphelper::isUnoTunnelId<::Graphic>(rId) ) ? reinterpret_cast<sal_Int64>(&maGraphic) : 0 ); } diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index 00343b8f3567..c4c77e43064b 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -801,7 +801,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG { const uno::Reference< XInterface > xIFace( rxGraphic, uno::UNO_QUERY ); - const ::Graphic* pGraphic = comphelper::getUnoTunnelImplementation<::Graphic>( xIFace ); + const ::Graphic* pGraphic = comphelper::getFromUnoTunnel<::Graphic>( xIFace ); if( pGraphic && ( pGraphic->GetType() != GraphicType::NONE ) ) { diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx index c8dfe375b6c9..23be0750e6bf 100644 --- a/vcl/source/treelist/transfer.cxx +++ b/vcl/source/treelist/transfer.cxx @@ -519,7 +519,7 @@ sal_Int64 SAL_CALL TransferableHelper::getSomething( const Sequence< sal_Int8 >& { sal_Int64 nRet; - if( isUnoTunnelId<TransferableHelper>(rId) ) + if( comphelper::isUnoTunnelId<TransferableHelper>(rId) ) { nRet = sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } @@ -1042,7 +1042,7 @@ void TransferableHelper::ClearPrimarySelection() const Sequence< sal_Int8 >& TransferableHelper::getUnoTunnelId() { - static const UnoTunnelIdInit theTransferableHelperUnoTunnelId; + static const comphelper::UnoIdInit theTransferableHelperUnoTunnelId; return theTransferableHelperUnoTunnelId.getSeq(); } diff --git a/xmloff/source/core/attrlist.cxx b/xmloff/source/core/attrlist.cxx index 0a1956db8775..3f9fbb6a8634 100644 --- a/xmloff/source/core/attrlist.cxx +++ b/xmloff/source/core/attrlist.cxx @@ -46,7 +46,7 @@ SvXMLAttributeList::SvXMLAttributeList( const SvXMLAttributeList &r ) : SvXMLAttributeList::SvXMLAttributeList( const uno::Reference< xml::sax::XAttributeList> & rAttrList ) { SvXMLAttributeList* pImpl = - comphelper::getUnoTunnelImplementation<SvXMLAttributeList>( rAttrList ); + comphelper::getFromUnoTunnel<SvXMLAttributeList>( rAttrList ); if( pImpl ) vecAttribute = pImpl->vecAttribute; diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx index 001033b711c3..1745e73f4bf0 100644 --- a/xmloff/source/core/unoatrcn.cxx +++ b/xmloff/source/core/unoatrcn.cxx @@ -88,13 +88,13 @@ sal_uInt16 SvUnoAttributeContainer::getIndexByName(const OUString& aName ) const const css::uno::Sequence< sal_Int8 > & SvUnoAttributeContainer::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSvUnoAttributeContainerUnoTunnelId; + static const comphelper::UnoIdInit theSvUnoAttributeContainerUnoTunnelId; return theSvUnoAttributeContainerUnoTunnelId.getSeq(); } sal_Int64 SAL_CALL SvUnoAttributeContainer::getSomething( const css::uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SvUnoAttributeContainer>(rId) ) + if( comphelper::isUnoTunnelId<SvUnoAttributeContainer>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index ea5e88b47603..4957fad331f8 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -467,14 +467,14 @@ bool SvXMLImport::addEmbeddedFont(const css::uno::Reference< css::io::XInputStre const css::uno::Sequence<sal_Int8>& SvXMLImport::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theSvXMLImportUnoTunnelId; + static const comphelper::UnoIdInit theSvXMLImportUnoTunnelId; return theSvXMLImportUnoTunnelId.getSeq(); } // XUnoTunnel sal_Int64 SAL_CALL SvXMLImport::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<SvXMLImport>(rId) ) + if( comphelper::isUnoTunnelId<SvXMLImport>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } @@ -988,7 +988,7 @@ void SAL_CALL SvXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen uno::Any aAny = mxImportInfo->getPropertyValue(sPropName); aAny >>= xIfc; - StyleMap *pSMap = comphelper::getUnoTunnelImplementation<StyleMap>( xIfc ); + StyleMap *pSMap = comphelper::getFromUnoTunnel<StyleMap>( xIfc ); if( pSMap ) { mpStyleMap = pSMap; diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index caba160252f3..990cf15461a7 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -215,7 +215,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( { // supplier must be SvNumberFormatsSupplierObj SvNumberFormatsSupplierObj* pObj = - comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>( rSupp ); + comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( rSupp ); if (pObj) pFormatter = pObj->GetNumberFormatter(); @@ -248,7 +248,7 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( { // supplier must be SvNumberFormatsSupplierObj SvNumberFormatsSupplierObj* pObj = - comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>( rSupp ); + comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( rSupp ); if (pObj) pFormatter = pObj->GetNumberFormatter(); diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index af65c302054b..4563efa9173d 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1448,7 +1448,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert( css::uno::Reference< css::util { SvNumberFormatter* pFormatter = nullptr; SvNumberFormatsSupplierObj* pObj = - comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>( xFormatsSupplier ); + comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( xFormatsSupplier ); if (pObj) pFormatter = pObj->GetNumberFormatter(); @@ -2150,7 +2150,7 @@ SvXMLNumFmtHelper::SvXMLNumFmtHelper( SvNumberFormatter* pFormatter = nullptr; SvNumberFormatsSupplierObj* pObj = - comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>( rSupp ); + comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>( rSupp ); if (pObj) pFormatter = pObj->GetNumberFormatter(); diff --git a/xmloff/source/transform/MutableAttrList.cxx b/xmloff/source/transform/MutableAttrList.cxx index fc11fb964716..9373055ab1df 100644 --- a/xmloff/source/transform/MutableAttrList.cxx +++ b/xmloff/source/transform/MutableAttrList.cxx @@ -59,7 +59,7 @@ XMLMutableAttributeList::~XMLMutableAttributeList() const css::uno::Sequence<sal_Int8>& XMLMutableAttributeList::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theXMLMutableAttributeListUnoTunnelId; + static const comphelper::UnoIdInit theXMLMutableAttributeListUnoTunnelId; return theXMLMutableAttributeListUnoTunnelId.getSeq(); } @@ -67,7 +67,7 @@ const css::uno::Sequence<sal_Int8>& XMLMutableAttributeList::getUnoTunnelId() no sal_Int64 SAL_CALL XMLMutableAttributeList::getSomething( const Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<XMLMutableAttributeList>(rId) ) + if( comphelper::isUnoTunnelId<XMLMutableAttributeList>(rId) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 5495864bf120..243fd6b708db 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -1946,14 +1946,14 @@ void OOo2OasisTransformer::Initialize( const css::uno::Sequence<sal_Int8>& OOo2OasisTransformer::getUnoTunnelId() noexcept { - static const UnoTunnelIdInit theOOo2OasisTransformerUnoTunnelId; + static const comphelper::UnoIdInit theOOo2OasisTransformerUnoTunnelId; return theOOo2OasisTransformerUnoTunnelId.getSeq(); } // XUnoTunnel sal_Int64 SAL_CALL OOo2OasisTransformer::getSomething( const Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<OOo2OasisTransformer>(rId) ) + if( comphelper::isUnoTunnelId<OOo2OasisTransformer>(rId) ) { return reinterpret_cast< sal_Int64 >( this ); } diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index ceb5daeffcfd..5c9cd31a9372 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -1945,14 +1945,14 @@ Oasis2OOoTransformer::~Oasis2OOoTransformer() noexcept const css::uno::Sequence<sal_Int8>& Oasis2OOoTransformer::getUnoTunnelId() noexcept { - static const class UnoTunnelIdInit theOasis2OOoTransformerUnoTunnelId; + static const class comphelper::UnoIdInit theOasis2OOoTransformerUnoTunnelId; return theOasis2OOoTransformerUnoTunnelId.getSeq(); } // XUnoTunnel sal_Int64 SAL_CALL Oasis2OOoTransformer::getSomething( const Sequence< sal_Int8 >& rId ) { - if( isUnoTunnelId<Oasis2OOoTransformer>(rId) ) + if( comphelper::isUnoTunnelId<Oasis2OOoTransformer>(rId) ) { return reinterpret_cast< sal_Int64 >( this ); } diff --git a/xmlsecurity/source/gpg/CertificateImpl.cxx b/xmlsecurity/source/gpg/CertificateImpl.cxx index 96557f02b96b..5a6d8d0bc921 100644 --- a/xmlsecurity/source/gpg/CertificateImpl.cxx +++ b/xmlsecurity/source/gpg/CertificateImpl.cxx @@ -196,7 +196,7 @@ sal_Int32 SAL_CALL CertificateImpl::getCertificateUsage() /* XUnoTunnel */ sal_Int64 SAL_CALL CertificateImpl::getSomething(const Sequence< sal_Int8 >& aIdentifier) { - if( isUnoTunnelId<CertificateImpl>(aIdentifier) ) { + if( comphelper::isUnoTunnelId<CertificateImpl>(aIdentifier) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } return 0 ; @@ -205,7 +205,7 @@ sal_Int64 SAL_CALL CertificateImpl::getSomething(const Sequence< sal_Int8 >& aId /* XUnoTunnel extension */ const Sequence< sal_Int8>& CertificateImpl::getUnoTunnelId() { - static const UnoTunnelIdInit theCertificateImplUnoTunnelId; + static const comphelper::UnoIdInit theCertificateImplUnoTunnelId; return theCertificateImplUnoTunnelId.getSeq(); } diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.cxx b/xmlsecurity/source/gpg/SecurityEnvironment.cxx index 6660e64f28bb..792b55763e1f 100644 --- a/xmlsecurity/source/gpg/SecurityEnvironment.cxx +++ b/xmlsecurity/source/gpg/SecurityEnvironment.cxx @@ -93,7 +93,7 @@ SecurityEnvironmentGpg::~SecurityEnvironmentGpg() /* XUnoTunnel */ sal_Int64 SAL_CALL SecurityEnvironmentGpg::getSomething( const Sequence< sal_Int8 >& aIdentifier ) { - if( isUnoTunnelId<SecurityEnvironmentGpg>(aIdentifier) ) { + if( comphelper::isUnoTunnelId<SecurityEnvironmentGpg>(aIdentifier) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } return 0 ; @@ -106,7 +106,7 @@ namespace } const Sequence< sal_Int8>& SecurityEnvironmentGpg::getUnoTunnelId() { - static const UnoTunnelIdInit theSecurityEnvironmentUnoTunnelId; + static const comphelper::UnoIdInit theSecurityEnvironmentUnoTunnelId; return theSecurityEnvironmentUnoTunnelId.getSeq(); } diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index daf70987ef21..17bc19ec33bd 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -154,7 +154,7 @@ Sequence< OUString > SAL_CALL SecurityEnvironment_NssImpl::getSupportedServiceNa /* XUnoTunnel */ sal_Int64 SAL_CALL SecurityEnvironment_NssImpl::getSomething( const Sequence< sal_Int8 >& aIdentifier ) { - if( isUnoTunnelId<SecurityEnvironment_NssImpl>(aIdentifier) ) { + if( comphelper::isUnoTunnelId<SecurityEnvironment_NssImpl>(aIdentifier) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } return 0 ; @@ -163,7 +163,7 @@ sal_Int64 SAL_CALL SecurityEnvironment_NssImpl::getSomething( const Sequence< sa /* XUnoTunnel extension */ const Sequence< sal_Int8>& SecurityEnvironment_NssImpl::getUnoTunnelId() { - static const UnoTunnelIdInit theSecurityEnvironment_NssImplUnoTunnelId; + static const comphelper::UnoIdInit theSecurityEnvironment_NssImplUnoTunnelId; return theSecurityEnvironment_NssImplUnoTunnelId.getSeq(); } diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx index bd3ad0174273..8a0b3f719eef 100644 --- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx @@ -344,7 +344,7 @@ SECKEYPrivateKey* X509Certificate_NssImpl::getPrivateKey() /* XUnoTunnel */ sal_Int64 SAL_CALL X509Certificate_NssImpl::getSomething( const Sequence< sal_Int8 >& aIdentifier ) { - if( isUnoTunnelId<X509Certificate_NssImpl>(aIdentifier) ) { + if( comphelper::isUnoTunnelId<X509Certificate_NssImpl>(aIdentifier) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } return 0 ; @@ -353,7 +353,7 @@ sal_Int64 SAL_CALL X509Certificate_NssImpl::getSomething( const Sequence< sal_In /* XUnoTunnel extension */ const Sequence< sal_Int8>& X509Certificate_NssImpl::getUnoTunnelId() { - static const UnoTunnelIdInit theX509Certificate_NssImplUnoTunnelId; + static const comphelper::UnoIdInit theX509Certificate_NssImplUnoTunnelId; return theX509Certificate_NssImplUnoTunnelId.getSeq(); } diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx index d29151b3cfc8..3473171e2961 100644 --- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx +++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx @@ -43,7 +43,7 @@ uno::Sequence< sal_Int8 > XMLElementWrapper_XmlSecImpl::getUnoTunnelId() sal_Int64 SAL_CALL XMLElementWrapper_XmlSecImpl::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier ) { - if (isUnoTunnelId<XMLElementWrapper_XmlSecImpl>(aIdentifier)) + if (comphelper::isUnoTunnelId<XMLElementWrapper_XmlSecImpl>(aIdentifier)) { return reinterpret_cast < sal_Int64 > ( this ); } |