14#include <com/sun/star/beans/PropertyAttribute.hpp>
15#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
16#include <com/sun/star/embed/ElementModes.hpp>
17#include <com/sun/star/packages/WrongPasswordException.hpp>
18#include <com/sun/star/packages/zip/ZipIOException.hpp>
19#include <com/sun/star/task/XStatusIndicator.hpp>
20#include <com/sun/star/xml/sax/FastParser.hpp>
21#include <com/sun/star/xml/sax/InputSource.hpp>
22#include <com/sun/star/xml/sax/Parser.hpp>
23#include <com/sun/star/xml/sax/SAXParseException.hpp>
31#include <rtl/character.hxx>
34#include <sfx2/sfxsids.hrc>
40#include <svx/strings.hrc>
50#include <document.hxx>
54#include <unomodel.hxx>
82 SAL_WARN(
"starmath",
"Failed to fetch model while file input");
89 SAL_WARN(
"starmath",
"Failed to fetch model while file input");
94 uno::Reference<task::XStatusIndicator> xStatusIndicator;
98 if (pModel ==
nullptr)
100 SAL_WARN(
"starmath",
"Failed to fetch sm model while file input");
108 SAL_WARN(
"starmath",
"Failed to fetch smdoc shell while file input");
120 SAL_WARN(
"starmath",
"Given medium and doc shell medium differ while file input");
126 if (pItem !=
nullptr)
127 pItem->
GetValue() >>= xStatusIndicator;
133 beans::PropertyAttribute::MAYBEVOID, 0 },
137 beans::PropertyAttribute::MAYBEVOID, 0 },
139 beans::PropertyAttribute::MAYBEVOID, 0 } };
140 uno::Reference<beans::XPropertySet> xInfoSet(
146 xInfoSet->setPropertyValue(
"BaseURI",
Any(rMedium.
GetBaseURL()));
149 sal_Int32 nProgressRange(rMedium.
IsStorage() ? 3 : 1);
150 if (xStatusIndicator.is())
152 xStatusIndicator->start(
SvxResId(RID_SVXSTR_DOC_LOAD), nProgressRange);
153 xStatusIndicator->setValue(0);
162 OUString
aName(
u"dummyObjName");
165 if (pDocHierarchItem !=
nullptr)
168 if (!
aName.isEmpty())
169 xInfoSet->setPropertyValue(
"StreamRelPath",
Any(
aName));
174 if (xStatusIndicator.is())
175 xStatusIndicator->setValue(1);
187 u"com.sun.star.comp.Math.MLOasisMetaImporter", 6);
191 xInfoSet,
u"com.sun.star.comp.Math.XMLMetaImporter", 5);
197 if (xStatusIndicator.is())
198 xStatusIndicator->end();
199 SAL_WARN(
"starmath",
"Failed to read file");
204 if (xStatusIndicator.is())
205 xStatusIndicator->setValue(2);
212 u"com.sun.star.comp.Math.MLOasisSettingsImporter", 6);
216 xInfoSet,
u"com.sun.star.comp.Math.XMLSettingsImporter", 5);
221 if (xStatusIndicator.is())
222 xStatusIndicator->end();
223 SAL_WARN(
"starmath",
"Failed to read file");
228 if (xStatusIndicator.is())
229 xStatusIndicator->setValue(3);
235 xInfoSet,
u"com.sun.star.comp.Math.XMLImporter", 5);
238 xInfoSet,
u"com.sun.star.comp.Math.MLImporter", 6);
242 if (xStatusIndicator.is())
243 xStatusIndicator->end();
244 SAL_WARN(
"starmath",
"Failed to read file");
249 if (xStatusIndicator.is())
250 xStatusIndicator->end();
256 Reference<io::XInputStream> xInputStream
260 if (xStatusIndicator.is())
261 xStatusIndicator->setValue(1);
268 u"com.sun.star.comp.Math.XMLImporter",
false, 5);
271 u"com.sun.star.comp.Math.MLImporter",
false, 6);
274 if (xStatusIndicator.is())
275 xStatusIndicator->end();
279 SAL_WARN(
"starmath",
"Failed to read file");
291 SAL_WARN(
"starmath",
"Failed to fetch model while file input");
298 SAL_WARN(
"starmath",
"Failed to fetch model while file input");
303 uno::Reference<lang::XComponent> xModelComp =
m_xModel;
304 if (!xModelComp.is())
306 SAL_WARN(
"starmath",
"Failed to make model while file input");
312 if (pModel ==
nullptr)
314 SAL_WARN(
"starmath",
"Failed to fetch sm model while file input");
322 SAL_WARN(
"starmath",
"Failed to fetch smdoc shell while file input");
329 beans::PropertyAttribute::MAYBEVOID, 0 },
333 beans::PropertyAttribute::MAYBEVOID, 0 },
335 beans::PropertyAttribute::MAYBEVOID, 0 } };
336 uno::Reference<beans::XPropertySet> xInfoSet(
346 SAL_WARN(
"starmath",
"Failed to read file");
355 const Reference<io::XInputStream>& xInputStream,
const Reference<XComponent>& xModelComponent,
356 Reference<uno::XComponentContext>
const& rxContext,
357 Reference<beans::XPropertySet>
const& rPropSet,
const char16_t* pFilterName,
bool bEncrypted,
358 int_fast16_t nSyntaxVersion)
366 xml::sax::InputSource aParserInput;
367 aParserInput.aInputStream = xInputStream;
370 Sequence<Any> aArgs{
Any(rPropSet) };
373 Reference<XInterface> xFilter
374 = rxContext->getServiceManager()->createInstanceWithArgumentsAndContext(
375 OUString(pFilterName), aArgs, rxContext);
378 SAL_WARN(
"starmath",
"Can't instantiate filter component " << OUString(pFilterName));
383 Reference<XImporter> xImporter(xFilter, UNO_QUERY);
384 xImporter->setTargetDocument(xModelComponent);
389 Reference<css::xml::sax::XFastParser> xFastParser(xFilter, UNO_QUERY);
390 Reference<css::xml::sax::XFastDocumentHandler> xFastDocHandler(xFilter, UNO_QUERY);
394 xFastParser->parseStream(aParserInput);
396 else if (xFastDocHandler)
398 Reference<css::xml::sax::XFastParser> xParser
399 = css::xml::sax::FastParser::create(rxContext);
401 xParser->setFastDocumentHandler(xFastDocHandler);
402 xParser->parseStream(aParserInput);
406 Reference<css::xml::sax::XDocumentHandler> xDocHandler(xFilter, UNO_QUERY);
408 Reference<css::xml::sax::XParser> xParser = css::xml::sax::Parser::create(rxContext);
409 xParser->setDocumentHandler(xDocHandler);
410 xParser->parseStream(aParserInput);
413 if (nSyntaxVersion == 5)
416 if (pXMlImport !=
nullptr && pXMlImport->
GetSuccess())
420 SAL_WARN(
"starmath",
"Filter failed on file input");
422 if (pXMlImport ==
nullptr)
433 SAL_WARN(
"starmath",
"Filter failed on file input");
437 catch (
const xml::sax::SAXParseException& r)
440 xml::sax::SAXException aTmp;
441 xml::sax::SAXException aSaxEx = *
static_cast<const xml::sax::SAXException*
>(&r);
442 while (aSaxEx.WrappedException >>= aTmp)
445 packages::zip::ZipIOException aBrokenPackage;
446 if (aSaxEx.WrappedException >>= aBrokenPackage)
448 SAL_WARN(
"starmath",
"Failed to read file SAXParseException");
454 SAL_WARN(
"starmath",
"Wrong file password SAXParseException");
458 catch (
const xml::sax::SAXException& r)
460 packages::zip::ZipIOException aBrokenPackage;
461 if (r.WrappedException >>= aBrokenPackage)
463 SAL_WARN(
"starmath",
"Failed to read file SAXException");
469 SAL_WARN(
"starmath",
"Wrong file password SAXException");
473 catch (
const packages::zip::ZipIOException&)
475 SAL_WARN(
"starmath",
"Failed to unzip file ZipIOException");
478 catch (
const io::IOException&)
480 SAL_WARN(
"starmath",
"Failed to read file ZipIOException");
483 catch (
const std::range_error&)
485 SAL_WARN(
"starmath",
"Failed to read file");
494 const Reference<XComponent>& xModelComponent,
495 const char16_t* pStreamName,
496 Reference<uno::XComponentContext>
const& rxContext,
497 Reference<beans::XPropertySet>
const& rPropSet,
498 const char16_t* pFilterName,
499 int_fast16_t nSyntaxVersion)
512 uno::Reference<io::XStream> xEventsStream
513 = xStorage->openStreamElement(OUString(pStreamName), embed::ElementModes::READ);
516 uno::Reference<beans::XPropertySet> xProps(xEventsStream, uno::UNO_QUERY);
517 Any aAny = xProps->getPropertyValue(
"Encrypted");
518 bool bEncrypted =
false;
522 rPropSet->setPropertyValue(
"StreamName",
Any(OUString(pStreamName)));
523 Reference<io::XInputStream>
xStream = xEventsStream->getInputStream();
527 bEncrypted, nSyntaxVersion);
529 catch (packages::WrongPasswordException&)
531 SAL_WARN(
"starmath",
"Wrong file password");
534 catch (packages::zip::ZipIOException&)
536 SAL_WARN(
"starmath",
"Failed to unzip file");
539 catch (uno::Exception&)
548 std::u16string_view aText,
const css::uno::Reference<css::lang::XComponent>& xModelComponent,
549 css::uno::Reference<css::uno::XComponentContext>
const& rxContext,
550 css::uno::Reference<css::beans::XPropertySet>
const& rPropSet)
569 u"com.sun.star.comp.Math.MLImporter",
false, 6);
571 catch (packages::WrongPasswordException&)
573 SAL_WARN(
"starmath",
"Wrong file password");
576 catch (packages::zip::ZipIOException&)
578 SAL_WARN(
"starmath",
"Failed to unzip file");
581 catch (uno::Exception&)
591extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
593 uno::Sequence<uno::Any>
const& )
595 return cppu::acquire(
596 new SmMLImport(pCtx,
"com.sun.star.comp.Math.XMLImporter", SvXMLImportFlags::ALL));
599extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
601 uno::Sequence<uno::Any>
const& )
603 return cppu::acquire(
new SmMLImport(pCtx,
"com.sun.star.comp.Math.XMLOasisMetaImporter",
604 SvXMLImportFlags::META));
607extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
609 uno::Sequence<uno::Any>
const& )
611 return cppu::acquire(
new SmMLImport(pCtx,
"com.sun.star.comp.Math.XMLOasisSettingsImporter",
612 SvXMLImportFlags::SETTINGS));
631 , m_pElement(nullptr)
637 void declareMlError();
642 virtual void SAL_CALL
characters(
const OUString& aChars)
override;
647 sal_Int32 nElement,
const Reference<XFastAttributeList>& aAttributeList)
override;
655 virtual uno::Reference<XFastContextHandler>
657 const uno::Reference<XFastAttributeList>& Attribs)
override;
665 void inheritStyleEnd();
669 void handleAttributes(
const Reference<XFastAttributeList>& aAttributeList);
673 SmLengthValue handleLengthAttribute(
const OUString& aAttribute);
676uno::Reference<XFastContextHandler> SAL_CALL
677SmMLImportContext::createFastChildContext(sal_Int32,
const uno::Reference<XFastAttributeList>&)
679 uno::Reference<xml::sax::XFastContextHandler> xContext;
680 xContext =
new SmMLImportContext(
static_cast<SmMLImport&
>(GetImport()), &m_pElement);
684void SmMLImportContext::declareMlError()
690void SmMLImportContext::inheritStyle()
692 while ((m_pStyle = m_pStyle->getParentElement()) !=
nullptr)
708 if (m_pStyle !=
nullptr
725 m_pElement->setAttribute(
741 if (m_pElement->getSubElementId() == 0)
745 aAttribute.setMlForm(&aForm);
746 m_pElement->setAttribute(aAttribute);
755void SmMLImportContext::inheritStyleEnd()
760 if ((*m_pParent)->getSubElementsCount() == m_pElement->getSubElementId())
765 aAttribute.setMlForm(&aForm);
766 m_pElement->setAttribute(aAttribute);
777 sal_Int32 nIndexUtf16 = 0;
779 m_pElement->getText().iterateCodePoints(&nIndexUtf16, 1);
781 if (nIndexUtf16 == m_pElement->getText().getLength())
785 aAttribute.setMlMathvariant(&aMathvariant);
786 aAttribute.setSet(
false);
787 m_pElement->setAttribute(aAttribute);
792SmLengthValue SmMLImportContext::handleLengthAttribute(
const OUString& aAttribute)
797 nUnitPos < aAttribute.getLength()
798 && (rtl::isAsciiHexDigit(aAttribute[nUnitPos]) || aAttribute[nUnitPos] ==
'.');
804 if (nUnitPos != aAttribute.getLength())
806 OUString aUnit = aAttribute.copy(nUnitPos);
807 if (aUnit.compareToIgnoreAsciiCaseAscii(
"ex"))
809 if (aUnit.compareToIgnoreAsciiCaseAscii(
"px"))
811 if (aUnit.compareToIgnoreAsciiCaseAscii(
"in"))
813 if (aUnit.compareToIgnoreAsciiCaseAscii(
"cm"))
815 if (aUnit.compareToIgnoreAsciiCaseAscii(
"mm"))
817 if (aUnit.compareToIgnoreAsciiCaseAscii(
"pt"))
819 if (aUnit.compareToIgnoreAsciiCaseAscii(
"pc"))
821 if (aUnit.compareToIgnoreAsciiCaseAscii(
"%"))
828 std::u16string_view aValue = aAttribute.subView(0, nUnitPos);
842void SmMLImportContext::handleAttributes(
const Reference<XFastAttributeList>& aAttributeList)
847 switch (aIter.getToken() & TOKEN_MASK)
855 aAttribute.setMlAccent(&aAccent);
861 aAttribute.setMlAccent(&aAccent);
875 aAttribute.setMlDir(&aDir);
881 aAttribute.setMlDir(&aDir);
894 aAttribute.setMlDisplaystyle(&aDisplaystyle);
900 aAttribute.setMlDisplaystyle(&aDisplaystyle);
912 aAttribute.setMlFence(&aFence);
918 aAttribute.setMlFence(&aFence);
928 OUString* aRef =
new OUString(aIter.toString());
930 aAttribute.setMlHref(&aHref);
937 aAttribute.setMlLspace(&aLspace);
946 aAttribute.setMlMathbackground(&aMathbackground);
954 aAttribute.setMlMathbackground(&aMathbackground);
964 aAttribute.setMlMathcolor(&aMathcolor);
971 aAttribute.setMlMathcolor(&aMathcolor);
978 aMathsize.
m_aLengthValue = handleLengthAttribute(aIter.toString());
979 aAttribute.setMlMathsize(&aMathsize);
984 OUString aVariant = aIter.toString();
986 if (aVariant.compareTo(u
"normal"))
988 else if (aVariant.compareTo(u
"bold"))
990 else if (aVariant.compareTo(u
"italic"))
992 else if (aVariant.compareTo(u
"double-struck"))
994 else if (aVariant.compareTo(u
"script"))
996 else if (aVariant.compareTo(u
"fraktur"))
998 else if (aVariant.compareTo(u
"sans-serif"))
1000 else if (aVariant.compareTo(u
"monospace"))
1002 else if (aVariant.compareTo(u
"bold-italic"))
1004 else if (aVariant.compareTo(u
"bold-fracktur"))
1006 else if (aVariant.compareTo(u
"bold-script"))
1008 else if (aVariant.compareTo(u
"bold-sans-serif"))
1010 else if (aVariant.compareTo(u
"sans-serif-italic"))
1012 else if (aVariant.compareTo(u
"sans-serif-bold-italic"))
1014 else if (aVariant.compareTo(u
"initial"))
1016 else if (aVariant.compareTo(u
"tailed"))
1018 else if (aVariant.compareTo(u
"looped"))
1020 else if (aVariant.compareTo(u
"stretched"))
1025 aAttribute.setMlMathvariant(&aMathvariant);
1039 aMaxsize.
m_aLengthValue = handleLengthAttribute(aIter.toString());
1041 aAttribute.setMlMaxsize(&aMaxsize);
1047 aMinsize.
m_aLengthValue = handleLengthAttribute(aIter.toString());
1048 aAttribute.setMlMinsize(&aMinsize);
1056 aAttribute.setMlMovablelimits(&aMovablelimits);
1062 aAttribute.setMlMovablelimits(&aMovablelimits);
1072 aRspace.
m_aLengthValue = handleLengthAttribute(aIter.toString());
1073 aAttribute.setMlRspace(&aRspace);
1081 aAttribute.setMlSeparator(&aSeparator);
1087 aAttribute.setMlSeparator(&aSeparator);
1099 aAttribute.setMlStretchy(&aStretchy);
1105 aAttribute.setMlStretchy(&aStretchy);
1117 aAttribute.setMlSymmetric(&aSymmetric);
1123 aAttribute.setMlSymmetric(&aSymmetric);
1134 if (aAttribute.isNullAttribute())
1137 m_pElement->setAttribute(aAttribute);
1141void SmMLImportContext::characters(
const OUString& aChars) { m_pElement->setText(aChars); }
1143void SmMLImportContext::startFastElement(sal_Int32 nElement,
1144 const Reference<XFastAttributeList>& aAttributeList)
1180 handleAttributes(aAttributeList);
1183void SmMLImportContext::endFastElement(sal_Int32) { inheritStyleEnd(); }
1191 const uno::Reference<xml::sax::XFastAttributeList>& )
1201 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(GetModel(),
1202 uno::UNO_QUERY_THROW);
1208 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(GetModel(),
1209 uno::UNO_QUERY_THROW);
1215 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(GetModel(),
1216 uno::UNO_QUERY_THROW);
1229 uno::Reference<frame::XModel>
xModel = GetModel();
1232 SAL_WARN(
"starmath",
"Failed to set view settings because missing model");
1233 SvXMLImport::endDocument();
1237 SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(
xModel);
1240 SAL_WARN(
"starmath",
"Failed to set view settings because missing sm model");
1241 SvXMLImport::endDocument();
1248 SAL_WARN(
"starmath",
"Failed to set view settings because missing sm doc shell");
1249 SvXMLImport::endDocument();
1257 SvXMLImport::endDocument();
1277 SvXMLImport::endDocument();
1282 uno::Reference<frame::XModel>
xModel = GetModel();
1285 SAL_WARN(
"starmath",
"Failed to set view settings because missing model");
1289 SmModel* pModel = comphelper::getFromUnoTunnel<SmModel>(
xModel);
1292 SAL_WARN(
"starmath",
"Failed to set view settings because missing sm model");
1299 SAL_WARN(
"starmath",
"Failed to set view settings because missing sm doc shell");
1307 for (
const PropertyValue& rValue : aViewProps)
1309 if (rValue.Name ==
"ViewAreaTop")
1311 rValue.Value >>= nTmp;
1314 else if (rValue.Name ==
"ViewAreaLeft")
1316 rValue.Value >>= nTmp;
1319 else if (rValue.Name ==
"ViewAreaWidth")
1321 rValue.Value >>= nTmp;
1326 else if (rValue.Name ==
"ViewAreaHeight")
1328 rValue.Value >>= nTmp;
1340 uno::Reference<frame::XModel>
xModel = GetModel();
1343 SAL_WARN(
"starmath",
"Failed to set view settings because missing model");
1347 uno::Reference<XPropertySet> xProps(
xModel, UNO_QUERY);
1350 SAL_WARN(
"starmath",
"Failed to set view settings because missing model properties");
1354 Reference<XPropertySetInfo> xInfo(xProps->getPropertySetInfo());
1358 "Failed to set view settings because missing model properties information");
1362 static constexpr OUStringLiteral
sFormula(
u"Formula");
1363 static constexpr OUStringLiteral sBasicLibraries(
u"BasicLibraries");
1364 static constexpr OUStringLiteral sDialogLibraries(
u"DialogLibraries");
1365 for (
const PropertyValue& rValue : aConfProps)
1367 if (rValue.Name !=
sFormula && rValue.Name != sBasicLibraries
1368 && rValue.Name != sDialogLibraries)
1372 if (xInfo->hasPropertyByName(rValue.Name))
1373 xProps->setPropertyValue(rValue.Name, rValue.Value);
1375 catch (
const beans::PropertyVetoException&)
1381 SAL_WARN(
"starmath",
"Unexpected issue while loading document properties");
1390 , m_pElementTree(nullptr)
1392 , m_nSmSyntaxVersion(
SM_MOD()->GetConfig()->GetDefaultSmSyntaxVersion())
1401 SAL_WARN(
"starmath",
"MathML error");
const OUString & GetValue() const
SfxObjectShell * GetObjectShell() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
OUString GetBaseURL(bool bForSaving=false)
SfxItemSet & GetItemSet() const
css::uno::Reference< css::embed::XStorage > GetStorage(bool bCreateTempFile=true)
SfxMedium * GetMedium() const
virtual tools::Rectangle GetVisArea(sal_uInt16 nAspect) const
SfxObjectCreateMode GetCreateMode() const
const css::uno::Any & GetValue() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
virtual void SetVisArea(const tools::Rectangle &rVisArea) override
sal_uInt16 GetSmSyntaxVersion() const
void SetMlElementTree(SmMlElement *pMlElementTree)
ErrCode ReadThroughComponentMS(std::u16string_view aText, const css::uno::Reference< css::lang::XComponent > &xModelComponent, css::uno::Reference< css::uno::XComponentContext > const &rxContext, css::uno::Reference< css::beans::XPropertySet > const &rPropSet)
read a component from text
ErrCode ReadThroughComponentIS(const css::uno::Reference< css::io::XInputStream > &xInputStream, const css::uno::Reference< css::lang::XComponent > &xModelComponent, css::uno::Reference< css::uno::XComponentContext > const &rxContext, css::uno::Reference< css::beans::XPropertySet > const &rPropSet, const char16_t *pFilterName, bool bEncrypted, int_fast16_t nSyntaxVersion)
read a component from input stream
ErrCode Import(SfxMedium &rMedium)
Imports the mathml.
rtl::Reference< SmModel > m_xModel
SmMlElement * getElementTree()
Get the element tree when parsed from text.
ErrCode ReadThroughComponentS(const css::uno::Reference< css::embed::XStorage > &xStorage, const css::uno::Reference< css::lang::XComponent > &xModelComponent, const char16_t *pStreamName, css::uno::Reference< css::uno::XComponentContext > const &rxContext, css::uno::Reference< css::beans::XPropertySet > const &rPropSet, const char16_t *pFilterName, int_fast16_t nSyntaxVersion)
read a component from storage
SmMlElement * getElementTree()
Gets parsed element tree.
SmMlElement * m_pElementTree
SmMLImport(const css::uno::Reference< css::uno::XComponentContext > &rContext, OUString const &implementationName, SvXMLImportFlags nImportFlags)
Constructor.
virtual void SetViewSettings(const css::uno::Sequence< css::beans::PropertyValue > &aViewProps) override
Imports view settings formula.
bool getSuccess() const
Checks out if parse was a success.
void SAL_CALL endDocument() override
End the document.
virtual void SetConfigurationSettings(const css::uno::Sequence< css::beans::PropertyValue > &aViewProps) override
Imports configurations settings formula.
SvXMLImportContext * CreateFastContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Create a fast context.
void declareMlError()
Handles an error on the mathml structure.
SmMlAttribute getAttribute(size_t nAttributePos) const
Gets a given attribute.
void setSubElement(size_t nPos, SmMlElement *aElement)
Sets a given sub element.
SmMlElement * getSubElement(size_t nPos)
Returns a given sub element.
void setAttribute(const SmMlAttribute *aAttribute)
Sets a given attribute.
size_t getSubElementsCount() const
Returns the sub elements count.
sal_Int32 GetVersion() const
SvStream & WriteOString(std::string_view rStr)
virtual void SAL_CALL startFastElement(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
virtual void SAL_CALL endFastElement(sal_Int32 Element) override
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
virtual void SAL_CALL characters(const OUString &aChars) override
css::uno::Type const & get()
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
SmMlAttributeValueMathvariant
SVXCORE_DLLPUBLIC OUString SvxResId(TranslateId aId)
#define ERRCODE_IO_BROKENPACKAGE
#define ERRCODE_IO_UNKNOWN
SAL_DLLPUBLIC_EXPORT uno::XInterface * Math_MLOasisMetaImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
SAL_DLLPUBLIC_EXPORT uno::XInterface * Math_MLImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
SAL_DLLPUBLIC_EXPORT uno::XInterface * Math_MLOasisSettingsImporter_get_implementation(uno::XComponentContext *pCtx, uno::Sequence< uno::Any > const &)
#define SAL_INFO_IF(condition, area, stream)
#define SAL_WARN(area, stream)
COMPHELPER_DLLPUBLIC css::uno::Reference< css::beans::XPropertySet > GenericPropertySet_CreateInstance(PropertySetInfo *pInfo)
Reference< XComponentContext > getProcessComponentContext()
constexpr OUStringLiteral implementationName
double toDouble(std::u16string_view str)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
const ::css::uno::Sequence<::css::beans::Pair<::rtl::OUString, ::rtl::OUString > > icustomMathmlHtmlEntities
Entity names for mathml.
SmColorTokenTableEntry Identify_ColorName_HTML(std::u16string_view colorname)
Identifies color from color name.
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
#define ERRCODE_SFX_WRONGPASSWORD
#define ERRCODE_SFX_DOLOADFAILED
SmLengthValue m_aLengthValue
SmLengthValue m_aLengthValue
SmMlAttributeValueMaxsize m_aMaxsize
SmLengthValue m_aLengthValue
SmLengthValue m_aLengthValue
SmLengthValue m_aLengthValue
Reference< XModel > xModel
#define XML_ELEMENT(prefix, name)