clang-formated rest of the mathml files on starmath
Change-Id: I1aedf909f7371f259b122364368c157fd615ae06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106298 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -11132,10 +11132,6 @@ starmath/source/edit.cxx
|
||||
starmath/source/eqnolefilehdr.cxx
|
||||
starmath/source/eqnolefilehdr.hxx
|
||||
starmath/source/format.cxx
|
||||
starmath/source/mathmlexport.cxx
|
||||
starmath/source/mathmlexport.hxx
|
||||
starmath/source/mathmlimport.cxx
|
||||
starmath/source/mathmlimport.hxx
|
||||
starmath/source/mathtype.cxx
|
||||
starmath/source/mathtype.hxx
|
||||
starmath/source/node.cxx
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -26,91 +26,94 @@
|
||||
class SfxMedium;
|
||||
class SmNode;
|
||||
class SmVerticalBraceNode;
|
||||
namespace com::sun::star {
|
||||
namespace io {
|
||||
class XOutputStream; }
|
||||
namespace beans {
|
||||
class XPropertySet; }
|
||||
namespace com::sun::star
|
||||
{
|
||||
namespace io
|
||||
{
|
||||
class XOutputStream;
|
||||
}
|
||||
namespace beans
|
||||
{
|
||||
class XPropertySet;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SmXMLExportWrapper
|
||||
{
|
||||
css::uno::Reference<css::frame::XModel> xModel;
|
||||
bool bFlat; //set true for export to flat .mml, set false for
|
||||
//export to a .sxm (or whatever) package
|
||||
bool bFlat; //set true for export to flat .mml, set false for
|
||||
//export to a .sxm (or whatever) package
|
||||
public:
|
||||
explicit SmXMLExportWrapper(css::uno::Reference<css::frame::XModel> const &rRef)
|
||||
: xModel(rRef), bFlat(true) {}
|
||||
explicit SmXMLExportWrapper(css::uno::Reference<css::frame::XModel> const& rRef)
|
||||
: xModel(rRef)
|
||||
, bFlat(true)
|
||||
{
|
||||
}
|
||||
|
||||
bool Export(SfxMedium &rMedium);
|
||||
void SetFlat(bool bIn) {bFlat = bIn;}
|
||||
bool Export(SfxMedium& rMedium);
|
||||
void SetFlat(bool bIn) { bFlat = bIn; }
|
||||
|
||||
static bool
|
||||
WriteThroughComponent(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 char* pComponentName);
|
||||
|
||||
static bool WriteThroughComponent(
|
||||
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 char* pComponentName );
|
||||
|
||||
static bool WriteThroughComponent(
|
||||
const css::uno::Reference< css::embed::XStorage >& xStor,
|
||||
const css::uno::Reference< css::lang::XComponent >& xComponent,
|
||||
const char* pStreamName,
|
||||
css::uno::Reference< css::uno::XComponentContext > const & rxContext,
|
||||
css::uno::Reference< css::beans::XPropertySet > const & rPropSet,
|
||||
const char* pComponentName );
|
||||
const css::uno::Reference<css::embed::XStorage>& xStor,
|
||||
const css::uno::Reference<css::lang::XComponent>& xComponent, const char* pStreamName,
|
||||
css::uno::Reference<css::uno::XComponentContext> const& rxContext,
|
||||
css::uno::Reference<css::beans::XPropertySet> const& rPropSet, const char* pComponentName);
|
||||
};
|
||||
|
||||
|
||||
class SmXMLExport final : public SvXMLExport
|
||||
{
|
||||
const SmNode * pTree;
|
||||
OUString aText;
|
||||
bool bSuccess;
|
||||
const SmNode* pTree;
|
||||
OUString aText;
|
||||
bool bSuccess;
|
||||
|
||||
void ExportNodes(const SmNode *pNode, int nLevel);
|
||||
void ExportTable(const SmNode *pNode, int nLevel);
|
||||
void ExportLine(const SmNode *pNode, int nLevel);
|
||||
void ExportExpression(const SmNode *pNode, int nLevel,
|
||||
bool bNoMrowContainer = false);
|
||||
void ExportText(const SmNode *pNode);
|
||||
void ExportMath(const SmNode *pNode);
|
||||
void ExportBinaryHorizontal(const SmNode *pNode, int nLevel);
|
||||
void ExportUnaryHorizontal(const SmNode *pNode, int nLevel);
|
||||
void ExportBrace(const SmNode *pNode, int nLevel);
|
||||
void ExportBinaryVertical(const SmNode *pNode, int nLevel);
|
||||
void ExportBinaryDiagonal(const SmNode *pNode, int nLevel);
|
||||
void ExportSubSupScript(const SmNode *pNode, int nLevel);
|
||||
void ExportRoot(const SmNode *pNode, int nLevel);
|
||||
void ExportOperator(const SmNode *pNode, int nLevel);
|
||||
void ExportAttributes(const SmNode *pNode, int nLevel);
|
||||
void ExportFont(const SmNode *pNode, int nLevel);
|
||||
void ExportVerticalBrace(const SmVerticalBraceNode *pNode, int nLevel);
|
||||
void ExportMatrix(const SmNode *pNode, int nLevel);
|
||||
void ExportBlank(const SmNode *pNode);
|
||||
void ExportNodes(const SmNode* pNode, int nLevel);
|
||||
void ExportTable(const SmNode* pNode, int nLevel);
|
||||
void ExportLine(const SmNode* pNode, int nLevel);
|
||||
void ExportExpression(const SmNode* pNode, int nLevel, bool bNoMrowContainer = false);
|
||||
void ExportText(const SmNode* pNode);
|
||||
void ExportMath(const SmNode* pNode);
|
||||
void ExportBinaryHorizontal(const SmNode* pNode, int nLevel);
|
||||
void ExportUnaryHorizontal(const SmNode* pNode, int nLevel);
|
||||
void ExportBrace(const SmNode* pNode, int nLevel);
|
||||
void ExportBinaryVertical(const SmNode* pNode, int nLevel);
|
||||
void ExportBinaryDiagonal(const SmNode* pNode, int nLevel);
|
||||
void ExportSubSupScript(const SmNode* pNode, int nLevel);
|
||||
void ExportRoot(const SmNode* pNode, int nLevel);
|
||||
void ExportOperator(const SmNode* pNode, int nLevel);
|
||||
void ExportAttributes(const SmNode* pNode, int nLevel);
|
||||
void ExportFont(const SmNode* pNode, int nLevel);
|
||||
void ExportVerticalBrace(const SmVerticalBraceNode* pNode, int nLevel);
|
||||
void ExportMatrix(const SmNode* pNode, int nLevel);
|
||||
void ExportBlank(const SmNode* pNode);
|
||||
|
||||
public:
|
||||
SmXMLExport(
|
||||
const css::uno::Reference< css::uno::XComponentContext >& rContext,
|
||||
OUString const & implementationName, SvXMLExportFlags nExportFlags);
|
||||
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() throw();
|
||||
sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8>& rId) override;
|
||||
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() throw();
|
||||
|
||||
void ExportAutoStyles_() override {}
|
||||
void ExportMasterStyles_() override {}
|
||||
void ExportContent_() override;
|
||||
ErrCode exportDoc(enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID) override;
|
||||
ErrCode exportDoc(enum ::xmloff::token::XMLTokenEnum eClass
|
||||
= ::xmloff::token::XML_TOKEN_INVALID) override;
|
||||
|
||||
virtual void GetViewSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override;
|
||||
virtual void GetConfigurationSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override;
|
||||
virtual void
|
||||
GetConfigurationSettings(css::uno::Sequence<css::beans::PropertyValue>& aProps) override;
|
||||
|
||||
bool GetSuccess() const {return bSuccess;}
|
||||
bool GetSuccess() const { return bSuccess; }
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -28,11 +28,13 @@
|
||||
|
||||
class SmNode;
|
||||
class SfxMedium;
|
||||
namespace com::sun::star {
|
||||
namespace beans {
|
||||
class XPropertySet; }
|
||||
namespace com::sun::star
|
||||
{
|
||||
namespace beans
|
||||
{
|
||||
class XPropertySet;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
typedef std::deque<std::unique_ptr<SmNode>> SmNodeStack;
|
||||
|
||||
@@ -41,68 +43,65 @@ class SmXMLImportWrapper
|
||||
css::uno::Reference<css::frame::XModel> xModel;
|
||||
|
||||
public:
|
||||
explicit SmXMLImportWrapper(css::uno::Reference<css::frame::XModel> const &rRef)
|
||||
: xModel(rRef) {}
|
||||
explicit SmXMLImportWrapper(css::uno::Reference<css::frame::XModel> const& rRef)
|
||||
: xModel(rRef)
|
||||
{
|
||||
}
|
||||
|
||||
ErrCode Import(SfxMedium &rMedium);
|
||||
ErrCode Import(SfxMedium& rMedium);
|
||||
|
||||
static ErrCode
|
||||
ReadThroughComponent(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 char* pFilterName, bool bEncrypted);
|
||||
|
||||
static ErrCode ReadThroughComponent(
|
||||
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 char* pFilterName,
|
||||
bool bEncrypted );
|
||||
|
||||
static ErrCode ReadThroughComponent(
|
||||
const css::uno::Reference< css::embed::XStorage >& xStorage,
|
||||
const css::uno::Reference< css::lang::XComponent >& xModelComponent,
|
||||
const char* pStreamName,
|
||||
css::uno::Reference< css::uno::XComponentContext > const & rxContext,
|
||||
css::uno::Reference< css::beans::XPropertySet > const & rPropSet,
|
||||
const char* pFilterName );
|
||||
const css::uno::Reference<css::embed::XStorage>& xStorage,
|
||||
const css::uno::Reference<css::lang::XComponent>& xModelComponent, const char* pStreamName,
|
||||
css::uno::Reference<css::uno::XComponentContext> const& rxContext,
|
||||
css::uno::Reference<css::beans::XPropertySet> const& rPropSet, const char* pFilterName);
|
||||
};
|
||||
|
||||
|
||||
class SmXMLImport : public SvXMLImport
|
||||
{
|
||||
SmNodeStack aNodeStack;
|
||||
bool bSuccess;
|
||||
int nParseDepth;
|
||||
OUString aText;
|
||||
SmNodeStack aNodeStack;
|
||||
bool bSuccess;
|
||||
int nParseDepth;
|
||||
OUString aText;
|
||||
|
||||
public:
|
||||
SmXMLImport(
|
||||
const css::uno::Reference< css::uno::XComponentContext >& rContext,
|
||||
OUString const & implementationName, SvXMLImportFlags nImportFlags);
|
||||
virtual ~SmXMLImport() throw () override;
|
||||
SmXMLImport(const css::uno::Reference<css::uno::XComponentContext>& rContext,
|
||||
OUString const& implementationName, SvXMLImportFlags nImportFlags);
|
||||
virtual ~SmXMLImport() throw() override;
|
||||
|
||||
// XUnoTunnel
|
||||
sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override;
|
||||
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
|
||||
sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8>& rId) override;
|
||||
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() throw();
|
||||
|
||||
void SAL_CALL endDocument() override;
|
||||
|
||||
SvXMLImportContext *CreateFastContext( sal_Int32 nElement,
|
||||
const css::uno::Reference<
|
||||
css::xml::sax::XFastAttributeList >& xAttrList ) override;
|
||||
SvXMLImportContext* CreateFastContext(
|
||||
sal_Int32 nElement,
|
||||
const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList) override;
|
||||
|
||||
SmNodeStack & GetNodeStack() { return aNodeStack; }
|
||||
SmNodeStack& GetNodeStack() { return aNodeStack; }
|
||||
|
||||
bool GetSuccess() const { return bSuccess; }
|
||||
bool GetSuccess() const { return bSuccess; }
|
||||
[[nodiscard]] const OUString& GetText() const { return aText; }
|
||||
void SetText(const OUString &rStr) { aText = rStr; }
|
||||
void SetText(const OUString& rStr) { aText = rStr; }
|
||||
|
||||
virtual void SetViewSettings(const css::uno::Sequence<css::beans::PropertyValue>& aViewProps) override;
|
||||
virtual void SetConfigurationSettings(const css::uno::Sequence<css::beans::PropertyValue>& aViewProps) override;
|
||||
virtual void
|
||||
SetViewSettings(const css::uno::Sequence<css::beans::PropertyValue>& aViewProps) override;
|
||||
virtual void SetConfigurationSettings(
|
||||
const css::uno::Sequence<css::beans::PropertyValue>& aViewProps) override;
|
||||
|
||||
void IncParseDepth() { ++nParseDepth; }
|
||||
bool TooDeep() const { return nParseDepth >= 2048; }
|
||||
void DecParseDepth() { --nParseDepth; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
Reference in New Issue
Block a user