diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-26 18:37:38 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-27 09:32:42 +0100 |
commit | 653b53287ca09a9ffe3f5ce0242919e719c1086c (patch) | |
tree | 83a3de8a5940e122be51dcebe0aa6cefef028ab5 /svx | |
parent | b919f246977a4a048419ba6129d411d30d37013e (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.cxx | 7 | ||||
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 5 |
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 |