summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-12 16:45:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-14 07:21:10 +0000
commite07d4c03ac08bc1139420210214e69115cf08586 (patch)
treeb8b34ee4142ff9a9f5675a6872c174c58bac1a9f /starmath/source
parente4e2c7a63217c797802045d326f732296e0af918 (diff)
XUnoTunnel->dynamic_cast in SvXMLImport
Change-Id: I070bc1a8136e5b492c0ea56774a274b9a3d2ec2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145494 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/mathml/import.cxx16
-rw-r--r--starmath/source/mathml/mathmlimport.cxx14
2 files changed, 3 insertions, 27 deletions
diff --git a/starmath/source/mathml/import.cxx b/starmath/source/mathml/import.cxx
index 90469abaa0d1..62cd455ad069 100644
--- a/starmath/source/mathml/import.cxx
+++ b/starmath/source/mathml/import.cxx
@@ -429,7 +429,7 @@ ErrCode SmMLImportWrapper::ReadThroughComponentIS(
if (nSyntaxVersion == 5)
{
- SmXMLImport* pXMlImport = comphelper::getFromUnoTunnel<SmXMLImport>(xFilter);
+ SmXMLImport* pXMlImport = dynamic_cast<SmXMLImport*>(xFilter.get());
if (pXMlImport != nullptr && pXMlImport->GetSuccess())
return ERRCODE_NONE;
else
@@ -442,7 +442,7 @@ ErrCode SmMLImportWrapper::ReadThroughComponentIS(
}
}
- m_pMlImport = comphelper::getFromUnoTunnel<SmMLImport>(xFilter);
+ m_pMlImport = dynamic_cast<SmMLImport*>(xFilter.get());
if (m_pMlImport != nullptr && m_pMlImport->getSuccess())
return ERRCODE_NONE;
else
@@ -1203,18 +1203,6 @@ void SmMLImportContext::endFastElement(sal_Int32) { inheritStyleEnd(); }
// SmMLImport
/*************************************************************************************************/
-const uno::Sequence<sal_Int8>& SmMLImport::getUnoTunnelId() noexcept
-{
- static const comphelper::UnoIdInit theSmMLImportUnoTunnelId;
- return theSmMLImportUnoTunnelId.getSeq();
-}
-
-sal_Int64 SAL_CALL SmMLImport::getSomething(const uno::Sequence<sal_Int8>& rId)
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<SvXMLImport>{});
-}
-
SvXMLImportContext*
SmMLImport::CreateFastContext(sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& /*xAttrList*/)
diff --git a/starmath/source/mathml/mathmlimport.cxx b/starmath/source/mathml/mathmlimport.cxx
index e37c604ae150..f31383d076ea 100644
--- a/starmath/source/mathml/mathmlimport.cxx
+++ b/starmath/source/mathml/mathmlimport.cxx
@@ -294,7 +294,7 @@ ErrCode SmXMLImportWrapper::ReadThroughComponent(const Reference<io::XInputStrea
xParser->parseStream(aParserInput);
}
- auto pFilter = comphelper::getFromUnoTunnel<SmXMLImport>(xFilter);
+ auto pFilter = dynamic_cast<SmXMLImport*>(xFilter.get());
if (pFilter && pFilter->GetSuccess())
nError = ERRCODE_NONE;
}
@@ -404,12 +404,6 @@ SmXMLImport::SmXMLImport(const css::uno::Reference<css::uno::XComponentContext>&
{
}
-const uno::Sequence<sal_Int8>& SmXMLImport::getUnoTunnelId() noexcept
-{
- static const comphelper::UnoIdInit theSmXMLImportUnoTunnelId;
- return theSmXMLImportUnoTunnelId.getSeq();
-}
-
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
Math_XMLImporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/)
@@ -434,12 +428,6 @@ Math_XMLOasisSettingsImporter_get_implementation(uno::XComponentContext* pCtx,
SvXMLImportFlags::SETTINGS));
}
-sal_Int64 SAL_CALL SmXMLImport::getSomething(const uno::Sequence<sal_Int8>& rId)
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<SvXMLImport>{});
-}
-
void SmXMLImport::endDocument()
{
//Set the resulted tree into the SmDocShell where it belongs