]> git.lyx.org Git - lyx.git/commitdiff
Rename WriteStream to TeXMathStream.
authorThibaut Cuvelier <tcuvelier@lyx.org>
Sat, 26 Dec 2020 19:04:36 +0000 (20:04 +0100)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Sat, 2 Jan 2021 18:52:23 +0000 (19:52 +0100)
119 files changed:
src/Cursor.cpp
src/graphics/PreviewLoader.cpp
src/lyxfind.cpp
src/mathed/InsetMath.cpp
src/mathed/InsetMath.h
src/mathed/InsetMathAMSArray.cpp
src/mathed/InsetMathAMSArray.h
src/mathed/InsetMathArray.cpp
src/mathed/InsetMathArray.h
src/mathed/InsetMathBig.cpp
src/mathed/InsetMathBig.h
src/mathed/InsetMathBoldSymbol.cpp
src/mathed/InsetMathBoldSymbol.h
src/mathed/InsetMathBox.cpp
src/mathed/InsetMathBox.h
src/mathed/InsetMathBrace.cpp
src/mathed/InsetMathBrace.h
src/mathed/InsetMathCancel.cpp
src/mathed/InsetMathCancel.h
src/mathed/InsetMathCancelto.cpp
src/mathed/InsetMathCancelto.h
src/mathed/InsetMathCases.cpp
src/mathed/InsetMathCases.h
src/mathed/InsetMathChar.cpp
src/mathed/InsetMathChar.h
src/mathed/InsetMathClass.cpp
src/mathed/InsetMathClass.h
src/mathed/InsetMathColor.cpp
src/mathed/InsetMathColor.h
src/mathed/InsetMathCommand.cpp
src/mathed/InsetMathCommand.h
src/mathed/InsetMathComment.cpp
src/mathed/InsetMathComment.h
src/mathed/InsetMathDecoration.cpp
src/mathed/InsetMathDecoration.h
src/mathed/InsetMathDelim.cpp
src/mathed/InsetMathDelim.h
src/mathed/InsetMathDiagram.cpp
src/mathed/InsetMathDiagram.h
src/mathed/InsetMathDiff.cpp
src/mathed/InsetMathDiff.h
src/mathed/InsetMathEnsureMath.cpp
src/mathed/InsetMathEnsureMath.h
src/mathed/InsetMathEnv.cpp
src/mathed/InsetMathEnv.h
src/mathed/InsetMathExInt.cpp
src/mathed/InsetMathExInt.h
src/mathed/InsetMathFont.cpp
src/mathed/InsetMathFont.h
src/mathed/InsetMathFontOld.cpp
src/mathed/InsetMathFontOld.h
src/mathed/InsetMathFrac.cpp
src/mathed/InsetMathFrac.h
src/mathed/InsetMathGrid.cpp
src/mathed/InsetMathGrid.h
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathHull.h
src/mathed/InsetMathKern.cpp
src/mathed/InsetMathKern.h
src/mathed/InsetMathLim.cpp
src/mathed/InsetMathLim.h
src/mathed/InsetMathMacro.cpp
src/mathed/InsetMathMacro.h
src/mathed/InsetMathMacroArgument.cpp
src/mathed/InsetMathMacroArgument.h
src/mathed/InsetMathMacroTemplate.cpp
src/mathed/InsetMathMacroTemplate.h
src/mathed/InsetMathMatrix.cpp
src/mathed/InsetMathMatrix.h
src/mathed/InsetMathNest.cpp
src/mathed/InsetMathNest.h
src/mathed/InsetMathNumber.cpp
src/mathed/InsetMathNumber.h
src/mathed/InsetMathOverset.cpp
src/mathed/InsetMathOverset.h
src/mathed/InsetMathPar.cpp
src/mathed/InsetMathPar.h
src/mathed/InsetMathPhantom.cpp
src/mathed/InsetMathPhantom.h
src/mathed/InsetMathRef.h
src/mathed/InsetMathRoot.cpp
src/mathed/InsetMathRoot.h
src/mathed/InsetMathScript.cpp
src/mathed/InsetMathScript.h
src/mathed/InsetMathSideset.cpp
src/mathed/InsetMathSideset.h
src/mathed/InsetMathSize.cpp
src/mathed/InsetMathSize.h
src/mathed/InsetMathSpace.cpp
src/mathed/InsetMathSpace.h
src/mathed/InsetMathSpecialChar.cpp
src/mathed/InsetMathSpecialChar.h
src/mathed/InsetMathSplit.cpp
src/mathed/InsetMathSplit.h
src/mathed/InsetMathSqrt.cpp
src/mathed/InsetMathSqrt.h
src/mathed/InsetMathStackrel.cpp
src/mathed/InsetMathStackrel.h
src/mathed/InsetMathString.cpp
src/mathed/InsetMathString.h
src/mathed/InsetMathSubstack.cpp
src/mathed/InsetMathSubstack.h
src/mathed/InsetMathSymbol.cpp
src/mathed/InsetMathSymbol.h
src/mathed/InsetMathTabular.cpp
src/mathed/InsetMathTabular.h
src/mathed/InsetMathUnderset.cpp
src/mathed/InsetMathUnderset.h
src/mathed/InsetMathXArrow.cpp
src/mathed/InsetMathXArrow.h
src/mathed/InsetMathXYMatrix.cpp
src/mathed/InsetMathXYMatrix.h
src/mathed/MacroTable.cpp
src/mathed/MathExtern.cpp
src/mathed/MathExtern.h
src/mathed/MathFactory.cpp
src/mathed/MathStream.cpp
src/mathed/MathStream.h
src/mathed/MathSupport.cpp

index b250b7bc56f20bbb1006ba1e4f962aa838c63bd5..939b92bd983e314965e9e7a0f47adf71fee83f54 100644 (file)
@@ -1879,7 +1879,7 @@ void Cursor::normalize()
                       << " in atom: '";
                odocstringstream os;
                otexrowstream ots(os);
-               WriteStream wi(ots, false, true, WriteStream::wsDefault);
+               TeXMathStream wi(ots, false, true, TeXMathStream::wsDefault);
                inset().asInsetMath()->write(wi);
                lyxerr << to_utf8(os.str()) << endl;
                pos() = lastpos();
index 7cb83fb5b7165a10a6cc0056d86bf9f84f66a9b5..de04e4db50ffbd7612daf909b52702f1350e1885 100644 (file)
@@ -819,11 +819,11 @@ void PreviewLoader::Impl::dumpPreamble(otexstream & os, Flavor flavor) const
        buffer_.writeLaTeXSource(os, buffer_.filePath(), runparams, Buffer::OnlyPreamble);
 
        // FIXME! This is a HACK! The proper fix is to control the 'true'
-       // passed to WriteStream below:
+       // passed to TeXMathStream below:
        // int InsetMathNest::latex(Buffer const &, odocstream & os,
        //                          OutputParams const & runparams) const
        // {
-       //      WriteStream wi(os, runparams.moving_arg, true);
+       //      TeXMathStream wi(os, runparams.moving_arg, true);
        //      par_->write(wi);
        //      return wi.line();
        // }
index f635be3003da6054a7c8831382f62ed525e44c06..94a54bc37a203e62fc55a6818add4320a723079f 100644 (file)
@@ -3441,7 +3441,7 @@ docstring latexifyFromCursor(DocIterator const & cur, int len)
                for (int s = cur.depth() - 1; s >= 0; --s) {
                        CursorSlice const & cs = cur[s];
                        if (cs.asInsetMath() && cs.asInsetMath()->asHullInset()) {
-                               WriteStream ws(os);
+                               TeXMathStream ws(os);
                                cs.asInsetMath()->asHullInset()->header_write(ws);
                                break;
                        }
@@ -3465,7 +3465,7 @@ docstring latexifyFromCursor(DocIterator const & cur, int len)
                        CursorSlice const & cs2 = cur[s];
                        InsetMath * inset = cs2.asInsetMath();
                        if (inset && inset->asHullInset()) {
-                               WriteStream ws(os);
+                               TeXMathStream ws(os);
                                inset->asHullInset()->footer_write(ws);
                                break;
                        }
index 9109c39bd1910fe0fcfe4beb9b9691ba47fbddcc..0d21b871d689f86f151ad2d744445c92cba3b5f5 100644 (file)
@@ -111,7 +111,7 @@ bool InsetMath::addToMathRow(MathRow & mrow, MetricsInfo & mi) const
 
 
 /// write LaTeX and LyX code
-void InsetMath::writeLimits(WriteStream & os) const
+void InsetMath::writeLimits(TeXMathStream & os) const
 {
        if (limits() == LIMITS) {
                os << "\\limits";
@@ -128,7 +128,7 @@ void InsetMath::dump() const
        lyxerr << "---------------------------------------------" << endl;
        odocstringstream os;
        otexrowstream ots(os);
-       WriteStream wi(ots, false, true, WriteStream::wsDefault);
+       TeXMathStream wi(ots, false, true, TeXMathStream::wsDefault);
        write(wi);
        lyxerr << to_utf8(os.str());
        lyxerr << "\n---------------------------------------------" << endl;
@@ -147,7 +147,7 @@ void InsetMath::drawT(TextPainter &, int, int) const
 }
 
 
-void InsetMath::write(WriteStream & os) const
+void InsetMath::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        docstring const s = name();
@@ -232,7 +232,7 @@ ostream & operator<<(ostream & os, MathAtom const & at)
 {
        odocstringstream oss;
        otexrowstream ots(oss);
-       WriteStream wi(ots, false, false, WriteStream::wsDefault);
+       TeXMathStream wi(ots, false, false, TeXMathStream::wsDefault);
        at->write(wi);
        return os << to_utf8(oss.str());
 }
@@ -241,7 +241,7 @@ ostream & operator<<(ostream & os, MathAtom const & at)
 odocstream & operator<<(odocstream & os, MathAtom const & at)
 {
        otexrowstream ots(os);
-       WriteStream wi(ots, false, false, WriteStream::wsDefault);
+       TeXMathStream wi(ots, false, false, TeXMathStream::wsDefault);
        at->write(wi);
        return os;
 }
index 95051bc8e720f3649b239ef04befe7544f804c80..c872316abfbf5bc38613f991d9c0a562b8f9699b 100644 (file)
@@ -105,7 +105,7 @@ class MapleStream;
 class MaximaStream;
 class MathematicaStream;
 class MathMLStream;
-class WriteStream;
+class TeXMathStream;
 
 class MathData;
 class InsetMathMacroTemplate;
@@ -216,7 +216,7 @@ public:
        /// sets types of sub/superscripts
        virtual void limits(Limits) {}
        /// write limits status for LaTeX and LyX code
-       void writeLimits(WriteStream & os) const;
+       void writeLimits(TeXMathStream & os) const;
 
        /// replace things by other things
        virtual void replace(ReplaceData &) {}
@@ -231,7 +231,7 @@ public:
        // write(). This is to shut off a clang warning.
        using Inset::write;
        /// write LaTeX and LyX code
-       virtual void write(WriteStream & os) const;
+       virtual void write(TeXMathStream & os) const;
        /// write normalized content
        virtual void normalize(NormalStream &) const;
        /// write content as something readable by Maple
index 61608041867202287dab071026bf6940d70b7dbe..16009e8a7b847d069ed5acad5c4c78d5e31ba720 100644 (file)
@@ -146,7 +146,7 @@ bool InsetMathAMSArray::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
-void InsetMathAMSArray::write(WriteStream & os) const
+void InsetMathAMSArray::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "\\begin{" << name_ << '}';
index 8feb5750c7e63245c06f28bbe394d5cb41cdc7f4..4994ffb2425bce4515eb229556686ba9b18e8933 100644 (file)
@@ -44,7 +44,7 @@ public:
        bool getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void infoize(odocstream & os) const override;
        ///
index eeea831d05e5c2d7f2279a88c6aa7a3553ba9c00..2815dc9612b06b87ee7e8faae344131cc782bbdc 100644 (file)
@@ -88,7 +88,7 @@ void InsetMathArray::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathArray::write(WriteStream & os) const
+void InsetMathArray::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
 
index ce372a1707e55203f5500c95a0d06f789a6d8f71..d17aa41b21a954370dab0d3f05c78b9a4176cba1 100644 (file)
@@ -38,7 +38,7 @@ public:
        InsetMathArray const * asArrayInset() const override { return this; }
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void infoize(odocstream & os) const override;
        ///
index fa31b7568bac8fb2baefae0dc7f3b950f7b364d6..091907e5171b8d416d38a724cbbac0158b391352 100644 (file)
@@ -120,7 +120,7 @@ void InsetMathBig::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathBig::write(WriteStream & os) const
+void InsetMathBig::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << '\\' << name_ << delim_;
index e98afa3f11bf644f20e8038f3a3e357c98250166..09f04a6f78ebe63ea7b7eb18ed2fd53fd49f06d8 100644 (file)
@@ -31,7 +31,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream & os) const override;
        ///
index 7b6932b8de425e66582f669dfbcbe73f9574c7fb..ba20aab80789fa0170a270c96b8f2ee0c97012b9 100644 (file)
@@ -90,7 +90,7 @@ void InsetMathBoldSymbol::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetMathBoldSymbol::write(WriteStream & os) const
+void InsetMathBoldSymbol::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        switch (kind_) {
index 27e9614af2d4cae90fecfd73e7e716e9498a8eae..4c47245df54955b3b381c7bef1fa0bd9209d2194 100644 (file)
@@ -40,7 +40,7 @@ public:
        ///
        void validate(LaTeXFeatures & features) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void mathmlize(MathMLStream &) const override;
        ///
index 7364d49a848523bcc8528c19e8b653e71d6b5017..2b237d8cbbb3f9624ba6a654b06066730022f252 100644 (file)
@@ -42,7 +42,7 @@ InsetMathBox::InsetMathBox(Buffer * buf, docstring const & name)
 {}
 
 
-void InsetMathBox::write(WriteStream & os) const
+void InsetMathBox::write(TeXMathStream & os) const
 {
        ModeSpecifier specifier(os, TEXT_MODE);
        os << '\\' << name_ << '{' << cell(0) << '}';
@@ -150,7 +150,7 @@ void InsetMathFBox::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathFBox::write(WriteStream & os) const
+void InsetMathFBox::write(TeXMathStream & os) const
 {
        ModeSpecifier specifier(os, TEXT_MODE);
        os << "\\fbox{" << cell(0) << '}';
@@ -279,7 +279,7 @@ void InsetMathMakebox::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathMakebox::write(WriteStream & os) const
+void InsetMathMakebox::write(TeXMathStream & os) const
 {
        ModeSpecifier specifier(os, TEXT_MODE);
        os << (framebox_ ? "\\framebox" : "\\makebox");
@@ -372,7 +372,7 @@ void InsetMathBoxed::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathBoxed::write(WriteStream & os) const
+void InsetMathBoxed::write(TeXMathStream & os) const
 {
        ModeSpecifier specifier(os, MATH_MODE);
        os << "\\boxed{" << cell(0) << '}';
index 6ab33b7a5040731e851068e474ce9c4aea3ea69f..898376583648135bb344f9f03d74b9b8464482a8 100644 (file)
@@ -29,7 +29,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream & ns) const override;
        ///
@@ -64,7 +64,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// write normalized content
        void normalize(NormalStream & ns) const override;
        ///
@@ -91,7 +91,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// write normalized content
        void normalize(NormalStream & ns) const override;
        ///
@@ -126,7 +126,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void mathmlize(MathMLStream & ms) const override;
        ///
index 8a3bcde24dc174a2cd2dd883d58ddcf2ec3d6d66..b0ce242f07b82db4af4e0005d2327d10ae03582e 100644 (file)
@@ -72,7 +72,7 @@ void InsetMathBrace::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathBrace::write(WriteStream & os) const
+void InsetMathBrace::write(TeXMathStream & os) const
 {
        os << '{' << cell(0) << '}';
 }
index 72a63e0bbe7e149df2537906da085b46367ddfd6..273a9edabc9570eee4f1d2aa127497a728e7bc2c 100644 (file)
@@ -34,7 +34,7 @@ public:
        ///
        void draw(PainterInfo &, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// write normalized content
        void normalize(NormalStream & ns) const override;
        ///
index 5370bb45a56b6a8550adc43daa732cab77ad690a..b060af0b9e4075f1d0b6effb102c43c0f565a6c2 100644 (file)
@@ -77,7 +77,7 @@ void InsetMathCancel::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathCancel::write(WriteStream & os) const
+void InsetMathCancel::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        switch (kind_) {
index 2f8e94dc72371efb401df9ba544c26b02744effd..817817bfd87009a24b6a40bc201239186a02e0ce 100644 (file)
@@ -32,7 +32,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// write normalized content
        void normalize(NormalStream & ns) const override;
        ///
index b6e7ed06866306d0a0c217f8880855a315944cd4..1a7d38c78ffb2f2b3bf2907237e288ec66e7accb 100644 (file)
@@ -88,7 +88,7 @@ void InsetMathCancelto::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathCancelto::write(WriteStream & os) const
+void InsetMathCancelto::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "\\cancelto{" << cell(1) << "}{" << cell(0) << '}';
index 654bd49d1e45da7e69cac7527bb4903e2b5a975f..7c7aad56d65f3cfa1b0605d291890a3566039882 100644 (file)
@@ -28,7 +28,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// write normalized content
        void normalize(NormalStream & ns) const override;
        ///
index cc5191e1c2a8a848b631a8318407ae82305f8eff..f9415dbeaccdf71810bc9e46aa573af605bbb449 100644 (file)
@@ -111,7 +111,7 @@ bool InsetMathCases::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
-void InsetMathCases::write(WriteStream & os) const
+void InsetMathCases::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        if (os.fragile())
index e74bea75d0be17b52ac221ae43b8e22f9d3d1094..6cace1fbf095fd674ddc887dc5cc4a885ec9ccc8 100644 (file)
@@ -45,7 +45,7 @@ public:
        ///
        void htmlize(HtmlStream &) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void validate(LaTeXFeatures & features) const override;
        ///
index cadadd24c17e4fc62dde43f98df66437210dd596..a02f54b43ac376f73f69894b0bb4c16c96d903f5 100644 (file)
@@ -195,7 +195,7 @@ void InsetMathChar::drawT(TextPainter & pain, int x, int y) const
 }
 
 
-void InsetMathChar::write(WriteStream & os) const
+void InsetMathChar::write(TeXMathStream & os) const
 {
        os.os().put(char_);
 }
index 5f1a128125a902a73863da66c62547d4427f0f99..be38a1398bb794f111201bfde6bfde577043970a 100644 (file)
@@ -35,7 +35,7 @@ public:
        int kerning(BufferView const *) const override { return kerning_; }
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void validate(LaTeXFeatures & features) const override;
        ///
index f98aaa7ca5f8481dad5ac4bf0bf1b3b8c3bea339..0c22d478c7acb8d413eb5aa131afb2a544c2c0a8 100644 (file)
@@ -49,7 +49,7 @@ void InsetMathClass::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathClass::write(WriteStream & os) const
+void InsetMathClass::write(TeXMathStream & os) const
 {
        InsetMathNest::write(os);
        writeLimits(os);
index 60b79cedd65d994d95279e108022835d4da0c14d..89189f2b0ddf88814a070be94e9abd1712241ed5 100644 (file)
@@ -41,7 +41,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void infoize(odocstream & os) const override;
        ///
index 31ba778fafb0ddb507d39cfa9aaf2caaf607ddb1..f2f9116bf9f4c01b2898d548a59c7639936db135 100644 (file)
@@ -94,7 +94,7 @@ void InsetMathColor::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetMathColor::write(WriteStream & os) const
+void InsetMathColor::write(TeXMathStream & os) const
 {
        // We have to ensure correct spacing when the front and/or back
        // atoms are not ordinary ones (bug 11827).
index 3051f22b4e7ff78dbfa3158233cd3f5e81846ba0..d3ea0501462b261240bc76d8f876f4f288a43305 100644 (file)
@@ -35,7 +35,7 @@ public:
        /// we need package color
        void validate(LaTeXFeatures & features) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// FIXME XHTML For now, we do nothing with color.
        void mathmlize(MathMLStream &) const override {}
        /// FIXME XHTML For now, we do nothing with color.
index deac6c3711e4fa193dce8279d12295b621a5c519..acde02adaa99ea735ccf273b469e603041413e99 100644 (file)
@@ -59,7 +59,7 @@ void InsetMathCommand::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathCommand::write(WriteStream & os) const
+void InsetMathCommand::write(TeXMathStream & os) const
 {
        ModeSpecifier specifier(os, currentMode(), lockedMode(), asciiOnly());
        MathEnsurer ensurer(os, needs_math_mode_);
index 0c96a25d7ff56c6494ea3e613f0d9c51f04f8a51..a0144bcf55b2b145c7b47cf1c2bc28251054493b 100644 (file)
@@ -36,7 +36,7 @@ public:
        ///
        Inset * editXY(Cursor &, int, int) override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        //
        // void infoize(odocstream & os) const;
        ///
index 1b51fdbf5d57f647be591677057351e6185e4efd..273253ec0e7fa3c7228a3eaafb6e27963438b25a 100644 (file)
@@ -71,7 +71,7 @@ void InsetMathComment::drawT(TextPainter & pain, int x, int y) const
 }
 
 
-void InsetMathComment::write(WriteStream & os) const
+void InsetMathComment::write(TeXMathStream & os) const
 {
        os << '%' << cell(0) << "\n";
 }
index ff6bbe345444297d2c71654a6178be1011048fb4..30e8cc4de4504446ddf3fe1d1c20b7de171dbe49 100644 (file)
@@ -36,7 +36,7 @@ public:
        void drawT(TextPainter & pi, int x, int y) const override;
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void maple(MapleStream &) const override;
        ///
index 398e3a299ded6297afe61ab4261ea1d664a2355e..c7d6386aa864ee779625ce420fb9812ae4fd983a 100644 (file)
@@ -146,7 +146,7 @@ void InsetMathDecoration::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathDecoration::write(WriteStream & os) const
+void InsetMathDecoration::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        if (os.fragile() && protect())
index 3e890db230364c894191236414cde4eda49769b7..e71b54b83db64466a6f767e5097d20da528b1c6b 100644 (file)
@@ -30,7 +30,7 @@ public:
        ///
        void draw(PainterInfo &, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
index 3326bd7edd37800a0897e9113087d43a34271067..95a0883cceb81a8e8edbf8e92575f44e1a39c37a 100644 (file)
@@ -74,7 +74,7 @@ void InsetMathDelim::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetMathDelim::write(WriteStream & os) const
+void InsetMathDelim::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "\\left" << convertDelimToLatexName(left_) << cell(0)
index c8828a8c35f6a8550f8ed5e57c81f0d7952a2a5d..cad8da49de71dd9a084b32b827ba487e9ee4a1f7 100644 (file)
@@ -48,7 +48,7 @@ public:
        ///
        void validate(LaTeXFeatures & features) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// write normalized content
        void normalize(NormalStream &) const override;
        ///
index baa20a5fa7cfef8ab5c2dba9d37ff48788bc450c..66d577f6b02ddf3734b3e286aae6a28a86daca2d 100644 (file)
@@ -66,7 +66,7 @@ void InsetMathDiagram::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathDiagram::write(WriteStream & os) const
+void InsetMathDiagram::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "\\Diagram";
index 83652e5377b780577214f933c7247b0ef2940cbd..95e16e278023b45460be946c2f2b90c41b17d022 100644 (file)
@@ -35,7 +35,7 @@ public:
        int rowsep() const override;
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void infoize(odocstream & os) const override;
        ///
index 9052d8999ba1541b1632ccb7be67ecadb71ee948..ffc3bedb4ea5ef5e740731fb904bd0af024f93d0 100644 (file)
@@ -95,7 +95,7 @@ void InsetMathDiff::mathematica(MathematicaStream & os) const
 }
 
 
-void InsetMathDiff::write(WriteStream &) const
+void InsetMathDiff::write(TeXMathStream &) const
 {
        LYXERR0("should not happen");
 }
index 486caa2b872d3f34fd17eed4714407176bf2e745..319af65a69f4cbc31a37e08eade8072d83af9994 100644 (file)
@@ -41,7 +41,7 @@ public:
        ///
        void maxima(MaximaStream &) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        InsetCode lyxCode() const override { return MATH_DIFF_CODE; }
 private:
index 3669b09ba3690f0267e8179eac1c8c45c740fcd7..bef6a900ffb133cdfe59468704a48c523a16af97 100644 (file)
@@ -62,7 +62,7 @@ void InsetMathEnsureMath::drawT(TextPainter & pain, int x, int y) const
 }
 
 
-void InsetMathEnsureMath::write(WriteStream & os) const
+void InsetMathEnsureMath::write(TeXMathStream & os) const
 {
        ModeSpecifier specifier(os, MATH_MODE);
        os << "\\ensuremath{" << cell(0) << "}";
index bbd4b80bc68adb1e3597ec2c4b6646b383006300..6d8032088b4af5ccb97d63e8d03c5a87632e1d84 100644 (file)
@@ -34,7 +34,7 @@ public:
        ///
        void drawT(TextPainter & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void mathmlize(MathMLStream &) const override;
        ///
index dd2c391681048b6fc4060f61251f4a01a749c7c1..4e8229b77501070ac7ee9aa5754c6e6fd3c83db9 100644 (file)
@@ -51,7 +51,7 @@ void InsetMathEnv::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathEnv::write(WriteStream & os) const
+void InsetMathEnv::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}';
index 22f6fecaabe17403ea9235695e212eb5967fdb00..4f8a342c0fef0fb2999281464c691f5f6a4fb674 100644 (file)
@@ -26,7 +26,7 @@ public:
        ///
        void draw(PainterInfo &, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// write normalized content
        void normalize(NormalStream & ns) const override;
        ///
index dcf274604b626a6bd52cee4123c1546571eadc0d..ba8eaa30b94b377fa0e670871f91e0d078a33236 100644 (file)
@@ -190,7 +190,7 @@ void InsetMathExInt::htmlize(HtmlStream & os) const
 }
 
 
-void InsetMathExInt::write(WriteStream &) const
+void InsetMathExInt::write(TeXMathStream &) const
 {
        LYXERR0("should not happen");
 }
index 0d58fb326a65bb15f8d5fd2a7c96fba79d56e5ac..989395fdb2d124bf56988178cd64f9b315ab3073 100644 (file)
@@ -56,7 +56,7 @@ public:
        ///
        void htmlize(HtmlStream &) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        InsetCode lyxCode() const override { return MATH_EXINT_CODE; }
 private:
index 317e285fdbcf8cec66b5fde2e2888deb51687b46..2a0cb997aa15636665d5df6b046e731b151c8eae 100644 (file)
@@ -62,7 +62,7 @@ bool InsetMathFont::lockedMode() const
 }
 
 
-void InsetMathFont::write(WriteStream & os) const
+void InsetMathFont::write(TeXMathStream & os) const
 {
        // Close the mode changing command inserted during export if
        // we are going to output another mode changing command that
index 8595c38c14fd549ef5e327e5be2d65e1e0b4d5ec..930e51293be4449040cad9170ad4762012756d6b 100644 (file)
@@ -34,7 +34,7 @@ public:
        /// do we allow changing mode during latex export?
        bool lockedMode() const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        docstring name() const override;
        ///
index 383efaf30fe736bd47eab043c6a4b6079d33093d..e3d1f8875fb8305256fea663bf117d6fccb44d04 100644 (file)
@@ -94,7 +94,7 @@ void InsetMathFontOld::drawT(TextPainter & pain, int x, int y) const
 }
 
 
-void InsetMathFontOld::write(WriteStream & os) const
+void InsetMathFontOld::write(TeXMathStream & os) const
 {
        os << "{\\" << key_->name << ' ' << cell(0) << '}';
 }
index fe313411e41f9babbd4936f5fcb1a98d9f84e6bb..b8aa668a9c040d0a2da491ea01d3cd8f01fdb92c 100644 (file)
@@ -38,7 +38,7 @@ public:
        ///
        void drawT(TextPainter & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream &) const override;
        ///
index 2ff0cb6cef6e175388ab596495d9e0d844820c3c..3719904b925ca4df355c7705ed2845479e4d3c54 100644 (file)
@@ -386,7 +386,7 @@ void InsetMathFrac::drawT(TextPainter & /*pain*/, int /*x*/, int /*y*/) const
 }
 
 
-void InsetMathFrac::write(WriteStream & os) const
+void InsetMathFrac::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        switch (kind_) {
@@ -698,7 +698,7 @@ bool InsetMathBinom::extraBraces() const
 }
 
 
-void InsetMathBinom::write(WriteStream & os) const
+void InsetMathBinom::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        switch (kind_) {
index 6691033183d088a534f79a1daf0c389576865efc..87b230623a105578c6a3021291fa28a046ae87ca 100644 (file)
@@ -82,7 +82,7 @@ public:
        ///
        bool extraBraces() const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void maple(MapleStream &) const override;
        ///
@@ -121,7 +121,7 @@ public:
        ///
        explicit InsetMathBinom(Buffer * buf, Kind kind = BINOM);
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream &) const override;
        /// Generalized fractions are of inner class (see The TeXbook, p.292)
index f10633ebd4dac1f62c1847117db61f48b06a3b01..c01c74ac3e76476825ea85deae5b9f88f0a99ba6 100644 (file)
@@ -1237,14 +1237,14 @@ void InsetMathGrid::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetMathGrid::write(WriteStream & os) const
+void InsetMathGrid::write(TeXMathStream & os) const
 {
        write(os, 0, 0, nrows(), ncols());
 }
 
-void InsetMathGrid::write(WriteStream & os,
-                         row_type beg_row, col_type beg_col,
-                         row_type end_row, col_type end_col) const
+void InsetMathGrid::write(TeXMathStream & os,
+                          row_type beg_row, col_type beg_col,
+                          row_type end_row, col_type end_col) const
 {
        MathEnsurer ensurer(os, false);
        docstring eol;
index 992844cfb875cd25a7c6b02e8ee238f1b9fb7706..70e9ddb4ca84523ec785f968881aca79b85e1d14 100644 (file)
@@ -208,11 +208,11 @@ public:
        virtual bool handlesMulticolumn() const { return false; }
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
-       void write(WriteStream & os,
-                  row_type beg_row, col_type beg_col,
-                  row_type end_row, col_type end_col) const;
+       void write(TeXMathStream & os,
+                  row_type beg_row, col_type beg_col,
+                  row_type end_row, col_type end_col) const;
        ///
        void normalize(NormalStream &) const override;
        ///
index 1a58583ff41878330e29b92a00e9db4211732d77..24e4397490573b0e117da11cd4a44b956efd2cd1 100644 (file)
@@ -121,28 +121,28 @@ namespace {
 
 
        // writes a preamble for underlined or struck out math display
-       void writeMathdisplayPreamble(WriteStream & os)
+       void writeMathdisplayPreamble(TeXMathStream & os)
        {
                if (os.strikeoutMath())
                        return;
 
-               if (os.ulemCmd() == WriteStream::UNDERLINE)
+               if (os.ulemCmd() == TeXMathStream::UNDERLINE)
                        os << "\\raisebox{-\\belowdisplayshortskip}{"
                              "\\parbox[b]{\\linewidth}{";
-               else if (os.ulemCmd() == WriteStream::STRIKEOUT)
+               else if (os.ulemCmd() == TeXMathStream::STRIKEOUT)
                        os << "\\parbox{\\linewidth}{";
        }
 
 
        // writes a postamble for underlined or struck out math display
-       void writeMathdisplayPostamble(WriteStream & os)
+       void writeMathdisplayPostamble(TeXMathStream & os)
        {
                if (os.strikeoutMath())
                        return;
 
-               if (os.ulemCmd() == WriteStream::UNDERLINE)
+               if (os.ulemCmd() == TeXMathStream::UNDERLINE)
                        os << "}}\\\\\n";
-               else if (os.ulemCmd() == WriteStream::STRIKEOUT)
+               else if (os.ulemCmd() == TeXMathStream::STRIKEOUT)
                        os << "}\\\\\n";
        }
 
@@ -678,7 +678,7 @@ void InsetMathHull::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
        } else {
                odocstringstream os;
                otexrowstream ots(os);
-               WriteStream wi(ots, false, true, WriteStream::wsDefault);
+               TeXMathStream wi(ots, false, true, TeXMathStream::wsDefault);
                write(wi);
                dim.wid = os.str().size();
                dim.asc = 1;
@@ -694,7 +694,7 @@ void InsetMathHull::drawT(TextPainter & pain, int x, int y) const
        } else {
                odocstringstream os;
                otexrowstream ots(os);
-               WriteStream wi(ots, false, true, WriteStream::wsDefault);
+               TeXMathStream wi(ots, false, true, TeXMathStream::wsDefault);
                write(wi);
                pain.draw(x, y, os.str().c_str());
        }
@@ -713,7 +713,7 @@ static docstring latexString(InsetMathHull const & inset)
        if (inset.isBufferValid())
                encoding = &(inset.buffer().params().encoding());
        otexrowstream ots(ls);
-       WriteStream wi(ots, false, true, WriteStream::wsPreview, encoding);
+       TeXMathStream wi(ots, false, true, TeXMathStream::wsPreview, encoding);
        inset.write(wi);
        return ls.str();
 }
@@ -1122,7 +1122,7 @@ CtObject InsetMathHull::getCtObject(OutputParams const & runparams) const
 }
 
 
-void InsetMathHull::header_write(WriteStream & os) const
+void InsetMathHull::header_write(TeXMathStream & os) const
 {
        bool n = numberedType();
 
@@ -1188,7 +1188,7 @@ void InsetMathHull::header_write(WriteStream & os) const
 }
 
 
-void InsetMathHull::footer_write(WriteStream & os) const
+void InsetMathHull::footer_write(TeXMathStream & os) const
 {
        bool n = numberedType();
 
@@ -1698,7 +1698,7 @@ docstring InsetMathHull::eolString(row_type row, bool fragile, bool latex,
        return res + InsetMathGrid::eolString(row, fragile, latex, last_eoln);
 }
 
-void InsetMathHull::write(WriteStream & os) const
+void InsetMathHull::write(TeXMathStream & os) const
 {
        ModeSpecifier specifier(os, MATH_MODE);
        header_write(os);
@@ -2304,7 +2304,7 @@ void InsetMathHull::write(ostream & os) const
 {
        odocstringstream oss;
        otexrowstream ots(oss);
-       WriteStream wi(ots, false, false, WriteStream::wsDefault);
+       TeXMathStream wi(ots, false, false, TeXMathStream::wsDefault);
        oss << "Formula ";
        write(wi);
        os << to_utf8(oss.str());
@@ -2348,7 +2348,7 @@ int InsetMathHull::plaintext(odocstringstream & os,
        odocstringstream oss;
        otexrowstream ots(oss);
        Encoding const * const enc = encodings.fromLyXName("utf8");
-       WriteStream wi(ots, false, true, WriteStream::wsDefault, enc);
+       TeXMathStream wi(ots, false, true, TeXMathStream::wsDefault, enc);
 
        // Fix Bug #6139
        if (type_ == hullRegexp)
@@ -2415,7 +2415,7 @@ void InsetMathHull::docbook(XMLStream & xs, OutputParams const & runparams) cons
        // Workaround for db2latex: db2latex always includes equations with
        // \ensuremath{} or \begin{display}\end{display}
        // so we strip LyX' math environment
-       WriteStream wi(ols, false, false, WriteStream::wsDefault, runparams.encoding);
+       TeXMathStream wi(ols, false, false, TeXMathStream::wsDefault, runparams.encoding);
        InsetMathGrid::write(wi);
        ms << from_utf8(subst(subst(to_utf8(ls.str()), "&", "&amp;"), "<", "&lt;"));
        ms << "</" << from_ascii("alt") << ">";
@@ -2541,7 +2541,7 @@ void InsetMathHull::mathmlize(MathMLStream & ms) const
 }
 
 
-void InsetMathHull::mathAsLatex(WriteStream & os) const
+void InsetMathHull::mathAsLatex(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os, false);
        bool havenumbers = haveNumbers();
@@ -2677,7 +2677,7 @@ docstring InsetMathHull::xhtml(XMLStream & xs, OutputParams const & op) const
                // $...$ or whatever.
                odocstringstream ls;
                otexrowstream ots(ls);
-               WriteStream wi(ots, false, true, WriteStream::wsPreview);
+               TeXMathStream wi(ots, false, true, TeXMathStream::wsPreview);
                ModeSpecifier specifier(wi, MATH_MODE);
                mathAsLatex(wi);
                docstring const latex = ls.str();
index 6901d6241c79d6fc3b076f5554abc93913c38e29..0b865be878df452d5651e4e980f79432c3c56827 100644 (file)
@@ -124,7 +124,7 @@ public:
        char displayColAlign(idx_type idx) const override;
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream &) const override;
        ///
@@ -133,9 +133,9 @@ public:
        ///
        void write(std::ostream & os) const override;
        ///
-       void header_write(WriteStream &) const;
+       void header_write(TeXMathStream &) const;
        ///
-       void footer_write(WriteStream &) const;
+       void footer_write(TeXMathStream &) const;
        ///
        void read(Lexer & lex) override;
        ///
@@ -152,7 +152,7 @@ public:
        ///
        void htmlize(HtmlStream &) const override;
        ///
-       void mathAsLatex(WriteStream &) const;
+       void mathAsLatex(TeXMathStream &) const;
        ///
        void toString(odocstream &) const override;
        ///
index 61ee6ee5b7db7cd7855fb887b1ac3450a4bd7aff..f99a210a9d398a76d821424ec3796392959e8c54 100644 (file)
@@ -57,7 +57,7 @@ void InsetMathKern::draw(PainterInfo &, int, int) const
 {}
 
 
-void InsetMathKern::write(WriteStream & os) const
+void InsetMathKern::write(TeXMathStream & os) const
 {
        if (wid_.empty())
                os << "\\kern" << ' ';
index 77bf4118ec13e787a9a756602ca9e9e310093932..c562250a363b00ab9b10c2074c8bcd5067ab7093 100644 (file)
@@ -36,7 +36,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream & ns) const override;
        ///
index 9c042beba8cc41c48b5e87fccb59e3c18cadd85f..98d307410fbc4919d55f38772ecd6792d7ac33c3 100644 (file)
@@ -71,7 +71,7 @@ void InsetMathLim::mathematica(MathematicaStream & os) const
 }
 
 
-void InsetMathLim::write(WriteStream &) const
+void InsetMathLim::write(TeXMathStream &) const
 {
        LYXERR0("should not happen");
 }
index 1aee218906a55c152226a085f5261b321095065c..57c482fa36c24456d8f924cb030dda6cdb88ae74 100644 (file)
@@ -40,7 +40,7 @@ public:
        ///
        void mathematica(MathematicaStream &) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        InsetCode lyxCode() const override { return MATH_LIM_CODE; }
 
index 0d3e5d9a394f5f64effea50104bfd6c69180ccf8..a21460091fda3e6cbe0f2a9d0000c3b7cff82d5d 100644 (file)
@@ -1133,7 +1133,7 @@ bool InsetMathMacro::folded() const
 }
 
 
-void InsetMathMacro::write(WriteStream & os) const
+void InsetMathMacro::write(TeXMathStream & os) const
 {
        mode_type mode = currentMode();
        MathEnsurer ensurer(os, mode == MATH_MODE, true, mode == TEXT_MODE);
index a2677d76357e9dfd65203845e4b034ea061a63a4..6ab13469c253772372ac6ae4ee0e68bd65c2b341 100644 (file)
@@ -95,7 +95,7 @@ public:
        mode_type currentMode() const override;
 
        /// Assumes that macros are up-to-date
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream & os) const override;
        ///
index 7fca256d01ed5719f398e0ced285b3a6a905a7bc..7352b3ac8712afef28c71060675801112ff4d5a0 100644 (file)
@@ -28,7 +28,7 @@ Inset * InsetMathHash::clone() const
 }
 
 
-void InsetMathHash::write(WriteStream & os) const
+void InsetMathHash::write(TeXMathStream & os) const
 {
        os << str_;
 }
index c0839c0464050d04e85a665aebef23976364c1a4..441ac3266fbf98365c674a61c5e5f2ab5bf989dd 100644 (file)
@@ -32,7 +32,7 @@ public:
        ///
        void normalize(NormalStream &) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
 
 private:
        Inset * clone() const override;
index 7b24784ae965378a1360dc8162ee0881faaf8a7e..3525ba4e8c6f03d77c4ae31f00ca56907bc8f918 100644 (file)
@@ -1170,20 +1170,20 @@ void InsetMathMacroTemplate::write(ostream & os) const
 {
        odocstringstream oss;
        otexrowstream ots(oss);
-       WriteStream wi(ots, false, false, WriteStream::wsDefault);
+       TeXMathStream wi(ots, false, false, TeXMathStream::wsDefault);
        oss << "FormulaMacro\n";
        write(wi);
        os << to_utf8(oss.str());
 }
 
 
-void InsetMathMacroTemplate::write(WriteStream & os) const
+void InsetMathMacroTemplate::write(TeXMathStream & os) const
 {
        write(os, false);
 }
 
 
-int InsetMathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) const
+int InsetMathMacroTemplate::write(TeXMathStream & os, bool overwriteRedefinition) const
 {
        int num_lines = 0;
 
index 09408968d687caf33f837257171feae5bc8f87d0..105dcfb7ff938192161c09223354ef2e6c6b2e0b 100644 (file)
@@ -47,10 +47,10 @@ public:
        ///
        void write(std::ostream & os) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// Output LaTeX code, but assume that the macro is not defined yet
        /// if overwriteRedefinition is true
-       int write(WriteStream & os, bool overwriteRedefinition) const;
+       int write(TeXMathStream & os, bool overwriteRedefinition) const;
        /// Nothing happens. This is simply to suppress the default output.
        docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
index 6ee9586307292b32ce39d5cda7e2eddc82ae96ce..72d58d3d05c376726de046fb42f651b1c40aa654 100644 (file)
@@ -32,7 +32,7 @@ Inset * InsetMathMatrix::clone() const
 }
 
 
-void InsetMathMatrix::write(WriteStream & os) const
+void InsetMathMatrix::write(TeXMathStream & os) const
 {
        InsetMathGrid::write(os);
 }
index 8750079380ca7e8cab972f9e8620e60ce2800a32..6aa44c1d5ca30060ae3a7c402e8beb57928a8d94 100644 (file)
@@ -30,7 +30,7 @@ public:
        InsetMathMatrix const * asMatrixInset() const override { return this; }
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream &) const override;
        ///
index 5cce553f296eb2da8e6d4348183837a63145b907..406bd93d997bfe8f48ac2ec36330a434fc730aa7 100644 (file)
@@ -255,7 +255,7 @@ void InsetMathNest::dump() const
 {
        odocstringstream oss;
        otexrowstream ots(oss);
-       WriteStream os(ots);
+       TeXMathStream os(ots);
        os << "---------------------------------------------\n";
        write(os);
        os << "\n";
@@ -326,7 +326,7 @@ MathData InsetMathNest::glue() const
 }
 
 
-void InsetMathNest::write(WriteStream & os) const
+void InsetMathNest::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os, currentMode() == MATH_MODE);
        ModeSpecifier specifier(os, currentMode(), lockedMode());
@@ -358,16 +358,16 @@ void InsetMathNest::normalize(NormalStream & os) const
 
 void InsetMathNest::latex(otexstream & os, OutputParams const & runparams) const
 {
-       WriteStream wi(os, runparams.moving_arg, true,
-                       runparams.dryrun ? WriteStream::wsDryrun : WriteStream::wsDefault,
-                       runparams.encoding);
+       TeXMathStream wi(os, runparams.moving_arg, true,
+                        runparams.dryrun ? TeXMathStream::wsDryrun : TeXMathStream::wsDefault,
+                        runparams.encoding);
        wi.strikeoutMath(runparams.inDeletedInset);
        if (runparams.inulemcmd) {
-               wi.ulemCmd(WriteStream::UNDERLINE);
+               wi.ulemCmd(TeXMathStream::UNDERLINE);
                if (runparams.local_font) {
                        FontInfo f = runparams.local_font->fontInfo();
                        if (f.strikeout() == FONT_ON)
-                               wi.ulemCmd(WriteStream::STRIKEOUT);
+                               wi.ulemCmd(TeXMathStream::STRIKEOUT);
                }
        }
        wi.canBreakLine(os.canBreakLine());
index 0a6579011ed7c0f550d8dc205be179bb7e78f1e3..06675f1a43408c04614e5e09af045f0dcf4db1ad 100644 (file)
@@ -104,7 +104,7 @@ public:
        void dump() const override;
 
        /// writes \\, name(), and args in braces and '\\lyxlock' if necessary
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// writes [, name(), and args in []
        void normalize(NormalStream & os) const override;
        ///
index 3b10c7a45b4d152079a90ef5ff20b9dcf8790516..f5702ab71d8510069e0275fd156047b43872fdee 100644 (file)
@@ -82,7 +82,7 @@ void InsetMathNumber::htmlize(HtmlStream & os) const
 }
 
 
-void InsetMathNumber::write(WriteStream & os) const
+void InsetMathNumber::write(TeXMathStream & os) const
 {
        os << str_;
 }
index 8470d4b03fdf7dc558abdc252004cde0c710e151..1b1f059bc09b213a95b22bb314a363642081914a 100644 (file)
@@ -47,7 +47,7 @@ public:
        ///
        void htmlize(HtmlStream &) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        InsetCode lyxCode() const override { return MATH_NUMBER_CODE; }
 
index a00888e1f6c8d316a34157d0cdab622bd4269def..583ae85ddeb8f5f98b45fac3dc42327c04ef654f 100644 (file)
@@ -88,7 +88,7 @@ bool InsetMathOverset::idxLast(Cursor & cur) const
 }
 
 
-void InsetMathOverset::write(WriteStream & os) const
+void InsetMathOverset::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        if (os.fragile())
index 9925bad6c8d9cdcac88de25d653e5944574b4de2..d893e781f34d0866f256cf5d8af188e099ce6e67 100644 (file)
@@ -34,7 +34,7 @@ public:
        ///
        bool idxLast(Cursor &) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream &) const override;
        ///
index e1227ac4af12cb3531b397a4ff7a60c4aec67a02..2e72a02b2128c9a26ade3aa91c4ea6b4358ce0af 100644 (file)
@@ -42,7 +42,7 @@ void InsetMathPar::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathPar::write(WriteStream & os) const
+void InsetMathPar::write(TeXMathStream & os) const
 {
        for (idx_type i = 0; i < nargs(); ++i)
                os << cell(i) << "\n";
index 36d3e9e7e3cdeebd41568ab279fd8fc9a66a7a20..9c8a2d2ac1276eb8bf002c18eb1087f5acbc2639 100644 (file)
@@ -33,7 +33,7 @@ public:
        ///
        void infoize(odocstream & os) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        InsetCode lyxCode() const override { return MATH_PAR_CODE; }
 
index fcb0bc50f134de38b920536d871c4f86e2b6e061..ed9cfd8cc903b270c4c0c4e3eefe4ad61fcec810 100644 (file)
@@ -249,7 +249,7 @@ void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathPhantom::write(WriteStream & os) const
+void InsetMathPhantom::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        if (os.fragile())
index c4a6a8e108f4e737643d0a1d49945ade34bceddd..b31500e644b2383c153c4be9404bc385d84b2abd 100644 (file)
@@ -38,7 +38,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// write normalized content
        void normalize(NormalStream & ns) const override;
        ///
index 33df8bc96d50b670e7f78f300bd7a1f444c9056d..acbe47b84dbf58dd12ab252ef2f88738ac819acb 100644 (file)
@@ -29,7 +29,7 @@ public:
        ///
        void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
        ///
-       //void write(WriteStream & os) const override;
+       //void write(TeXMathStream & os) const override;
        ///
        void infoize(odocstream & os) const override;
        ///
index 4ab30583774ab5c98cdc662d0e232b6d78011548..2c90e5ba5945b032050edab3bf4d55db83b270c3 100644 (file)
@@ -132,7 +132,7 @@ void InsetMathRoot::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathRoot::write(WriteStream & os) const
+void InsetMathRoot::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "\\sqrt[" << cell(1) << "]{" << cell(0) << '}';
index ad57e8e3bf941cfc9737a51ab0191faa3aea1612..10c621b988dd646a24975c49cd3438e2a469e7c8 100644 (file)
@@ -41,7 +41,7 @@ public:
        void draw(PainterInfo & pi, int x, int y) const override;
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream &) const override;
        ///
