bump product version to 7.2.5.1
[LibreOffice.git] / oox / inc / drawingml / textparagraph.hxx
blobdf39f8841c76e7f257dc764a439a205aacf0a5f0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
21 #define INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
23 #include <memory>
24 #include <com/sun/star/text/XTextCursor.hpp>
25 #include <com/sun/star/text/XText.hpp>
27 #include <oox/core/xmlfilterbase.hxx>
28 #include <oox/helper/refvector.hxx>
29 #include <drawingml/textrun.hxx>
30 #include <drawingml/textliststyle.hxx>
31 #include <drawingml/textparagraphproperties.hxx>
33 // The height the bullet is relative to is different in OOXML
34 #define OOX_BULLET_LIST_SCALE_FACTOR 0.7f
36 namespace oox::formulaimport {
37 class XmlStreamBuilder;
40 namespace oox::drawingml {
42 typedef RefVector< TextRun > TextRunVector;
44 class TextParagraph
46 public:
47 TextParagraph();
48 ~TextParagraph();
50 TextRunVector& getRuns() { return maRuns; }
51 const TextRunVector& getRuns() const { return maRuns; }
52 void addRun( const TextRunPtr & pRun ) { maRuns.push_back( pRun ); }
54 TextParagraphProperties& getProperties() { return maProperties; }
55 const TextParagraphProperties& getProperties() const { return maProperties; }
57 TextCharacterProperties& getEndProperties() { return maEndProperties; }
58 const TextCharacterProperties& getEndProperties() const { return maEndProperties; }
60 TextCharacterProperties getCharacterStyle(
61 const TextCharacterProperties& rTextStyleProperties,
62 const TextListStyle& rTextListStyle) const;
64 TextParagraphProperties* getParagraphStyle(
65 const TextListStyle& rTextListStyle) const;
67 void insertAt(
68 const ::oox::core::XmlFilterBase& rFilterBase,
69 const css::uno::Reference < css::text::XText > & xText,
70 const css::uno::Reference < css::text::XTextCursor > &xAt,
71 const TextCharacterProperties& rTextStyleProperties,
72 const TextListStyle& rTextListStyle,
73 bool bFirst,
74 float nDefaultCharHeight) const;
76 bool HasMathXml() const
78 return m_pMathXml != nullptr;
80 formulaimport::XmlStreamBuilder & GetMathXml();
82 private:
83 TextParagraphProperties maProperties;
84 TextCharacterProperties maEndProperties;
85 TextRunVector maRuns;
86 // temporarily store this here
87 std::unique_ptr<formulaimport::XmlStreamBuilder> m_pMathXml;
92 #endif // INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */