summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-12 16:39:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-14 07:28:18 +0000
commitd66d1f6fd47b02076945c09c0d6f8f019d0501d5 (patch)
treee1410a37606542e7003f474b903d168fc6080f83 /starmath
parentfd6df89dbc26cda08c54e76644b43219d8b75236 (diff)
XUnoTunnel->dynamic_cast in SvXMLExport
Change-Id: I68e4691ac0a58e2320b534d15934ff177feb124d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145493 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/mathml/export.hxx4
-rw-r--r--starmath/inc/mathml/mathmlexport.hxx4
-rw-r--r--starmath/source/mathml/export.cxx16
-rw-r--r--starmath/source/mathml/mathmlexport.cxx14
4 files changed, 3 insertions, 35 deletions
diff --git a/starmath/inc/mathml/export.hxx b/starmath/inc/mathml/export.hxx
index 12e541d31551..0ed354be4b67 100644
--- a/starmath/inc/mathml/export.hxx
+++ b/starmath/inc/mathml/export.hxx
@@ -204,10 +204,6 @@ private:
SmDocShell* getSmDocShell();
public:
- // XUnoTunnel
- sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8>& rId) override;
- static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() noexcept;
-
/** Exports auto styles
* However math doesn't have any
*/
diff --git a/starmath/inc/mathml/mathmlexport.hxx b/starmath/inc/mathml/mathmlexport.hxx
index 28e35a7c52a0..74a655174089 100644
--- a/starmath/inc/mathml/mathmlexport.hxx
+++ b/starmath/inc/mathml/mathmlexport.hxx
@@ -109,10 +109,6 @@ public:
SmXMLExport(const css::uno::Reference<css::uno::XComponentContext>& rContext,
OUString const& implementationName, SvXMLExportFlags nExportFlags);
- // XUnoTunnel
- sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8>& rId) override;
- static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() noexcept;
-
void ExportAutoStyles_() override {}
void ExportMasterStyles_() override {}
void ExportContent_() override;
diff --git a/starmath/source/mathml/export.cxx b/starmath/source/mathml/export.cxx
index b55be509216b..c9b7bbf6d41a 100644
--- a/starmath/source/mathml/export.cxx
+++ b/starmath/source/mathml/export.cxx
@@ -331,7 +331,7 @@ bool SmMLExportWrapper::WriteThroughComponentOS(const Reference<io::XOutputStrea
// filter
if (nSyntaxVersion == 5)
{
- SmXMLExport* pFilter = comphelper::getFromUnoTunnel<SmXMLExport>(xFilter);
+ SmXMLExport* pFilter = dynamic_cast<SmXMLExport*>(xFilter.get());
if (pFilter == nullptr)
{
SAL_WARN("starmath", "Failed to fetch SmMLExport");
@@ -342,7 +342,7 @@ bool SmMLExportWrapper::WriteThroughComponentOS(const Reference<io::XOutputStrea
}
// filter
- SmMLExport* pFilter = comphelper::getFromUnoTunnel<SmMLExport>(xFilter);
+ SmMLExport* pFilter = dynamic_cast<SmMLExport*>(xFilter.get());
// Setup filter
if (pFilter == nullptr)
@@ -439,18 +439,6 @@ SmMLExportWrapper::WriteThroughComponentMS(const Reference<XComponent>& xCompone
// SmMLExport technical
/*************************************************************************************************/
-sal_Int64 SAL_CALL SmMLExport::getSomething(const uno::Sequence<sal_Int8>& rId)
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<SvXMLExport>{});
-}
-
-const uno::Sequence<sal_Int8>& SmMLExport::getUnoTunnelId() noexcept
-{
- static const comphelper::UnoIdInit theSmMLExportUnoTunnelId;
- return theSmMLExportUnoTunnelId.getSeq();
-}
-
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_MLExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&)
diff --git a/starmath/source/mathml/mathmlexport.cxx b/starmath/source/mathml/mathmlexport.cxx
index bbb5bfc18a4d..9a2c6cd2db8f 100644
--- a/starmath/source/mathml/mathmlexport.cxx
+++ b/starmath/source/mathml/mathmlexport.cxx
@@ -263,7 +263,7 @@ bool SmXMLExportWrapper::WriteThroughComponent(const Reference<io::XOutputStream
uno::Sequence<PropertyValue> aProps(0);
xFilter->filter(aProps);
- auto pFilter = comphelper::getFromUnoTunnel<SmXMLExport>(xFilter);
+ auto pFilter = dynamic_cast<SmXMLExport*>(xFilter.get());
return pFilter == nullptr || pFilter->GetSuccess();
}
@@ -323,18 +323,6 @@ SmXMLExport::SmXMLExport(const css::uno::Reference<css::uno::XComponentContext>&
{
}
-sal_Int64 SAL_CALL SmXMLExport::getSomething(const uno::Sequence<sal_Int8>& rId)
-{
- return comphelper::getSomethingImpl(rId, this,
- comphelper::FallbackToGetSomethingOf<SvXMLExport>{});
-}
-
-const uno::Sequence<sal_Int8>& SmXMLExport::getUnoTunnelId() noexcept
-{
- static const comphelper::UnoIdInit theSmXMLExportUnoTunnelId;
- return theSmXMLExportUnoTunnelId.getSeq();
-}
-
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_XMLExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&)