Blame SOURCES/0001-implement-dialog-control-over-enhanced-shape-control.patch

f325b2
From e9680d99c4403bd07ab4d50939a5d7791bceb98c Mon Sep 17 00:00:00 2001
f325b2
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
f325b2
Date: Tue, 13 Oct 2015 13:16:31 +0100
f325b2
Subject: [PATCH] implement dialog control over enhanced shape control points
f325b2
f325b2
use case is a desire to enable viewing and setting rounded rectangle radiuses
f325b2
to an exact known value
f325b2
f325b2
Change-Id: I7e6a4db0699076950adf5869a61825159766c46a
f325b2
(cherry picked from commit b859d84e471fdb70b61607d2d919a7907d074bd0)
f325b2
---
f325b2
 cui/source/inc/transfrm.hxx           |   6 +
f325b2
 cui/source/tabpages/transfrm.cxx      | 137 ++++++++++++++-
f325b2
 cui/uiconfig/ui/slantcornertabpage.ui | 310 ++++++++++++++++++++++++++++++----
f325b2
 include/svx/EnhancedCustomShape2d.hxx |   1 +
f325b2
 4 files changed, 416 insertions(+), 38 deletions(-)
f325b2
f325b2
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
f325b2
index 2945d28..2fe2524 100644
f325b2
--- a/cui/source/inc/transfrm.hxx
f325b2
+++ b/cui/source/inc/transfrm.hxx
f325b2
@@ -239,6 +239,12 @@ private:
f325b2
     VclPtr<VclFrame>            m_pFlAngle;
f325b2
     VclPtr<MetricField>         m_pMtrAngle;
f325b2
 
f325b2
+    VclPtr<VclFrame>            m_aControlGroups[2];
f325b2
+    VclPtr<VclContainer>        m_aControlGroupX[2];
f325b2
+    VclPtr<MetricField>         m_aControlX[2];
f325b2
+    VclPtr<VclContainer>        m_aControlGroupY[2];
f325b2
+    VclPtr<MetricField>         m_aControlY[2];
f325b2
+
f325b2
     const SfxItemSet&   rOutAttrs;
f325b2
 
f325b2
     const SdrView*      pView;
f325b2
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
f325b2
index 950a4b2..43375c2 100644
f325b2
--- a/cui/source/tabpages/transfrm.cxx
f325b2
+++ b/cui/source/tabpages/transfrm.cxx
f325b2
@@ -18,6 +18,8 @@
f325b2
  */
f325b2
 
f325b2
 #include <sfx2/app.hxx>
f325b2
+#include <svx/EnhancedCustomShape2d.hxx>
f325b2
+#include <svx/svdundo.hxx>
f325b2
 #include <svx/svdview.hxx>
f325b2
 #include <svx/svdobj.hxx>
f325b2
 #include <svx/svdpagv.hxx>
f325b2
@@ -430,6 +432,15 @@ SvxSlantTabPage::SvxSlantTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr
f325b2
     get(m_pFlAngle, "FL_SLANT");
f325b2
     get(m_pMtrAngle, "MTR_FLD_ANGLE");
f325b2
 
f325b2
+    for (int i = 0; i < 2; ++i)
f325b2
+    {
f325b2
+        get(m_aControlGroups[i], "controlgroups" + OString::number(i+1));
f325b2
+        get(m_aControlGroupX[i], "controlgroupx" + OString::number(i+1));
f325b2
+        get(m_aControlX[i], "controlx" + OString::number(i+1));
f325b2
+        get(m_aControlGroupY[i], "controlgroupy" + OString::number(i+1));
f325b2
+        get(m_aControlY[i], "controly" + OString::number(i+1));
f325b2
+    }
f325b2
+
f325b2
     // this page needs ExchangeSupport
f325b2
     SetExchangeSupport();
f325b2
 
f325b2
@@ -450,6 +461,14 @@ void SvxSlantTabPage::dispose()
f325b2
     m_pMtrRadius.clear();
f325b2
     m_pFlAngle.clear();
f325b2
     m_pMtrAngle.clear();
f325b2
+    for (int i = 0; i < 2; ++i)
f325b2
+    {
f325b2
+        m_aControlGroups[i].clear();
f325b2
+        m_aControlGroupX[i].clear();
f325b2
+        m_aControlX[i].clear();
f325b2
+        m_aControlGroupY[i].clear();
f325b2
+        m_aControlY[i].clear();
f325b2
+    }
f325b2
     SvxTabPage::dispose();
f325b2
 }
f325b2
 
f325b2
@@ -506,10 +525,56 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs)
f325b2
         rAttrs->Put( SfxBoolItem( SID_ATTR_TRANSFORM_SHEAR_VERTICAL, false ) );
f325b2
     }
f325b2
 
f325b2
-    return bModified;
f325b2
-}
f325b2
+    bool bControlPointsChanged = false;
f325b2
+    for (int i = 0; i < 2; ++i)
f325b2
+    {
f325b2
+        bControlPointsChanged |= (m_aControlX[i]->IsValueChangedFromSaved() ||
f325b2
+                                  m_aControlY[i]->IsValueChangedFromSaved());
f325b2
+    }
f325b2
+
f325b2
+    if (!bControlPointsChanged)
f325b2
+        return bModified;
f325b2
+
f325b2
+    SdrObject* pObj = pView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
f325b2
+    SdrModel* pModel = pObj->GetModel();
f325b2
+    SdrUndoAction* pUndo = pModel->IsUndoEnabled() ?
f325b2
+                pModel->GetSdrUndoFactory().CreateUndoAttrObject(*pObj) :
f325b2
+                nullptr;
f325b2
 
f325b2
+    if (pUndo)
f325b2
+        pModel->BegUndo(pUndo->GetComment());
f325b2
+
f325b2
+    EnhancedCustomShape2d aShape(pObj);
f325b2
+    Rectangle aLogicRect = aShape.GetLogicRect();
f325b2
+
f325b2
+    for (int i = 0; i < 2; ++i)
f325b2
+    {
f325b2
+        if (m_aControlX[i]->IsValueChangedFromSaved() || m_aControlY[i]->IsValueChangedFromSaved())
f325b2
+        {
f325b2
+            Point aNewPosition(GetCoreValue(*m_aControlX[i], ePoolUnit),
f325b2
+                               GetCoreValue(*m_aControlY[i], ePoolUnit));
f325b2
+            aNewPosition.Move(aLogicRect.Left(), aLogicRect.Top());
f325b2
+
f325b2
+            css::awt::Point aPosition;
f325b2
+            aPosition.X = aNewPosition.X();
f325b2
+            aPosition.Y = aNewPosition.Y();
f325b2
+
f325b2
+            aShape.SetHandleControllerPosition(i, aPosition);
f325b2
+        }
f325b2
+    }
f325b2
+
f325b2
+    pObj->SetChanged();
f325b2
+    pObj->BroadcastObjectChange();
f325b2
+    bModified = true;
f325b2
+
f325b2
+    if (pUndo)
f325b2
+    {
f325b2
+        pModel->AddUndo(pUndo);
f325b2
+        pModel->EndUndo();
f325b2
+    }
f325b2
 
f325b2
+    return bModified;
f325b2
+}
f325b2
 
f325b2
 void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
f325b2
 {
f325b2
@@ -561,17 +626,76 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
f325b2
     }
f325b2
 
f325b2
     m_pMtrAngle->SaveValue();
f325b2
-}
f325b2
-
f325b2
 
f325b2
+    const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
f325b2
+    if (rMarkList.GetMarkCount() == 1)
f325b2
+    {
f325b2
+        SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
f325b2
+        SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier();
f325b2
+        if (eKind == OBJ_CUSTOMSHAPE)
f325b2
+        {
f325b2
+            EnhancedCustomShape2d aShape(pObj);
f325b2
+            Point aInitialPosition;
f325b2
+            for (int i = 0; i < 2; ++i)
f325b2
+            {
f325b2
+                if (!aShape.GetHandlePosition(i, aInitialPosition))
f325b2
+                    break;
f325b2
+                m_aControlGroups[i]->Enable();
f325b2
+                css::awt::Point aPosition;
f325b2
+
f325b2
+                aPosition.X = SAL_MAX_INT32;
f325b2
+                aPosition.Y = SAL_MAX_INT32;
f325b2
+                aShape.SetHandleControllerPosition(i, aPosition);
f325b2
+                Point aMaxPosition;
f325b2
+                aShape.GetHandlePosition(i, aMaxPosition);
f325b2
+
f325b2
+                aPosition.X = SAL_MIN_INT32;
f325b2
+                aPosition.Y = SAL_MIN_INT32;
f325b2
+                aShape.SetHandleControllerPosition(i, aPosition);
f325b2
+                Point aMinPosition;
f325b2
+                aShape.GetHandlePosition(i, aMinPosition);
f325b2
+
f325b2
+                Rectangle aLogicRect = aShape.GetLogicRect();
f325b2
+                aMaxPosition.Move(-aLogicRect.Left(), -aLogicRect.Top());
f325b2
+                aMinPosition.Move(-aLogicRect.Left(), -aLogicRect.Top());
f325b2
+
f325b2
+                aPosition.X = aInitialPosition.X();
f325b2
+                aPosition.Y = aInitialPosition.Y();
f325b2
+                aInitialPosition.Move(-aLogicRect.Left(), -aLogicRect.Top());
f325b2
+                aShape.SetHandleControllerPosition(i, aPosition);
f325b2
+
f325b2
+                SetMetricValue(*m_aControlX[i], aInitialPosition.X(), ePoolUnit);
f325b2
+                SetMetricValue(*m_aControlY[i], aInitialPosition.Y(), ePoolUnit);
f325b2
+
f325b2
+                if (aMaxPosition.X() == aMinPosition.X())
f325b2
+                    m_aControlGroupX[i]->Disable();
f325b2
+                else
f325b2
+                {
f325b2
+                    m_aControlX[i]->SetMin(aMinPosition.X(), FUNIT_MM);
f325b2
+                    m_aControlX[i]->SetMax(aMaxPosition.X(), FUNIT_MM);
f325b2
+                }
f325b2
+                if (aMaxPosition.Y() == aMinPosition.Y())
f325b2
+                    m_aControlGroupY[i]->Disable();
f325b2
+                else
f325b2
+                {
f325b2
+                    m_aControlY[i]->SetMin(aMinPosition.Y(), FUNIT_MM);
f325b2
+                    m_aControlY[i]->SetMax(aMaxPosition.Y(), FUNIT_MM);
f325b2
+                }
f325b2
+            }
f325b2
+        }
f325b2
+    }
f325b2
+    for (int i = 0; i < 2; ++i)
f325b2
+    {
f325b2
+        m_aControlX[i]->SaveValue();
f325b2
+        m_aControlY[i]->SaveValue();
f325b2
+    }
f325b2
+}
f325b2
 
f325b2
 VclPtr<SfxTabPage> SvxSlantTabPage::Create( vcl::Window* pWindow, const SfxItemSet* rOutAttrs )
f325b2
 {
f325b2
     return VclPtr<SvxSlantTabPage>::Create( pWindow, *rOutAttrs );
f325b2
 }
f325b2
 
f325b2
-
f325b2
-
f325b2
 void SvxSlantTabPage::ActivatePage( const SfxItemSet& rSet )
f325b2
 {
f325b2
     SfxRectangleItem const * pRectItem = NULL;
f325b2
@@ -620,7 +744,6 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage(vcl::Window* pParent, const SfxIt
f325b2
     , mfOldWidth(0.0)
f325b2
     , mfOldHeight(0.0)
f325b2
 {
f325b2
-
f325b2
     get(m_pFlPosition, "FL_POSITION");
f325b2
     get(m_pMtrPosX, "MTR_FLD_POS_X");
f325b2
     get(m_pMtrPosY, "MTR_FLD_POS_Y");
f325b2
diff --git a/cui/uiconfig/ui/slantcornertabpage.ui b/cui/uiconfig/ui/slantcornertabpage.ui
f325b2
index 37b7b0e..b3ce646 100644
f325b2
--- a/cui/uiconfig/ui/slantcornertabpage.ui
f325b2
+++ b/cui/uiconfig/ui/slantcornertabpage.ui
f325b2
@@ -13,12 +13,132 @@
f325b2
     <property name="step_increment">1</property>
f325b2
     <property name="page_increment">10</property>
f325b2
   </object>
f325b2
-  <object class="GtkBox" id="SlantAndCornerRadius">
f325b2
+  <object class="GtkGrid" id="SlantAndCornerRadius">
f325b2
     <property name="visible">True</property>
f325b2
     <property name="can_focus">False</property>
f325b2
     <property name="border_width">6</property>
f325b2
-    <property name="orientation">vertical</property>
f325b2
-    <property name="spacing">12</property>
f325b2
+    <property name="row_spacing">24</property>
f325b2
+    <property name="column_spacing">12</property>
f325b2
+    <child>
f325b2
+      <object class="GtkFrame" id="controlgroups1">
f325b2
+        <property name="visible">True</property>
f325b2
+        <property name="sensitive">False</property>
f325b2
+        <property name="can_focus">False</property>
f325b2
+        <property name="label_xalign">0</property>
f325b2
+        <property name="shadow_type">none</property>
f325b2
+        <child>
f325b2
+          <object class="GtkAlignment" id="alignment3">
f325b2
+            <property name="visible">True</property>
f325b2
+            <property name="can_focus">False</property>
f325b2
+            <property name="top_padding">6</property>
f325b2
+            <property name="left_padding">12</property>
f325b2
+            <child>
f325b2
+              <object class="GtkGrid" id="grid1">
f325b2
+                <property name="visible">True</property>
f325b2
+                <property name="can_focus">False</property>
f325b2
+                <property name="row_spacing">12</property>
f325b2
+                <property name="column_spacing">6</property>
f325b2
+                <child>
f325b2
+                  <object class="GtkBox" id="controlgroupx1">
f325b2
+                    <property name="visible">True</property>
f325b2
+                    <property name="can_focus">False</property>
f325b2
+                    <property name="spacing">12</property>
f325b2
+                    <child>
f325b2
+                      <object class="GtkLabel" id="label5">
f325b2
+                        <property name="visible">True</property>
f325b2
+                        <property name="can_focus">False</property>
f325b2
+                        <property name="label" translatable="yes">_X:</property>
f325b2
+                        <property name="use_underline">True</property>
f325b2
+                        <property name="mnemonic_widget">controlx1:0.00cm</property>
f325b2
+                        <property name="xalign">0</property>
f325b2
+                      </object>
f325b2
+                      <packing>
f325b2
+                        <property name="expand">False</property>
f325b2
+                        <property name="fill">True</property>
f325b2
+                        <property name="position">0</property>
f325b2
+                      </packing>
f325b2
+                    </child>
f325b2
+                    <child>
f325b2
+                      <object class="GtkSpinButton" id="controlx1:0.00cm">
f325b2
+                        <property name="visible">True</property>
f325b2
+                        <property name="can_focus">True</property>
f325b2
+                        <property name="invisible_char">•</property>
f325b2
+                        <property name="text" translatable="yes">0.00</property>
f325b2
+                        <property name="digits">2</property>
f325b2
+                      </object>
f325b2
+                      <packing>
f325b2
+                        <property name="expand">False</property>
f325b2
+                        <property name="fill">True</property>
f325b2
+                        <property name="position">1</property>
f325b2
+                      </packing>
f325b2
+                    </child>
f325b2
+                  </object>
f325b2
+                  <packing>
f325b2
+                    <property name="left_attach">0</property>
f325b2
+                    <property name="top_attach">0</property>
f325b2
+                  </packing>
f325b2
+                </child>
f325b2
+                <child>
f325b2
+                  <object class="GtkBox" id="controlgroupy1">
f325b2
+                    <property name="visible">True</property>
f325b2
+                    <property name="can_focus">False</property>
f325b2
+                    <property name="spacing">12</property>
f325b2
+                    <child>
f325b2
+                      <object class="GtkLabel" id="label6">
f325b2
+                        <property name="visible">True</property>
f325b2
+                        <property name="can_focus">False</property>
f325b2
+                        <property name="label" translatable="yes">_Y:</property>
f325b2
+                        <property name="use_underline">True</property>
f325b2
+                        <property name="mnemonic_widget">controly1:0.00cm</property>
f325b2
+                        <property name="xalign">0</property>
f325b2
+                      </object>
f325b2
+                      <packing>
f325b2
+                        <property name="expand">False</property>
f325b2
+                        <property name="fill">True</property>
f325b2
+                        <property name="position">0</property>
f325b2
+                      </packing>
f325b2
+                    </child>
f325b2
+                    <child>
f325b2
+                      <object class="GtkSpinButton" id="controly1:0.00cm">
f325b2
+                        <property name="visible">True</property>
f325b2
+                        <property name="can_focus">True</property>
f325b2
+                        <property name="invisible_char">•</property>
f325b2
+                        <property name="text" translatable="yes">0.00</property>
f325b2
+                        <property name="digits">2</property>
f325b2
+                      </object>
f325b2
+                      <packing>
f325b2
+                        <property name="expand">False</property>
f325b2
+                        <property name="fill">True</property>
f325b2
+                        <property name="position">1</property>
f325b2
+                      </packing>
f325b2
+                    </child>
f325b2
+                  </object>
f325b2
+                  <packing>
f325b2
+                    <property name="left_attach">0</property>
f325b2
+                    <property name="top_attach">1</property>
f325b2
+                  </packing>
f325b2
+                </child>
f325b2
+              </object>
f325b2
+            </child>
f325b2
+          </object>
f325b2
+        </child>
f325b2
+        <child type="label">
f325b2
+          <object class="GtkLabel" id="label3">
f325b2
+            <property name="visible">True</property>
f325b2
+            <property name="can_focus">False</property>
f325b2
+            <property name="label" translatable="yes">Control Point 1</property>
f325b2
+            <property name="xalign">0</property>
f325b2
+            <attributes>
f325b2
+              <attribute name="weight" value="bold"/>
f325b2
+            </attributes>
f325b2
+          </object>
f325b2
+        </child>
f325b2
+      </object>
f325b2
+      <packing>
f325b2
+        <property name="left_attach">0</property>
f325b2
+        <property name="top_attach">1</property>
f325b2
+      </packing>
f325b2
+    </child>
f325b2
     <child>
f325b2
       <object class="GtkFrame" id="FL_RADIUS">
f325b2
         <property name="visible">True</property>
f325b2
@@ -32,37 +152,36 @@
f325b2
             <property name="top_padding">6</property>
f325b2
             <property name="left_padding">12</property>
f325b2
             <child>
f325b2
-              <object class="GtkBox" id="box2">
f325b2
+              <object class="GtkGrid" id="grid2">
f325b2
                 <property name="visible">True</property>
f325b2
                 <property name="can_focus">False</property>
f325b2
-                <property name="spacing">12</property>
f325b2
+                <property name="column_spacing">12</property>
f325b2
                 <child>
f325b2
                   <object class="GtkLabel" id="FT_RADIUS">
f325b2
                     <property name="visible">True</property>
f325b2
                     <property name="can_focus">False</property>
f325b2
-                    <property name="xalign">0</property>
f325b2
                     <property name="label" translatable="yes">_Radius:</property>
f325b2
                     <property name="use_underline">True</property>
f325b2
                     <property name="mnemonic_widget">MTR_FLD_RADIUS:0.00cm</property>
f325b2
+                    <property name="xalign">0</property>
f325b2
                   </object>
f325b2
                   <packing>
f325b2
-                    <property name="expand">False</property>
f325b2
-                    <property name="fill">True</property>
f325b2
-                    <property name="position">0</property>
f325b2
+                    <property name="left_attach">0</property>
f325b2
+                    <property name="top_attach">0</property>
f325b2
                   </packing>
f325b2
                 </child>
f325b2
                 <child>
f325b2
                   <object class="GtkSpinButton" id="MTR_FLD_RADIUS:0.00cm">
f325b2
                     <property name="visible">True</property>
f325b2
-                    <property name="can_focus">False</property>
f325b2
+                    <property name="can_focus">True</property>
f325b2
                     <property name="invisible_char">•</property>
f325b2
+                    <property name="text" translatable="yes">0.00</property>
f325b2
                     <property name="adjustment">adjustmentRADIUS</property>
f325b2
                     <property name="digits">2</property>
f325b2
                   </object>
f325b2
                   <packing>
f325b2
-                    <property name="expand">False</property>
f325b2
-                    <property name="fill">True</property>
f325b2
-                    <property name="position">1</property>
f325b2
+                    <property name="left_attach">1</property>
f325b2
+                    <property name="top_attach">0</property>
f325b2
                   </packing>
f325b2
                 </child>
f325b2
               </object>
f325b2
@@ -73,8 +192,8 @@
f325b2
           <object class="GtkLabel" id="label1">
f325b2
             <property name="visible">True</property>
f325b2
             <property name="can_focus">False</property>
f325b2
-            <property name="xalign">0</property>
f325b2
             <property name="label" translatable="yes">Corner Radius</property>
f325b2
+            <property name="xalign">0</property>
f325b2
             <attributes>
f325b2
               <attribute name="weight" value="bold"/>
f325b2
             </attributes>
f325b2
@@ -82,9 +201,8 @@
f325b2
         </child>
f325b2
       </object>
f325b2
       <packing>
f325b2
-        <property name="expand">False</property>
f325b2
-        <property name="fill">True</property>
f325b2
-        <property name="position">0</property>
f325b2
+        <property name="left_attach">0</property>
f325b2
+        <property name="top_attach">0</property>
f325b2
       </packing>
f325b2
     </child>
f325b2
     <child>
f325b2
@@ -100,37 +218,36 @@
f325b2
             <property name="top_padding">6</property>
f325b2
             <property name="left_padding">12</property>
f325b2
             <child>
f325b2
-              <object class="GtkBox" id="box3">
f325b2
+              <object class="GtkGrid" id="grid3">
f325b2
                 <property name="visible">True</property>
f325b2
                 <property name="can_focus">False</property>
f325b2
-                <property name="spacing">12</property>
f325b2
+                <property name="column_spacing">12</property>
f325b2
                 <child>
f325b2
                   <object class="GtkLabel" id="FT_ANGLE">
f325b2
                     <property name="visible">True</property>
f325b2
                     <property name="can_focus">False</property>
f325b2
-                    <property name="xalign">0</property>
f325b2
                     <property name="label" translatable="yes">_Angle:</property>
f325b2
                     <property name="use_underline">True</property>
f325b2
                     <property name="mnemonic_widget">MTR_FLD_ANGLE:0.00degrees</property>
f325b2
+                    <property name="xalign">0</property>
f325b2
                   </object>
f325b2
                   <packing>
f325b2
-                    <property name="expand">False</property>
f325b2
-                    <property name="fill">True</property>
f325b2
-                    <property name="position">0</property>
f325b2
+                    <property name="left_attach">0</property>
f325b2
+                    <property name="top_attach">0</property>
f325b2
                   </packing>
f325b2
                 </child>
f325b2
                 <child>
f325b2
                   <object class="GtkSpinButton" id="MTR_FLD_ANGLE:0.00degrees">
f325b2
                     <property name="visible">True</property>
f325b2
-                    <property name="can_focus">False</property>
f325b2
+                    <property name="can_focus">True</property>
f325b2
                     <property name="invisible_char">•</property>
f325b2
+                    <property name="text" translatable="yes">0.00</property>
f325b2
                     <property name="adjustment">adjustmentSLANT</property>
f325b2
                     <property name="digits">2</property>
f325b2
                   </object>
f325b2
                   <packing>
f325b2
-                    <property name="expand">False</property>
f325b2
-                    <property name="fill">True</property>
f325b2
-                    <property name="position">1</property>
f325b2
+                    <property name="left_attach">1</property>
f325b2
+                    <property name="top_attach">0</property>
f325b2
                   </packing>
f325b2
                 </child>
f325b2
               </object>
f325b2
@@ -141,8 +258,128 @@
f325b2
           <object class="GtkLabel" id="label2">
f325b2
             <property name="visible">True</property>
f325b2
             <property name="can_focus">False</property>
f325b2
-            <property name="xalign">0</property>
f325b2
             <property name="label" translatable="yes">Slant</property>
f325b2
+            <property name="xalign">0</property>
f325b2
+            <attributes>
f325b2
+              <attribute name="weight" value="bold"/>
f325b2
+            </attributes>
f325b2
+          </object>
f325b2
+        </child>
f325b2
+      </object>
f325b2
+      <packing>
f325b2
+        <property name="left_attach">1</property>
f325b2
+        <property name="top_attach">0</property>
f325b2
+      </packing>
f325b2
+    </child>
f325b2
+    <child>
f325b2
+      <object class="GtkFrame" id="controlgroups2">
f325b2
+        <property name="visible">True</property>
f325b2
+        <property name="sensitive">False</property>
f325b2
+        <property name="can_focus">False</property>
f325b2
+        <property name="label_xalign">0</property>
f325b2
+        <property name="shadow_type">none</property>
f325b2
+        <child>
f325b2
+          <object class="GtkAlignment" id="alignment4">
f325b2
+            <property name="visible">True</property>
f325b2
+            <property name="can_focus">False</property>
f325b2
+            <property name="top_padding">6</property>
f325b2
+            <property name="left_padding">12</property>
f325b2
+            <child>
f325b2
+              <object class="GtkGrid" id="grid4">
f325b2
+                <property name="visible">True</property>
f325b2
+                <property name="can_focus">False</property>
f325b2
+                <property name="row_spacing">12</property>
f325b2
+                <property name="column_spacing">6</property>
f325b2
+                <child>
f325b2
+                  <object class="GtkBox" id="controlgroupx2">
f325b2
+                    <property name="visible">True</property>
f325b2
+                    <property name="can_focus">False</property>
f325b2
+                    <property name="spacing">12</property>
f325b2
+                    <child>
f325b2
+                      <object class="GtkLabel" id="label4">
f325b2
+                        <property name="visible">True</property>
f325b2
+                        <property name="can_focus">False</property>
f325b2
+                        <property name="label" translatable="yes">_X:</property>
f325b2
+                        <property name="use_underline">True</property>
f325b2
+                        <property name="mnemonic_widget">controlx2:0.00cm</property>
f325b2
+                        <property name="xalign">0</property>
f325b2
+                      </object>
f325b2
+                      <packing>
f325b2
+                        <property name="expand">False</property>
f325b2
+                        <property name="fill">True</property>
f325b2
+                        <property name="position">0</property>
f325b2
+                      </packing>
f325b2
+                    </child>
f325b2
+                    <child>
f325b2
+                      <object class="GtkSpinButton" id="controlx2:0.00cm">
f325b2
+                        <property name="visible">True</property>
f325b2
+                        <property name="can_focus">True</property>
f325b2
+                        <property name="invisible_char">•</property>
f325b2
+                        <property name="text" translatable="yes">0.00</property>
f325b2
+                        <property name="digits">2</property>
f325b2
+                      </object>
f325b2
+                      <packing>
f325b2
+                        <property name="expand">False</property>
f325b2
+                        <property name="fill">True</property>
f325b2
+                        <property name="position">1</property>
f325b2
+                      </packing>
f325b2
+                    </child>
f325b2
+                  </object>
f325b2
+                  <packing>
f325b2
+                    <property name="left_attach">0</property>
f325b2
+                    <property name="top_attach">0</property>
f325b2
+                  </packing>
f325b2
+                </child>
f325b2
+                <child>
f325b2
+                  <object class="GtkBox" id="controlgroupy2">
f325b2
+                    <property name="visible">True</property>
f325b2
+                    <property name="can_focus">False</property>
f325b2
+                    <property name="spacing">12</property>
f325b2
+                    <child>
f325b2
+                      <object class="GtkLabel" id="label7">
f325b2
+                        <property name="visible">True</property>
f325b2
+                        <property name="can_focus">False</property>
f325b2
+                        <property name="label" translatable="yes">_Y:</property>
f325b2
+                        <property name="use_underline">True</property>
f325b2
+                        <property name="mnemonic_widget">controly2:0.00cm</property>
f325b2
+                        <property name="xalign">0</property>
f325b2
+                      </object>
f325b2
+                      <packing>
f325b2
+                        <property name="expand">False</property>
f325b2
+                        <property name="fill">True</property>
f325b2
+                        <property name="position">0</property>
f325b2
+                      </packing>
f325b2
+                    </child>
f325b2
+                    <child>
f325b2
+                      <object class="GtkSpinButton" id="controly2:0.00cm">
f325b2
+                        <property name="visible">True</property>
f325b2
+                        <property name="can_focus">True</property>
f325b2
+                        <property name="invisible_char">•</property>
f325b2
+                        <property name="text" translatable="yes">0.00</property>
f325b2
+                        <property name="digits">2</property>
f325b2
+                      </object>
f325b2
+                      <packing>
f325b2
+                        <property name="expand">False</property>
f325b2
+                        <property name="fill">True</property>
f325b2
+                        <property name="position">1</property>
f325b2
+                      </packing>
f325b2
+                    </child>
f325b2
+                  </object>
f325b2
+                  <packing>
f325b2
+                    <property name="left_attach">0</property>
f325b2
+                    <property name="top_attach">1</property>
f325b2
+                  </packing>
f325b2
+                </child>
f325b2
+              </object>
f325b2
+            </child>
f325b2
+          </object>
f325b2
+        </child>
f325b2
+        <child type="label">
f325b2
+          <object class="GtkLabel" id="label8">
f325b2
+            <property name="visible">True</property>
f325b2
+            <property name="can_focus">False</property>
f325b2
+            <property name="label" translatable="yes">Control Point 2</property>
f325b2
+            <property name="xalign">0</property>
f325b2
             <attributes>
f325b2
               <attribute name="weight" value="bold"/>
f325b2
             </attributes>
f325b2
@@ -150,16 +387,19 @@
f325b2
         </child>
f325b2
       </object>
f325b2
       <packing>
f325b2
-        <property name="expand">False</property>
f325b2
-        <property name="fill">True</property>
f325b2
-        <property name="position">1</property>
f325b2
+        <property name="left_attach">1</property>
f325b2
+        <property name="top_attach">1</property>
f325b2
       </packing>
f325b2
     </child>
f325b2
   </object>
f325b2
   <object class="GtkSizeGroup" id="sizegroup1">
f325b2
     <widgets>
f325b2
+      <widget name="label5"/>
f325b2
+      <widget name="label6"/>
f325b2
       <widget name="FT_RADIUS"/>
f325b2
       <widget name="FT_ANGLE"/>
f325b2
+      <widget name="label4"/>
f325b2
+      <widget name="label7"/>
f325b2
     </widgets>
f325b2
   </object>
f325b2
   <object class="GtkSizeGroup" id="sizegroup2">
f325b2
@@ -168,4 +408,12 @@
f325b2
       <widget name="MTR_FLD_ANGLE:0.00degrees"/>
f325b2
     </widgets>
f325b2
   </object>
f325b2
+  <object class="GtkSizeGroup" id="sizegroup5">
f325b2
+    <widgets>
f325b2
+      <widget name="controlx1:0.00cm"/>
f325b2
+      <widget name="controly1:0.00cm"/>
f325b2
+      <widget name="controlx2:0.00cm"/>
f325b2
+      <widget name="controly2:0.00cm"/>
f325b2
+    </widgets>
f325b2
+  </object>
f325b2
 </interface>
f325b2
diff --git a/include/svx/EnhancedCustomShape2d.hxx b/include/svx/EnhancedCustomShape2d.hxx
f325b2
index b9ed6f2..b1cc1b7 100644
f325b2
--- a/include/svx/EnhancedCustomShape2d.hxx
f325b2
+++ b/include/svx/EnhancedCustomShape2d.hxx
f325b2
@@ -191,6 +191,7 @@ class SVX_DLLPUBLIC EnhancedCustomShape2d : public SfxItemSet
f325b2
         SdrObject*              CreateObject( bool bLineGeometryNeededOnly );
f325b2
         void                    ApplyGluePoints( SdrObject* pObj );
f325b2
         Rectangle               GetTextRect() const;
f325b2
+        Rectangle               GetLogicRect() const { return aLogicRect; }
f325b2
 
f325b2
         sal_uInt32              GetHdlCount() const;
f325b2
         bool                    GetHandlePosition( const sal_uInt32 nIndex, Point& rReturnPosition ) const;
f325b2
-- 
f325b2
2.4.3
f325b2