tdf#39593 use isUnoTunnelId in xmloff
Add getUnoTunnelId methods.
Change-Id: I80d3568e65ac66ee65ad589755a20270a27e62a7
Reviewed-on: https://gerrit.libreoffice.org/78744
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index d609ae0..78bc26a 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -343,6 +343,7 @@
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
// XUnoTunnel
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() throw();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
// XServiceInfo
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 6c832c7..ba71532 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -449,12 +449,15 @@
class theSvXMLImportUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvXMLImportUnoTunnelId> {};
}
const css::uno::Sequence<sal_Int8>& SvXMLImport::getUnoTunnelId() throw()
{
return theSvXMLImportUnoTunnelId::get().getSeq();
}
// XUnoTunnel
sal_Int64 SAL_CALL SvXMLImport::getSomething( const uno::Sequence< sal_Int8 >& rId )
{
if( rId.getLength() == 16 &&
0 == memcmp( theSvXMLImportUnoTunnelId::get().getSeq().getConstArray(),
rId.getConstArray(), 16 ) )
if( isUnoTunnelId<SvXMLImport>(rId) )
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this));
}
diff --git a/xmloff/source/transform/MutableAttrList.cxx b/xmloff/source/transform/MutableAttrList.cxx
index ae06de2..38c500c 100644
--- a/xmloff/source/transform/MutableAttrList.cxx
+++ b/xmloff/source/transform/MutableAttrList.cxx
@@ -66,13 +66,16 @@
class theXMLMutableAttributeListUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theXMLMutableAttributeListUnoTunnelId> {};
}
const css::uno::Sequence<sal_Int8>& XMLMutableAttributeList::getUnoTunnelId() throw()
{
return theXMLMutableAttributeListUnoTunnelId::get().getSeq();
}
// XUnoTunnel
sal_Int64 SAL_CALL XMLMutableAttributeList::getSomething(
const Sequence< sal_Int8 >& rId )
{
if( rId.getLength() == 16 &&
0 == memcmp( theXMLMutableAttributeListUnoTunnelId::get().getSeq().getConstArray(),
rId.getConstArray(), 16 ) )
if( isUnoTunnelId<XMLMutableAttributeList>(rId) )
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this));
}
diff --git a/xmloff/source/transform/MutableAttrList.hxx b/xmloff/source/transform/MutableAttrList.hxx
index dd31156..ed89500 100644
--- a/xmloff/source/transform/MutableAttrList.hxx
+++ b/xmloff/source/transform/MutableAttrList.hxx
@@ -47,6 +47,7 @@
virtual ~XMLMutableAttributeList() override;
// XUnoTunnel
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() throw();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
// css::xml::sax::XAttributeList
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index d2c2ea3..e5060c3 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -1934,19 +1934,20 @@
class theOOo2OasisTransformerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theOOo2OasisTransformerUnoTunnelId> {};
}
const css::uno::Sequence<sal_Int8>& OOo2OasisTransformer::getUnoTunnelId() throw()
{
return theOOo2OasisTransformerUnoTunnelId::get().getSeq();
}
// XUnoTunnel
sal_Int64 SAL_CALL OOo2OasisTransformer::getSomething( const Sequence< sal_Int8 >& rId )
{
if( rId.getLength() == 16
&& 0 == memcmp( theOOo2OasisTransformerUnoTunnelId::get().getSeq().getConstArray(),
rId.getConstArray(), 16 ) )
if( isUnoTunnelId<OOo2OasisTransformer>(rId) )
{
return reinterpret_cast< sal_Int64 >( this );
}
else
{
return sal_Int64(0);
}
return sal_Int64(0);
}
// XServiceInfo
diff --git a/xmloff/source/transform/OOo2Oasis.hxx b/xmloff/source/transform/OOo2Oasis.hxx
index 7d6244f..7b47644 100644
--- a/xmloff/source/transform/OOo2Oasis.hxx
+++ b/xmloff/source/transform/OOo2Oasis.hxx
@@ -79,6 +79,7 @@
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
// XUnoTunnel
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() throw();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
// XImporter
diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx
index ff1f6cb..6959d2b 100644
--- a/xmloff/source/transform/Oasis2OOo.cxx
+++ b/xmloff/source/transform/Oasis2OOo.cxx
@@ -1926,19 +1926,20 @@
class theOasis2OOoTransformerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theOasis2OOoTransformerUnoTunnelId> {};
}
const css::uno::Sequence<sal_Int8>& Oasis2OOoTransformer::getUnoTunnelId() throw()
{
return theOasis2OOoTransformerUnoTunnelId::get().getSeq();
}
// XUnoTunnel
sal_Int64 SAL_CALL Oasis2OOoTransformer::getSomething( const Sequence< sal_Int8 >& rId )
{
if( rId.getLength() == 16
&& 0 == memcmp( theOasis2OOoTransformerUnoTunnelId::get().getSeq().getConstArray(),
rId.getConstArray(), 16 ) )
if( isUnoTunnelId<Oasis2OOoTransformer>(rId) )
{
return reinterpret_cast< sal_Int64 >( this );
}
else
{
return sal_Int64(0);
}
return sal_Int64(0);
}
// XServiceInfo
diff --git a/xmloff/source/transform/Oasis2OOo.hxx b/xmloff/source/transform/Oasis2OOo.hxx
index 6ac5b33..7a5d9c0 100644
--- a/xmloff/source/transform/Oasis2OOo.hxx
+++ b/xmloff/source/transform/Oasis2OOo.hxx
@@ -50,6 +50,7 @@
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
// XUnoTunnel
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() throw();
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
virtual OUString GetEventName( const OUString& rName,