diff options
author | dante <dante19031999@gmail.com> | 2021-02-27 18:49:19 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-02 07:17:32 +0100 |
commit | c1659be6ff0e0c91e0c7d1e6acb6ab18821e2bf7 (patch) | |
tree | e5c7b8eacdd8452b1912e86a5edcefdcf2141af9 /starmath/inc | |
parent | e9e41795e6b2bf680a5f74e5684b76af00bf677b (diff) |
Starmath now allows multiple parsers third part
Allows SmDocShell to choose parser
Change-Id: I36e7563943690ffe3bf031438061b302b7439258
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111684
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/inc')
-rw-r--r-- | starmath/inc/document.hxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 17f0713a63ce..c7885c027019 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -77,7 +77,6 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener OUString maText; SmFormat maFormat; - SmParser maParser; OUString maAccText; SvtLinguOptions maLinguOptions; std::unique_ptr<SmTableNode> mpTree; @@ -88,6 +87,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener sal_uInt16 mnModifyCount; bool mbFormulaArranged; sal_uInt16 mnSmSyntaxVersion; + std::unique_ptr<AbstractSmParser> maParser; std::unique_ptr<SmCursor> mpCursor; std::set< OUString > maUsedSymbols; // to export used symbols only when saving @@ -166,12 +166,11 @@ public: const SmFormat& GetFormat() const { return maFormat; } void Parse(); - SmParser & GetParser() { return maParser; } + AbstractSmParser* GetParser() { return maParser.get(); } const SmTableNode *GetFormulaTree() const { return mpTree.get(); } void SetFormulaTree(SmTableNode *pTree) { mpTree.reset(pTree); } sal_uInt16 GetSmSyntaxVersion() const { return mnSmSyntaxVersion; } - void SetSmSyntaxVersion(sal_uInt16 nSmSyntaxVersion) - { mnSmSyntaxVersion = nSmSyntaxVersion; } + void SetSmSyntaxVersion(sal_uInt16 nSmSyntaxVersion); const std::set< OUString > & GetUsedSymbols() const { return maUsedSymbols; } |