diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/oox/vml/vmlshape.hxx | 1 | ||||
-rw-r--r-- | include/oox/vml/vmltextbox.hxx | 11 | ||||
-rw-r--r-- | include/oox/vml/vmltextboxcontext.hxx | 5 |
3 files changed, 15 insertions, 2 deletions
diff --git a/include/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx index ca815ec8ef8e..0312ec1a17c9 100644 --- a/include/oox/vml/vmlshape.hxx +++ b/include/oox/vml/vmlshape.hxx @@ -96,6 +96,7 @@ struct OOX_DLLPUBLIC ShapeTypeModel OptValue< OUString > moWrapAnchorY; ///< The base object from which our vertical positioning should be calculated. OptValue< ::rtl::OUString > moWrapType; ///< How to wrap the text around the object OptValue< ::rtl::OUString > moWrapSide; ///< On which side to wrap the text around the object + OUString maVTextAnchor; ///< How the text inside the shape is anchored vertically. explicit ShapeTypeModel(); diff --git a/include/oox/vml/vmltextbox.hxx b/include/oox/vml/vmltextbox.hxx index 4975e6bb26b6..fc97dc78413b 100644 --- a/include/oox/vml/vmltextbox.hxx +++ b/include/oox/vml/vmltextbox.hxx @@ -37,6 +37,12 @@ struct ShapeTypeModel; // ============================================================================ +/// A text paragraph in a textbox. +struct TextParagraphModel +{ + OptValue<OUString> moParaAdjust; ///< Paragraph adjust (left, center, right, etc.) +}; + /** Font settings for a text portion in a textbox. */ struct OOX_DLLPUBLIC TextFontModel { @@ -57,10 +63,11 @@ struct OOX_DLLPUBLIC TextFontModel /** A text portion in a textbox with the same formatting for all characters. */ struct TextPortionModel { + TextParagraphModel maParagraph; TextFontModel maFont; OUString maText; - explicit TextPortionModel( const TextFontModel& rFont, const OUString& rText ); + explicit TextPortionModel( const TextParagraphModel& rParagraph, const TextFontModel& rFont, const OUString& rText ); }; // ============================================================================ @@ -72,7 +79,7 @@ public: explicit TextBox(ShapeTypeModel& rTypeModel); /** Appends a new text portion to the textbox. */ - void appendPortion( const TextFontModel& rFont, const OUString& rText ); + void appendPortion( const TextParagraphModel& rParagraph, const TextFontModel& rFont, const OUString& rText ); /** Returns the current number of text portions. */ inline size_t getPortionCount() const { return maPortions.size(); } diff --git a/include/oox/vml/vmltextboxcontext.hxx b/include/oox/vml/vmltextboxcontext.hxx index 47d71ac41b41..b5502445cdd7 100644 --- a/include/oox/vml/vmltextboxcontext.hxx +++ b/include/oox/vml/vmltextboxcontext.hxx @@ -34,6 +34,7 @@ public: explicit TextPortionContext( ::oox::core::ContextHandler2Helper& rParent, TextBox& rTextBox, + TextParagraphModel& rParagraph, const TextFontModel& rParentFont, sal_Int32 nElement, const AttributeList& rAttribs ); @@ -46,6 +47,7 @@ public: private: TextBox& mrTextBox; + TextParagraphModel maParagraph; TextFontModel maFont; size_t mnInitialPortions; }; @@ -63,9 +65,12 @@ public: virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ); + virtual void onStartElement(const AttributeList& rAttribs) SAL_OVERRIDE; + virtual void onEndElement(); private: TextBox& mrTextBox; + TextParagraphModel maParagraph; }; // ============================================================================ |