summaryrefslogtreecommitdiff
path: root/editeng/source/outliner/outlobj.cxx
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 /editeng/source/outliner/outlobj.cxx
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 'editeng/source/outliner/outlobj.cxx')
-rw-r--r--editeng/source/outliner/outlobj.cxx21
1 files changed, 17 insertions, 4 deletions
diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx
index 23206122b1df..d402666d7248 100644
--- a/editeng/source/outliner/outlobj.cxx
+++ b/editeng/source/outliner/outlobj.cxx
@@ -135,20 +135,33 @@ bool OutlinerParaObject::IsVertical() const
return mpImpl->mpEditTextObject->IsVertical();
}
+bool OutlinerParaObject::GetDirectVertical() const
+{
+ return mpImpl->mpEditTextObject->GetDirectVertical();
+}
+
bool OutlinerParaObject::IsTopToBottom() const
{
return mpImpl->mpEditTextObject->IsTopToBottom();
}
-void OutlinerParaObject::SetVertical(bool bNew, bool bTopToBottom)
+void OutlinerParaObject::SetVertical(bool bNew)
{
const ::o3tl::cow_wrapper< OutlinerParaObjData >* pImpl = &mpImpl;
- if ( ( *pImpl )->mpEditTextObject->IsVertical() != bNew ||
- (*pImpl)->mpEditTextObject->IsTopToBottom() != (bNew && bTopToBottom))
+ if ( ( *pImpl )->mpEditTextObject->IsVertical() != bNew)
{
- mpImpl->mpEditTextObject->SetVertical(bNew, bTopToBottom);
+ mpImpl->mpEditTextObject->SetVertical(bNew);
}
}
+void OutlinerParaObject::SetRotation(TextRotation nRotation)
+{
+ mpImpl->mpEditTextObject->SetRotation(nRotation);
+}
+
+TextRotation OutlinerParaObject::GetRotation() const
+{
+ return mpImpl->mpEditTextObject->GetRotation();
+}
sal_Int32 OutlinerParaObject::Count() const
{