class SmMLExportWrapper
{ private: // Model
rtl::Reference<SmModel> m_xModel; // Save as a flat document ( mml, fodf ... ) bool m_bFlat; // Use html / mathml entities bool m_bUseHTMLMLEntities; // Mathmml tree to parse
SmMlElement* m_pElementTree; // Export xmlns tag bool m_bUseExportTag;
public: /** Set's the writer to export to flat document
*/ void setFlat(bool bFlat) { m_bFlat = bFlat; }
/** Checks if the writer is set to export to flat document
*/ bool getFlat() const { return m_bFlat; }
/** Checks the use of HTML / MathML entities such as &infinity;
*/ void setUseHTMLMLEntities(bool bUseHTMLMLEntities)
{
m_bUseHTMLMLEntities = bUseHTMLMLEntities;
}
/** Activates the use of HTML / MathML entities such as &infinity;
*/ bool getUseHTMLMLEntities() const { return m_bUseHTMLMLEntities; }
/** Get's if xmlns field is added
*/ bool getUseExportTag() const { return m_bUseExportTag; }
/** Set's if xmlns field is added
*/ void setUseExportTag(bool bUseExportTag) { m_bUseExportTag = bUseExportTag; }
/** Export to an archive
*/ bool Export(SfxMedium& rMedium);
/** Just export a mathml tree
*/
OUString Export(SmMlElement* pElementTree);
// Making this protected we can keep it from getting trash as input protected: /** export through an XML exporter component (output stream version)
*/ bool WriteThroughComponentOS(const css::uno::Reference<css::io::XOutputStream>& xOutputStream, const css::uno::Reference<css::lang::XComponent>& xComponent,
css::uno::Reference<css::uno::XComponentContext> const& rxContext,
css::uno::Reference<css::beans::XPropertySet> const& rPropSet, const char16_t* pComponentName, int_fast16_t nSyntaxVersion);
/** Get's if xmlns field is added
*/ bool getUseExportTag() const { return m_bUseExportTag; }
/** Set's if xmlns field is added
*/ void setUseExportTag(bool bUseExportTag) { m_bUseExportTag = bUseExportTag; }
/** Set's the element tree to be exported. *Ifitisn'tnullptrthethiswillbeexportedinsteadofthedocument
*/ void setElementTree(SmMlElement* pElementTree) { m_pElementTree = pElementTree; }
private: /** Adds an element
*/
SvXMLElementExport* createElementExport(xmloff::token::XMLTokenEnum nElement)
{ // We can't afford to ignore white spaces. They are part of the code. returnnew SvXMLElementExport(*this, XML_NAMESPACE_MATH, nElement, false, false);
}
public: /** Exports an attribute of type "length"
*/ void exportMlAttributeLength(xmloff::token::XMLTokenEnum pAttribute, const SmLengthValue& aLengthValue);
/** Exports attributes of an element
*/ void exportMlAttributes(const SmMlElement* pMlElement);
/** Exports an element and all it's attributes
*/
SvXMLElementExport* exportMlElement(const SmMlElement* pMlElement);
/** Exports an element tree
*/ void exportMlElementTree();
/** Handles an error on the mathml structure
*/ void declareMlError();
/** Get's view settings and prepares them to export
*/ virtualvoid GetViewSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override;
/** Get's configuration settings and prepares them to export
*/ virtualvoid
GetConfigurationSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.