[Libreoffice-commits] .: sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Fri Jan 28 04:19:29 PST 2011
sw/source/core/docnode/ndtbl1.cxx | 12 ++++++++++++
sw/source/core/unocore/unotbl.cxx | 18 ++++++++++++++++++
2 files changed, 30 insertions(+)
New commits:
commit f53a5f8a3278b38b61579216c6fc767ed15aead8
Author: os <os at openoffice.org>
Date: Fri Jan 28 13:19:04 2011 +0100
i#116420, fdo#33477: Implemented VertOrient on Writer table cell ranges
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 1e6a66b..0f098c5 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 2169cbf..8cb8dd7 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");
More information about the Libreoffice-commits
mailing list