1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 #ifndef INCLUDED_OOX_MATHML_IMEXPORT_HXX
10 #define INCLUDED_OOX_MATHML_IMEXPORT_HXX
12 #include <oox/core/filterbase.hxx>
13 #include <oox/dllapi.h>
14 #include <oox/export/utils.hxx>
15 #include <rtl/ref.hxx>
16 #include <rtl/strbuf.hxx>
17 #include <rtl/textenc.h>
18 #include <sax/fshelper.hxx>
19 #include <tools/gen.hxx>
24 namespace formulaimport
30 Interface class, StarMath will implement readFormulaOoxml() to read OOXML
31 representing the formula, getFormulaSize() to provide the size of the resulting
32 formula, and writeFormula*() to write out markup representing the formula.
34 class OOX_DLLPUBLIC
SAL_LOPLUGIN_ANNOTATE("crosscast") FormulaImExportBase
37 virtual void readFormulaOoxml( oox::formulaimport::XmlStream
& stream
) = 0;
38 virtual Size
getFormulaSize() const = 0; // Unit is mm100
40 virtual void writeFormulaOoxml(::sax_fastparser::FSHelperPtr pSerializer
,
41 oox::core::OoxmlVersion version
,
42 oox::drawingml::DocumentType documentType
, sal_Int8 nAlign
) = 0;
43 virtual void writeFormulaRtf( OStringBuffer
& rBuffer
, rtl_TextEncoding nEncoding
) = 0;
44 enum eFormulaAlign
{ INLINE
, CENTER
, LEFT
, RIGHT
};
47 FormulaImExportBase();
49 ~FormulaImExportBase() {}
52 namespace core
{ class ContextHandler
; }
53 namespace drawingml
{ class TextParagraph
; }
55 ::rtl::Reference
<core::ContextHandler
> CreateLazyMathBufferingContext(
56 core::ContextHandler
const& rParent
, drawingml::TextParagraph
& rPara
);
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */