summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorSarper Akdemir <sarper.akdemir@collabora.com>2023-04-06 13:00:53 +0300
committerTomaž Vajngerl <quikee@gmail.com>2023-04-10 08:52:42 +0200
commit1934698260222f6727ac43118933094fa84dcdea (patch)
treea4035ba860f5cf0eaed11691af935575957fadf4 /include/svx
parent185cf4496d8750c9e4905c4e384252b01b85d130 (diff)
editeng, svx: introduce ability to clip vertical text overflow
Introduces editeng text property TextClipVerticalOverflow. Which when set causes vertical text that is overflown out of a frame/shape truncated. (Only when text isn't being edited) This is implemented as two steps: (if text overflows) 1 - Vertical adjust is forced to top. (Forcing vert adjust to top isn't the desired behavior normally, but good enough for a first cut I'd say.) -> The desired behavior would be after the overflown text is truncated, doing a vertical adjust (of center/bottom/top) on that piece of text. 2 - ClipRange is set to the height of the frame/shape. This appears to work with different text directions too (vertical etc.). Change-Id: I697715a7d28bde94a6650609b16505ffab92173f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150106 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/svddef.hxx3
-rw-r--r--include/svx/unoshprp.hxx1
2 files changed, 3 insertions, 1 deletions
diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx
index 059c461721b4..85a72e5b713d 100644
--- a/include/svx/svddef.hxx
+++ b/include/svx/svddef.hxx
@@ -232,7 +232,8 @@ constexpr TypedWhichId<SvXMLAttrContainerItem> SDRATTR_XMLATTRIBUTES
constexpr TypedWhichId<SdrTextFixedCellHeightItem> SDRATTR_TEXT_USEFIXEDCELLHEIGHT (SDRATTR_MISC_FIRST +23); /* 1121 */ /* 1121 */ /* 1104 */ /* Pool V2 */
constexpr TypedWhichId<SdrOnOffItem> SDRATTR_TEXT_WORDWRAP (SDRATTR_MISC_FIRST +24); /* 1122 */ /* 1122 */ /* 1105 */ /* Pool V2 */
constexpr TypedWhichId<SfxStringItem> SDRATTR_TEXT_CHAINNEXTNAME (SDRATTR_MISC_FIRST +25); /* 1123 */ /* 1123 */ /* 1106 */ /* Pool V2 */
-constexpr sal_uInt16 SDRATTR_MISC_LAST (SDRATTR_TEXT_CHAINNEXTNAME); /* 1125 */ /* 1125 */ /* 1108 */ /* Pool V1: 1056 */
+constexpr TypedWhichId<SdrOnOffItem> SDRATTR_TEXT_CLIPVERTOVERFLOW (SDRATTR_MISC_FIRST +26);
+constexpr sal_uInt16 SDRATTR_MISC_LAST (SDRATTR_TEXT_CLIPVERTOVERFLOW); /* 1126 */ /* 1125 */ /* 1108 */ /* Pool V1: 1056 */
constexpr sal_uInt16 SDRATTR_EDGE_FIRST (SDRATTR_MISC_LAST + 1); /* 1127 */ /* Pool V4 */
constexpr TypedWhichId<SdrEdgeKindItem> SDRATTR_EDGEKIND (SDRATTR_EDGE_FIRST + 0); /* 1127 */ /* Pool V4 */
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 8a6302659702..a1fa9412afc9 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -327,6 +327,7 @@
{ UNO_NAME_TEXT_VERTADJUST, SDRATTR_TEXT_VERTADJUST, cppu::UnoType<css::drawing::TextVerticalAdjust>::get(), 0, 0},\
{ UNO_NAME_TEXT_WORDWRAP, SDRATTR_TEXT_WORDWRAP, cppu::UnoType<bool>::get(), 0, 0}, \
{ UNO_NAME_TEXT_CHAINNEXTNAME, SDRATTR_TEXT_CHAINNEXTNAME, ::cppu::UnoType<OUString>::get(), 0, 0}, \
+ { UNO_NAME_TEXT_CLIPVERTOVERFLOW, SDRATTR_TEXT_CLIPVERTOVERFLOW, cppu::UnoType<bool>::get(), 0, 0}, \
{ u"TextColumns", OWN_ATTR_TEXTCOLUMNS, cppu::UnoType<css::text::XTextColumns>::get(), 0, 0 }, \
SVX_UNOEDIT_CHAR_PROPERTIES, \
SVX_UNOEDIT_PARA_PROPERTIES,