index 0b82d05c12ed7c86613fed7cfea3bafaec8bec85..01c91a3cd491c7f5bc8e39af46d8ba65a9a0fe97 100644 (file)
@@ -505,7 +505,7 @@ bool InsetMathScript::idxUpDown(Cursor & cur, bool up) const
 }
 
 
-void InsetMathScript::write(WriteStream & os) const
+void InsetMathScript::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
 
index 909fd768d2c6452dcc4733824df124edee74c0d6..9615d1997927e37adbe8c3196f07507721e6cc59 100644 (file)
@@ -57,7 +57,7 @@ public:
        size_type lastIdx() const override { return 0; }
 
        /// write LaTeX and Lyx code
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// write normalized content
        void normalize(NormalStream &) const override;
        /// write content as something readable by Maple
index df7f43d14d951cd4406f365405d48c196a567b5c..bf3f6cb41af354460919e2b42a007a191122ecf8 100644 (file)
@@ -334,7 +334,7 @@ bool InsetMathSideset::idxUpDown(Cursor & cur, bool up) const
 }
 
 
-void InsetMathSideset::write(WriteStream & os) const
+void InsetMathSideset::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
 
index c32c1330323d25c727e2f619df06519c389b0923..f084d61c48078e85aa1b3081f8614386512aa284 100644 (file)
@@ -50,7 +50,7 @@ public:
        size_type lastIdx() const override { return 0; }
 
        /// write LaTeX and Lyx code
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// write normalized content
        void normalize(NormalStream &) const override;
        /// write content as MathML
index 195a4545f4a6ce779c46623799797f56ca8d3096..5055f2d73e6c2612d7e9b5402ce4a8deb7f2a775 100644 (file)
@@ -59,7 +59,7 @@ void InsetMathSize::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathSize::write(WriteStream & os) const
+void InsetMathSize::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "{\\" << key_->name << ' ' << cell(0) << '}';
index 48d1e7595385de8a6bb75032a5f9122b7e08399f..7073f5da15b3ba40515a26093f477a3cf9a47c49 100644 (file)
@@ -35,7 +35,7 @@ public:
        void draw(PainterInfo &, int x, int y) const override;
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream &) const override;
        ///
index f639218687c84b3079453b080989511838a4d991..d053b68d412ac67409327614595b2b4cedf2bdec 100644 (file)
@@ -266,7 +266,7 @@ void InsetMathSpace::normalize(NormalStream & os) const
 }
 
 
-void InsetMathSpace::write(WriteStream & os) const
+void InsetMathSpace::write(TeXMathStream & os) const
 {
        // All kinds work in text and math mode, so simply suspend
        // writing a possibly pending mode closing brace.
index 1b0fc037edc20a8d712dc5c37ee30021fe40da64..283237d4f33e1d6697e7d52a2b63a61030f6cf1f 100644 (file)
@@ -56,7 +56,7 @@ public:
        ///
        void htmlize(HtmlStream & ms) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        /// generate something that will be understood by the Dialogs.
        InsetSpaceParams params() const;
        ///
index d901b213b9ac5b63e8566c22f007c845abaadbad..3fc796f8347a7886aa6943481a1746772c7b7801 100644 (file)
@@ -91,7 +91,7 @@ void InsetMathSpecialChar::drawT(TextPainter & pain, int x, int y) const
 }
 
 
