oox/inc/oox/vml/vmltextbox.hxx | 1 + oox/source/vml/vmltextbox.cxx | 8 ++++++++ oox/source/vml/vmltextboxcontext.cxx | 11 +++++++++++ sw/source/core/text/xmldump.cxx | 2 ++ writerfilter/source/dmapper/StyleSheetTable.cxx | 3 ++- 5 files changed, 24 insertions(+), 1 deletion(-)
New commits: commit e8387897bba3ba2863a0975a106486d852dc67db 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. (cherry picked from commit 3d46b39491af97ba360fb92182501e6b399f4f56) (cherry picked from commit 94108f529a11062eb2749b5141752c884d106464) 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 4af0a9d..72a18ce 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 { @@ -90,6 +92,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 3755cc7..b96bb60 100644 --- a/oox/source/vml/vmltextboxcontext.cxx +++ b/oox/source/vml/vmltextboxcontext.cxx @@ -179,6 +179,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 ) commit d623db401a080aa15b711a267bc6072e2c0b9446 Author: Cédric Bosdonnat <cedric.bosdonnat....@free.fr> Date: Thu Sep 20 09:59:48 2012 +0200 n#779627: forgot to remove a debug fprintf Change-Id: Idba155358166db358b0ef36b71a0bcf5abf77ce9 (cherry picked from commit 823512d12d268e45c4ff6b13b6ed9e0db49d1d8a) diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 57f0e35..19a5796 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -445,7 +445,6 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val) case NS_ooxml::LN_CT_Style_styleId: m_pImpl->m_pCurrentEntry->sStyleIdentifierI = sValue; m_pImpl->m_pCurrentEntry->sStyleIdentifierD = sValue; - fprintf( stderr, "sStyleIdentifierI: %s\n", OUStringToOString( m_pImpl->m_pCurrentEntry->sStyleIdentifierI, RTL_TEXTENCODING_UTF8 ).getStr( ) ); break; case NS_ooxml::LN_CT_TblWidth_w: dynamic_cast< StyleSheetPropertyMap* >( m_pImpl->m_pCurrentEntry->pProperties.get() )->SetCT_TblWidth_w( nIntValue ); commit 01b15f20497f0562e9431a6d227a0070cb859cfe Author: Cédric Bosdonnat <cedric.bosdonnat....@free.fr> Date: Wed Sep 19 17:51:19 2012 +0200 n779627: docx import of table styles, why not copy the ids? Change-Id: I72188eef689c656b56e2c19e60e0104a1e6d87bf (cherry picked from commit c091b8fc526bed051295870b8b28f73f3ac908ae) diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index b5413b8..57f0e35 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -75,7 +75,8 @@ TableStyleSheetEntry::TableStyleSheetEntry( StyleSheetEntry& rEntry, StyleSheetT StyleSheetEntry( ), m_pStyleSheet( pStyles ) { - + sStyleIdentifierI = rEntry.sStyleIdentifierI; + sStyleIdentifierD = rEntry.sStyleIdentifierD; bIsDefaultStyle = rEntry.bIsDefaultStyle; bInvalidHeight = rEntry.bInvalidHeight; bHasUPE = rEntry.bHasUPE; @@ -444,6 +445,7 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val) case NS_ooxml::LN_CT_Style_styleId: m_pImpl->m_pCurrentEntry->sStyleIdentifierI = sValue; m_pImpl->m_pCurrentEntry->sStyleIdentifierD = sValue; + fprintf( stderr, "sStyleIdentifierI: %s\n", OUStringToOString( m_pImpl->m_pCurrentEntry->sStyleIdentifierI, RTL_TEXTENCODING_UTF8 ).getStr( ) ); break; case NS_ooxml::LN_CT_TblWidth_w: dynamic_cast< StyleSheetPropertyMap* >( m_pImpl->m_pCurrentEntry->pProperties.get() )->SetCT_TblWidth_w( nIntValue ); commit 4e0e5f13579f0e79ee9a9a95c86509ffa15d0363 Author: Cédric Bosdonnat <cedric.bosdonnat....@free.fr> Date: Fri Aug 31 11:08:08 2012 +0200 Output typeid().name( ) in layout dump for easier debugging Change-Id: I12c0583b73200fa9fa4d4d56be464b1467149630 (cherry picked from commit ba71c346d6ac60b2c49caed81673d4ca498a6f1e) diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 5decf30..4ad90af 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -322,6 +322,8 @@ void SwFrm::dumpAsXml( xmlTextWriterPtr writer ) xmlTextWriterEndElement( writer ); } + xmlTextWriterWriteElement( writer, BAD_CAST( "typeid" ), BAD_CAST( typeid( *this ).name() ) ); + // Dump the children if ( IsTxtFrm( ) ) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits