oox/inc/oox/vml/vmltextbox.hxx | 1 + oox/source/vml/vmltextbox.cxx | 8 ++++++++ oox/source/vml/vmltextboxcontext.cxx | 11 +++++++++++ 3 files changed, 20 insertions(+)
New commits: commit 3d46b39491af97ba360fb92182501e6b399f4f56 Author: Cédric Bosdonnat <cedric.bosdon...@free.fr> Date: Thu Feb 21 17:34:16 2013 +0100 n#779642: Import vertical layout mode from VML elements. diff --git a/oox/inc/oox/vml/vmltextbox.hxx b/oox/inc/oox/vml/vmltextbox.hxx index 1dc30ab..f234b00 100644 --- a/oox/inc/oox/vml/vmltextbox.hxx +++ b/oox/inc/oox/vml/vmltextbox.hxx @@ -86,6 +86,7 @@ public: /// Text distance from the border (inset attribute of v:textbox), valid only if set. bool borderDistanceSet; int borderDistanceLeft, borderDistanceTop, borderDistanceRight, borderDistanceBottom; + OUString maLayoutFlow; private: typedef ::std::vector< TextPortionModel > PortionVector; diff --git a/oox/source/vml/vmltextbox.cxx b/oox/source/vml/vmltextbox.cxx index f3c4102..65b8f34 100644 --- a/oox/source/vml/vmltextbox.cxx +++ b/oox/source/vml/vmltextbox.cxx @@ -21,7 +21,9 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/awt/FontWeight.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/text/XTextAppend.hpp> +#include <com/sun/star/text/WritingMode.hpp> namespace oox { namespace vml { @@ -88,6 +90,12 @@ void TextBox::convert(uno::Reference<drawing::XShape> xShape) const *pValues++ = *i; xTextAppend->appendTextPortion(aIt->maText, aPropSeq); } + + if ( maLayoutFlow == "vertical" ) + { + uno::Reference<beans::XPropertySet> xProperties(xShape, uno::UNO_QUERY); + xProperties->setPropertyValue( "TextWritingMode", uno::makeAny( text::WritingMode_TB_RL ) ); + } } } // namespace vml diff --git a/oox/source/vml/vmltextboxcontext.cxx b/oox/source/vml/vmltextboxcontext.cxx index 9d1c4ee..ca124bc 100644 --- a/oox/source/vml/vmltextboxcontext.cxx +++ b/oox/source/vml/vmltextboxcontext.cxx @@ -178,6 +178,17 @@ TextBoxContext::TextBoxContext( ContextHandler2Helper& rParent, TextBox& rTextBo value.isEmpty() ? "0.05in" : value, 0, false, false ); rTextBox.borderDistanceSet = true; } + + OUString sStyle = rAttribs.getString( XML_style, OUString() ); + sal_Int32 nIndex = 0; + while( nIndex >= 0 ) + { + OUString aName, aValue; + if( ConversionHelper::separatePair( aName, aValue, sStyle.getToken( 0, ';', nIndex ), ':' ) ) + { + if( aName == "layout-flow" ) rTextBox.maLayoutFlow = aValue; + } + } } ContextHandlerRef TextBoxContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits