2360dde
From 50b7a998d0229ff7f49cd6b653765410749cf747 Mon Sep 17 00:00:00 2001
2360dde
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
2360dde
Date: Thu, 9 Jun 2016 13:03:57 +0100
2360dde
Subject: [PATCH] Related: tdf#93135 adjust the ui to reflect the text fit
2360dde
 options entanglement
2360dde
2360dde
We have two major groups of text fitting options in draw/impress
2360dde
2360dde
ones that apply only to custom shapes
2360dde
 * Word wrap text in shape
2360dde
 * Resize shape to fit text
2360dde
2360dde
those that apply to other elements, e.g. text boxes, legacy rectangles and lines
2360dde
 * Fit width to text
2360dde
 * Fit height to text
2360dde
 * Fit to frame
2360dde
 * Adjust to contour
2360dde
2360dde
Of the second group, only "fit to frame" is always available. Text boxes
2360dde
have "Fit width to text" and "Fit height to text", while stuff like legacy
2360dde
rectangles and lines etc have "Adjust to contour" instead.
2360dde
2360dde
A fun issue is that (currently anyway) the bit for "resize shape to
2360dde
fit text" in custom shapes and the bit for "fit height to text" in text boxes
2360dde
is the same bit, SDRATTR_TEXT_AUTOGROWHEIGHT.
2360dde
2360dde
So before this change in all circumstances the same collection of checkboxes
2360dde
for all settings was visible. With context used to enable or disable which
2360dde
ones could be set according to the type of shape it was. Simultaneously there
2360dde
is logic to enable/disable checkboxes depending on if other checkboxes that
2360dde
control contradictionary options were checked/unchecked. e.g. "Fit to frame"
2360dde
disabled if "fit height to text" is enabled. So its not apparently why some
2360dde
can be enabled and some disabled by clicking about the place in the shared
2360dde
collection.
2360dde
2360dde
In this commit we split the sizing options into their two families, one frame and
2360dde
column for each of "custom shapes" and "everything else". When adjusting
2360dde
a single selected object we use context to determine which column to show
2360dde
or hide. When editing multiple objects or the underlying graphic styles we show
2360dde
both columns. When editing a presentation style we show just the text box
2360dde
column. (The use of HasText in the original code is a concern, cause it doesn't
2360dde
make sense to me, using it like that means that in the original dialog
2360dde
format->text on an empty text box from F2 shows the contour option, but after
2360dde
entering text and then format->text it shows a set of different text box sizing
2360dde
options, so that's dropped here)
2360dde
2360dde
Because (currently) the same SDRATTR_TEXT_AUTOGROWHEIGHT bit it used for two
2360dde
apparently different things then we visually toggle on all things that use that
2360dde
bit in multi-column mode when its togged on, i.e. on editing a style visually
2360dde
both "fit height to text" and "resize shape to fix text" are kept in sync when
2360dde
you toggle one or the other. We don't disable the "resize shape to fit text"
2360dde
checkbox (unlike the fit height to text checkbox which controls the same bit)
2360dde
if "fit to frame" and "adjust to contour" are set, and give it additional
2360dde
powers to unset those if clicked.
2360dde
2360dde
This hopefully makes the ui describe the way things actually are.
2360dde
2360dde
Because this SDRATTR_TEXT_AUTOGROWHEIGHT is currently sort of doing two purposes
2360dde
selecting a freshly drawn custom rectangle and using format->default formatting
2360dde
will cause it to change properties because the underlying
2360dde
SDRATTR_TEXT_AUTOGROWHEIGHT bit is cleared.
2360dde
2360dde
The way things should probably be I guess is that there should be a
2360dde
SDRATTR_TEXT_AUTOGROWSIZE property (which used to exist but wasn't hooked up to
2360dde
anything) just for custom shapes which overrides the old family of options if
2360dde
set.
2360dde
2360dde
(cherry picked from commit 8d51397bfd98615e74e116582a50e29846ecb76e)
2360dde
2360dde
Change-Id: I49241c90d919eeb5caa8775beab57746d5c6df04
2360dde
---
2360dde
 cui/source/inc/textattr.hxx        |   8 +-
2360dde
 cui/source/tabpages/textanim.cxx   |  17 ++-
2360dde
 cui/source/tabpages/textattr.cxx   | 131 +++++++++--------
2360dde
 cui/uiconfig/ui/textattrtabpage.ui | 286 ++++++++++++++++++++++---------------
2360dde
 include/svx/svxids.hrc             |   2 +-
2360dde
 sd/source/ui/dlg/prltempl.cxx      |  11 +-
2360dde
 sd/source/ui/dlg/tabtempl.cxx      |   5 +-
2360dde
 7 files changed, 271 insertions(+), 189 deletions(-)
2360dde
2360dde
diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx
2360dde
index 7d67d86..a826b2f 100644
2360dde
--- a/cui/source/inc/textattr.hxx
2360dde
+++ b/cui/source/inc/textattr.hxx
2360dde
@@ -20,6 +20,7 @@
2360dde
 #define INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX
2360dde
 
2360dde
 #include <svx/dlgctrl.hxx>
2360dde
+#include <svx/svdobj.hxx>
2360dde
 
2360dde
 #include <vcl/group.hxx>
2360dde
 
2360dde
@@ -39,6 +40,9 @@ class SvxTextAttrPage : public SvxTabPage
2360dde
 private:
2360dde
     static const sal_uInt16 pRanges[];
2360dde
 
2360dde
+    VclPtr<VclContainer>        m_pDrawingText;
2360dde
+    VclPtr<VclContainer>        m_pCustomShapeText;
2360dde
+
2360dde
     VclPtr<TriStateBox>         m_pTsbAutoGrowWidth;
2360dde
     VclPtr<TriStateBox>         m_pTsbAutoGrowHeight;
2360dde
     VclPtr<TriStateBox>         m_pTsbFitToSize;
2360dde
@@ -57,7 +61,7 @@ private:
2360dde
     VclPtr<TriStateBox>         m_pTsbFullWidth;
2360dde
 
2360dde
     const SfxItemSet&   rOutAttrs;
2360dde
-    const SdrView*      pView;
2360dde
+    SdrObjKind    m_eObjKind;
2360dde
 
2360dde
     bool                bAutoGrowSizeEnabled;
2360dde
     bool                bContourEnabled;
2360dde
@@ -89,7 +93,7 @@ public:
2360dde
     virtual void        PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
2360dde
 
2360dde
     void         Construct();
2360dde
-    void         SetView( const SdrView* pSdrView ) { pView = pSdrView; }
2360dde
+    void         SetObjKind(SdrObjKind eObjKind) { m_eObjKind = eObjKind; }
2360dde
     virtual void PageCreated(const SfxAllItemSet& aSet) override;
2360dde
 };
2360dde
 
2360dde
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
2360dde
index 64bf0e1..5c9ba06 100644
2360dde
--- a/cui/source/tabpages/textanim.cxx
2360dde
+++ b/cui/source/tabpages/textanim.cxx
2360dde
@@ -27,6 +27,8 @@
2360dde
 #include "textattr.hxx"
2360dde
 #include <dialmgr.hxx>
2360dde
 #include "svx/dlgutil.hxx"
2360dde
+#include "svx/svdmark.hxx"
2360dde
+#include "svx/svdview.hxx"
2360dde
 
2360dde
 const sal_uInt16 SvxTextAnimationPage::pRanges[] =
2360dde
 {
2360dde
@@ -63,10 +65,21 @@ SvxTextTabDialog::SvxTextTabDialog( vcl::Window* pParent,
2360dde
 void SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
2360dde
 {
2360dde
     if (nId == m_nTextId)
2360dde
+    {
2360dde
+        const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
2360dde
+        bool bHasMarked = rMarkList.GetMarkCount() > 0;
2360dde
+        SdrObjKind eKind = OBJ_NONE;
2360dde
+        if (bHasMarked)
2360dde
         {
2360dde
-            static_cast<SvxTextAttrPage&>(rPage).SetView( pView );
2360dde
-            static_cast<SvxTextAttrPage&>(rPage).Construct();
2360dde
+            if (rMarkList.GetMarkCount() == 1)
2360dde
+            {
2360dde
+                const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
2360dde
+                eKind = (SdrObjKind)pObj->GetObjIdentifier();
2360dde
+            }
2360dde
         }
2360dde
+        static_cast<SvxTextAttrPage&>(rPage).SetObjKind(eKind);
2360dde
+        static_cast<SvxTextAttrPage&>(rPage).Construct();
2360dde
+    }
2360dde
 }
2360dde
 
2360dde
 
2360dde
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
2360dde
index a0ba1bb..23dd097 100644
2360dde
--- a/cui/source/tabpages/textattr.cxx
2360dde
+++ b/cui/source/tabpages/textattr.cxx
2360dde
@@ -56,7 +56,7 @@ const sal_uInt16 SvxTextAttrPage::pRanges[] =
2360dde
 SvxTextAttrPage::SvxTextAttrPage(vcl::Window* pWindow, const SfxItemSet& rInAttrs)
2360dde
     : SvxTabPage(pWindow,"TextAttributesPage","cui/ui/textattrtabpage.ui", rInAttrs)
2360dde
     , rOutAttrs(rInAttrs)
2360dde
-    , pView(nullptr)
2360dde
+    , m_eObjKind(OBJ_NONE)
2360dde
     , bAutoGrowSizeEnabled(false)
2360dde
     , bContourEnabled(false)
2360dde
     , bAutoGrowWidthEnabled(false)
2360dde
@@ -64,6 +64,8 @@ SvxTextAttrPage::SvxTextAttrPage(vcl::Window* pWindow, const SfxItemSet& rInAttr
2360dde
     , bWordWrapTextEnabled(false)
2360dde
     , bFitToSizeEnabled(false)
2360dde
 {
2360dde
+    get(m_pDrawingText, "drawingtext");
2360dde
+    get(m_pCustomShapeText, "customshapetext");
2360dde
     get(m_pTsbAutoGrowWidth,"TSB_AUTOGROW_WIDTH");
2360dde
     get(m_pTsbAutoGrowHeight,"TSB_AUTOGROW_HEIGHT");
2360dde
     get(m_pTsbFitToSize,"TSB_FIT_TO_SIZE");
2360dde
@@ -90,6 +92,7 @@ SvxTextAttrPage::SvxTextAttrPage(vcl::Window* pWindow, const SfxItemSet& rInAttr
2360dde
     Link<Button*,void> aLink( LINK( this, SvxTextAttrPage, ClickHdl_Impl ) );
2360dde
     m_pTsbAutoGrowWidth->SetClickHdl( aLink );
2360dde
     m_pTsbAutoGrowHeight->SetClickHdl( aLink );
2360dde
+    m_pTsbAutoGrowSize->SetClickHdl( aLink );
2360dde
     m_pTsbFitToSize->SetClickHdl( aLink );
2360dde
     m_pTsbContour->SetClickHdl( aLink );
2360dde
 
2360dde
@@ -103,6 +106,8 @@ SvxTextAttrPage::~SvxTextAttrPage()
2360dde
 
2360dde
 void SvxTextAttrPage::dispose()
2360dde
 {
2360dde
+    m_pDrawingText.clear();
2360dde
+    m_pCustomShapeText.clear();
2360dde
     m_pTsbAutoGrowWidth.clear();
2360dde
     m_pTsbAutoGrowHeight.clear();
2360dde
     m_pTsbFitToSize.clear();
2360dde
@@ -181,16 +186,24 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
2360dde
         m_pMtrFldBottom->SetText( "" );
2360dde
     m_pMtrFldBottom->SaveValue();
2360dde
 
2360dde
-    // adjust to height
2360dde
+    // adjust to height and autogrowsize
2360dde
     if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SfxItemState::DONTCARE )
2360dde
     {
2360dde
         m_pTsbAutoGrowHeight->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ).
2360dde
                         GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
2360dde
         m_pTsbAutoGrowHeight->EnableTriState( false );
2360dde
+
2360dde
+        m_pTsbAutoGrowSize->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ).
2360dde
+                        GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
2360dde
+        m_pTsbAutoGrowSize->EnableTriState( false );
2360dde
     }
2360dde
     else
2360dde
+    {
2360dde
         m_pTsbAutoGrowHeight->SetState( TRISTATE_INDET );
2360dde
+        m_pTsbAutoGrowSize->SetState( TRISTATE_INDET );
2360dde
+    }
2360dde
     m_pTsbAutoGrowHeight->SaveValue();
2360dde
+    m_pTsbAutoGrowSize->SaveValue();
2360dde
 
2360dde
     // adjust to width
2360dde
     if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWWIDTH ) != SfxItemState::DONTCARE )
2360dde
@@ -203,17 +216,6 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
2360dde
         m_pTsbAutoGrowWidth->SetState( TRISTATE_INDET );
2360dde
     m_pTsbAutoGrowWidth->SaveValue();
2360dde
 
2360dde
-    // autogrowsize
2360dde
-    if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SfxItemState::DONTCARE )
2360dde
-    {
2360dde
-        m_pTsbAutoGrowSize->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ).
2360dde
-                        GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
2360dde
-        m_pTsbAutoGrowSize->EnableTriState( false );
2360dde
-    }
2360dde
-    else
2360dde
-        m_pTsbAutoGrowSize->SetState( TRISTATE_INDET );
2360dde
-    m_pTsbAutoGrowSize->SaveValue();
2360dde
-
2360dde
     // wordwrap text
2360dde
     if ( rAttrs->GetItemState( SDRATTR_TEXT_WORDWRAP ) != SfxItemState::DONTCARE )
2360dde
     {
2360dde
@@ -481,52 +483,47 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
2360dde
 
2360dde
 void SvxTextAttrPage::Construct()
2360dde
 {
2360dde
-    DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
2360dde
-
2360dde
-    bFitToSizeEnabled = bContourEnabled = true;
2360dde
-    bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = false;
2360dde
-
2360dde
-    const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
2360dde
-    if( rMarkList.GetMarkCount() == 1 )
2360dde
+    switch (m_eObjKind)
2360dde
     {
2360dde
-        const SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
2360dde
-        SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier();
2360dde
-        if( pObj->GetObjInventor() == SdrInventor )
2360dde
-        {
2360dde
-            switch( eKind )
2360dde
-            {
2360dde
-                case OBJ_TEXT :
2360dde
-                case OBJ_TITLETEXT :
2360dde
-                case OBJ_OUTLINETEXT :
2360dde
-                case OBJ_CAPTION :
2360dde
-                {
2360dde
-                    if(pObj->HasText())
2360dde
-                    {
2360dde
-                        // contour NOT possible for pure text objects
2360dde
-                        bContourEnabled = false;
2360dde
-
2360dde
-                        // adjusting width and height is ONLY possible for pure text objects
2360dde
-                        bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = true;
2360dde
-                    }
2360dde
-                }
2360dde
-                break;
2360dde
-                case OBJ_CUSTOMSHAPE :
2360dde
-                {
2360dde
-                    bFitToSizeEnabled = bContourEnabled = false;
2360dde
-                    bAutoGrowSizeEnabled = true;
2360dde
-                    bWordWrapTextEnabled = true;
2360dde
-                }
2360dde
-                break;
2360dde
-                default: ;//prevent warning
2360dde
-            }
2360dde
-        }
2360dde
+        case OBJ_NONE:
2360dde
+            // indeterminate, show them all
2360dde
+            bFitToSizeEnabled = bContourEnabled = bWordWrapTextEnabled =
2360dde
+            bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = true;
2360dde
+            m_pCustomShapeText->Show();
2360dde
+            m_pDrawingText->Show();
2360dde
+            break;
2360dde
+        case OBJ_TEXT:
2360dde
+        case OBJ_TITLETEXT:
2360dde
+        case OBJ_OUTLINETEXT:
2360dde
+        case OBJ_CAPTION:
2360dde
+            // contour NOT possible for pure text objects
2360dde
+            bContourEnabled = bWordWrapTextEnabled = bAutoGrowSizeEnabled = false;
2360dde
+
2360dde
+            // adjusting width and height is ONLY possible for pure text objects
2360dde
+            bFitToSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = true;
2360dde
+            m_pCustomShapeText->Hide();
2360dde
+            m_pDrawingText->Show();
2360dde
+            break;
2360dde
+        case OBJ_CUSTOMSHAPE:
2360dde
+            bFitToSizeEnabled = bContourEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = false;
2360dde
+            bWordWrapTextEnabled = bAutoGrowSizeEnabled = true;
2360dde
+            m_pDrawingText->Hide();
2360dde
+            m_pCustomShapeText->Show();
2360dde
+            break;
2360dde
+        default:
2360dde
+            bFitToSizeEnabled = bContourEnabled = true;
2360dde
+            bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = false;
2360dde
+            m_pCustomShapeText->Hide();
2360dde
+            m_pDrawingText->Show();
2360dde
+            break;
2360dde
     }
2360dde
-    m_pTsbAutoGrowHeight->Enable( bAutoGrowHeightEnabled );
2360dde
-    m_pTsbAutoGrowWidth->Enable( bAutoGrowWidthEnabled );
2360dde
-    m_pTsbFitToSize->Enable( bFitToSizeEnabled );
2360dde
-    m_pTsbContour->Enable( bContourEnabled );
2360dde
-    m_pTsbAutoGrowSize->Enable( bAutoGrowSizeEnabled );
2360dde
-    m_pTsbWordWrapText->Enable( bWordWrapTextEnabled );
2360dde
+
2360dde
+    m_pTsbAutoGrowHeight->Show( bAutoGrowHeightEnabled );
2360dde
+    m_pTsbAutoGrowWidth->Show( bAutoGrowWidthEnabled );
2360dde
+    m_pTsbFitToSize->Show( bFitToSizeEnabled );
2360dde
+    m_pTsbContour->Show( bContourEnabled );
2360dde
+    m_pTsbAutoGrowSize->Show( bAutoGrowSizeEnabled );
2360dde
+    m_pTsbWordWrapText->Show( bWordWrapTextEnabled );
2360dde
 }
2360dde
 
2360dde
 VclPtr<SfxTabPage> SvxTextAttrPage::Create( vcl::Window* pWindow,
2360dde
@@ -639,8 +636,20 @@ IMPL_LINK_NOARG_TYPED(SvxTextAttrPage, ClickFullWidthHdl_Impl, Button*, void)
2360dde
 |*
2360dde
 \************************************************************************/
2360dde
 
2360dde
-IMPL_LINK_NOARG_TYPED(SvxTextAttrPage, ClickHdl_Impl, Button*, void)
2360dde
+IMPL_LINK_TYPED(SvxTextAttrPage, ClickHdl_Impl, Button*, pButton, void)
2360dde
 {
2360dde
+    if (pButton == m_pTsbAutoGrowSize)
2360dde
+    {
2360dde
+        m_pTsbAutoGrowHeight->SetState(m_pTsbAutoGrowSize->GetState());
2360dde
+        if (m_pTsbAutoGrowSize->GetState() == TRISTATE_TRUE)
2360dde
+        {
2360dde
+            m_pTsbFitToSize->SetState(TRISTATE_FALSE);
2360dde
+            m_pTsbContour->SetState(TRISTATE_FALSE);
2360dde
+        }
2360dde
+    }
2360dde
+    else if (pButton == m_pTsbAutoGrowHeight)
2360dde
+        m_pTsbAutoGrowSize->SetState(m_pTsbAutoGrowHeight->GetState());
2360dde
+
2360dde
     bool bAutoGrowWidth  = m_pTsbAutoGrowWidth->GetState() == TRISTATE_TRUE;
2360dde
     bool bAutoGrowHeight = m_pTsbAutoGrowHeight->GetState() == TRISTATE_TRUE;
2360dde
     bool bFitToSize      = m_pTsbFitToSize->GetState() == TRISTATE_TRUE;
2360dde
@@ -701,10 +710,10 @@ bool SvxTextAttrPage::IsTextDirectionLeftToRight() const
2360dde
 
2360dde
 void SvxTextAttrPage::PageCreated(const SfxAllItemSet& aSet)
2360dde
 {
2360dde
-    const OfaPtrItem* pViewItem = aSet.GetItem<OfaPtrItem>(SID_SVXTEXTATTRPAGE_VIEW, false);
2360dde
+    const CntUInt16Item* pObjTypeItem = aSet.GetItem<CntUInt16Item>(SID_SVXTEXTATTRPAGE_OBJKIND, false);
2360dde
 
2360dde
-    if (pViewItem)
2360dde
-        SetView( static_cast<SdrView *>(pViewItem->GetValue()));
2360dde
+    if (pObjTypeItem)
2360dde
+        SetObjKind(static_cast<SdrObjKind>(pObjTypeItem->GetValue()));
2360dde
 
2360dde
     Construct();
2360dde
 }
2360dde
diff --git a/cui/uiconfig/ui/textattrtabpage.ui b/cui/uiconfig/ui/textattrtabpage.ui
2360dde
index 15574d6..dc0059b 100644
2360dde
--- a/cui/uiconfig/ui/textattrtabpage.ui
2360dde
+++ b/cui/uiconfig/ui/textattrtabpage.ui
2360dde
@@ -1,5 +1,5 @@
2360dde
 
2360dde
-
2360dde
+
2360dde
 <interface>
2360dde
   <requires lib="gtk+" version="3.0"/>
2360dde
   <requires lib="LibreOffice" version="1.0"/>
2360dde
@@ -16,139 +16,189 @@
2360dde
     <property name="orientation">vertical</property>
2360dde
     <property name="spacing">12</property>
2360dde
     <child>
2360dde
-      <object class="GtkFrame" id="frame1">
2360dde
+      <object class="GtkGrid">
2360dde
         <property name="visible">True</property>
2360dde
         <property name="can_focus">False</property>
2360dde
-        <property name="label_xalign">0</property>
2360dde
-        <property name="shadow_type">none</property>
2360dde
+        <property name="column_homogeneous">True</property>
2360dde
         <child>
2360dde
-          <object class="GtkAlignment" id="alignment1">
2360dde
+          <object class="GtkFrame" id="drawingtext">
2360dde
             <property name="visible">True</property>
2360dde
             <property name="can_focus">False</property>
2360dde
-            <property name="top_padding">6</property>
2360dde
-            <property name="left_padding">12</property>
2360dde
+            <property name="label_xalign">0</property>
2360dde
+            <property name="shadow_type">none</property>
2360dde
             <child>
2360dde
-              <object class="GtkGrid" id="grid1">
2360dde
+              <object class="GtkAlignment" id="alignment1">
2360dde
                 <property name="visible">True</property>
2360dde
                 <property name="can_focus">False</property>
2360dde
-                <property name="row_spacing">6</property>
2360dde
-                <property name="column_spacing">12</property>
2360dde
-                <child>
2360dde
-                  <object class="GtkCheckButton" id="TSB_AUTOGROW_WIDTH">
2360dde
-                    <property name="label" translatable="yes">Fit wi_dth to text</property>
2360dde
-                    <property name="visible">True</property>
2360dde
-                    <property name="can_focus">False</property>
2360dde
-                    <property name="receives_default">False</property>
2360dde
-                    <property name="use_underline">True</property>
2360dde
-                    <property name="xalign">0</property>
2360dde
-                    <property name="inconsistent">True</property>
2360dde
-                    <property name="draw_indicator">True</property>
2360dde
-                  </object>
2360dde
-                  <packing>
2360dde
-                    <property name="left_attach">0</property>
2360dde
-                    <property name="top_attach">0</property>
2360dde
-                  </packing>
2360dde
-                </child>
2360dde
-                <child>
2360dde
-                  <object class="GtkCheckButton" id="TSB_AUTOGROW_HEIGHT">
2360dde
-                    <property name="label" translatable="yes">Fit h_eight to text</property>
2360dde
-                    <property name="visible">True</property>
2360dde
-                    <property name="can_focus">False</property>
2360dde
-                    <property name="receives_default">False</property>
2360dde
-                    <property name="use_underline">True</property>
2360dde
-                    <property name="xalign">0</property>
2360dde
-                    <property name="inconsistent">True</property>
2360dde
-                    <property name="draw_indicator">True</property>
2360dde
-                  </object>
2360dde
-                  <packing>
2360dde
-                    <property name="left_attach">0</property>
2360dde
-                    <property name="top_attach">1</property>
2360dde
-                  </packing>
2360dde
-                </child>
2360dde
-                <child>
2360dde
-                  <object class="GtkCheckButton" id="TSB_FIT_TO_SIZE">
2360dde
-                    <property name="label" translatable="yes">_Fit to frame</property>
2360dde
-                    <property name="visible">True</property>
2360dde
-                    <property name="can_focus">False</property>
2360dde
-                    <property name="receives_default">False</property>
2360dde
-                    <property name="use_underline">True</property>
2360dde
-                    <property name="xalign">0</property>
2360dde
-                    <property name="inconsistent">True</property>
2360dde
-                    <property name="draw_indicator">True</property>
2360dde
-                  </object>
2360dde
-                  <packing>
2360dde
-                    <property name="left_attach">0</property>
2360dde
-                    <property name="top_attach">2</property>
2360dde
-                  </packing>
2360dde
-                </child>
2360dde
-                <child>
2360dde
-                  <object class="GtkCheckButton" id="TSB_CONTOUR">
2360dde
-                    <property name="label" translatable="yes">_Adjust to contour</property>
2360dde
-                    <property name="visible">True</property>
2360dde
-                    <property name="can_focus">False</property>
2360dde
-                    <property name="receives_default">False</property>
2360dde
-                    <property name="use_underline">True</property>
2360dde
-                    <property name="xalign">0</property>
2360dde
-                    <property name="inconsistent">True</property>
2360dde
-                    <property name="draw_indicator">True</property>
2360dde
-                  </object>
2360dde
-                  <packing>
2360dde
-                    <property name="left_attach">0</property>
2360dde
-                    <property name="top_attach">3</property>
2360dde
-                  </packing>
2360dde
-                </child>
2360dde
+                <property name="top_padding">6</property>
2360dde
+                <property name="left_padding">12</property>
2360dde
                 <child>
2360dde
-                  <object class="GtkCheckButton" id="TSB_WORDWRAP_TEXT">
2360dde
-                    <property name="label" translatable="yes">_Word wrap text in shape</property>
2360dde
+                  <object class="GtkGrid" id="grid1">
2360dde
                     <property name="visible">True</property>
2360dde
                     <property name="can_focus">False</property>
2360dde
-                    <property name="receives_default">False</property>
2360dde
-                    <property name="use_underline">True</property>
2360dde
-                    <property name="xalign">0</property>
2360dde
-                    <property name="inconsistent">True</property>
2360dde
-                    <property name="draw_indicator">True</property>
2360dde
+                    <property name="row_spacing">6</property>
2360dde
+                    <property name="column_spacing">12</property>
2360dde
+                    <child>
2360dde
+                      <object class="GtkCheckButton" id="TSB_AUTOGROW_WIDTH">
2360dde
+                        <property name="label" translatable="yes">Fit wi_dth to text</property>
2360dde
+                        <property name="visible">True</property>
2360dde
+                        <property name="can_focus">True</property>
2360dde
+                        <property name="receives_default">False</property>
2360dde
+                        <property name="use_underline">True</property>
2360dde
+                        <property name="xalign">0</property>
2360dde
+                        <property name="inconsistent">True</property>
2360dde
+                        <property name="draw_indicator">True</property>
2360dde
+                      </object>
2360dde
+                      <packing>
2360dde
+                        <property name="left_attach">0</property>
2360dde
+                        <property name="top_attach">0</property>
2360dde
+                      </packing>
2360dde
+                    </child>
2360dde
+                    <child>
2360dde
+                      <object class="GtkCheckButton" id="TSB_AUTOGROW_HEIGHT">
2360dde
+                        <property name="label" translatable="yes">Fit h_eight to text</property>
2360dde
+                        <property name="visible">True</property>
2360dde
+                        <property name="can_focus">True</property>
2360dde
+                        <property name="receives_default">False</property>
2360dde
+                        <property name="use_underline">True</property>
2360dde
+                        <property name="xalign">0</property>
2360dde
+                        <property name="inconsistent">True</property>
2360dde
+                        <property name="draw_indicator">True</property>
2360dde
+                      </object>
2360dde
+                      <packing>
2360dde
+                        <property name="left_attach">0</property>
2360dde
+                        <property name="top_attach">1</property>
2360dde
+                      </packing>
2360dde
+                    </child>
2360dde
+                    <child>
2360dde
+                      <object class="GtkCheckButton" id="TSB_FIT_TO_SIZE">
2360dde
+                        <property name="label" translatable="yes">_Fit to frame</property>
2360dde
+                        <property name="visible">True</property>
2360dde
+                        <property name="can_focus">True</property>
2360dde
+                        <property name="receives_default">False</property>
2360dde
+                        <property name="use_underline">True</property>
2360dde
+                        <property name="xalign">0</property>
2360dde
+                        <property name="inconsistent">True</property>
2360dde
+                        <property name="draw_indicator">True</property>
2360dde
+                      </object>
2360dde
+                      <packing>
2360dde
+                        <property name="left_attach">0</property>
2360dde
+                        <property name="top_attach">2</property>
2360dde
+                      </packing>
2360dde
+                    </child>
2360dde
+                    <child>
2360dde
+                      <object class="GtkCheckButton" id="TSB_CONTOUR">
2360dde
+                        <property name="label" translatable="yes">_Adjust to contour</property>
2360dde
+                        <property name="visible">True</property>
2360dde
+                        <property name="can_focus">True</property>
2360dde
+                        <property name="receives_default">False</property>
2360dde
+                        <property name="use_underline">True</property>
2360dde
+                        <property name="xalign">0</property>
2360dde
+                        <property name="inconsistent">True</property>
2360dde
+                        <property name="draw_indicator">True</property>
2360dde
+                      </object>
2360dde
+                      <packing>
2360dde
+                        <property name="left_attach">0</property>
2360dde
+                        <property name="top_attach">3</property>
2360dde
+                      </packing>
2360dde
+                    </child>
2360dde
                   </object>
2360dde
-                  <packing>
2360dde
-                    <property name="left_attach">1</property>
2360dde
-                    <property name="top_attach">0</property>
2360dde
-                  </packing>
2360dde
                 </child>
2360dde
+              </object>
2360dde
+            </child>
2360dde
+            <child type="label">
2360dde
+              <object class="GtkLabel" id="label1">
2360dde
+                <property name="visible">True</property>
2360dde
+                <property name="can_focus">False</property>
2360dde
+                <property name="label" translatable="yes">Drawing Object Text</property>
2360dde
+                <property name="xalign">0</property>
2360dde
+                <attributes>
2360dde
+                  <attribute name="weight" value="bold"/>
2360dde
+                </attributes>
2360dde
+              </object>
2360dde
+            </child>
2360dde
+          </object>
2360dde
+          <packing>
2360dde
+            <property name="left_attach">0</property>
2360dde
+            <property name="top_attach">0</property>
2360dde
+          </packing>
2360dde
+        </child>
2360dde
+        <child>
2360dde
+          <object class="GtkFrame" id="customshapetext">
2360dde
+            <property name="visible">True</property>
2360dde
+            <property name="can_focus">False</property>
2360dde
+            <property name="label_xalign">0</property>
2360dde
+            <property name="shadow_type">none</property>
2360dde
+            <child>
2360dde
+              <object class="GtkAlignment" id="alignment4">
2360dde
+                <property name="visible">True</property>
2360dde
+                <property name="can_focus">False</property>
2360dde
+                <property name="top_padding">6</property>
2360dde
+                <property name="left_padding">12</property>
2360dde
                 <child>
2360dde
-                  <object class="GtkCheckButton" id="TSB_AUTOGROW_SIZE">
2360dde
-                    <property name="label" translatable="yes">_Resize shape to fit text</property>
2360dde
+                  <object class="GtkGrid" id="grid3">
2360dde
                     <property name="visible">True</property>
2360dde
                     <property name="can_focus">False</property>
2360dde
-                    <property name="receives_default">False</property>
2360dde
-                    <property name="use_underline">True</property>
2360dde
-                    <property name="xalign">0</property>
2360dde
-                    <property name="inconsistent">True</property>
2360dde
-                    <property name="draw_indicator">True</property>
2360dde
+                    <property name="row_spacing">6</property>
2360dde
+                    <property name="column_spacing">12</property>
2360dde
+                    <child>
2360dde
+                      <object class="GtkCheckButton" id="TSB_WORDWRAP_TEXT">
2360dde
+                        <property name="label" translatable="yes">_Word wrap text in shape</property>
2360dde
+                        <property name="visible">True</property>
2360dde
+                        <property name="can_focus">True</property>
2360dde
+                        <property name="receives_default">False</property>
2360dde
+                        <property name="use_underline">True</property>
2360dde
+                        <property name="xalign">0</property>
2360dde
+                        <property name="inconsistent">True</property>
2360dde
+                        <property name="draw_indicator">True</property>
2360dde
+                      </object>
2360dde
+                      <packing>
2360dde
+                        <property name="left_attach">0</property>
2360dde
+                        <property name="top_attach">0</property>
2360dde
+                      </packing>
2360dde
+                    </child>
2360dde
+                    <child>
2360dde
+                      <object class="GtkCheckButton" id="TSB_AUTOGROW_SIZE">
2360dde
+                        <property name="label" translatable="yes">_Resize shape to fit text</property>
2360dde
+                        <property name="visible">True</property>
2360dde
+                        <property name="can_focus">True</property>
2360dde
+                        <property name="receives_default">False</property>
2360dde
+                        <property name="use_underline">True</property>
2360dde
+                        <property name="xalign">0</property>
2360dde
+                        <property name="inconsistent">True</property>
2360dde
+                        <property name="draw_indicator">True</property>
2360dde
+                      </object>
2360dde
+                      <packing>
2360dde
+                        <property name="left_attach">0</property>
2360dde
+                        <property name="top_attach">1</property>
2360dde
+                      </packing>
2360dde
+                    </child>
2360dde
+                    <child>
2360dde
+                      <placeholder/>
2360dde
+                    </child>
2360dde
+                    <child>
2360dde
+                      <placeholder/>
2360dde
+                    </child>
2360dde
                   </object>
2360dde
-                  <packing>
2360dde
-                    <property name="left_attach">1</property>
2360dde
-                    <property name="top_attach">1</property>
2360dde
-                  </packing>
2360dde
-                </child>
2360dde
-                <child>
2360dde
-                  <placeholder/>
2360dde
-                </child>
2360dde
-                <child>
2360dde
-                  <placeholder/>
2360dde
                 </child>
2360dde
               </object>
2360dde
             </child>
2360dde
+            <child type="label">
2360dde
+              <object class="GtkLabel" id="label8">
2360dde
+                <property name="visible">True</property>
2360dde
+                <property name="can_focus">False</property>
2360dde
+                <property name="label" translatable="yes">Custom Shape Text</property>
2360dde
+                <property name="xalign">0</property>
2360dde
+                <attributes>
2360dde
+                  <attribute name="weight" value="bold"/>
2360dde
+                </attributes>
2360dde
+              </object>
2360dde
+            </child>
2360dde
           </object>
2360dde
-        </child>
2360dde
-        <child type="label">
2360dde
-          <object class="GtkLabel" id="label1">
2360dde
-            <property name="visible">True</property>
2360dde
-            <property name="can_focus">False</property>
2360dde
-            <property name="xalign">0</property>
2360dde
-            <property name="label" translatable="yes">Text</property>
2360dde
-            <attributes>
2360dde
-              <attribute name="weight" value="bold"/>
2360dde
-            </attributes>
2360dde
-          </object>
2360dde
+          <packing>
2360dde
+            <property name="left_attach">1</property>
2360dde
+            <property name="top_attach">0</property>
2360dde
+          </packing>
2360dde
         </child>
2360dde
       </object>
2360dde
       <packing>
2360dde
@@ -184,10 +234,10 @@
2360dde
                       <object class="GtkLabel" id="label4">
2360dde
                         <property name="visible">True</property>
2360dde
                         <property name="can_focus">False</property>
2360dde
-                        <property name="xalign">0</property>
2360dde
                         <property name="label" translatable="yes">_Left:</property>
2360dde
                         <property name="use_underline">True</property>
2360dde
                         <property name="mnemonic_widget">MTR_FLD_LEFT:0.00cm</property>
2360dde
+                        <property name="xalign">0</property>
2360dde
                       </object>
2360dde
                       <packing>
2360dde
                         <property name="left_attach">0</property>
2360dde
@@ -198,10 +248,10 @@
2360dde
                       <object class="GtkLabel" id="label5">
2360dde
                         <property name="visible">True</property>
2360dde
                         <property name="can_focus">False</property>
2360dde
-                        <property name="xalign">0</property>
2360dde
                         <property name="label" translatable="yes">_Right:</property>
2360dde
                         <property name="use_underline">True</property>
2360dde
                         <property name="mnemonic_widget">MTR_FLD_RIGHT:0.00cm</property>
2360dde
+                        <property name="xalign">0</property>
2360dde
                       </object>
2360dde
                       <packing>
2360dde
                         <property name="left_attach">0</property>
2360dde
@@ -212,10 +262,10 @@
2360dde
                       <object class="GtkLabel" id="label6">
2360dde
                         <property name="visible">True</property>
2360dde
                         <property name="can_focus">False</property>
2360dde
-                        <property name="xalign">0</property>
2360dde
                         <property name="label" translatable="yes">_Top:</property>
2360dde
                         <property name="use_underline">True</property>
2360dde
                         <property name="mnemonic_widget">MTR_FLD_TOP:0.00cm</property>
2360dde
+                        <property name="xalign">0</property>
2360dde
                       </object>
2360dde
                       <packing>
2360dde
                         <property name="left_attach">0</property>
2360dde
@@ -226,10 +276,10 @@
2360dde
                       <object class="GtkLabel" id="label7">
2360dde
                         <property name="visible">True</property>
2360dde
                         <property name="can_focus">False</property>
2360dde
-                        <property name="xalign">0</property>
2360dde
                         <property name="label" translatable="yes">_Bottom:</property>
2360dde
                         <property name="use_underline">True</property>
2360dde
                         <property name="mnemonic_widget">MTR_FLD_BOTTOM:0.00cm</property>
2360dde
+                        <property name="xalign">0</property>
2360dde
                       </object>
2360dde
                       <packing>
2360dde
                         <property name="left_attach">0</property>
2360dde
@@ -296,8 +346,8 @@
2360dde
               <object class="GtkLabel" id="label2">
2360dde
                 <property name="visible">True</property>
2360dde
                 <property name="can_focus">False</property>
2360dde
-                <property name="xalign">0</property>
2360dde
                 <property name="label" translatable="yes">Spacing to Borders</property>
2360dde
+                <property name="xalign">0</property>
2360dde
                 <attributes>
2360dde
                   <attribute name="weight" value="bold"/>
2360dde
                 </attributes>
2360dde
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
2360dde
index 1ec7daa..64333be 100644
2360dde
--- a/include/svx/svxids.hrc
2360dde
+++ b/include/svx/svxids.hrc
2360dde
@@ -886,7 +886,7 @@
2360dde
 #define SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET              ( SID_SVX_START + 1030 )
2360dde
 #define SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST          ( SID_SVX_START + 1031 )
2360dde
 #define SID_SVXTABULATORTABPAGE_CONTROLFLAGS            ( SID_SVX_START + 1032 )
2360dde
-#define SID_SVXTEXTATTRPAGE_VIEW                        ( SID_SVX_START + 1033 )
2360dde
+#define SID_SVXTEXTATTRPAGE_OBJKIND                     ( SID_SVX_START + 1033 )
2360dde
 #define SID_FLAG_TYPE                                   ( SID_SVX_START + 1034 )
2360dde
 #define SID_SWMODE_TYPE                                 ( SID_SVX_START + 1035 )
2360dde
 #define SID_DISABLE_CTL                                 ( SID_SVX_START + 1036 )
2360dde
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
2360dde
index c341a2c..5d0d6d2 100644
2360dde
--- a/sd/source/ui/dlg/prltempl.cxx
2360dde
+++ b/sd/source/ui/dlg/prltempl.cxx
2360dde
@@ -280,9 +280,14 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
2360dde
         }
2360dde
 
2360dde
     else if (nId == mnEffects)
2360dde
-        {
2360dde
-            rPage.PageCreated(aSet);
2360dde
-        }
2360dde
+    {
2360dde
+        rPage.PageCreated(aSet);
2360dde
+    }
2360dde
+    else if (nId == mnTextAtt)
2360dde
+    {
2360dde
+        aSet.Put(CntUInt16Item(SID_SVXTEXTATTRPAGE_OBJKIND, OBJ_TEXT));
2360dde
+        rPage.PageCreated(aSet);
2360dde
+    }
2360dde
 }
2360dde
 
2360dde
 const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const
2360dde
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx
2360dde
index 1189922..9a06ece 100644
2360dde
--- a/sd/source/ui/dlg/tabtempl.cxx
2360dde
+++ b/sd/source/ui/dlg/tabtempl.cxx
2360dde
@@ -24,8 +24,10 @@
2360dde
 #include <svx/drawitem.hxx>
2360dde
 #include <svl/intitem.hxx>
2360dde
 #include <svx/ofaitem.hxx>
2360dde
-#include <svx/svxgrahicitem.hxx>
2360dde
+#include <svx/svdmark.hxx>
2360dde
 #include <svx/svdmodel.hxx>
2360dde
+#include <svx/svdview.hxx>
2360dde
+#include <svx/svxgrahicitem.hxx>
2360dde
 #include <svl/cjkoptions.hxx>
2360dde
 
2360dde
 #include <svx/dialogs.hrc>
2360dde
@@ -156,7 +158,6 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
2360dde
     }
2360dde
     else if (nId == m_nTextId)
2360dde
     {
2360dde
-        aSet.Put(OfaPtrItem(SID_SVXTEXTATTRPAGE_VIEW,pSdrView));
2360dde
         rPage.PageCreated(aSet);
2360dde
     }
2360dde
     else if (nId == m_nDimensionId)
2360dde
-- 
2360dde
2.7.4
2360dde