[Libreoffice-commits] core.git: oox/source svx/source

Jürgen Schmidt jsc at apache.org
Sat May 11 07:12:36 PDT 2013


 oox/source/drawingml/table/tablecell.cxx |    6 ++++++
 svx/source/table/cell.cxx                |   10 ++++++++++
 2 files changed, 16 insertions(+)

New commits:
commit c6238797733a607054e84f6620ae479ae77c7d82
Author: Jürgen Schmidt <jsc at apache.org>
Date:   Fri Jun 8 11:31:34 2012 +0000

    Resolves: #i119889# .pptx table vertical text direction
    
    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
    
    (cherry picked from commit bb8bf7bde59c22776199e791b8cfcbf07992de8e)
    
    Conflicts:
    	oox/source/drawingml/table/tablecell.cxx
    
    Change-Id: I58bb1548617c4c1e231280a405d6071ea8813039

diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index 3bca437..c3c4f49 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -32,6 +32,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 namespace ::oox::core;
 using namespace ::com::sun::star;
@@ -351,6 +352,11 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, ::oo
     aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper() );
     PropertySet( xPropSet ).setProperties( aPropMap );
 
+    if ( getVertToken() == XML_eaVert )
+    {
+        xPropSet->setPropertyValue("TextWritingMode", Any(com::sun::star::text::WritingMode_TB_RL));
+    }
+
     getTextBody()->insertAt( rFilterBase, xText, xAt, aTextStyleProps, pMasterTextListStyle );
 }
 
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index ccb71c9..c86662c 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -305,6 +305,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


More information about the Libreoffice-commits mailing list