-void InsetMathSpecialChar::write(WriteStream & os) const
+void InsetMathSpecialChar::write(TeXMathStream & os) const
 {
        os << '\\' << name_;
        if (name_.size() != 1)
index 9f81ae6e40c361a24cdc9a6cecb452b51a48930c..d46e3456d78ec4c3e28a20ca654509db9c0905c1 100644 (file)
@@ -35,7 +35,7 @@ public:
        ///
        int kerning(BufferView const *) const override { return kerning_; }
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void validate(LaTeXFeatures & features) const override;
        ///
index 6099070178c920ee42b78e16910c93057d8c03e4..141b57bebf74d03bda36be1104cec122d078319d 100644 (file)
@@ -142,7 +142,7 @@ bool InsetMathSplit::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
-void InsetMathSplit::write(WriteStream & ws) const
+void InsetMathSplit::write(TeXMathStream & ws) const
 {
        MathEnsurer ensurer(ws);
        if (ws.fragile())
index f7c2f16dfe0618ccd968a30196a20a81b26a7c3d..73aa460763c75061e60019254c7b28e25f0943f5 100644 (file)
@@ -31,7 +31,7 @@ public:
        bool getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const override;
 
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void infoize(odocstream & os) const override;
        ///
index 51e1e2fe845043b3fc5c6b3538182a3e06d8944d..7cfe028c242cec0c09ba42083db3f9a1ecba29ff 100644 (file)
@@ -69,7 +69,7 @@ void InsetMathSqrt::drawT(TextPainter & /*pain*/, int /*x*/, int /*y*/) const
 }
 
 
-void InsetMathSqrt::write(WriteStream & os) const
+void InsetMathSqrt::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "\\sqrt{" << cell(0) << '}';
index 1a299a64dee55eaa92399a74424827d64771452b..e2cfd5bd12cd16796f58a196be6bbad355b87116 100644 (file)
@@ -34,7 +34,7 @@ public:
        void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override;
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream &) const override;
        ///
index e9b974cd0f6dbc79c682f39bf37047312b643bf6..5c0c2dcd4b0238999a2464b88902f5f1ee8f722c 100644 (file)
@@ -122,7 +122,7 @@ void InsetMathStackrel::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathStackrel::write(WriteStream & os) const
+void InsetMathStackrel::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "\\stackrel";
index 6af7fbdaa01faf7b3ea508d61df85531f578d934..e7d6787ac6c9ce6aa4beee07d468c99635f627cf 100644 (file)
@@ -34,7 +34,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void normalize(NormalStream &) const override;
        ///
index ef403f452a8f0610b2ea7490930e3d19d6a42c73..2a80e546bef03b5ce4ebee44e3ada37d06187c5a 100644 (file)
@@ -101,7 +101,7 @@ void InsetMathString::mathmlize(MathMLStream &) const
 }
 
 
-void InsetMathString::write(WriteStream & os) const
+void InsetMathString::write(TeXMathStream & os) const
 {
        writeString(str_, os);
 }
index ad18fae0e751df7b1288852d0d5c27e76afe9a19..02ce7f039c55fd3273235b7ca8e804692f612274 100644 (file)
@@ -49,7 +49,7 @@ public:
        ///
        void mathmlize(MathMLStream &) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        InsetCode lyxCode() const override { return MATH_STRING_CODE; }
 
index f44bf9f78008f1da66a13954af65377e69ac7b4e..ed90338fb6934e3ce97257ddd554967be8da2d03 100644 (file)
@@ -97,7 +97,7 @@ void InsetMathSubstack::infoize(odocstream & os) const
 }
 
 
