summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Lima <rafael.palma.lima@gmail.com>2020-11-25 19:53:59 -0300
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2021-04-12 09:08:31 +0200
commit8f9b4464ad5bf3dd235e89982454e9aee3c8ea5e (patch)
treee34ff5f61ad93bdcecedecea6a80ff3ce5485187
parentac87ae4615fc96c247ca98a321c69400411dab06 (diff)
Partially resolves tdf#134369: Enable word-wrap by default for shapes in sd
This patch enables word-wrap by default for Basic Shapes, Block Arrows, Flowchart Shapes and Callouts. However, it does not enable word-wrap by default in some object gropus in the Gallery. These groups will be handled in a future patch. Change-Id: I9158bce92d26766a3b281e13758bf388b54b4f7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106650 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rw-r--r--sd/source/core/drawdoc4.cxx4
-rw-r--r--sd/source/ui/func/fuconcs.cxx3
2 files changed, 7 insertions, 0 deletions
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index c4cdbc96b8d3..e3d7080f953b 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -93,6 +93,7 @@
#include <editeng/outlobj.hxx>
#include <sfx2/viewfrm.hxx>
#include <editeng/frmdiritem.hxx>
+#include <svx/sdasitm.hxx>
#include <sdresid.hxx>
#include <drawdoc.hxx>
@@ -225,6 +226,9 @@ void SdDrawDocument::CreateLayoutTemplates()
rISet.Put( makeSdrTextUpperDistItem( 125 ) );
rISet.Put( makeSdrTextLowerDistItem( 125 ) );
+ // Set Word-wrap to true by default
+ rISet.Put( makeSdrTextWordWrapItem(true) );
+
rISet.Put( SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL ) );
// #i16874# enable kerning by default but only for new documents
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index d1fcf0f3e36e..0d2a406e0e14 100644
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -34,6 +34,7 @@
#include <ViewShellBase.hxx>
#include <ToolBarManager.hxx>
#include <svx/gallery.hxx>
+#include <svx/sdooitm.hxx>
#include <svl/itempool.hxx>
#include <svl/stritem.hxx>
@@ -183,6 +184,8 @@ void FuConstructCustomShape::SetAttributes( SdrObject* pObj )
EE_ITEMS_START, EE_ITEMS_END>{});
aDest.Set( rSource );
pObj->SetMergedItemSet( aDest );
+ // Enables Word-wrap by default (tdf#134369)
+ pObj->SetMergedItem( SdrOnOffItem( SDRATTR_TEXT_WORDWRAP, true ) );
Degree100 nAngle = pSourceObj->GetRotateAngle();
if ( nAngle )
pObj->NbcRotate( pObj->GetSnapRect().Center(), nAngle );