LibreOffice Module oox (master) 1
textparagraph.hxx
Go to the documentation of this file.
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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
21#define INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
22
23#include <memory>
24#include <com/sun/star/text/XTextCursor.hpp>
25#include <com/sun/star/text/XText.hpp>
26
29#include <drawingml/textrun.hxx>
32
33// The height the bullet is relative to is different in OOXML
34#define OOX_BULLET_LIST_SCALE_FACTOR 0.7f
35
36namespace oox::formulaimport {
37 class XmlStreamBuilder;
38}
39
40namespace oox::drawingml {
41
43
45{
46public:
49
51 const TextRunVector& getRuns() const { return maRuns; }
52 void addRun( const TextRunPtr & pRun ) { maRuns.push_back( pRun ); }
53
59 bool hasProperties() const { return mbHasProperties; }
60
63
65 const TextCharacterProperties& rTextStyleProperties,
66 const TextListStyle& rMasterTextListStyle,
67 const TextListStyle& rTextListStyle) const;
68
70 const TextListStyle& rTextListStyle) const;
71
72 void insertAt(
73 const ::oox::core::XmlFilterBase& rFilterBase,
74 const css::uno::Reference < css::text::XText > & xText,
75 const css::uno::Reference < css::text::XTextCursor > &xAt,
76 const TextCharacterProperties& rTextStyleProperties,
77 const TextListStyle& rMasterTextListStyle,
78 const TextListStyle& rTextListStyle,
79 bool bFirst,
80 float nDefaultCharHeight) const;
81
82 bool HasMathXml() const
83 {
84 return m_pMathXml != nullptr;
85 }
87
92 bool hasVisualRunProperties() const;
93
94private:
99 // temporarily store this here
100 std::unique_ptr<formulaimport::XmlStreamBuilder> m_pMathXml;
101};
102
103}
104
105#endif // INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
106
107/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const TextParagraphProperties & getProperties() const
void addRun(const TextRunPtr &pRun)
TextParagraphProperties maProperties
const TextCharacterProperties & getEndProperties() const
const TextRunVector & getRuns() const
TextCharacterProperties maEndProperties
bool hasVisualRunProperties() const
Returns whether textparagraph had a rPr tag in it that alters it visually.
TextParagraphProperties & getProperties()
TextCharacterProperties getCharacterStyle(const TextCharacterProperties &rTextStyleProperties, const TextListStyle &rMasterTextListStyle, const TextListStyle &rTextListStyle) const
std::unique_ptr< formulaimport::XmlStreamBuilder > m_pMathXml
void insertAt(const ::oox::core::XmlFilterBase &rFilterBase, const css::uno::Reference< css::text::XText > &xText, const css::uno::Reference< css::text::XTextCursor > &xAt, const TextCharacterProperties &rTextStyleProperties, const TextListStyle &rMasterTextListStyle, const TextListStyle &rTextListStyle, bool bFirst, float nDefaultCharHeight) const
bool hasProperties() const
Returns whether the textparagraph had an pPr tag in it during import.
void setHasProperties()
Flags the textparagraph as having a pPr tag in it.
TextParagraphProperties * getParagraphStyle(const TextListStyle &rTextListStyle) const
TextCharacterProperties & getEndProperties()
formulaimport::XmlStreamBuilder & GetMathXml()
This class is used for creating XmlStream.
std::shared_ptr< TextRun > TextRunPtr
Definition: textrun.hxx:65
RefVector< TextRun > TextRunVector