LibreOffice Module oox (master)  1
vmltextbox.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_VML_VMLTEXTBOX_HXX
21 #define INCLUDED_OOX_VML_VMLTEXTBOX_HXX
22 
23 #include <cstddef>
24 #include <vector>
25 
26 #include <com/sun/star/uno/Reference.hxx>
27 #include <oox/dllapi.h>
28 #include <oox/helper/helper.hxx>
29 #include <rtl/ustring.hxx>
30 #include <sal/types.h>
31 
32 namespace com::sun::star {
33  namespace drawing { class XShape; }
34 }
35 
36 namespace oox::vml {
37 
38 struct ShapeTypeModel;
39 
40 
43 {
46 };
47 
50 {
62 
63  explicit TextFontModel();
64 };
65 
66 
69 {
72  OUString maText;
73 
74  explicit TextPortionModel( const TextParagraphModel& rParagraph, const TextFontModel& rFont, const OUString& rText );
75 };
76 
77 
80 {
81 public:
82  explicit TextBox(ShapeTypeModel& rTypeModel);
83 
85  void appendPortion( const TextParagraphModel& rParagraph, const TextFontModel& rFont, const OUString& rText );
86 
88  size_t getPortionCount() const { return maPortions.size(); }
90  const TextFontModel* getFirstFont() const;
92  OUString getText() const;
93  void convert(const css::uno::Reference<css::drawing::XShape>& xShape) const;
94 
98  int borderDistanceLeft, borderDistanceTop, borderDistanceRight, borderDistanceBottom;
99  OUString maLayoutFlow;
100  OUString msNextTextbox;
101 
102 private:
103  typedef ::std::vector< TextPortionModel > PortionVector;
104 
105  PortionVector maPortions;
106 };
107 
108 
109 } // namespace oox::vml
110 
111 #endif
112 
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
The shape model structure contains all properties shared by all types of shapes.
Definition: vmlshape.hxx:60
TextParagraphModel maParagraph
Definition: vmltextbox.hxx:70
OptValue< OUString > moParaAdjust
Paragraph adjust (left, center, right, etc.)
Definition: vmltextbox.hxx:44
A text paragraph in a textbox.
Definition: vmltextbox.hxx:42
A text portion in a textbox with the same formatting for all characters.
Definition: vmltextbox.hxx:68
OptValue< sal_Int32 > monSpacing
Definition: vmltextbox.hxx:61
OptValue< OUString > moNameAsian
Asian font name.
Definition: vmltextbox.hxx:52
Font settings for a text portion in a textbox.
Definition: vmltextbox.hxx:49
OptValue< bool > mobBold
Definition: vmltextbox.hxx:58
exports com.sun.star. drawing
ShapeTypeModel & mrTypeModel
Definition: vmltextbox.hxx:95
TextPortionModel(const TextParagraphModel &rParagraph, const TextFontModel &rFont, const OUString &rText)
Definition: vmltextbox.cxx:42
The textbox contains all text contents and properties.
Definition: vmltextbox.hxx:79
size_t getPortionCount() const
Returns the current number of text portions.
Definition: vmltextbox.hxx:88
OptValue< sal_Int32 > monUnderline
Single or double underline.
Definition: vmltextbox.hxx:56
::std::vector< TextPortionModel > PortionVector
Definition: vmltextbox.hxx:103
bool borderDistanceSet
Text distance from the border (inset attribute of v:textbox), valid only if set.
Definition: vmltextbox.hxx:97
OptValue< OUString > moParaStyleName
Definition: vmltextbox.hxx:45
OUString maLayoutFlow
Definition: vmltextbox.hxx:99
convert
OptValue< sal_Int32 > monEscapement
Subscript or superscript.
Definition: vmltextbox.hxx:57
OptValue< OUString > moColor
Font color, HTML encoded, sort of.
Definition: vmltextbox.hxx:54
OptValue< OUString > moName
Font name.
Definition: vmltextbox.hxx:51
OptValue< OUString > moNameComplex
Complex font name.
Definition: vmltextbox.hxx:53
OptValue< sal_Int32 > monSize
Font size in twips.
Definition: vmltextbox.hxx:55
#define OOX_DLLPUBLIC
Definition: dllapi.h:28
OUString msNextTextbox
Definition: vmltextbox.hxx:100
PortionVector maPortions
Definition: vmltextbox.hxx:105
OptValue< bool > mobStrikeout
Definition: vmltextbox.hxx:60
OptValue< bool > mobItalic
Definition: vmltextbox.hxx:59