incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1348039 - in /incubator/ooo/trunk/main: oox/source/drawingml/table/tablecell.cxx svx/source/table/cell.cxx
Date Fri, 08 Jun 2012 12:31:34 GMT
Author: jsc
Date: Fri Jun  8 12:31:34 2012
New Revision: 1348039

URL: http://svn.apache.org/viewvc?rev=1348039&view=rev
Log:
119889: Import .pptx file into OO3.4, the vertical text direction of the table will be lost.


fix: Set property to cell object if the cell has vertical property. And fix in svx module
by setting cell's vertical property. 

Patch By: companycy
Found By: Shan Zu 
Review By: jsc


Modified:
    incubator/ooo/trunk/main/oox/source/drawingml/table/tablecell.cxx
    incubator/ooo/trunk/main/svx/source/table/cell.cxx

Modified: incubator/ooo/trunk/main/oox/source/drawingml/table/tablecell.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/oox/source/drawingml/table/tablecell.cxx?rev=1348039&r1=1348038&r2=1348039&view=diff
==============================================================================
--- incubator/ooo/trunk/main/oox/source/drawingml/table/tablecell.cxx (original)
+++ incubator/ooo/trunk/main/oox/source/drawingml/table/tablecell.cxx Fri Jun  8 12:31:34
2012
@@ -36,6 +36,7 @@
 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
 #include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
 
 using rtl::OUString;
 using namespace ::oox::core;
@@ -356,6 +357,11 @@ void TableCell::pushToXCell( const ::oox
     // TODO: phClr?
     aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper() );
     PropertySet( xPropSet ).setProperties( aPropMap );
+
+    if ( getVertToken() == XML_eaVert )
+    {
+        xPropSet->setPropertyValue(::rtl::OUString::createFromAscii( "TextWritingMode"
) , Any(com::sun::star::text::WritingMode_TB_RL) );
+    }
 }
 
 } } }

Modified: incubator/ooo/trunk/main/svx/source/table/cell.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/table/cell.cxx?rev=1348039&r1=1348038&r2=1348039&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/table/cell.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/table/cell.cxx Fri Jun  8 12:31:34 2012
@@ -260,6 +260,16 @@ namespace sdr
 				sdr::table::SdrTableObj& rObj = (sdr::table::SdrTableObj&)GetSdrObject();
 				if( rObj.IsVerticalWriting() != bVertical )
 					rObj.SetVerticalWriting(bVertical);
+
+				// Set a cell vertical property
+				OutlinerParaObject* pParaObj = mxCell->GetEditOutlinerParaObject();
+				if( pParaObj == 0 )
+					pParaObj = mxCell->GetOutlinerParaObject();
+				if(pParaObj)
+				{
+					pParaObj->SetVertical(bVertical);
+				}
+
 			}
 
 			// call parent



Mime
View raw message