tdf#39593 use isUnoTunnelId
Adapt getUnoTunnelId methods where required: rename or make public.
Change-Id: I0fd2120bf9f0ff1aa690329a65ff64a154c89315
Reviewed-on: https://gerrit.libreoffice.org/78680
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 3989f8d..ec0df4b 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -1201,8 +1201,7 @@
// ____ XUnoTunnel ___
::sal_Int64 SAL_CALL ChartModel::getSomething( const Sequence< ::sal_Int8 >& aIdentifier )
{
if( aIdentifier.getLength() == 16 && memcmp( SvNumberFormatsSupplierObj::getUnoTunnelId().getConstArray(),
aIdentifier.getConstArray(), 16 ) == 0 )
if( isUnoTunnelId<SvNumberFormatsSupplierObj>(aIdentifier) )
{
Reference< lang::XUnoTunnel > xTunnel( getNumberFormatsSupplier(), uno::UNO_QUERY );
if( xTunnel.is() )
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 876d475..ab3b10d7 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1233,8 +1233,7 @@
// ____ XUnoTunnel ___
::sal_Int64 SAL_CALL ChartView::getSomething( const uno::Sequence< ::sal_Int8 >& aIdentifier )
{
if( aIdentifier.getLength() == 16 && memcmp( ExplicitValueProvider::getUnoTunnelId().getConstArray(),
aIdentifier.getConstArray(), 16 ) == 0 )
if( isUnoTunnelId<ExplicitValueProvider>(aIdentifier) )
{
ExplicitValueProvider* pProvider = this;
return reinterpret_cast<sal_Int64>(pProvider);
diff --git a/connectivity/source/commontools/ConnectionWrapper.cxx b/connectivity/source/commontools/ConnectionWrapper.cxx
index e5a1044..fba26d8 100644
--- a/connectivity/source/commontools/ConnectionWrapper.cxx
+++ b/connectivity/source/commontools/ConnectionWrapper.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/uno3.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/hash.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
@@ -157,7 +158,7 @@
// css::lang::XUnoTunnel
sal_Int64 SAL_CALL OConnectionWrapper::getSomething( const Sequence< sal_Int8 >& rId )
{
if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
if (isUnoTunnelId<OConnectionWrapper>(rId))
return reinterpret_cast< sal_Int64 >( this );
if(m_xUnoTunnel.is())
@@ -166,7 +167,7 @@
}
Sequence< sal_Int8 > OConnectionWrapper::getUnoTunnelImplementationId()
Sequence< sal_Int8 > OConnectionWrapper::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
diff --git a/connectivity/source/commontools/TConnection.cxx b/connectivity/source/commontools/TConnection.cxx
index 779ea85..255776a 100644
--- a/connectivity/source/commontools/TConnection.cxx
+++ b/connectivity/source/commontools/TConnection.cxx
@@ -20,6 +20,7 @@
#include <string.h>
#include <TConnection.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbexception.hxx>
@@ -57,12 +58,12 @@
//XUnoTunnel
sal_Int64 SAL_CALL OMetaConnection::getSomething( const css::uno::Sequence< sal_Int8 >& rId )
{
return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return (isUnoTunnelId<OMetaConnection>(rId))
? reinterpret_cast< sal_Int64 >( this )
: sal_Int64(0);
}
Sequence< sal_Int8 > OMetaConnection::getUnoTunnelImplementationId()
Sequence< sal_Int8 > OMetaConnection::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index ef9e095..004b0af 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -46,6 +46,7 @@
#include <rtl/math.hxx>
#include <connectivity/dbexception.hxx>
#include <connectivity/dbconversion.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <cppuhelper/typeprovider.hxx>
@@ -617,7 +618,7 @@
}
Sequence< sal_Int8 > OCalcTable::getUnoTunnelImplementationId()
Sequence< sal_Int8 > OCalcTable::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -628,7 +629,7 @@
sal_Int64 OCalcTable::getSomething( const Sequence< sal_Int8 > & rId )
{
return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return (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 0f40fe79..1db6508 100644
--- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
@@ -299,7 +299,7 @@
Reference< XUnoTunnel> xTunnel(xIndex,UNO_QUERY);
if(xTunnel.is())
{
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelImplementationId()) );
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelId()) );
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 23a5d28..ee77ea8 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/sdbcx/XRowLocate.hpp>
#include <com/sun/star/sdbc/XRow.hpp>
#include <unotools/ucbhelper.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <connectivity/dbexception.hxx>
@@ -104,7 +105,7 @@
m_pColumns.reset(new ODbaseIndexColumns(this,m_aMutex,aVector));
}
Sequence< sal_Int8 > ODbaseIndex::getUnoTunnelImplementationId()
Sequence< sal_Int8 > ODbaseIndex::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -115,7 +116,7 @@
sal_Int64 ODbaseIndex::getSomething( const Sequence< sal_Int8 > & rId )
{
return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return (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 416e05ea..3758330 100644
--- a/connectivity/source/drivers/dbase/DIndexes.cxx
+++ b/connectivity/source/drivers/dbase/DIndexes.cxx
@@ -94,7 +94,7 @@
Reference<XUnoTunnel> xTunnel(descriptor,UNO_QUERY);
if(xTunnel.is())
{
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelImplementationId()) );
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelId()) );
if(!pIndex)
throw SQLException();
pIndex->CreateImpl();
@@ -109,7 +109,7 @@
Reference< XUnoTunnel> xTunnel(getObject(_nPos),UNO_QUERY);
if ( xTunnel.is() )
{
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelImplementationId()) );
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelId()) );
if ( pIndex )
pIndex->DropImpl();
}
diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx
index 572eaa27..260e009 100644
--- a/connectivity/source/drivers/dbase/DResultSet.cxx
+++ b/connectivity/source/drivers/dbase/DResultSet.cxx
@@ -158,7 +158,7 @@
Reference<XUnoTunnel> xTunnel(_xIndex,UNO_QUERY);
if(xTunnel.is())
{
dbase::ODbaseIndex* pIndex = reinterpret_cast< dbase::ODbaseIndex* >( xTunnel->getSomething(dbase::ODbaseIndex::getUnoTunnelImplementationId()) );
dbase::ODbaseIndex* pIndex = reinterpret_cast< dbase::ODbaseIndex* >( xTunnel->getSomething(dbase::ODbaseIndex::getUnoTunnelId()) );
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 9cfee8f..3f91c54 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <comphelper/property.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/string.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/ucbhelper.hxx>
@@ -733,7 +734,7 @@
}
Sequence< sal_Int8 > ODbaseTable::getUnoTunnelImplementationId()
Sequence< sal_Int8 > ODbaseTable::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -744,7 +745,7 @@
sal_Int64 ODbaseTable::getSomething( const Sequence< sal_Int8 > & rId )
{
return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return (isUnoTunnelId<ODbaseTable>(rId))
? reinterpret_cast< sal_Int64 >( this )
: ODbaseTable_BASE::getSomething(rId);
}
@@ -1567,7 +1568,7 @@
Reference<XUnoTunnel> xTunnel(xIndex,UNO_QUERY);
OSL_ENSURE(xTunnel.is(),"No TunnelImplementation!");
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelImplementationId()) );
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelId()) );
OSL_ENSURE(pIndex,"ODbaseTable::DeleteRow: No Index returned!");
OSQLColumns::Vector::const_iterator aIter = std::find_if(_rCols.get().begin(), _rCols.get().end(),
@@ -1673,7 +1674,7 @@
{
Reference<XUnoTunnel> xTunnel(xIndex,UNO_QUERY);
OSL_ENSURE(xTunnel.is(),"No TunnelImplementation!");
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelImplementationId()) );
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelId()) );
OSL_ENSURE(pIndex,"ODbaseTable::UpdateBuffer: No Index returned!");
if (pIndex->Find(0,*rRow.get()[nPos]))
@@ -1781,7 +1782,7 @@
{
Reference<XUnoTunnel> xTunnel(aIndexedCols[i],UNO_QUERY);
OSL_ENSURE(xTunnel.is(),"No TunnelImplementation!");
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelImplementationId()) );
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelId()) );
OSL_ENSURE(pIndex,"ODbaseTable::UpdateBuffer: No Index returned!");
// Update !!
if (pOrgRow.is() && !thisColIsNull)
diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx
index 99c192d..d72061b 100644
--- a/connectivity/source/drivers/dbase/DTables.cxx
+++ b/connectivity/source/drivers/dbase/DTables.cxx
@@ -72,7 +72,7 @@
Reference<XUnoTunnel> xTunnel(descriptor,UNO_QUERY);
if(xTunnel.is())
{
ODbaseTable* pTable = reinterpret_cast< ODbaseTable* >( xTunnel->getSomething(ODbaseTable::getUnoTunnelImplementationId()) );
ODbaseTable* pTable = reinterpret_cast< ODbaseTable* >( xTunnel->getSomething(ODbaseTable::getUnoTunnelId()) );
if(pTable)
{
pTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),makeAny(_rForName));
@@ -111,7 +111,7 @@
if ( xTunnel.is() )
{
ODbaseTable* pTable = reinterpret_cast< ODbaseTable* >( xTunnel->getSomething(ODbaseTable::getUnoTunnelImplementationId()) );
ODbaseTable* pTable = reinterpret_cast< ODbaseTable* >( xTunnel->getSomething(ODbaseTable::getUnoTunnelId()) );
if(pTable)
pTable->DropImpl();
}
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index afa6cc5..3eeea67 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <file/FConnection.hxx>
#include <file/FDatabaseMetaData.hxx>
@@ -405,12 +406,12 @@
sal_Int64 SAL_CALL OConnection::getSomething( const Sequence< sal_Int8 >& rId )
{
return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return (isUnoTunnelId<OConnection>(rId))
? reinterpret_cast< sal_Int64 >( this )
: sal_Int64(0);
}
Sequence< sal_Int8 > OConnection::getUnoTunnelImplementationId()
Sequence< sal_Int8 > OConnection::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx
index 25ccc57..367fd1f 100644
--- a/connectivity/source/drivers/file/FDriver.cxx
+++ b/connectivity/source/drivers/file/FDriver.cxx
@@ -189,7 +189,7 @@
Reference< css::lang::XUnoTunnel> xTunnel(connection,UNO_QUERY);
if(xTunnel.is())
{
OConnection* pSearchConnection = reinterpret_cast< OConnection* >( xTunnel->getSomething(OConnection::getUnoTunnelImplementationId()) );
OConnection* pSearchConnection = reinterpret_cast< OConnection* >( xTunnel->getSomething(OConnection::getUnoTunnelId()) );
OConnection* pConnection = nullptr;
for (auto const& elem : m_xConnections)
{
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index b535c35..bc978bc 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -34,6 +34,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/numbers.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <flat/EDriver.hxx>
#include <com/sun/star/util/NumberFormat.hpp>
@@ -553,7 +554,7 @@
}
Sequence< sal_Int8 > OFlatTable::getUnoTunnelImplementationId()
Sequence< sal_Int8 > OFlatTable::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -564,7 +565,7 @@
sal_Int64 OFlatTable::getSomething( const Sequence< sal_Int8 > & rId )
{
return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return (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 e7811fd..5ab48b1 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -345,7 +345,7 @@
Reference< XUnoTunnel> xTunnel(xOrig,UNO_QUERY);
if ( xTunnel.is() )
{
OMetaConnection* pMetaConnection = reinterpret_cast<OMetaConnection*>(xTunnel->getSomething( OMetaConnection::getUnoTunnelImplementationId() ));
OMetaConnection* pMetaConnection = reinterpret_cast<OMetaConnection*>(xTunnel->getSomething( OMetaConnection::getUnoTunnelId() ));
if ( pMetaConnection )
pMetaConnection->setURL(url);
}
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx
index b7a841a..ab7d958 100644
--- a/connectivity/source/drivers/hsqldb/HTable.cxx
+++ b/connectivity/source/drivers/hsqldb/HTable.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <comphelper/property.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/sdbcx/VColumn.hxx>
@@ -126,7 +127,7 @@
return new OIndexesHelper(this,m_aMutex,_rNames);
}
Sequence< sal_Int8 > OHSQLTable::getUnoTunnelImplementationId()
Sequence< sal_Int8 > OHSQLTable::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -137,7 +138,7 @@
sal_Int64 OHSQLTable::getSomething( const Sequence< sal_Int8 > & rId )
{
return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
return (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 d36f78f..06631ed 100644
--- a/connectivity/source/drivers/mysql_jdbc/YDriver.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YDriver.cxx
@@ -271,7 +271,7 @@
if (xTunnel.is())
{
pMetaConnection = reinterpret_cast<OMetaConnection*>(
xTunnel->getSomething(OMetaConnection::getUnoTunnelImplementationId()));
xTunnel->getSomething(OMetaConnection::getUnoTunnelId()));
if (pMetaConnection)
pMetaConnection->setURL(url);
}
@@ -344,7 +344,7 @@
if (xTunnel.is())
{
OMetaConnection* pConnection = reinterpret_cast<OMetaConnection*>(
xTunnel->getSomething(OMetaConnection::getUnoTunnelImplementationId()));
xTunnel->getSomething(OMetaConnection::getUnoTunnelId()));
if (pConnection)
{
TWeakPairVector::iterator i
diff --git a/connectivity/source/drivers/mysql_jdbc/YTable.cxx b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
index a3f3039..f627794 100644
--- a/connectivity/source/drivers/mysql_jdbc/YTable.cxx
+++ b/connectivity/source/drivers/mysql_jdbc/YTable.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <comphelper/property.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/sdbcx/VColumn.hxx>
@@ -125,7 +126,7 @@
return new OIndexesHelper(this, m_aMutex, _rNames);
}
Sequence<sal_Int8> OMySQLTable::getUnoTunnelImplementationId()
Sequence<sal_Int8> OMySQLTable::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -136,10 +137,8 @@
sal_Int64 OMySQLTable::getSomething(const Sequence<sal_Int8>& rId)
{
return (rId.getLength() == 16
&& 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16))
? reinterpret_cast<sal_Int64>(this)
: OTable_TYPEDEF::getSomething(rId);
return (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 82aea71..cf9ca78 100644
--- a/connectivity/source/drivers/writer/WTable.cxx
+++ b/connectivity/source/drivers/writer/WTable.cxx
@@ -28,6 +28,7 @@
#include <writer/WConnection.hxx>
#include <connectivity/sdbcx/VColumn.hxx>
#include <sal/log.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/typeprovider.hxx>
namespace com
@@ -222,7 +223,7 @@
m_pWriterConnection = nullptr;
}
uno::Sequence<sal_Int8> OWriterTable::getUnoTunnelImplementationId()
uno::Sequence<sal_Int8> OWriterTable::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -231,10 +232,8 @@
sal_Int64 OWriterTable::getSomething(const uno::Sequence<sal_Int8>& rId)
{
return (rId.getLength() == 16
&& 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16))
? reinterpret_cast<sal_Int64>(this)
: OWriterTable_BASE::getSomething(rId);
return (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/inc/TConnection.hxx b/connectivity/source/inc/TConnection.hxx
index 8737da6..af528c8 100644
--- a/connectivity/source/inc/TConnection.hxx
+++ b/connectivity/source/inc/TConnection.hxx
@@ -75,7 +75,7 @@
//XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
};
}
#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_TCONNECTION_HXX
diff --git a/connectivity/source/inc/calc/CTable.hxx b/connectivity/source/inc/calc/CTable.hxx
index 00e91ee..570a6bc 100644
--- a/connectivity/source/inc/calc/CTable.hxx
+++ b/connectivity/source/inc/calc/CTable.hxx
@@ -69,7 +69,7 @@
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
void construct() override;
};
diff --git a/connectivity/source/inc/dbase/DIndex.hxx b/connectivity/source/inc/dbase/DIndex.hxx
index d4a9d7d..ce2a3c5 100644
--- a/connectivity/source/inc/dbase/DIndex.hxx
+++ b/connectivity/source/inc/dbase/DIndex.hxx
@@ -97,7 +97,7 @@
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
const ODbaseTable* getTable() const { return m_pTable; }
const NDXHeader& getHeader() const { return m_aHeader; }
diff --git a/connectivity/source/inc/dbase/DTable.hxx b/connectivity/source/inc/dbase/DTable.hxx
index ace8f3c..7551dd0 100644
--- a/connectivity/source/inc/dbase/DTable.hxx
+++ b/connectivity/source/inc/dbase/DTable.hxx
@@ -167,7 +167,7 @@
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// XAlterTable
virtual void SAL_CALL alterColumnByName( const OUString& colName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;
virtual void SAL_CALL alterColumnByIndex( sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;
diff --git a/connectivity/source/inc/file/FConnection.hxx b/connectivity/source/inc/file/FConnection.hxx
index ddb3dbc..4041e06 100644
--- a/connectivity/source/inc/file/FConnection.hxx
+++ b/connectivity/source/inc/file/FConnection.hxx
@@ -107,7 +107,7 @@
virtual void SAL_CALL clearWarnings( ) override;
//XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// no interface methods
css::uno::Reference< css::ucb::XDynamicResultSet > getDir() const;
diff --git a/connectivity/source/inc/flat/ETable.hxx b/connectivity/source/inc/flat/ETable.hxx
index 7dbc56d..b36111c 100644
--- a/connectivity/source/inc/flat/ETable.hxx
+++ b/connectivity/source/inc/flat/ETable.hxx
@@ -98,7 +98,7 @@
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
OUString getEntry() const;
};
diff --git a/connectivity/source/inc/hsqldb/HTable.hxx b/connectivity/source/inc/hsqldb/HTable.hxx
index 9f3bbe4..efae11c 100644
--- a/connectivity/source/inc/hsqldb/HTable.hxx
+++ b/connectivity/source/inc/hsqldb/HTable.hxx
@@ -87,7 +87,7 @@
virtual void construct() override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
//XTypeProvider
diff --git a/connectivity/source/inc/mysql/YTable.hxx b/connectivity/source/inc/mysql/YTable.hxx
index 5c5f5e4..9e7ea59 100644
--- a/connectivity/source/inc/mysql/YTable.hxx
+++ b/connectivity/source/inc/mysql/YTable.hxx
@@ -94,7 +94,7 @@
virtual void construct() override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// XAlterTable
virtual void SAL_CALL alterColumnByName( const OUString& colName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;
diff --git a/connectivity/source/inc/writer/WTable.hxx b/connectivity/source/inc/writer/WTable.hxx
index 6e2c3e8..fa533e1 100644
--- a/connectivity/source/inc/writer/WTable.hxx
+++ b/connectivity/source/inc/writer/WTable.hxx
@@ -78,7 +78,7 @@
// css::lang::XUnoTunnel
sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8>& rId) override;
static css::uno::Sequence<sal_Int8> getUnoTunnelImplementationId();
static css::uno::Sequence<sal_Int8> getUnoTunnelId();
void construct() override;
};
diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx
index cde9753..7b56d40 100644
--- a/connectivity/source/sdbcx/VDescriptor.cxx
+++ b/connectivity/source/sdbcx/VDescriptor.cxx
@@ -49,7 +49,7 @@
// css::lang::XUnoTunnel
sal_Int64 SAL_CALL ODescriptor::getSomething( const Sequence< sal_Int8 >& rId )
{
return (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
return (isUnoTunnelId<ODescriptor>(rId))
? reinterpret_cast< sal_Int64 >( this )
: 0;
}
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index c2cf6e5..334afad 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -59,6 +59,7 @@
#include <comphelper/property.hxx>
#include <comphelper/seqstream.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <comphelper/uno3.hxx>
#include <connectivity/BlobHelper.hxx>
@@ -443,13 +444,13 @@
// css::XUnoTunnel
sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId )
{
if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
if (isUnoTunnelId<ORowSet>(rId))
return reinterpret_cast<sal_Int64>(this);
return 0;
}
Sequence< sal_Int8 > ORowSet::getUnoTunnelImplementationId()
Sequence< sal_Int8 > ORowSet::getUnoTunnelId()
{
static ::cppu::OImplementationId s_Id;
@@ -2146,7 +2147,7 @@
Reference< XUnoTunnel > xTunnel(elem.get(),UNO_QUERY);
if(xTunnel.is())
{
ORowSetClone* pClone = reinterpret_cast<ORowSetClone*>(xTunnel->getSomething(ORowSetClone::getUnoTunnelImplementationId()));
ORowSetClone* pClone = reinterpret_cast<ORowSetClone*>(xTunnel->getSomething(ORowSetClone::getUnoTunnelId()));
if(pClone)
pClone->onDeleteRow( _rBookmark );
}
@@ -2163,7 +2164,7 @@
Reference< XUnoTunnel > xTunnel(clone.get(),UNO_QUERY);
if(xTunnel.is())
{
ORowSetClone* pClone = reinterpret_cast<ORowSetClone*>(xTunnel->getSomething(ORowSetClone::getUnoTunnelImplementationId()));
ORowSetClone* pClone = reinterpret_cast<ORowSetClone*>(xTunnel->getSomething(ORowSetClone::getUnoTunnelId()));
if(pClone)
pClone->onDeletedRow( _rBookmark, _nPos );
}
@@ -2909,7 +2910,7 @@
return *::comphelper::OPropertyArrayUsageHelper<ORowSetClone>::getArrayHelper();
}
Sequence< sal_Int8 > ORowSetClone::getUnoTunnelImplementationId()
Sequence< sal_Int8 > ORowSetClone::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -2919,7 +2920,7 @@
// css::XUnoTunnel
sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId )
{
if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
if (isUnoTunnelId<ORowSetClone>(rId))
return reinterpret_cast<sal_Int64>(this);
return 0;
diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx
index 74d54cd..a0c7b6f 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -259,7 +259,7 @@
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// css::uno::XAggregation
virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& aType ) override;
@@ -491,7 +491,7 @@
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// OComponentHelper
virtual void SAL_CALL disposing() override;
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index 6b632e1..c2c99f2 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -29,6 +29,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/property.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <com/sun/star/util/XRefreshListener.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
@@ -452,7 +453,7 @@
sal_Int64 SAL_CALL ODBTableDecorator::getSomething( const Sequence< sal_Int8 >& rId )
{
if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
if (isUnoTunnelId<ODBTableDecorator>(rId))
return reinterpret_cast<sal_Int64>(this);
sal_Int64 nRet = 0;
@@ -462,7 +463,7 @@
return nRet;
}
Sequence< sal_Int8 > ODBTableDecorator::getUnoTunnelImplementationId()
Sequence< sal_Int8 > ODBTableDecorator::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx
index ea00554..3007b03 100644
--- a/dbaccess/source/core/api/table.cxx
+++ b/dbaccess/source/core/api/table.cxx
@@ -28,6 +28,7 @@
#include <osl/diagnose.h>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/util/XRefreshListener.hpp>
@@ -306,7 +307,7 @@
sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId )
{
sal_Int64 nRet(0);
if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
if (isUnoTunnelId<ODBTable>(rId))
nRet = reinterpret_cast<sal_Int64>(this);
else
nRet = OTable_Base::getSomething(rId);
@@ -314,7 +315,7 @@
return nRet;
}
Sequence< sal_Int8 > ODBTable::getUnoTunnelImplementationId()
Sequence< sal_Int8 > ODBTable::getUnoTunnelId()
{
static ::cppu::OImplementationId s_Id;
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index b8e7502..7737ac0 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -32,6 +32,7 @@
#include <ucbhelper/contentidentifier.hxx>
#include "myucp_resultset.hxx"
#include <com/sun/star/container/XNameContainer.hpp>
#include <comphelper/servicehelper.hxx>
#include <sdbcoretools.hxx>
#include <stringconstants.hxx>
@@ -541,7 +542,7 @@
// css::lang::XUnoTunnel
sal_Int64 OContentHelper::getSomething( const Sequence< sal_Int8 > & rId )
{
if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
if (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 6e9a38d..c37994d 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -54,6 +54,7 @@
#include <comphelper/enumhelper.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
@@ -731,13 +732,13 @@
sal_Int64 SAL_CALL ODatabaseContext::getSomething( const Sequence< sal_Int8 >& rId )
{
if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
if (isUnoTunnelId<ODatabaseContext>(rId))
return reinterpret_cast<sal_Int64>(this);
return 0;
}
Sequence< sal_Int8 > ODatabaseContext::getUnoTunnelImplementationId()
Sequence< sal_Int8 > ODatabaseContext::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index f1f5b8a..30ffe0c 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -2205,7 +2205,7 @@
Reference<XUnoTunnel> xDBContextTunnel(DatabaseContext::create(context), UNO_QUERY_THROW);
dbaccess::ODatabaseContext* pContext = reinterpret_cast<dbaccess::ODatabaseContext*>(
xDBContextTunnel->getSomething(
dbaccess::ODatabaseContext::getUnoTunnelImplementationId()));
dbaccess::ODatabaseContext::getUnoTunnelId()));
rtl::Reference pImpl(
new dbaccess::ODatabaseModelImpl(context, *pContext));
diff --git a/dbaccess/source/core/inc/TableDeco.hxx b/dbaccess/source/core/inc/TableDeco.hxx
index 52d6fb0..cd1bb31 100644
--- a/dbaccess/source/core/inc/TableDeco.hxx
+++ b/dbaccess/source/core/inc/TableDeco.hxx
@@ -147,7 +147,7 @@
virtual void SAL_CALL setName( const OUString& aName ) override;
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// XColumnsSupplier
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns( ) override;
diff --git a/dbaccess/source/core/inc/databasecontext.hxx b/dbaccess/source/core/inc/databasecontext.hxx
index c69c350..19c59a9 100644
--- a/dbaccess/source/core/inc/databasecontext.hxx
+++ b/dbaccess/source/core/inc/databasecontext.hxx
@@ -167,7 +167,7 @@
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
void registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl);
void revokeDatabaseDocument( const ODatabaseModelImpl& _rModelImpl);
diff --git a/dbaccess/source/core/inc/table.hxx b/dbaccess/source/core/inc/table.hxx
index 0b4b284..883849c 100644
--- a/dbaccess/source/core/inc/table.hxx
+++ b/dbaccess/source/core/inc/table.hxx
@@ -124,7 +124,7 @@
//XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
// css::lang::XServiceInfo
DECLARE_SERVICE_INFO();
diff --git a/dbaccess/source/ui/inc/JoinExchange.hxx b/dbaccess/source/ui/inc/JoinExchange.hxx
index 0d750a4..72aa0d1 100644
--- a/dbaccess/source/ui/inc/JoinExchange.hxx
+++ b/dbaccess/source/ui/inc/JoinExchange.hxx
@@ -50,6 +50,7 @@
virtual void SAL_CALL release( ) throw() override;
// XUnoTunnel
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& _rIdentifier ) override;
void StartDrag( vcl::Window* pWindow, sal_Int8 nDragSourceActions, IDragTransferableListener* _pListener );
@@ -62,8 +63,6 @@
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
virtual void DragFinished( sal_Int8 nDropAction ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
using TransferableHelper::StartDrag;
};
}
diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx
index 036943f..3ee2e4d 100644
--- a/dbaccess/source/ui/querydesign/JoinExchange.cxx
+++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx
@@ -19,6 +19,7 @@
#include <JoinExchange.hxx>
#include <sot/formats.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/typeprovider.hxx>
namespace dbaui
@@ -70,14 +71,14 @@
Reference< XUnoTunnel > xTunnel(_rxObject, UNO_QUERY);
if (xTunnel.is())
{
OJoinExchObj* pImplementation = reinterpret_cast<OJoinExchObj*>(xTunnel->getSomething(getUnoTunnelImplementationId()));
OJoinExchObj* pImplementation = reinterpret_cast<OJoinExchObj*>(xTunnel->getSomething(getUnoTunnelId()));
if (pImplementation)
aReturn = pImplementation->m_jxdSourceDescription;
}
return aReturn;
}
Sequence< sal_Int8 > OJoinExchObj::getUnoTunnelImplementationId()
Sequence< sal_Int8 > OJoinExchObj::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -86,7 +87,7 @@
sal_Int64 SAL_CALL OJoinExchObj::getSomething( const Sequence< sal_Int8 >& _rIdentifier )
{
if (_rIdentifier.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) )
if (isUnoTunnelId<OJoinExchObj>(_rIdentifier))
return reinterpret_cast<sal_Int64>(this);
return 0;
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx
index 5fd625f..8ed4217 100644
--- a/forms/source/component/Columns.cxx
+++ b/forms/source/component/Columns.cxx
@@ -125,9 +125,7 @@
{
sal_Int64 nReturn(0);
if ( (_rIdentifier.getLength() == 16)
&& (0 == memcmp( getUnoTunnelId().getConstArray(), _rIdentifier.getConstArray(), 16 ))
)
if ( isUnoTunnelId<OGridColumn>(_rIdentifier) )
{
nReturn = reinterpret_cast<sal_Int64>(this);
}
diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx
index f33a408..397218a 100644
--- a/framework/source/fwi/uielement/constitemcontainer.cxx
+++ b/framework/source/fwi/uielement/constitemcontainer.cxx
@@ -165,7 +165,7 @@
// XUnoTunnel
sal_Int64 ConstItemContainer::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier )
{
if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( ConstItemContainer::getUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) )
if( isUnoTunnelId<ConstItemContainer>(rIdentifier) )
{
return reinterpret_cast< sal_Int64 >( this );
}
diff --git a/include/connectivity/ConnectionWrapper.hxx b/include/connectivity/ConnectionWrapper.hxx
index 0d6132a..b621cd0 100644
--- a/include/connectivity/ConnectionWrapper.hxx
+++ b/include/connectivity/ConnectionWrapper.hxx
@@ -67,7 +67,7 @@
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
/** method to create unique ids
@param _rURL
The URL.
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 23a35f0..7a69594 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -356,10 +356,8 @@
static SfxUnoStyleSheet* getUnoStyleSheet( const css::uno::Reference< css::style::XStyle >& xStyle );
// XUnoTunnel
static const css::uno::Sequence< ::sal_Int8 >& getUnoTunnelId();
virtual ::sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< ::sal_Int8 >& aIdentifier ) override;
private:
static const css::uno::Sequence< ::sal_Int8 >& getIdentifier();
};
#endif
diff --git a/package/inc/ZipPackage.hxx b/package/inc/ZipPackage.hxx
index ff76226..d1f9560 100644
--- a/package/inc/ZipPackage.hxx
+++ b/package/inc/ZipPackage.hxx
@@ -147,7 +147,7 @@
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
/// @throws css::uno::RuntimeException
static css::uno::Sequence < sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence < sal_Int8 > getUnoTunnelId();
// XPropertySet
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
diff --git a/package/inc/ZipPackageFolder.hxx b/package/inc/ZipPackageFolder.hxx
index 1f65b2c..c99f8f2 100644
--- a/package/inc/ZipPackageFolder.hxx
+++ b/package/inc/ZipPackageFolder.hxx
@@ -64,7 +64,7 @@
ZipContentInfo& doGetByName( const OUString& aName );
static css::uno::Sequence < sal_Int8 > static_getImplementationId();
static css::uno::Sequence < sal_Int8 > getUnoTunnelId();
void setPackageFormat_Impl( sal_Int32 nFormat ) { m_nFormat = nFormat; }
void setRemoveOnInsertMode_Impl( bool bRemove ) { mbAllowRemoveOnInsert = bRemove; }
diff --git a/package/inc/ZipPackageStream.hxx b/package/inc/ZipPackageStream.hxx
index ffd791c..7f704ca5 100644
--- a/package/inc/ZipPackageStream.hxx
+++ b/package/inc/ZipPackageStream.hxx
@@ -138,7 +138,7 @@
void setZipEntryOnLoading( const ZipEntry &rInEntry);
void successfullyWritten( ZipEntry const *pEntry );
static css::uno::Sequence < sal_Int8 > static_getImplementationId();
static css::uno::Sequence < sal_Int8 > getUnoTunnelId();
// XActiveDataSink
virtual void SAL_CALL setInputStream( const css::uno::Reference< css::io::XInputStream >& aStream ) override;
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index a7bb9e8..3f38580 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -80,6 +80,7 @@
#include <comphelper/sequenceashashmap.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
using namespace std;
using namespace osl;
@@ -245,7 +246,7 @@
uno::Reference < XUnoTunnel > xUnoTunnel;
aAny >>= xUnoTunnel;
sal_Int64 nTest=0;
if ( (nTest = xUnoTunnel->getSomething( ZipPackageFolder::static_getImplementationId() )) != 0 )
if ( (nTest = xUnoTunnel->getSomething( ZipPackageFolder::getUnoTunnelId() )) != 0 )
{
pFolder = reinterpret_cast < ZipPackageFolder* > ( nTest );
pFolder->SetMediaType ( sMediaType );
@@ -253,7 +254,7 @@
}
else
{
pStream = reinterpret_cast < ZipPackageStream* > ( xUnoTunnel->getSomething( ZipPackageStream::static_getImplementationId() ));
pStream = reinterpret_cast < ZipPackageStream* > ( xUnoTunnel->getSomething( ZipPackageStream::getUnoTunnelId() ));
pStream->SetMediaType ( sMediaType );
pStream->SetFromManifest( true );
@@ -491,7 +492,7 @@
uno::Any aIterAny = getByHierarchicalName( aPath );
uno::Reference < lang::XUnoTunnel > xIterTunnel;
aIterAny >>= xIterTunnel;
sal_Int64 nTest = xIterTunnel->getSomething( ZipPackageStream::static_getImplementationId() );
sal_Int64 nTest = xIterTunnel->getSomething( ZipPackageStream::getUnoTunnelId() );
if ( nTest != 0 )
{
// this is a package stream, in OFOPXML format only streams can have mediatype
@@ -1706,7 +1707,7 @@
static_getSupportedServiceNames() );
}
Sequence< sal_Int8 > ZipPackage::getUnoTunnelImplementationId()
Sequence< sal_Int8 > ZipPackage::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -1715,7 +1716,7 @@
sal_Int64 SAL_CALL ZipPackage::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier )
{
if ( aIdentifier.getLength() == 16 && 0 == memcmp( getUnoTunnelImplementationId().getConstArray(), aIdentifier.getConstArray(), 16 ) )
if ( isUnoTunnelId<ZipPackage>(aIdentifier) )
return reinterpret_cast < sal_Int64 > ( this );
return 0;
}
diff --git a/package/source/zippackage/ZipPackageEntry.cxx b/package/source/zippackage/ZipPackageEntry.cxx
index 118630e..3578965 100644
--- a/package/source/zippackage/ZipPackageEntry.cxx
+++ b/package/source/zippackage/ZipPackageEntry.cxx
@@ -94,7 +94,7 @@
{
sal_Int64 nTest(0);
uno::Reference < XUnoTunnel > xTunnel ( xNewParent, UNO_QUERY );
if ( !xNewParent.is() || ( nTest = xTunnel->getSomething ( ZipPackageFolder::static_getImplementationId () ) ) == 0 )
if ( !xNewParent.is() || ( nTest = xTunnel->getSomething ( ZipPackageFolder::getUnoTunnelId () ) ) == 0 )
throw NoSupportException(THROW_WHERE );
ZipPackageFolder *pNewParent = reinterpret_cast < ZipPackageFolder * > ( nTest );
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index 0b5ae36..2dfbb72 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/packages/zip/ZipConstants.hpp>
#include <com/sun/star/embed/StorageFormats.hpp>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <osl/diagnose.h>
@@ -155,7 +156,7 @@
}
}
css::uno::Sequence < sal_Int8 > ZipPackageFolder::static_getImplementationId()
css::uno::Sequence < sal_Int8 > ZipPackageFolder::getUnoTunnelId()
{
return lcl_CachedImplId::get().getImplementationId();
}
@@ -173,12 +174,12 @@
sal_Int64 nTest;
ZipPackageEntry *pEntry;
if ( ( nTest = xRef->getSomething ( ZipPackageFolder::static_getImplementationId() ) ) != 0 )
if ( ( nTest = xRef->getSomething ( ZipPackageFolder::getUnoTunnelId() ) ) != 0 )
{
ZipPackageFolder *pFolder = reinterpret_cast < ZipPackageFolder * > ( nTest );
pEntry = static_cast < ZipPackageEntry * > ( pFolder );
}
else if ( ( nTest = xRef->getSomething ( ZipPackageStream::static_getImplementationId() ) ) != 0 )
else if ( ( nTest = xRef->getSomething ( ZipPackageStream::getUnoTunnelId() ) ) != 0 )
{
ZipPackageStream *pStream = reinterpret_cast < ZipPackageStream * > ( nTest );
pEntry = static_cast < ZipPackageEntry * > ( pStream );
@@ -357,8 +358,7 @@
sal_Int64 SAL_CALL ZipPackageFolder::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier )
{
sal_Int64 nMe = 0;
if ( aIdentifier.getLength() == 16 &&
0 == memcmp(static_getImplementationId().getConstArray(), aIdentifier.getConstArray(), 16 ) )
if ( 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 25c7050..f685f89 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -46,6 +46,7 @@
#include "wrapstreamforshare.hxx"
#include <comphelper/seekableinput.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/storagehelper.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -76,7 +77,7 @@
namespace { struct lcl_CachedImplId : public rtl::Static< cppu::OImplementationId, lcl_CachedImplId > {}; }
css::uno::Sequence < sal_Int8 > ZipPackageStream::static_getImplementationId()
css::uno::Sequence < sal_Int8 > ZipPackageStream::getUnoTunnelId()
{
return lcl_CachedImplId::get().getImplementationId();
}
@@ -1119,8 +1120,7 @@
sal_Int64 SAL_CALL ZipPackageStream::getSomething( const Sequence< sal_Int8 >& aIdentifier )
{
sal_Int64 nMe = 0;
if ( aIdentifier.getLength() == 16 &&
0 == memcmp( static_getImplementationId().getConstArray(), aIdentifier.getConstArray(), 16 ) )
if ( isUnoTunnelId<ZipPackageStream>(aIdentifier) )
nMe = reinterpret_cast < sal_Int64 > ( this );
return nMe;
}
diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx
index bdcaeb8..436550c 100644
--- a/reportdesign/inc/ReportDefinition.hxx
+++ b/reportdesign/inc/ReportDefinition.hxx
@@ -192,6 +192,7 @@
public:
//TTTT Needed? Or same as above?
static css::uno::Sequence< sal_Int8 > getUnoTunnelId();
static std::shared_ptr<rptui::OReportModel> getSdrModel(const css::uno::Reference< css::report::XReportDefinition >& _xReportDefinition);
private:
@@ -354,7 +355,6 @@
// css::lang::XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId();
// SvxUnoDrawMSFactory
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) override;
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 7ac5e6e..e3ef88a 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -96,6 +96,7 @@
#include <comphelper/propertystatecontainer.hxx>
#include <comphelper/seqstream.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/uno3.hxx>
#include <connectivity/CommonTools.hxx>
@@ -1937,7 +1938,7 @@
sal_Int64 SAL_CALL OReportDefinition::getSomething( const uno::Sequence< sal_Int8 >& rId )
{
sal_Int64 nRet = 0;
if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
if (isUnoTunnelId<OReportDefinition>(rId) )
nRet = reinterpret_cast<sal_Int64>(this);
else
{
@@ -1961,7 +1962,7 @@
return css::uno::Sequence<sal_Int8>();
}
uno::Sequence< sal_Int8 > OReportDefinition::getUnoTunnelImplementationId()
uno::Sequence< sal_Int8 > OReportDefinition::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -1982,7 +1983,7 @@
if( xUT.is() )
pReportModel = reinterpret_cast<OReportDefinition*>(
sal::static_int_cast<sal_uIntPtr>(
xUT->getSomething( OReportDefinition::getUnoTunnelImplementationId()))
xUT->getSomething( OReportDefinition::getUnoTunnelId()))
)->m_pImpl->m_pReportModel;
return pReportModel;
}
diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx
index 1ad60a6..6aa10a6 100644
--- a/reportdesign/source/core/api/Section.cxx
+++ b/reportdesign/source/core/api/Section.cxx
@@ -571,7 +571,7 @@
sal_Int64 OSection::getSomething( const uno::Sequence< sal_Int8 > & rId )
{
if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
if (isUnoTunnelId<OSection>(rId) )
return reinterpret_cast<sal_Int64>(this);
return (m_xDrawPage_Tunnel.is()) ? m_xDrawPage_Tunnel->getSomething(rId) : 0;
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index bbca0b5..ab464f2 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -2860,9 +2860,7 @@
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
}
if ( rId.getLength() == 16 &&
0 == memcmp( SfxObjectShell::getUnoTunnelId().getConstArray(),
rId.getConstArray(), 16 ) )
if ( isUnoTunnelId<SfxObjectShell>(rId) )
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(pDocShell ));
}
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index edfa6bf..7665a22 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -410,8 +410,7 @@
sal_Int64
ScVbaWorkbook::getSomething(const uno::Sequence<sal_Int8 >& rId )
{
if (rId.getLength() == 16 &&
0 == memcmp( ScVbaWorksheet::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ))
if (isUnoTunnelId<ScVbaWorksheet>(rId))
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
}
diff --git a/sd/source/ui/inc/ViewTabBar.hxx b/sd/source/ui/inc/ViewTabBar.hxx
index 3401966..4d205fb 100644
--- a/sd/source/ui/inc/ViewTabBar.hxx
+++ b/sd/source/ui/inc/ViewTabBar.hxx
@@ -110,6 +110,8 @@
//----- XUnoTunnel --------------------------------------------------------
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething (const css::uno::Sequence<sal_Int8>& rId) override;
/** The returned value is calculated as the difference between the
@@ -159,7 +161,6 @@
static vcl::Window* GetAnchorWindow(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewTabBarId,
const css::uno::Reference<css::frame::XController>& rxController);
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
};
} // end of namespace sd
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 20bdfbd..c3c54fd 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -350,13 +350,13 @@
sal_Int64 SAL_CALL SdXImpressDocument::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier )
{
if( rIdentifier.getLength() == 16 )
{
if( 0 == memcmp( SdXImpressDocument::getUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) )
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
if( isUnoTunnelId<SdXImpressDocument>(rIdentifier) )
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
if( 0 == memcmp( SdrModel::getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 ) )
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(mpDoc));
if( (rIdentifier.getLength() == 16) &&
(0 == memcmp( SdrModel::getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 )))
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(mpDoc));
}
return SfxBaseModel::getSomething( rIdentifier );
diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx
index 969a59a..9c9abda 100644
--- a/sd/source/ui/view/ViewTabBar.cxx
+++ b/sd/source/ui/view/ViewTabBar.cxx
@@ -314,8 +314,7 @@
{
sal_Int64 nResult = 0;
if (rId.getLength() == 16
&& memcmp(getUnoTunnelId().getConstArray(), rId.getConstArray(), 16) == 0)
if (isUnoTunnelId<ViewTabBar>(rId))
{
nResult = reinterpret_cast<sal_Int64>(this);
}
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx
index 91b31eb..afb4974 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -486,7 +486,7 @@
{
sal_Int64 nRet;
if( ( rId.getLength() == 16 ) && ( 0 == memcmp( ThumbnailViewAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
if( isUnoTunnelId<ThumbnailViewAcc>(rId) )
nRet = reinterpret_cast< sal_Int64 >( this );
else
nRet = 0;
@@ -946,7 +946,7 @@
{
sal_Int64 nRet;
if( ( rId.getLength() == 16 ) && ( 0 == memcmp( SfxThumbnailViewAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
if( isUnoTunnelId<SfxThumbnailViewAcc>(rId) )
nRet = reinterpret_cast< sal_Int64 >( this );
else
nRet = 0;
@@ -1354,7 +1354,7 @@
{
sal_Int64 nRet;
if( ( rId.getLength() == 16 ) && ( 0 == memcmp( ThumbnailViewItemAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
if( isUnoTunnelId<ThumbnailViewItemAcc>(rId) )
nRet = reinterpret_cast< sal_Int64 >( this );
else
nRet = 0;
diff --git a/sfx2/source/control/thumbnailviewacc.hxx b/sfx2/source/control/thumbnailviewacc.hxx
index 5eab7ff..4d3f0d7 100644
--- a/sfx2/source/control/thumbnailviewacc.hxx
+++ b/sfx2/source/control/thumbnailviewacc.hxx
@@ -118,6 +118,7 @@
virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
// XUnoTunnel
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override;
private:
@@ -127,8 +128,6 @@
/// The current FOCUSED state.
bool mbIsFocused;
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
/** Tell all listeners that the object is dying. This callback is
usually called from the WeakComponentImplHelper class.
*/
@@ -210,6 +209,7 @@
virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
// XUnoTunnel
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override;
private:
@@ -217,8 +217,6 @@
css::accessibility::XAccessibleEventListener > > mxEventListeners;
SfxThumbnailView* mpParent;
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
/** Tell all listeners that the object is dying. This callback is
usually called from the WeakComponentImplHelper class.
*/
@@ -264,8 +262,6 @@
ThumbnailViewItem* mpParent;
bool const mbIsTransientChildrenDisabled;
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
public:
ThumbnailViewItemAcc( ThumbnailViewItem* pParent, bool bIsTransientChildrenDisabled );
@@ -308,6 +304,7 @@
virtual sal_Int32 SAL_CALL getBackground( ) override;
// XUnoTunnel
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override;
};
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index d206c17b..beeaa56 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -917,7 +917,7 @@
{
css::uno::Reference< css::lang::XUnoTunnel > xUT( xStyle, css::uno::UNO_QUERY );
if( xUT.is() )
pRet = reinterpret_cast<SfxUnoStyleSheet*>(sal::static_int_cast<sal_uIntPtr>(xUT->getSomething( SfxUnoStyleSheet::getIdentifier())));
pRet = reinterpret_cast<SfxUnoStyleSheet*>(sal::static_int_cast<sal_uIntPtr>(xUT->getSomething( SfxUnoStyleSheet::getUnoTunnelId())));
}
return pRet;
}
@@ -927,14 +927,12 @@
*/
::sal_Int64 SAL_CALL SfxUnoStyleSheet::getSomething( const css::uno::Sequence< ::sal_Int8 >& rId )
{
if( rId.getLength() == 16 && 0 == memcmp( getIdentifier().getConstArray(), rId.getConstArray(), 16 ) )
if( isUnoTunnelId<SfxUnoStyleSheet>(rId) )
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this));
}
else
{
return 0;
}
return 0;
}
void
@@ -948,7 +946,7 @@
class theSfxUnoStyleSheetIdentifier : public rtl::Static< UnoTunnelIdInit, theSfxUnoStyleSheetIdentifier > {};
}
const css::uno::Sequence< ::sal_Int8 >& SfxUnoStyleSheet::getIdentifier()
const css::uno::Sequence< ::sal_Int8 >& SfxUnoStyleSheet::getUnoTunnelId()
{
return theSfxUnoStyleSheetIdentifier::get().getSeq();
}
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index 50ae750..08838f3 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -602,7 +602,7 @@
{
sal_Int64 nRet;
if( ( rId.getLength() == 16 ) && ( 0 == memcmp( ValueSetAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
if( isUnoTunnelId<ValueSetAcc>(rId) )
nRet = reinterpret_cast< sal_Int64 >( this );
else
nRet = 0;
@@ -1056,7 +1056,7 @@
{
sal_Int64 nRet;
if( ( rId.getLength() == 16 ) && ( 0 == memcmp( ValueItemAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
if( isUnoTunnelId<ValueItemAcc>(rId) )
nRet = reinterpret_cast< sal_Int64 >( this );
else
nRet = 0;
@@ -1405,7 +1405,7 @@
{
sal_Int64 nRet;
if( ( rId.getLength() == 16 ) && ( 0 == memcmp( SvtValueItemAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
if( isUnoTunnelId<SvtValueItemAcc>(rId) )
nRet = reinterpret_cast< sal_Int64 >( this );
else
nRet = 0;
@@ -1929,7 +1929,7 @@
{
sal_Int64 nRet;
if( ( rId.getLength() == 16 ) && ( 0 == memcmp( SvtValueSetAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
if( isUnoTunnelId<SvtValueSetAcc>(rId) )
nRet = reinterpret_cast< sal_Int64 >( this );
else
nRet = 0;
diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx
index 635a7d0..840d92f 100644
--- a/svtools/source/control/valueimp.hxx
+++ b/svtools/source/control/valueimp.hxx
@@ -165,6 +165,7 @@
virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
// XUnoTunnel
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override;
private:
@@ -174,8 +175,6 @@
/// The current FOCUSED state.
bool mbIsFocused;
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
/** Tell all listeners that the object is dying. This callback is
usually called from the WeakComponentImplHelper class.
*/
@@ -279,6 +278,7 @@
virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override;
// XUnoTunnel
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override;
private:
@@ -288,8 +288,6 @@
/// The current FOCUSED state.
bool mbIsFocused;
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
/** Tell all listeners that the object is dying. This callback is
usually called from the WeakComponentImplHelper class.
*/
@@ -342,8 +340,6 @@
ValueSetItem* mpParent;
bool const mbIsTransientChildrenDisabled;
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
public:
ValueItemAcc( ValueSetItem* pParent, bool bIsTransientChildrenDisabled );
@@ -388,6 +384,7 @@
virtual sal_Int32 SAL_CALL getBackground( ) override;
// XUnoTunnel
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override;
};
@@ -405,8 +402,6 @@
SvtValueSetItem* mpParent;
bool const mbIsTransientChildrenDisabled;
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
public:
SvtValueItemAcc(SvtValueSetItem* pParent, bool bIsTransientChildrenDisabled);
@@ -451,6 +446,7 @@
virtual sal_Int32 SAL_CALL getBackground( ) override;
// XUnoTunnel
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override;
};
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 6dd0738..5b0239d 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -302,9 +302,7 @@
{
return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ));
}
if( rId.getLength() == 16
&& 0 == memcmp( SfxObjectShell::getUnoTunnelId().getConstArray(),
rId.getConstArray(), 16 ) )
if( isUnoTunnelId<SfxObjectShell>(rId) )
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(pDocShell ));
}
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
index bf18360a..485c770 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
@@ -107,7 +107,7 @@
}
Reference< XUnoTunnel > xNodTunnel( xElement , UNO_QUERY_THROW ) ;
XMLElementWrapper_XmlSecImpl* pElement = reinterpret_cast<XMLElementWrapper_XmlSecImpl*>(xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ));
XMLElementWrapper_XmlSecImpl* pElement = reinterpret_cast<XMLElementWrapper_XmlSecImpl*>(xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelId() ));
if( pElement == nullptr ) {
throw RuntimeException() ;
}
@@ -195,7 +195,7 @@
throw RuntimeException() ;
Reference< XUnoTunnel > xNodTunnel( xElement , UNO_QUERY_THROW ) ;
XMLElementWrapper_XmlSecImpl* pElement = reinterpret_cast<XMLElementWrapper_XmlSecImpl*>(xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ));
XMLElementWrapper_XmlSecImpl* pElement = reinterpret_cast<XMLElementWrapper_XmlSecImpl*>(xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelId() ));
if( pElement == nullptr )
throw RuntimeException() ;
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index f3a76c7..c39f6cc 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -105,7 +105,7 @@
XMLElementWrapper_XmlSecImpl* pElement =
reinterpret_cast<XMLElementWrapper_XmlSecImpl*>(
sal::static_int_cast<sal_uIntPtr>(
xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() )));
xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelId() )));
if( pElement == nullptr ) {
throw RuntimeException() ;
}
@@ -193,7 +193,7 @@
XMLElementWrapper_XmlSecImpl* pElement =
reinterpret_cast<XMLElementWrapper_XmlSecImpl*>(
sal::static_int_cast<sal_uIntPtr>(
xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() )));
xNodTunnel->getSomething( XMLElementWrapper_XmlSecImpl::getUnoTunnelId() )));
if( pElement == nullptr )
throw RuntimeException() ;
diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
index a2ebb13..5d57ff0 100644
--- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
@@ -380,7 +380,7 @@
= reinterpret_cast<XMLElementWrapper_XmlSecImpl*>(
sal::static_int_cast<sal_uIntPtr>(
xNodTunnel->getSomething(
XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId() ))) ;
XMLElementWrapper_XmlSecImpl::getUnoTunnelId() ))) ;
if( pElement == nullptr ) {
throw uno::RuntimeException() ;
diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
index 3108543..01f8df7 100644
--- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
@@ -20,6 +20,7 @@
#include <string.h>
#include "xmlelementwrapper_xmlsecimpl.hxx"
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
@@ -33,7 +34,7 @@
}
/* XUnoTunnel */
uno::Sequence< sal_Int8 > XMLElementWrapper_XmlSecImpl::getUnoTunnelImplementationId()
uno::Sequence< sal_Int8 > XMLElementWrapper_XmlSecImpl::getUnoTunnelId()
{
static ::cppu::OImplementationId implId;
@@ -42,18 +43,12 @@
sal_Int64 SAL_CALL XMLElementWrapper_XmlSecImpl::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier )
{
if (aIdentifier.getLength() == 16 &&
0 == memcmp(
getUnoTunnelImplementationId().getConstArray(),
aIdentifier.getConstArray(),
16 ))
if (isUnoTunnelId<XMLElementWrapper_XmlSecImpl>(aIdentifier))
{
return reinterpret_cast < sal_Int64 > ( this );
}
else
{
return 0;
}
return 0;
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
index 35c58420..43815a2 100644
--- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
+++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.hxx
@@ -56,7 +56,7 @@
/* css::lang::XUnoTunnel */
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
/// @throws css::uno::RuntimeException
static css::uno::Sequence < sal_Int8 > getUnoTunnelImplementationId();
static css::uno::Sequence < sal_Int8 > getUnoTunnelId();
/* css::lang::XServiceInfo */
virtual OUString SAL_CALL getImplementationName( ) override;