xref: /aoo4110/main/oox/inc/oox/drawingml/textbody.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef OOX_DRAWINGML_TEXTBODY_HXX
25 #define OOX_DRAWINGML_TEXTBODY_HXX
26 
27 #include "oox/drawingml/textbodyproperties.hxx"
28 #include "oox/drawingml/textliststyle.hxx"
29 
30 namespace com { namespace sun { namespace star {
31     namespace text { class XText; }
32     namespace text { class XTextCursor; }
33 } } }
34 
35 namespace oox { namespace core { class XmlFilterBase; } }
36 
37 namespace oox { namespace drawingml {
38 
39 class TextParagraph;
40 typedef RefVector< TextParagraph > TextParagraphVector;
41 
42 class TextBody
43 {
44 public:
45 	TextBody();
46 	~TextBody();
47 
getParagraphs() const48     inline const TextParagraphVector&   getParagraphs() const { return maParagraphs; }
49     TextParagraph&                      addParagraph();
50 
getTextListStyle() const51     inline const TextListStyle&         getTextListStyle() const { return maTextListStyle; }
getTextListStyle()52     inline TextListStyle&               getTextListStyle() { return maTextListStyle; }
53 
getTextProperties() const54     inline const TextBodyProperties&    getTextProperties() const { return maTextProperties; }
getTextProperties()55     inline TextBodyProperties&          getTextProperties() { return maTextProperties; }
56 
57 	/** insert the text body at the text cursor */
58     void                insertAt(
59                             const ::oox::core::XmlFilterBase& rFilterBase,
60                             const ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > & xText,
61                             const ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextCursor > & xAt,
62                             const TextCharacterProperties& rTextStyleProperties,
63                             const TextListStylePtr& pMasterTextListStyle ) const;
64 protected:
65     TextParagraphVector maParagraphs;
66     TextBodyProperties  maTextProperties;
67     TextListStyle       maTextListStyle;
68 };
69 
70 } }
71 
72 #endif  //  OOX_DRAWINGML_TEXTBODY_HXX
73