-void InsetMathSubstack::write(WriteStream & os) const
+void InsetMathSubstack::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "\\substack{";
index 1950acd4fa74d486d8a83605f33aa3cef8467980..4f0a9e79dbac090eca76bf601d905ac295b36228 100644 (file)
@@ -37,7 +37,7 @@ public:
        ///
        void infoize(odocstream & os) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void mathmlize(MathMLStream &) const override;
        ///
index f8315391dfce9b4f7e982ef11646056fbaa1c7b8..291dabb3b9d037e85d1ce57b8ea69dfb7295abc6 100644 (file)
@@ -205,7 +205,7 @@ void InsetMathSymbol::octave(OctaveStream & os) const
 }
 
 
-void InsetMathSymbol::write(WriteStream & os) const
+void InsetMathSymbol::write(TeXMathStream & os) const
 {
        unique_ptr<MathEnsurer> ensurer;
        if (currentMode() != TEXT_MODE)
index 00458c34db9eeeae01f65816d7110783a813dc06..f894782ab5c1366fe195f6ec3a0b5c81c20f49eb 100644 (file)
@@ -72,7 +72,7 @@ public:
        ///
        void octave(OctaveStream &) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void infoize2(odocstream & os) const override;
        ///
index 565a71fb186baba5ae373f29e9e983de9455eac6..3daac36c21ef09b10d3562194e3511ebd76dc4c0 100644 (file)
@@ -56,7 +56,7 @@ void InsetMathTabular::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathTabular::write(WriteStream & os) const
+void InsetMathTabular::write(TeXMathStream & os) const
 {
        ModeSpecifier specifier(os, TEXT_MODE);
 
index 26676754a949c5bb5efe4bf2b6923492b34530e5..b2394d24183e7238b4baabca4d59a8a1211961b9 100644 (file)
@@ -36,7 +36,7 @@ public:
        InsetMathTabular const * asTabularInset() const { return this; }
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void infoize(odocstream & os) const override;
        ///
index bb628fb5a85e436b9351f476e46e759f9446a335..970f82456b79d7d89a342ae55c3ca7799d9da7f0 100644 (file)
@@ -77,7 +77,7 @@ bool InsetMathUnderset::idxLast(Cursor & cur) const
 }
 
 
-void InsetMathUnderset::write(WriteStream & os) const
+void InsetMathUnderset::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        if (os.fragile())
index f84c4814dc1e177bb87226ea4b1dcd284f927b09..9f77a50e421cdffc4d19a82f258cf8a8f13b402b 100644 (file)
@@ -32,7 +32,7 @@ public:
        ///
        bool idxLast(Cursor &) const override;
        ///
-       void write(WriteStream & ws) const override;
+       void write(TeXMathStream & ws) const override;
        ///
        void normalize(NormalStream & ns) const override;
        ///
index 2de93f79909fe4e01807e81f9849e877ee162965..a9ed6b0004393db8a6120147abd0082794271cd7 100644 (file)
@@ -68,7 +68,7 @@ void InsetMathXArrow::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathXArrow::write(WriteStream & os) const
+void InsetMathXArrow::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << '\\' << name_;
index b3bd67e10f9d8f98a7156d4d13c0ee5e49183d8b..3e5c4846a95889e68149ed14b671f9bb99705469 100644 (file)
@@ -26,7 +26,7 @@ public:
        ///
        void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
index 036f54aa9d85ea166d0f428b571d1148962e7613..7e35fe92e12691de0beba9f7569cdb0e3e0a16e8 100644 (file)
@@ -63,7 +63,7 @@ void InsetMathXYMatrix::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathXYMatrix::write(WriteStream & os) const
+void InsetMathXYMatrix::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        os << "\\xymatrix";
index 95be0fe3ce99ed5a8f3996ebb35428216b084191..589aea90b70ff12a1424fcd12a325f063feb0cb6 100644 (file)
@@ -37,7 +37,7 @@ public:
        int rowsep() const override;
 
        ///
-       void write(WriteStream & os) const override;
+       void write(TeXMathStream & os) const override;
        ///
        void infoize(odocstream & os) const override;
        ///
index 218c8492e284a83a5f76ca5dde60f77655592d0e..1cc5a1521fe2992169a2697bcddee5ea3e225643 100644 (file)
@@ -204,7 +204,7 @@ int MacroData::write(odocstream & os, bool overwriteRedefinition) const
        InsetMathMacroTemplate const & tmpl =
                static_cast<InsetMathMacroTemplate const &>(*inset);
        otexrowstream ots(os);
-       WriteStream wi(ots, false, true, WriteStream::wsDefault);
+       TeXMathStream wi(ots, false, true, TeXMathStream::wsDefault);
        return tmpl.write(wi, overwriteRedefinition);
 }
 
index 42a2d25f43a195824cd1783dd8bc93744b302674..0df0ece6aef4e679401487ed461771600d273f95 100644 (file)
@@ -1395,7 +1395,7 @@ namespace {
 
 } // namespace
 
-void write(MathData const & dat, WriteStream & wi)
+void write(MathData const & dat, TeXMathStream & wi)
 {
        wi.firstitem() = true;
        docstring s;
@@ -1419,7 +1419,7 @@ void write(MathData const & dat, WriteStream & wi)
 }
 
 
