summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-11-26 18:37:38 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-11-27 09:32:42 +0100
commit653b53287ca09a9ffe3f5ce0242919e719c1086c (patch)
tree83a3de8a5940e122be51dcebe0aa6cefef028ab5 /svx
parentb919f246977a4a048419ba6129d411d30d37013e (diff)
Better handling of text rotation attribute.
We need to have a separate attribute for vertical option and for rotation option. So rotation won't be lost by setting the text direction. So I added a rotation member variable and use that as an orthogonal variable to the vertical text direction. A follow-up fix for tdf#100926. The problem was that the rotation was imported / exported correctly from/in ODP, but the text was not displayed as rotated. Change-Id: Icddc0689f06fdcd52df6dc911e02a9a948c42654 Reviewed-on: https://gerrit.libreoffice.org/83809 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/table/cell.cxx7
-rw-r--r--svx/source/unodraw/unoshtxt.cxx5
2 files changed, 10 insertions, 2 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 8b01fa9edcec..f16b5a414ae6 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -341,7 +341,12 @@ namespace sdr
if (pParaObj)
{
- pParaObj->SetVertical(pRotateItem->IsVertical(), pRotateItem->IsTopToBottom());
+ if(pRotateItem->IsVertical() && pRotateItem->IsTopToBottom())
+ pParaObj->SetRotation(TextRotation::TOPTOBOTTOM);
+ else if (pRotateItem->IsVertical())
+ pParaObj->SetRotation(TextRotation::BOTTOMTOTOP);
+ else
+ pParaObj->SetRotation(TextRotation::NONE);
if (bOwnParaObj)
delete pParaObj;
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 64e13012ac86..ab46fbb199b6 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -575,7 +575,10 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
mpOutliner->SetStyleSheet( 0, pStyleSheet );
if( bVertical )
- mpOutliner->SetVertical( true, pOutlinerParaObject->IsTopToBottom());
+ {
+ mpOutliner->SetVertical( pOutlinerParaObject->GetDirectVertical());
+ mpOutliner->SetRotation( pOutlinerParaObject->GetRotation());
+ }
}
// maybe we have to set the border attributes