From 0c566771c433ec3c29b2bda7d9cb4efaf30e14e4 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 2 Dec 2017 20:35:42 +0000 Subject: let mathtype import take a SvStream of the contents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3c02dbee53554aa644b78f8a425b6a4333f2b95d Reviewed-on: https://gerrit.libreoffice.org/45729 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- starmath/source/mathtype.cxx | 7 ++++++- starmath/source/mathtype.hxx | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'starmath') diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index dda5523d8be7..9f58ee1ece4a 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -564,7 +564,12 @@ bool MathType::Parse(SotStorage *pStor) StreamMode::STD_READ); if ( (!xSrc.is()) || (ERRCODE_NONE != xSrc->GetError())) return false; - pS = xSrc.get(); + return Parse(xSrc.get()); +} + +bool MathType::Parse(SvStream* pStream) +{ + pS = pStream; pS->SetEndian( SvStreamEndian::LITTLE ); EQNOLEFILEHDR aHdr; diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx index caa651acbd75..6bf10cba01ad 100644 --- a/starmath/source/mathtype.hxx +++ b/starmath/source/mathtype.hxx @@ -97,7 +97,8 @@ public: Init(); } - bool Parse( SotStorage* pStor ); + bool Parse(SotStorage* pStor); + bool Parse(SvStream* pStor); bool ConvertFromStarMath( SfxMedium& rMedium ); private: -- cgit