[Libreoffice-commits] core.git: sw/source

Oliver Specht oliver.specht at cib.de
Fri Dec 18 06:47:43 PST 2015


 sw/source/core/docnode/ndtbl1.cxx |   14 ++++++++++++++
 sw/source/core/unocore/unotbl.cxx |   18 ++++++++++++++++++
 2 files changed, 32 insertions(+)

New commits:
commit d95428278d54697064973a70c68fd2c40d174d8a
Author: Oliver Specht <oliver.specht at cib.de>
Date:   Fri Dec 18 12:55:55 2015 +0100

    tdf#33477: added support of property VertOrient to cell range
    
    Change-Id: Id8f0c138fb665a19b92f2779aa59ae1778efddc5
    Reviewed-on: https://gerrit.libreoffice.org/20789
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Oliver Specht <oliver.specht at cib.de>

diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 99be14a..a95cec8 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1213,6 +1213,20 @@ bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill )
                     else if( rToFill != rDir )
                         bRet = false;
                 }
+                break;
+                case RES_VERT_ORIENT:
+                {
+                    const SwFormatVertOrient& rOrient =
+                                    aBoxes[i]->GetFrameFormat()->GetVertOrient();
+                    if( !bOneFound )
+                    {
+                        (SwFormatVertOrient&)rToFill = rOrient;
+                        bOneFound = true;
+                    }
+                    else if( rToFill != rOrient )
+                        bRet = false;
+                }
+                break;
             }
 
             if ( !bRet )
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index d8cf5c6..4e6c1c7 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -61,6 +61,7 @@
 #include <com/sun/star/text/WrapTextMode.hpp>
 #include <com/sun/star/text/TextContentAnchorType.hpp>
 #include <com/sun/star/text/TableColumnSeparator.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
 #include <com/sun/star/text/XTextSection.hpp>
 #include <com/sun/star/table/ShadowFormat.hpp>
 #include <com/sun/star/table/TableBorder.hpp>
@@ -3384,6 +3385,14 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An
                     }
                 }
                 break;
+                case RES_VERT_ORIENT:
+                {
+                    sal_Int16 nAlign = -1;
+                    aValue >>= nAlign;
+                    if( nAlign >= text::VertOrientation::NONE && nAlign <= text::VertOrientation::BOTTOM)
+                        pDoc->SetBoxAlign( rCursor, nAlign );
+                }
+                break;
                 default:
                 {
                     SfxItemSet aItemSet( pDoc->GetAttrPool(), pEntry->nWID, pEntry->nWID );
@@ -3462,6 +3471,15 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName)
                 case FN_UNO_RANGE_COL_LABEL:
                     aRet <<= m_bFirstColumnAsLabel;
                 break;
+                case RES_VERT_ORIENT:
+                {
+                    SwFormatVertOrient aVertOrient;
+                    if( m_pTableCursor->GetDoc()->GetBoxAttr( *m_pTableCursor, aVertOrient ) )
+                    {
+                        aVertOrient.QueryValue( aRet, pEntry->nMemberId );
+                    }
+                }
+                break;
                 default:
                 {
                     SfxItemSet aSet(m_pTableCursor->GetDoc()->GetAttrPool(),


More information about the Libreoffice-commits mailing list