Coverage Report

Created: 2025-07-07 10:01

/src/libreoffice/include/oox/mathml/imexport.hxx
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
 * This file is part of the LibreOffice project.
4
 *
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/.
8
 */
9
#ifndef INCLUDED_OOX_MATHML_IMEXPORT_HXX
10
#define INCLUDED_OOX_MATHML_IMEXPORT_HXX
11
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>
20
21
namespace oox
22
{
23
24
namespace formulaimport
25
{
26
class XmlStream;
27
}
28
29
/**
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.
33
 */
34
class OOX_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") FormulaImExportBase
35
{
36
public:
37
    virtual void readFormulaOoxml( oox::formulaimport::XmlStream& stream ) = 0;
38
    virtual Size getFormulaSize() const = 0; // Unit is mm100
39
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 };
45
46
protected:
47
    FormulaImExportBase();
48
49
27.7k
    ~FormulaImExportBase() {}
50
};
51
52
namespace core { class ContextHandler; }
53
namespace drawingml { class TextParagraph; }
54
55
::rtl::Reference<core::ContextHandler> CreateLazyMathBufferingContext(
56
        core::ContextHandler const& rParent, drawingml::TextParagraph & rPara);
57
58
} // namespace
59
60
#endif
61
62
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */