LibreOffice Module oox (master)  1
textbody.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_TEXTBODY_HXX
21 #define INCLUDED_OOX_DRAWINGML_TEXTBODY_HXX
22 
27 #include <oox/helper/refvector.hxx>
28 
29 namespace com::sun::star::text {
30  class XText;
31  class XTextCursor;
32 }
33 
34 namespace oox::core { class XmlFilterBase; }
35 
36 namespace oox::drawingml {
37 
40 
41 class TextBody
42 {
43 public:
44  TextBody();
45  TextBody( const TextBodyPtr& pBody );
46 
47  const TextParagraphVector& getParagraphs() const { return maParagraphs; }
49 
50  const TextListStyle& getTextListStyle() const { return maTextListStyle; }
52 
55 
57  const Text3DProperties& get3DProperties() const { return ma3DProperties; }
58 
60  void insertAt(
61  const ::oox::core::XmlFilterBase& rFilterBase,
62  const css::uno::Reference < css::text::XText > & xText,
63  const css::uno::Reference < css::text::XTextCursor > & xAt,
64  const TextCharacterProperties& rTextStyleProperties,
65  const TextListStylePtr& pMasterTextListStyle ) const;
66  bool isEmpty() const;
67  OUString toString() const;
68 
73  bool hasVisualRunProperties() const;
74 
76  bool hasParagraphProperties() const;
77 
82 
85 
86  void ApplyStyleEmpty(
87  const ::oox::core::XmlFilterBase& rFilterBase,
88  const css::uno::Reference < css::text::XText > & xText,
89  const TextCharacterProperties& rTextStyleProperties,
90  const TextListStylePtr& pMasterTextListStylePtr) const;
91 protected:
92  TextParagraphVector maParagraphs;
98 };
99 
100 }
101 
102 #endif // INCLUDED_OOX_DRAWINGML_TEXTBODY_HXX
103 
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
TextParagraphVector maParagraphs
Definition: textbody.hxx:92
TextListStyle maTextListStyle
Definition: textbody.hxx:96
bool isEmpty() const
Definition: textbody.cxx:74
bool hasListStyleOnImport() const
Returns whether the lstStyle tag was non-empty on import.
TextBodyProperties & getTextProperties()
Definition: textbody.hxx:54
TextBodyProperties maTextProperties
Definition: textbody.hxx:93
bool hasListStyleOnImport() const
Returns whether the textbody had a non-empty lstStyle tag in it.
Definition: textbody.hxx:84
bool hasParagraphProperties() const
Returns whether the textbody had a pPr tag in it.
Definition: textbody.cxx:108
void ApplyStyleEmpty(const ::oox::core::XmlFilterBase &rFilterBase, const css::uno::Reference< css::text::XText > &xText, const TextCharacterProperties &rTextStyleProperties, const TextListStylePtr &pMasterTextListStylePtr) const
Definition: textbody.cxx:118
Text3DProperties ma3DProperties
Definition: textbody.hxx:97
TextParagraph & addParagraph()
Definition: textbody.cxx:46
bool hasVisualRunProperties() const
Returns whether the textbody had a rPr tag in it that alters it visually.
Definition: textbody.cxx:98
Text3DProperties & get3DProperties()
Definition: textbody.hxx:56
TextListStyle & getTextListStyle()
Definition: textbody.hxx:51
std::shared_ptr< TextBody > TextBodyPtr
bool mbHasNoninheritedBodyProperties
Set if bodyPr tag in this textbody is non-empty during import.
Definition: textbody.hxx:95
std::shared_ptr< TextListStyle > TextListStylePtr
const TextParagraphVector & getParagraphs() const
Definition: textbody.hxx:47
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 TextListStylePtr &pMasterTextListStyle) const
insert the text body at the text cursor
Definition: textbody.cxx:53
const TextListStyle & getTextListStyle() const
Definition: textbody.hxx:50
RefVector< TextParagraph > TextParagraphVector
Definition: textbody.hxx:38
const Text3DProperties & get3DProperties() const
Definition: textbody.hxx:57
bool hasNoninheritedBodyProperties() const
Returns whether the textbody had a non-empty bodyPr tag in it.
Definition: textbody.hxx:79
const TextBodyProperties & getTextProperties() const
Definition: textbody.hxx:53
void setHasNoninheritedBodyProperties()
Flags textbody as having a non-empty bodyPr tag.
Definition: textbody.hxx:81
OUString toString() const
Definition: textbody.cxx:90