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 /editeng/inc | |
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 'editeng/inc')
-rw-r--r-- | editeng/inc/editdoc.hxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx index 2924a0e20c45..ccff24f1beb3 100644 --- a/editeng/inc/editdoc.hxx +++ b/editeng/inc/editdoc.hxx @@ -38,6 +38,7 @@ class ImpEditEngine; class SvxTabStop; +enum class TextRotation; #define CHARPOSGROW 16 @@ -742,7 +743,7 @@ private: SvxFont aDefFont; //faster than ever from the pool!! sal_uInt16 nDefTab; bool bIsVertical:1; - bool bIsTopToBottomVert : 1; + TextRotation mnRotation; bool bIsFixedCellHeight:1; bool bOwnerOfPool:1; @@ -769,10 +770,12 @@ public: void SetDefTab( sal_uInt16 nTab ) { nDefTab = nTab ? nTab : DEFTAB; } sal_uInt16 GetDefTab() const { return nDefTab; } - void SetVertical( bool bVertical, bool bTopToBottom ) - { bIsVertical = bVertical; bIsTopToBottomVert = bVertical && bTopToBottom; } - bool IsVertical() const { return bIsVertical; } - bool IsTopToBottom() const { return bIsTopToBottomVert; } + void SetVertical( bool bVertical ) { bIsVertical = bVertical; } + bool IsVertical() const; + bool IsTopToBottom() const; + bool GetDirectVertical() const; + void SetRotation( TextRotation nRotation ) { mnRotation = nRotation; } + TextRotation GetRotation() const { return mnRotation; } void SetFixedCellHeight( bool bUseFixedCellHeight ) { bIsFixedCellHeight = bUseFixedCellHeight; } bool IsFixedCellHeight() const { return bIsFixedCellHeight; } |