summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authoros <os@openoffice.org>2011-01-28 13:19:04 +0100
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2011-01-28 13:19:20 +0100
commit2d96b310b4894dd06eb541474a5dc05346a28efd (patch)
tree48be54bde299122cc8a6c9ad979f4890aa03f29c /sw/source
parentc9af5c16f27f4fbddfcf0d98230bed1247827b4e (diff)
i#116420, fdo#33477: Implemented VertOrient on Writer table cell ranges
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx12
-rw-r--r--sw/source/core/unocore/unotbl.cxx18
2 files changed, 30 insertions, 0 deletions
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index e6f1c0ddc6c3..5e26faf69976 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1209,6 +1209,18 @@ BOOL SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
else if( rToFill != rDir )
bRet = FALSE;
}
+ case RES_VERT_ORIENT:
+ {
+ const SwFmtVertOrient& rOrient =
+ aBoxes[i]->GetFrmFmt()->GetVertOrient();
+ if( !bOneFound )
+ {
+ (SwFmtVertOrient&)rToFill = rOrient;
+ bOneFound = TRUE;
+ }
+ else if( rToFill != rOrient )
+ bRet = FALSE;
+ }
}
if ( FALSE == bRet )
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 1846032d2431..138834750b62 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -69,6 +69,7 @@
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/TableColumnSeparator.hpp>
#include <com/sun/star/text/XTextSection.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/table/TableBorder.hpp>
#include <com/sun/star/table/TableBorderDistances.hpp>
@@ -3851,6 +3852,14 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName,
pDoc->SetBoxAttr( *pCrsr, aNumberFormat);
}
break;
+ case RES_VERT_ORIENT:
+ {
+ sal_Int16 nAlign = -1;
+ aValue >>= nAlign;
+ if( nAlign >= text::VertOrientation::NONE && nAlign <= text::VertOrientation::BOTTOM)
+ pDoc->SetBoxAlign( *pCrsr, nAlign );
+ }
+ break;
case FN_UNO_RANGE_ROW_LABEL:
{
sal_Bool bTmp = *(sal_Bool*)aValue.getValue();
@@ -3928,6 +3937,15 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) throw( be
rBoxItem.QueryValue(aRet, pEntry->nMemberId);
}
break;
+ case RES_VERT_ORIENT:
+ {
+ SwFmtVertOrient aVertOrient;
+ if( pTblCrsr->GetDoc()->GetBoxAttr( *pTblCrsr, aVertOrient ) )
+ {
+ aVertOrient.QueryValue( aRet, pEntry->nMemberId );
+ }
+ }
+ break;
case RES_BOXATR_FORMAT:
//GetAttr fuer Tabellenselektion am Doc fehlt noch
DBG_WARNING("not implemented");