summaryrefslogtreecommitdiff
path: root/svx/source/table/cell.cxx
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-04-06 22:22:53 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-04-15 15:40:56 +0200
commita0755ab8772d01797f4945016a978a2bbd8fdf20 (patch)
treeaa6eb393c589c77caed69ef72168b2362e8f771c /svx/source/table/cell.cxx
parentc671094154ecec6f3ba5beea9d26ff0d2d4d86ad (diff)
Implement RotateAngle API property for Impress table cells
Change-Id: I01379c0fc21e8fe294bc882bf824f64502863ff4
Diffstat (limited to 'svx/source/table/cell.cxx')
-rw-r--r--svx/source/table/cell.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 814e69ce3790..8da2f1555a06 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -90,6 +90,7 @@ static const SvxItemPropertySet* ImplGetSvxCellPropertySet()
{ OUString("BottomBorder"), SDRATTR_TABLE_BORDER, cppu::UnoType<BorderLine>::get(), 0, BOTTOM_BORDER },
{ OUString("LeftBorder"), SDRATTR_TABLE_BORDER, cppu::UnoType<BorderLine>::get(), 0, LEFT_BORDER },
{ OUString("RightBorder"), SDRATTR_TABLE_BORDER, cppu::UnoType<BorderLine>::get(), 0, RIGHT_BORDER },
+ { OUString("RotateAngle"), SDRATTR_TABLE_TEXT_ROTATION, cppu::UnoType<sal_Int32>::get(), 0, 0 },
SVX_UNOEDIT_OUTLINER_PROPERTIES,
SVX_UNOEDIT_CHAR_PROPERTIES,
@@ -285,8 +286,6 @@ namespace sdr
OutlinerParaObject* pTemp = pOutliner->CreateParaObject(0, nParaCount);
pOutliner->Clear();
- pTemp->SetVertical(pParaObj->IsVertical(), pParaObj->IsTopToBottom());
-
mxCell->SetOutlinerParaObject(pTemp);
}
@@ -1102,6 +1101,18 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any&
mpProperties->SetObjectItem( XFillBmpTileItem( eMode == BitmapMode_REPEAT ) );
return;
}
+ case SDRATTR_TABLE_TEXT_ROTATION:
+ {
+ sal_Int32 nRotVal = 0;
+ if (!(rValue >>= nRotVal))
+ throw IllegalArgumentException();
+
+ if (nRotVal != 27000 && nRotVal != 9000 && nRotVal != 0)
+ throw IllegalArgumentException();
+
+ mpProperties->SetObjectItem(SvxTextRotateItem(nRotVal/10, SDRATTR_TABLE_TEXT_ROTATION));
+ return;
+ }
default:
{
SfxItemSet aSet( GetModel()->GetItemPool(), pMap->nWID, pMap->nWID);
@@ -1217,6 +1228,11 @@ Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName )
return Any( BitmapMode_NO_REPEAT );
}
}
+ case SDRATTR_TABLE_TEXT_ROTATION:
+ {
+ const SvxTextRotateItem& rTextRotate = static_cast<const SvxTextRotateItem&>(mpProperties->GetItem(SDRATTR_TABLE_TEXT_ROTATION));
+ return Any(sal_Int32(rTextRotate.GetValue() * 10));
+ }
default:
{
SfxItemSet aSet( GetModel()->GetItemPool(), pMap->nWID, pMap->nWID);