diff options
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathmlexport.cxx | 2 | ||||
-rw-r--r-- | starmath/source/xparsmlbase.cxx | 10 | ||||
-rw-r--r-- | starmath/source/xparsmlbase.hxx | 10 |
3 files changed, 20 insertions, 2 deletions
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 9a8f700af2ec..953bfb87f062 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -58,6 +58,7 @@ #include <stack> #include "mathmlexport.hxx" +#include "xparsmlbase.hxx" #include <strings.hrc> #include <smmod.hxx> #include <unomodel.hxx> @@ -240,6 +241,7 @@ bool SmXMLExportWrapper::WriteThroughComponent(const Reference<io::XOutputStream // connect XML writer to output stream xSaxWriter->setOutputStream(xOutputStream); + xSaxWriter->setCustomEntityNames(starmathdatabase::icustomMathmlHtmlEntitiesExport); // prepare arguments (prepend doc handler to given arguments) Sequence<Any> aArgs(2); diff --git a/starmath/source/xparsmlbase.cxx b/starmath/source/xparsmlbase.cxx index 4c5651ae2c55..519fab844465 100644 --- a/starmath/source/xparsmlbase.cxx +++ b/starmath/source/xparsmlbase.cxx @@ -2153,4 +2153,14 @@ const ::css::uno::Sequence<::css::beans::Pair<OUString, OUString>> starmathdatabase::icustomMathmlHtmlEntities( icustomMathmlHtmlEntitiesData, starmathdatabase::STARMATH_MATHMLHTML_ENTITY_NUMBER); +static ::css::beans::Pair<::rtl::OUString, ::rtl::OUString> + icustomMathmlHtmlEntitiesNamesExportData[2] = { + // clang-format off + { u"σ", u"\u03C3"}, + { u"∞", u"\u221E"} + // clang-format on + }; +const ::css::uno::Sequence<::css::beans::Pair<::rtl::OUString, ::rtl::OUString>> + starmathdatabase::icustomMathmlHtmlEntitiesExport(icustomMathmlHtmlEntitiesNamesExportData, 2); + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/starmath/source/xparsmlbase.hxx b/starmath/source/xparsmlbase.hxx index 8ec7b48ccab4..83650382e31b 100644 --- a/starmath/source/xparsmlbase.hxx +++ b/starmath/source/xparsmlbase.hxx @@ -37,12 +37,18 @@ namespace starmathdatabase constexpr sal_Int32 STARMATH_MATHMLHTML_ENTITY_NUMBER = 2125; /** - * Entity names for mathml. Example: ∞ + * Entity names for mathml. Example: &infin -> \u221E; * These ones are to be used on import. - * Must be in sync with customMathmlHtmlEntitiesNames. */ const extern ::css::uno::Sequence<::css::beans::Pair<::rtl::OUString, ::rtl::OUString>> icustomMathmlHtmlEntities; + +/** + * Entity names for mathml. Example: "\u221E"; -> ∞ + * These ones are to be used on file export. + */ +const extern ::css::uno::Sequence<::css::beans::Pair<::rtl::OUString, ::rtl::OUString>> + icustomMathmlHtmlEntitiesExport; }; #endif /*XPARSEMLBASE*/ |