include/oox/mathml/export.hxx | 45 ------------------ include/oox/mathml/imexport.hxx | 25 +++++++--- oox/Library_oox.mk | 3 - oox/source/drawingml/shape.cxx | 6 +- oox/source/drawingml/textbodycontext.cxx | 2 oox/source/export/shapes.cxx | 7 +- oox/source/mathml/export.cxx | 18 ------- oox/source/mathml/imexport.cxx | 4 - solenv/clang-format/excludelist | 5 -- starmath/inc/unomodel.hxx | 9 +-- starmath/source/document.cxx | 4 - starmath/source/ooxmlexport.cxx | 12 ++-- sw/source/filter/ww8/docxattributeoutput.cxx | 12 ++-- sw/source/filter/ww8/rtfattributeoutput.cxx | 4 - writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 - writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 5 +- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 6 +- 17 files changed, 58 insertions(+), 113 deletions(-)
New commits: commit c3497353cabdef735dcebd66a8818ea117623dac Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Dec 16 17:22:54 2022 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Sun Dec 18 16:04:18 2022 +0000 Combine oox::FormulaIm-/ExportBase The original classes were both only used as base classes of SmModel, and combining them will make it easier to replace the existing dynamic_casts to those classes with XUnoTunnel. (And see the upcoming commit introducing loplugin:unocast on why those dynamic_casts are dangerous.) Change-Id: I4b1e0594fb202e3423d57db6457aa0e1b1b0b612 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144353 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/include/oox/mathml/export.hxx b/include/oox/mathml/export.hxx deleted file mode 100644 index a9f3862867ed..000000000000 --- a/include/oox/mathml/export.hxx +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ -#ifndef INCLUDED_OOX_MATHML_EXPORT_HXX -#define INCLUDED_OOX_MATHML_EXPORT_HXX - -#include <oox/core/filterbase.hxx> -#include <oox/dllapi.h> -#include <oox/export/utils.hxx> -#include <rtl/strbuf.hxx> -#include <rtl/textenc.h> -#include <sax/fshelper.hxx> - -namespace oox -{ - -/** - Interface class, StarMath will implement writeFormula*() to write out markup - representing the formula. - */ -class OOX_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") FormulaExportBase -{ -public: - virtual void writeFormulaOoxml(::sax_fastparser::FSHelperPtr pSerializer, - oox::core::OoxmlVersion version, - oox::drawingml::DocumentType documentType, sal_Int8 nAlign) = 0; - virtual void writeFormulaRtf( OStringBuffer& rBuffer, rtl_TextEncoding nEncoding ) = 0; - enum eFormulaAlign { INLINE, CENTER, GROUPEDCENTER, LEFT, RIGHT }; - -protected: - FormulaExportBase(); - - ~FormulaExportBase() {} -}; - -} // namespace - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/oox/mathml/import.hxx b/include/oox/mathml/imexport.hxx similarity index 57% rename from include/oox/mathml/import.hxx rename to include/oox/mathml/imexport.hxx index eefb609178e5..a93216fb1199 100644 --- a/include/oox/mathml/import.hxx +++ b/include/oox/mathml/imexport.hxx @@ -6,11 +6,16 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_OOX_MATHML_IMPORT_HXX -#define INCLUDED_OOX_MATHML_IMPORT_HXX +#ifndef INCLUDED_OOX_MATHML_IMEXPORT_HXX +#define INCLUDED_OOX_MATHML_IMEXPORT_HXX +#include <oox/core/filterbase.hxx> #include <oox/dllapi.h> +#include <oox/export/utils.hxx> #include <rtl/ref.hxx> +#include <rtl/strbuf.hxx> +#include <rtl/textenc.h> +#include <sax/fshelper.hxx> #include <tools/gen.hxx> namespace oox @@ -23,19 +28,25 @@ class XmlStream; /** Interface class, StarMath will implement readFormulaOoxml() to read OOXML - representing the formula and getFormulaSize() to provide the size of the resulting - formula. + representing the formula, getFormulaSize() to provide the size of the resulting + formula, and writeFormula*() to write out markup representing the formula. */ -class OOX_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") FormulaImportBase +class OOX_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") FormulaImExportBase { public: virtual void readFormulaOoxml( oox::formulaimport::XmlStream& stream ) = 0; virtual Size getFormulaSize() const = 0; + virtual void writeFormulaOoxml(::sax_fastparser::FSHelperPtr pSerializer, + oox::core::OoxmlVersion version, + oox::drawingml::DocumentType documentType, sal_Int8 nAlign) = 0; + virtual void writeFormulaRtf( OStringBuffer& rBuffer, rtl_TextEncoding nEncoding ) = 0; + enum eFormulaAlign { INLINE, CENTER, GROUPEDCENTER, LEFT, RIGHT }; + protected: - FormulaImportBase(); + FormulaImExportBase(); - ~FormulaImportBase() {} + ~FormulaImExportBase() {} }; namespace core { class ContextHandler; } diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk index 88da558a3f89..b61f912c87c2 100644 --- a/oox/Library_oox.mk +++ b/oox/Library_oox.mk @@ -244,8 +244,7 @@ $(eval $(call gb_Library_add_exception_objects,oox,\ oox/source/helper/storagebase \ oox/source/helper/textinputstream \ oox/source/helper/zipstorage \ - oox/source/mathml/export \ - oox/source/mathml/import \ + oox/source/mathml/imexport \ oox/source/mathml/importutils \ oox/source/ole/axbinaryreader \ oox/source/ole/axbinarywriter \ diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index a9b869e86af2..d5b02455ab35 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -46,8 +46,8 @@ #include <oox/helper/graphichelper.hxx> #include <oox/helper/propertyset.hxx> #include <oox/helper/modelobjecthelper.hxx> +#include <oox/mathml/imexport.hxx> #include <oox/mathml/importutils.hxx> -#include <oox/mathml/import.hxx> #include <oox/token/properties.hxx> #include "diagram/datamodel.hxx" #include "diagram/diagramhelper.hxx" @@ -1294,8 +1294,8 @@ Reference< XShape > const & Shape::createAndInsert( if (xObj.is()) { uno::Reference<uno::XInterface> const xMathModel(xObj->getComponent()); - oox::FormulaImportBase *const pMagic( - dynamic_cast<oox::FormulaImportBase*>(xMathModel.get())); + oox::FormulaImExportBase *const pMagic( + dynamic_cast<oox::FormulaImExportBase*>(xMathModel.get())); assert(pMagic); pMagic->readFormulaOoxml(*pMathXml); } diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index d647feea485a..39eda41d5ced 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -31,7 +31,7 @@ #include <sax/fastattribs.hxx> #include "hyperlinkcontext.hxx" -#include <oox/mathml/import.hxx> +#include <oox/mathml/imexport.hxx> #include <sal/log.hxx> #include <utility> diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 70466d17fdb1..125ea39e2970 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -81,7 +81,7 @@ #include <svx/svdoole2.hxx> #include <comphelper/diagnose_ex.hxx> #include <oox/export/chartexport.hxx> -#include <oox/mathml/export.hxx> +#include <oox/mathml/imexport.hxx> #include <basegfx/numeric/ftools.hxx> #include <oox/export/DMLPresetShapeExport.hxx> @@ -2472,10 +2472,11 @@ void ShapeExport::WriteMathShape(Reference<XShape> const& xShape) mpFS->startElementNS(XML_a, XML_p); mpFS->startElementNS(XML_a14, XML_m); - oox::FormulaExportBase *const pMagic(dynamic_cast<oox::FormulaExportBase*>(xMathModel.get())); + oox::FormulaImExportBase *const pMagic( + dynamic_cast<oox::FormulaImExportBase*>(xMathModel.get())); assert(pMagic); pMagic->writeFormulaOoxml(GetFS(), GetFB()->getVersion(), GetDocumentType(), - FormulaExportBase::eFormulaAlign::INLINE); + FormulaImExportBase::eFormulaAlign::INLINE); mpFS->endElementNS(XML_a14, XML_m); mpFS->endElementNS(XML_a, XML_p); diff --git a/oox/source/mathml/export.cxx b/oox/source/mathml/export.cxx deleted file mode 100644 index ceb40d0df0c6..000000000000 --- a/oox/source/mathml/export.cxx +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include <oox/mathml/export.hxx> - -namespace oox -{ -FormulaExportBase::FormulaExportBase() {} - -} // namespace - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/mathml/import.cxx b/oox/source/mathml/imexport.cxx similarity index 97% rename from oox/source/mathml/import.cxx rename to oox/source/mathml/imexport.cxx index bff603d2b83a..2b5990679bea 100644 --- a/oox/source/mathml/import.cxx +++ b/oox/source/mathml/imexport.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <oox/mathml/import.hxx> +#include <oox/mathml/imexport.hxx> #include <oox/mathml/importutils.hxx> #include <oox/core/contexthandler.hxx> @@ -21,7 +21,7 @@ using namespace ::com::sun::star; namespace oox { -FormulaImportBase::FormulaImportBase() +FormulaImExportBase::FormulaImExportBase() { } diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index e3079aec34e9..f6a4b822a7c2 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -5404,8 +5404,7 @@ include/oox/helper/refvector.hxx include/oox/helper/storagebase.hxx include/oox/helper/textinputstream.hxx include/oox/helper/zipstorage.hxx -include/oox/mathml/export.hxx -include/oox/mathml/import.hxx +include/oox/mathml/imexport.hxx include/oox/ole/axbinaryreader.hxx include/oox/ole/axbinarywriter.hxx include/oox/ole/axcontrol.hxx @@ -7204,7 +7203,7 @@ oox/source/helper/propertyset.cxx oox/source/helper/storagebase.cxx oox/source/helper/textinputstream.cxx oox/source/helper/zipstorage.cxx -oox/source/mathml/import.cxx +oox/source/mathml/imexport.cxx oox/source/mathml/importutils.cxx oox/source/ole/axbinaryreader.cxx oox/source/ole/axbinarywriter.cxx diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx index 1bb66c4da435..6c2ecbbdd4b0 100644 --- a/starmath/inc/unomodel.hxx +++ b/starmath/inc/unomodel.hxx @@ -25,8 +25,7 @@ #include <sfx2/sfxbasemodel.hxx> #include <comphelper/propertysethelper.hxx> #include <vcl/print.hxx> -#include <oox/mathml/export.hxx> -#include <oox/mathml/import.hxx> +#include <oox/mathml/imexport.hxx> inline constexpr OUStringLiteral PRTUIOPT_TITLE_ROW = u"TitleRow"; inline constexpr OUStringLiteral PRTUIOPT_FORMULA_TEXT = u"FormulaText"; @@ -45,8 +44,7 @@ class SmModel final : public SfxBaseModel, public comphelper::PropertySetHelper, public css::lang::XServiceInfo, public css::view::XRenderable, - public oox::FormulaExportBase, - public oox::FormulaImportBase + public oox::FormulaImExportBase { std::unique_ptr<SmPrintUIOptions> m_pPrintUIOptions; @@ -81,12 +79,11 @@ public: virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& xParent ) override; - // oox::FormulaExportBase + // oox::FormulaImExportBase virtual void writeFormulaOoxml(::sax_fastparser::FSHelperPtr pSerializer, oox::core::OoxmlVersion version, oox::drawingml::DocumentType documentType, sal_Int8 nAlign) override; virtual void writeFormulaRtf(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding) override; - // oox::FormulaImportBase virtual void readFormulaOoxml( oox::formulaimport::XmlStream& stream ) override; virtual Size getFormulaSize() const override; }; diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index e7c5dee90c4d..556dbf9d3d78 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -79,7 +79,7 @@ #include "accessibility.hxx" #include <cfgitem.hxx> #include <utility> -#include <oox/mathml/export.hxx> +#include <oox/mathml/imexport.hxx> #include <ElementsDockingWindow.hxx> #include <smediteng.hxx> @@ -802,7 +802,7 @@ void SmDocShell::writeFormulaOoxml( if(documentType == oox::drawingml::DOCUMENT_DOCX) aEquation.ConvertFromStarMath( pSerializer, nAlign); else - aEquation.ConvertFromStarMath(pSerializer, oox::FormulaExportBase::eFormulaAlign::INLINE); + aEquation.ConvertFromStarMath(pSerializer, oox::FormulaImExportBase::eFormulaAlign::INLINE); } void SmDocShell::writeFormulaRtf(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding) diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx index 1c349c080be3..d90f56cc488a 100644 --- a/starmath/source/ooxmlexport.cxx +++ b/starmath/source/ooxmlexport.cxx @@ -12,7 +12,7 @@ #include <oox/token/tokens.hxx> #include <rtl/ustring.hxx> #include <sal/log.hxx> -#include <oox/mathml/export.hxx> +#include <oox/mathml/imexport.hxx> using namespace oox; using namespace oox::core; @@ -50,18 +50,18 @@ void SmOoxmlExport::ConvertFromStarMath( const ::sax_fastparser::FSHelperPtr& se // </m:oMath> // </m:oMathPara> - if (nAlign != FormulaExportBase::eFormulaAlign::INLINE) + if (nAlign != FormulaImExportBase::eFormulaAlign::INLINE) { m_pSerializer->startElementNS(XML_m, XML_oMathPara, FSNS(XML_xmlns, XML_m), "http://schemas.openxmlformats.org/officeDocument/2006/math"); m_pSerializer->startElementNS(XML_m, XML_oMathParaPr); - if (nAlign == FormulaExportBase::eFormulaAlign::CENTER) + if (nAlign == FormulaImExportBase::eFormulaAlign::CENTER) m_pSerializer->singleElementNS(XML_m, XML_jc, FSNS(XML_m, XML_val), "center"); - if (nAlign == FormulaExportBase::eFormulaAlign::GROUPEDCENTER) + if (nAlign == FormulaImExportBase::eFormulaAlign::GROUPEDCENTER) m_pSerializer->singleElementNS(XML_m, XML_jc, FSNS(XML_m, XML_val), "center"); - if (nAlign == FormulaExportBase::eFormulaAlign::LEFT) + if (nAlign == FormulaImExportBase::eFormulaAlign::LEFT) m_pSerializer->singleElementNS(XML_m, XML_jc, FSNS(XML_m, XML_val), "left"); - if (nAlign == FormulaExportBase::eFormulaAlign::RIGHT) + if (nAlign == FormulaImExportBase::eFormulaAlign::RIGHT) m_pSerializer->singleElementNS(XML_m, XML_jc, FSNS(XML_m, XML_val), "right"); m_pSerializer->endElementNS(XML_m, XML_oMathParaPr); m_pSerializer->startElementNS(XML_m, XML_oMath); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index b78094da7401..fac7d3aa42c4 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -48,7 +48,7 @@ #include <oox/token/namespaces.hxx> #include <oox/token/tokens.hxx> #include <oox/export/utils.hxx> -#include <oox/mathml/export.hxx> +#include <oox/mathml/imexport.hxx> #include <oox/drawingml/drawingmltypes.hxx> #include <oox/token/relationship.hxx> #include <oox/export/vmlexport.hxx> @@ -5985,7 +5985,7 @@ void DocxAttributeOutput::WritePostponedMath(const SwOLENode* pPostponedMath, sa SAL_WARN("sw.ww8", "Broken math object"); return; } - if( oox::FormulaExportBase* formulaexport = dynamic_cast< oox::FormulaExportBase* >( xInterface.get())) + if( oox::FormulaImExportBase* formulaexport = dynamic_cast< oox::FormulaImExportBase* >( xInterface.get())) formulaexport->writeFormulaOoxml( m_pSerializer, GetExport().GetFilter().getVersion(), oox::drawingml::DOCUMENT_DOCX, nAlign); else @@ -6755,7 +6755,7 @@ void DocxAttributeOutput::WriteFlyFrame(const ww8::Frame& rFrame) SwOLENode& rOLENd = *aIdx.GetNode().GetOLENode(); //output variable for the formula alignment (default inline) - sal_Int8 nAlign(FormulaExportBase::eFormulaAlign::INLINE); + sal_Int8 nAlign(FormulaImExportBase::eFormulaAlign::INLINE); auto xObj(rOLENd.GetOLEObj().GetOleRef()); //get the xObject of the formula //tdf133030: Export formula position @@ -6773,11 +6773,11 @@ void DocxAttributeOutput::WriteFlyFrame(const ww8::Frame& rFrame) auto aParaAdjust = pTextNode->GetSwAttrSet().GetAdjust().GetAdjust(); //And set the formula according to the paragraph alignment if (aParaAdjust == SvxAdjust::Center) - nAlign = FormulaExportBase::eFormulaAlign::CENTER; + nAlign = FormulaImExportBase::eFormulaAlign::CENTER; else if (aParaAdjust == SvxAdjust::Right) - nAlign = FormulaExportBase::eFormulaAlign::RIGHT; + nAlign = FormulaImExportBase::eFormulaAlign::RIGHT; else // left in the case of left and justified paragraph alignments - nAlign = FormulaExportBase::eFormulaAlign::LEFT; + nAlign = FormulaImExportBase::eFormulaAlign::LEFT; } } } diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index e81a299ec9f9..8131b981c0e8 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -87,7 +87,7 @@ #include <rtf.hxx> #include <IDocumentSettingAccess.hxx> #include <vcl/cvtgrf.hxx> -#include <oox/mathml/export.hxx> +#include <oox/mathml/imexport.hxx> #include <com/sun/star/i18n/ScriptType.hpp> #include <svl/grabbagitem.hxx> #include <frmatr.hxx> @@ -4187,7 +4187,7 @@ bool RtfAttributeOutput::FlyFrameOLEMath(const SwFlyFrameFormat* pFlyFrameFormat uno::Reference<util::XCloseable> xClosable = xObj->getComponent(); if (!xClosable.is()) return false; - auto pBase = dynamic_cast<oox::FormulaExportBase*>(xClosable.get()); + auto pBase = dynamic_cast<oox::FormulaImExportBase*>(xClosable.get()); SAL_WARN_IF(!pBase, "sw.rtf", "Math OLE object cannot write out RTF"); if (pBase) { diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 0cc56b14d4f2..e7f757f42055 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -86,7 +86,7 @@ #include <editeng/unotext.hxx> #include <o3tl/safeint.hxx> #include <o3tl/temporary.hxx> -#include <oox/mathml/import.hxx> +#include <oox/mathml/imexport.hxx> #include <utility> #include <xmloff/odffields.hxx> #include <rtl/uri.hxx> @@ -3009,7 +3009,7 @@ void DomainMapper_Impl::appendStarMath( const Value& val ) xComponentProperties->setPropertyValue(getPropertyName( PROP_BOTTOM_MARGIN ), uno::Any(sal_Int32(0))); Size size( 1000, 1000 ); - if( oox::FormulaImportBase* formulaimport = dynamic_cast< oox::FormulaImportBase* >( xInterface.get())) + if( oox::FormulaImExportBase* formulaimport = dynamic_cast< oox::FormulaImExportBase* >( xInterface.get())) size = formulaimport->getFormulaSize(); xStarMathProperties->setPropertyValue(getPropertyName( PROP_WIDTH ), uno::Any( sal_Int32(size.Width()))); diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 5fcd1dd518cb..2563956bf97a 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -22,7 +22,7 @@ #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/xml/sax/SAXException.hpp> #include <ooxml/resourceids.hxx> -#include <oox/mathml/import.hxx> +#include <oox/mathml/imexport.hxx> #include <oox/token/namespaces.hxx> #include <oox/shape/ShapeFilterBase.hxx> #include <sal/log.hxx> @@ -2282,7 +2282,8 @@ void OOXMLFastContextHandlerMath::process() if (!ref.is()) return; uno::Reference< uno::XInterface > component(ref->getComponent(), uno::UNO_QUERY_THROW); - if( oox::FormulaImportBase* import = dynamic_cast< oox::FormulaImportBase* >( component.get())) + if( oox::FormulaImExportBase* import + = dynamic_cast< oox::FormulaImExportBase* >( component.get())) import->readFormulaOoxml( buffer ); if (!isForwardEvents()) return; diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 921bb61efceb..ac5bbfb042f2 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -33,7 +33,7 @@ #include <svl/lngmisc.hxx> #include <sfx2/sfxbasemodel.hxx> #include <sfx2/classificationhelper.hxx> -#include <oox/mathml/import.hxx> +#include <oox/mathml/imexport.hxx> #include <ooxml/resourceids.hxx> #include <oox/token/namespaces.hxx> #include <oox/drawingml/drawingmltypes.hxx> @@ -2967,8 +2967,8 @@ RTFError RTFDocumentImpl::beforePopState(RTFParserState& rState) { uno::Reference<util::XCloseable> xComponent(xObject->getComponent(), uno::UNO_SET_THROW); - if (oox::FormulaImportBase* pImport - = dynamic_cast<oox::FormulaImportBase*>(xComponent.get())) + if (oox::FormulaImExportBase* pImport + = dynamic_cast<oox::FormulaImExportBase*>(xComponent.get())) pImport->readFormulaOoxml(m_aMathBuffer); auto pValue = new RTFValue(xObject);