-void writeString(docstring const & s, WriteStream & os)
+void writeString(docstring const & s, TeXMathStream & os)
 {
        if (!os.latex()) {
                os << (os.asciiOnly() ? escape(s) : s);
@@ -1436,14 +1436,14 @@ void writeString(docstring const & s, WriteStream & os)
                                os.pendingSpace(space);
                        } catch (EncodingException const & e) {
                                switch (os.output()) {
-                               case WriteStream::wsDryrun: {
+                               case TeXMathStream::wsDryrun: {
                                        os << "<" << _("LyX Warning: ")
                                           << _("uncodable character") << " '";
                                        os << docstring(1, e.failed_char);
                                        os << "'>";
                                        break;
                                }
-                               case WriteStream::wsPreview: {
+                               case TeXMathStream::wsPreview: {
                                        // indicate the encoding error by a boxed '?'
                                        os << "{\\fboxsep=1pt\\fbox{?}}";
                                        LYXERR0("Uncodable character" << " '"
@@ -1451,7 +1451,7 @@ void writeString(docstring const & s, WriteStream & os)
                                                << "'");
                                        break;
                                }
-                               case WriteStream::wsDefault:
+                               case TeXMathStream::wsDefault:
                                default:
                                        // throw again
                                        throw;
@@ -1510,14 +1510,14 @@ void writeString(docstring const & s, WriteStream & os)
                                os.pendingSpace(true);
                } catch (EncodingException const & e) {
                        switch (os.output()) {
-                       case WriteStream::wsDryrun: {
+                       case TeXMathStream::wsDryrun: {
                                os << "<" << _("LyX Warning: ")
                                   << _("uncodable character") << " '";
                                os << docstring(1, e.failed_char);
                                os << "'>";
                                break;
                        }
-                       case WriteStream::wsPreview: {
+                       case TeXMathStream::wsPreview: {
                                // indicate the encoding error by a boxed '?'
                                os << "{\\fboxsep=1pt\\fbox{?}}";
                                LYXERR0("Uncodable character" << " '"
@@ -1525,7 +1525,7 @@ void writeString(docstring const & s, WriteStream & os)
                                        << "'");
                                break;
                        }
-                       case WriteStream::wsDefault:
+                       case TeXMathStream::wsDefault:
                        default:
                                // throw again
                                throw;
index 973f026a1e1d2115bd1124e87b30038dac520a3a..2544ebf811f4b8305eec12b1caadf8f06d3d0a3c 100644 (file)
@@ -23,10 +23,10 @@ class MaximaStream;
 class MathematicaStream;
 class MathMLStream;
 class OctaveStream;
-class WriteStream;
+class TeXMathStream;
 class MathData;
 
-void write(MathData const &, WriteStream &);
+void write(MathData const &, TeXMathStream &);
 void htmlize(MathData const &, HtmlStream &);
 void normalize(MathData const &, NormalStream &);
 void maple(MathData const &, MapleStream &);
@@ -39,7 +39,7 @@ bool extractNumber(MathData const & ar, int & i);
 bool extractNumber(MathData const & ar, double & i);
 
 /// Write \p s (which may contain math or text contents in LaTeX syntax) to \p os
-void writeString(docstring const & s, WriteStream & os);
+void writeString(docstring const & s, TeXMathStream & os);
 
 MathData pipeThroughExtern(std::string const & language,
        docstring const & extra, MathData const & ar);
index 9a8ab051964489a211c1a7cdde4004acadcbf49f..18e4c06f0ad6aa5b612c90b6a0ae64618e2df31a 100644 (file)
@@ -380,7 +380,7 @@ void initMath()
 }
 
 
-bool ensureMath(WriteStream & os, bool needs_mathmode, bool macro,
+bool ensureMath(TeXMathStream & os, bool needs_mathmode, bool macro,
                 bool textmode_macro)
 {
        bool brace = os.pendingBrace();
@@ -420,8 +420,8 @@ bool ensureMath(WriteStream & os, bool needs_mathmode, bool macro,
 }
 
 
-int ensureMode(WriteStream & os, InsetMath::mode_type mode,
-               bool locked, bool ascii)
+int ensureMode(TeXMathStream & os, InsetMath::mode_type mode,
+               bool locked, bool ascii)
 {
        bool textmode = mode == InsetMath::TEXT_MODE;
        if (os.latex() && textmode && os.pendingBrace()) {
index 43e4a3e570a53e1b6fc6486959a3c0f807542a55..51ac98486795718acdcf3c7c3e75ac52a0444425 100644 (file)
@@ -88,7 +88,7 @@ NormalStream & operator<<(NormalStream & ns, int i)
 /////////////////////////////////////////////////////////////////
 
 
-WriteStream & operator<<(WriteStream & ws, docstring const & s)
+TeXMathStream & operator<<(TeXMathStream & ws, docstring const & s)
 {
        // Skip leading '\n' if we had already output a newline char
        size_t const first =
@@ -126,14 +126,14 @@ WriteStream & operator<<(WriteStream & ws, docstring const & s)
 }
 
 
-WriteStream::WriteStream(otexrowstream & os, bool fragile, bool latex,
-                                                OutputType output, Encoding const * encoding)
+TeXMathStream::TeXMathStream(otexrowstream & os, bool fragile, bool latex,
+                             OutputType output, Encoding const * encoding)
        : os_(os), fragile_(fragile), latex_(latex),
          output_(output), encoding_(encoding)
 {}
 
 
-WriteStream::~WriteStream()
+TeXMathStream::~TeXMathStream()
 {
        if (pendingbrace_)
                os_ << '}';
@@ -142,49 +142,49 @@ WriteStream::~WriteStream()
 }
 
 
-void WriteStream::addlines(unsigned int n)
+void TeXMathStream::addlines(unsigned int n)
 {
        line_ += n;
 }
 
 
-void WriteStream::pendingSpace(bool how)
+void TeXMathStream::pendingSpace(bool how)
 {
        pendingspace_ = how;
 }
 
 
-void WriteStream::pendingBrace(bool brace)
+void TeXMathStream::pendingBrace(bool brace)
 {
        pendingbrace_ = brace;
 }
 
 
-void WriteStream::textMode(bool textmode)
+void TeXMathStream::textMode(bool textmode)
 {
        textmode_ = textmode;
 }
 
 
-void WriteStream::lockedMode(bool locked)
+void TeXMathStream::lockedMode(bool locked)
 {
        locked_ = locked;
 }
 
 
-void WriteStream::asciiOnly(bool ascii)
+void TeXMathStream::asciiOnly(bool ascii)
 {
        ascii_ = ascii;
 }
 
 
-Changer WriteStream::changeRowEntry(TexRow::RowEntry entry)
+Changer TeXMathStream::changeRowEntry(TexRow::RowEntry entry)
 {
        return changeVar(row_entry_, entry);
 }
 
 
-bool WriteStream::startOuterRow()
+bool TeXMathStream::startOuterRow()
 {
        if (TexRow::isNone(row_entry_))
                return false;
@@ -192,28 +192,28 @@ bool WriteStream::startOuterRow()
 }
 
 
-WriteStream & operator<<(WriteStream & ws, MathAtom const & at)
+TeXMathStream & operator<<(TeXMathStream & ws, MathAtom const & at)
 {
        at->write(ws);
        return ws;
 }
 
 
-WriteStream & operator<<(WriteStream & ws, MathData const & ar)
+TeXMathStream & operator<<(TeXMathStream & ws, MathData const & ar)
 {
        write(ar, ws);
        return ws;
 }
 
 
-WriteStream & operator<<(WriteStream & ws, char const * s)
+TeXMathStream & operator<<(TeXMathStream & ws, char const * s)
 {
        ws << from_utf8(s);
        return ws;
 }
 
 
-WriteStream & operator<<(WriteStream & ws, char c)
+TeXMathStream & operator<<(TeXMathStream & ws, char c)
 {
        if (c == '\n' && !ws.canBreakLine())
                return ws;
@@ -238,7 +238,7 @@ WriteStream & operator<<(WriteStream & ws, char c)
 }
 
 
-WriteStream & operator<<(WriteStream & ws, int i)
+TeXMathStream & operator<<(TeXMathStream & ws, int i)
 {
        if (ws.pendingBrace()) {
                ws.os() << '}';
@@ -251,7 +251,7 @@ WriteStream & operator<<(WriteStream & ws, int i)
 }
 
 
-WriteStream & operator<<(WriteStream & ws, unsigned int i)
+TeXMathStream & operator<<(TeXMathStream & ws, unsigned int i)
 {
        if (ws.pendingBrace()) {
                ws.os() << '}';
index 56df9b40a3027dafd32db0eb6f76569145129fee..aa1f71a4616ea5831df08abf1d39932aac60b652 100644 (file)
@@ -31,7 +31,7 @@ class MathData;
 // LaTeX/LyX
 //
 
-class WriteStream {
+class TeXMathStream {
 public:
        ///
        enum OutputType {
@@ -46,11 +46,11 @@ public:
                STRIKEOUT
        };
        ///
-       explicit WriteStream(otexrowstream & os, bool fragile = false,
-                            bool latex = false, OutputType output = wsDefault,
-                            Encoding const * encoding = nullptr);
+       explicit TeXMathStream(otexrowstream & os, bool fragile = false,
+                              bool latex = false, OutputType output = wsDefault,
+                              Encoding const * encoding = nullptr);
        ///
-       ~WriteStream();
+       ~TeXMathStream();
        ///
        int line() const { return line_; }
        ///
@@ -149,26 +149,26 @@ private:
 };
 
 ///
-WriteStream & operator<<(WriteStream &, MathAtom const &);
+TeXMathStream & operator<<(TeXMathStream &, MathAtom const &);
 ///
-WriteStream & operator<<(WriteStream &, MathData const &);
+TeXMathStream & operator<<(TeXMathStream &, MathData const &);
 ///
-WriteStream & operator<<(WriteStream &, docstring const &);
+TeXMathStream & operator<<(TeXMathStream &, docstring const &);
 ///
-WriteStream & operator<<(WriteStream &, char const * const);
+TeXMathStream & operator<<(TeXMathStream &, char const * const);
 ///
-WriteStream & operator<<(WriteStream &, char);
+TeXMathStream & operator<<(TeXMathStream &, char);
 ///
-WriteStream & operator<<(WriteStream &, int);
+TeXMathStream & operator<<(TeXMathStream &, int);
 ///
-WriteStream & operator<<(WriteStream &, unsigned int);
+TeXMathStream & operator<<(TeXMathStream &, unsigned int);
 
 /// ensure correct mode, possibly by opening \ensuremath or \lyxmathsym
-bool ensureMath(WriteStream & os, bool needs_mathmode = true,
+bool ensureMath(TeXMathStream & os, bool needs_mathmode = true,
                 bool macro = false, bool textmode_macro = false);
 
 /// ensure the requested mode, possibly by closing \ensuremath or \lyxmathsym
-int ensureMode(WriteStream & os, InsetMath::mode_type mode, bool locked, bool ascii);
+int ensureMode(TeXMathStream & os, InsetMath::mode_type mode, bool locked, bool ascii);
 
 
 /**
@@ -222,14 +222,14 @@ class MathEnsurer
 {
 public:
        ///
-       explicit MathEnsurer(WriteStream & os, bool needs_mathmode = true,
+       explicit MathEnsurer(TeXMathStream & os, bool needs_mathmode = true,
                             bool macro = false, bool textmode_macro = false)
                : os_(os), brace_(ensureMath(os, needs_mathmode, macro, textmode_macro)) {}
        ///
        ~MathEnsurer() { os_.pendingBrace(brace_); }
 private:
        ///
-       WriteStream & os_;
+       TeXMathStream & os_;
        ///
        bool brace_;
 };
@@ -274,8 +274,8 @@ class ModeSpecifier
 {
 public:
        ///
-       explicit ModeSpecifier(WriteStream & os, InsetMath::mode_type mode,
-                               bool locked = false, bool ascii = false)
+       explicit ModeSpecifier(TeXMathStream & os, InsetMath::mode_type mode,
+                              bool locked = false, bool ascii = false)
                : os_(os), oldmodes_(ensureMode(os, mode, locked, ascii)) {}
        ///
        ~ModeSpecifier()
@@ -286,7 +286,7 @@ public:
        }
 private:
        ///
-       WriteStream & os_;
+       TeXMathStream & os_;
        ///
        int oldmodes_;
 };
index acc952324366a88a45f471f925dd07c4f7b83ac5..a7f66a7c7ca1e0a458dd0f46d331ac6a00b7cdf6 100644 (file)
@@ -992,7 +992,7 @@ docstring asString(MathData const & ar)
 {
        odocstringstream os;
        otexrowstream ots(os);
-       WriteStream ws(ots);
+       TeXMathStream ws(ots);
        ws << ar;
        return os.str();
 }
@@ -1015,7 +1015,7 @@ docstring asString(InsetMath const & inset)
 {
        odocstringstream os;
        otexrowstream ots(os);
-       WriteStream ws(ots);
+       TeXMathStream ws(ots);
        inset.write(ws);
        return os.str();
 }
@@ -1025,7 +1025,7 @@ docstring asString(MathAtom const & at)
 {
        odocstringstream os;
        otexrowstream ots(os);
-       WriteStream ws(ots);
+       TeXMathStream ws(ots);
        at->write(ws);
        return os.str();
 }