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>
This commit is contained in:
@@ -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() );
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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 ));
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 ));
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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() )
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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() )
|
||||
{
|
||||
|
||||
@@ -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 )
|
||||
:
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) );
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) );
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) );
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) );
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) );
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) );
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {};
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 ),
|
||||
|
||||
@@ -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&)
|
||||
{
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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!" );
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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!" );
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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" );
|
||||
|
||||
@@ -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>( ) );
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user