diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-07-01 16:47:56 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-07-02 11:55:43 +0200 |
commit | 5a737fca37cd5a5f90aa03a30688d447677d3b8a (patch) | |
tree | c14f1ecb1245b72aa8bd63875ba51167490b8482 /include/oox/vml | |
parent | 6bf79576aeca243db553ed3b5eade492dc35337b (diff) |
fdo#46361 oox: handle w:jc for groupshape textboxes
Change-Id: I21391d9a9f5b5173b599006287b33fdaab3c0c75
Diffstat (limited to 'include/oox/vml')
-rw-r--r-- | include/oox/vml/vmltextbox.hxx | 11 | ||||
-rw-r--r-- | include/oox/vml/vmltextboxcontext.hxx | 4 |
2 files changed, 13 insertions, 2 deletions
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 1a44e41ee4b1..150297f6bdf1 100644 --- a/include/oox/vml/vmltextboxcontext.hxx +++ b/include/oox/vml/vmltextboxcontext.hxx @@ -36,6 +36,7 @@ public: explicit TextPortionContext( ::oox::core::ContextHandler2Helper& rParent, TextBox& rTextBox, + TextParagraphModel& rParagraph, const TextFontModel& rParentFont, sal_Int32 nElement, const AttributeList& rAttribs ); @@ -48,6 +49,7 @@ public: private: TextBox& mrTextBox; + TextParagraphModel maParagraph; TextFontModel maFont; size_t mnInitialPortions; }; @@ -65,10 +67,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; }; // ============================================================================ |