[Libreoffice-commits] core.git: framework/source solenv/sanitizers sw/inc sw/source sw/uiconfig

andreas kainz (via logerrit) logerrit at kemper.freedesktop.org
Fri Jan 24 21:20:51 UTC 2020


 framework/source/fwe/xml/toolboxdocumenthandler.cxx |    4 
 solenv/sanitizers/ui/modules/swriter.suppr          |    2 
 sw/inc/strings.hrc                                  |    2 
 sw/source/uibase/sidebar/WrapPropertyPanel.cxx      |  196 ---------------
 sw/source/uibase/sidebar/WrapPropertyPanel.hxx      |   27 --
 sw/uiconfig/swriter/ui/sidebarwrap.ui               |  254 +++++---------------
 6 files changed, 95 insertions(+), 390 deletions(-)

New commits:
commit a22de0aacc9fb4197e9051f572b1a9298b2472e2
Author:     andreas kainz <kainz.a at gmail.com>
AuthorDate: Thu Jan 23 23:34:59 2020 +0100
Commit:     andreas_kainz <kainz.a at gmail.com>
CommitDate: Fri Jan 24 22:20:17 2020 +0100

    tdf#130096 Wrap Sidebar update use common .uno commands and layout
    
    Change-Id: Ie8185169582616179fd96850283836f4e3d60ad1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87309
    Tested-by: Jenkins
    Reviewed-by: andreas_kainz <kainz.a at gmail.com>

diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 1ded389cdcce..a01e0fc649cf 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -369,6 +369,10 @@ void SAL_CALL OReadToolBoxDocumentHandler::startElement(
                             aCommandURL = ".uno:AlignRight";
                         else if (aCommandURL == ".uno:AlignRight")
                             aCommandURL = ".uno:AlignLeft";
+                        else if (aCommandURL == ".uno:WrapLeft")
+                            aCommandURL = ".uno:WrapRight";
+                        else if (aCommandURL == ".uno:WrapRight")
+                            aCommandURL = ".uno:WrapLeft";
                     }
 
                     auto aToolbarItemProp( comphelper::InitPropertySequence( {
diff --git a/solenv/sanitizers/ui/modules/swriter.suppr b/solenv/sanitizers/ui/modules/swriter.suppr
index 119f86201364..47348e2d58af 100644
--- a/solenv/sanitizers/ui/modules/swriter.suppr
+++ b/solenv/sanitizers/ui/modules/swriter.suppr
@@ -197,8 +197,6 @@ sw/uiconfig/swriter/ui/selectaddressdialog.ui://GtkLabel[@id='desc'] orphan-labe
 sw/uiconfig/swriter/ui/selectaddressdialog.ui://GtkLabel[@id='label2'] orphan-label
 sw/uiconfig/swriter/ui/selectaddressdialog.ui://GtkLabel[@id='connecting'] orphan-label
 sw/uiconfig/swriter/ui/selecttabledialog.ui://GtkLabel[@id='select'] orphan-label
-sw/uiconfig/swriter/ui/sidebarwrap.ui://GtkLabel[@id='label1'] orphan-label
-sw/uiconfig/swriter/ui/sidebarwrap.ui://GtkLabel[@id='customlabel'] orphan-label
 sw/uiconfig/swriter/ui/spellmenu.ui://GtkMenuItem[@id='spelldialog'] button-no-label
 sw/uiconfig/swriter/ui/spellmenu.ui://GtkMenuItem[@id='correctdialog'] button-no-label
 sw/uiconfig/swriter/ui/statisticsinfopage.ui://GtkLabel[@id='nopages'] orphan-label
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 561014a460a2..88bf8e91f5a2 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -1388,6 +1388,8 @@
 #define STR_AUTOMARK_YES                        NC_("createautomarkdialog|yes", "Yes")
 #define STR_AUTOMARK_NO                         NC_("createautomarkdialog|no", "No")
 
+#define STR_WRAP_PANEL_CUSTOM_STR               NC_("sidebarwrap|customlabel", "Custom")
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index 080946ff08dc..a2d033696de1 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -30,17 +30,11 @@
 #include <editeng/lrspitem.hxx>
 #include <editeng/ulspitem.hxx>
 #include <hintids.hxx>
+#include <strings.hrc>
 #include <uitool.hxx>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <comphelper/lok.hxx>
 
-const char UNO_WRAPOFF[] = ".uno:WrapOff";
-const char UNO_WRAPLEFT[] = ".uno:WrapLeft";
-const char UNO_WRAPRIGHT[] = ".uno:WrapRight";
-const char UNO_WRAPON[] = ".uno:WrapOn";
-const char UNO_WRAPTHROUGH[] = ".uno:WrapThrough";
-const char UNO_WRAPIDEAL[] = ".uno:WrapIdeal";
-
 namespace sw::sidebar {
 
 VclPtr<vcl::Window> WrapPropertyPanel::Create (
@@ -74,27 +68,15 @@ WrapPropertyPanel::WrapPropertyPanel(
     , nLeft(0)
     , nRight(0)
     // resources
-    , aCustomEntry()
+    , aCustomEntry(SwResId(STR_WRAP_PANEL_CUSTOM_STR))
     // controller items
-    , maSwNoWrapControl(FN_FRAME_NOWRAP, *pBindings, *this)
-    , maSwWrapLeftControl(FN_FRAME_WRAP, *pBindings, *this)
-    , maSwWrapRightControl(FN_FRAME_WRAP_RIGHT, *pBindings, *this)
-    , maSwWrapParallelControl(FN_FRAME_WRAP_LEFT, *pBindings, *this)
-    , maSwWrapThroughControl(FN_FRAME_WRAPTHRU, *pBindings, *this)
-    , maSwWrapIdealControl(FN_FRAME_WRAP_IDEAL, *pBindings, *this)
-    , maSwEnableContourControl(FN_FRAME_WRAP_CONTOUR, *pBindings, *this)
     , maSwLRSpacingControl(SID_ATTR_LRSPACE, *pBindings, *this)
     , maSwULSpacingControl(SID_ATTR_ULSPACE, *pBindings, *this)
-    , mxRBNoWrap(m_xBuilder->weld_radio_button("buttonnone"))
-    , mxRBWrapLeft(m_xBuilder->weld_radio_button("buttonbefore"))
-    , mxRBWrapRight(m_xBuilder->weld_radio_button("buttonafter"))
-    , mxRBWrapParallel(m_xBuilder->weld_radio_button("buttonparallel"))
-    , mxRBWrapThrough(m_xBuilder->weld_radio_button("buttonthrough"))
-    , mxRBIdealWrap(m_xBuilder->weld_radio_button("buttonoptimal"))
-    , mxEditContour(m_xBuilder->weld_button("editcontour"))
-    , mxEnableContour(m_xBuilder->weld_check_button("enablecontour"))
+    , mxWrapOptions1(m_xBuilder->weld_toolbar("wrapoptions1"))
+    , mxWrapOptions1Dispatch(new ToolbarUnoDispatcher(*mxWrapOptions1, rxFrame))
+    , mxWrapOptions2(m_xBuilder->weld_toolbar("wrapoptions2"))
+    , mxWrapOptions2Dispatch(new ToolbarUnoDispatcher(*mxWrapOptions2, rxFrame))
     , mxSpacingLB(m_xBuilder->weld_combo_box("spacingLB"))
-    , mxCustomEntry(m_xBuilder->weld_label("customlabel"))
 {
     FieldUnit eMetric = ::GetDfltMetric(false);
     SpacingListBox::Fill(IsInch(eMetric) ? SpacingType::SPACING_INCH : SpacingType::SPACING_CM, *mxSpacingLB);
@@ -109,24 +91,13 @@ WrapPropertyPanel::~WrapPropertyPanel()
 
 void WrapPropertyPanel::dispose()
 {
-    mxRBNoWrap.reset();
-    mxRBWrapLeft.reset();
-    mxRBWrapRight.reset();
-    mxRBWrapParallel.reset();
-    mxRBWrapThrough.reset();
-    mxRBIdealWrap.reset();
-    mxEnableContour.reset();
-    mxEditContour.reset();
     mxSpacingLB.reset();
-    mxCustomEntry.reset();
 
-    maSwNoWrapControl.dispose();
-    maSwWrapLeftControl.dispose();
-    maSwWrapRightControl.dispose();
-    maSwWrapParallelControl.dispose();
-    maSwWrapThroughControl.dispose();
-    maSwWrapIdealControl.dispose();
-    maSwEnableContourControl.dispose();
+    mxWrapOptions2Dispatch.reset();
+    mxWrapOptions2.reset();
+    mxWrapOptions1Dispatch.reset();
+    mxWrapOptions1.reset();
+
     maSwLRSpacingControl.dispose();
     maSwULSpacingControl.dispose();
 
@@ -135,54 +106,10 @@ void WrapPropertyPanel::dispose()
 
 void WrapPropertyPanel::Initialize()
 {
-    Link<weld::ToggleButton&,void> aLink = LINK(this, WrapPropertyPanel, WrapTypeHdl);
-    mxRBNoWrap->connect_toggled(aLink);
-    mxRBWrapLeft->connect_toggled(aLink);
-    mxRBWrapRight->connect_toggled(aLink);
-    mxRBWrapParallel->connect_toggled(aLink);
-    mxRBWrapThrough->connect_toggled(aLink);
-    mxRBIdealWrap->connect_toggled(aLink);
-
-    Link<weld::Button&,void> EditContourLink = LINK(this, WrapPropertyPanel, EditContourHdl);
-    mxEditContour->connect_clicked(EditContourLink);
-
-    if (comphelper::LibreOfficeKit::isActive())
-    {
-        // Disable Edit Contour button for LOK purposes.
-        mxEditContour->hide();
-    }
-
-    Link<weld::ToggleButton&, void> EnableContourLink = LINK(this,WrapPropertyPanel, EnableContourHdl);
-    mxEnableContour->connect_toggled(EnableContourLink);
     mxSpacingLB->connect_changed(LINK(this, WrapPropertyPanel, SpacingLBHdl));
 
-    mxRBNoWrap->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPOFF, mxFrame));
-    if ( AllSettings::GetLayoutRTL() )
-    {
-        mxRBWrapLeft->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPRIGHT, mxFrame));
-        mxRBWrapRight->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPLEFT, mxFrame));
-    }
-    else
-    {
-        mxRBWrapLeft->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPLEFT, mxFrame));
-        mxRBWrapRight->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPRIGHT, mxFrame));
-    }
-    mxRBWrapParallel->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPON, mxFrame));
-    mxRBWrapThrough->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPTHROUGH, mxFrame));
-    mxRBIdealWrap->set_image(vcl::CommandInfoProvider::GetXGraphicForCommand(UNO_WRAPIDEAL, mxFrame));
-
-    aCustomEntry = mxCustomEntry->get_label();
-
-    mpBindings->Update( FN_FRAME_NOWRAP );
-    mpBindings->Update( FN_FRAME_WRAP );
-    mpBindings->Update( FN_FRAME_WRAP_RIGHT );
-    mpBindings->Update( FN_FRAME_WRAP_LEFT );
-    mpBindings->Update( FN_FRAME_WRAPTHRU );
-    mpBindings->Update( FN_FRAME_WRAP_IDEAL );
-    mpBindings->Update( FN_FRAME_WRAP_CONTOUR );
     mpBindings->Update( SID_ATTR_LRSPACE );
     mpBindings->Update( SID_ATTR_ULSPACE );
-
 }
 
 void WrapPropertyPanel::UpdateSpacingLB()
@@ -208,21 +135,6 @@ void WrapPropertyPanel::UpdateSpacingLB()
     mxSpacingLB->set_active_text(aCustomEntry);
 }
 
-IMPL_LINK_NOARG(WrapPropertyPanel, EditContourHdl, weld::Button&, void)
-{
-    SfxBoolItem aItem(SID_CONTOUR_DLG, true);
-    mpBindings->GetDispatcher()->ExecuteList(SID_CONTOUR_DLG,
-            SfxCallMode::RECORD, { &aItem });
-}
-
-IMPL_LINK_NOARG(WrapPropertyPanel, EnableContourHdl, weld::ToggleButton&, void)
-{
-    bool IsContour = mxEnableContour->get_active();
-    SfxBoolItem aItem(FN_FRAME_WRAP_CONTOUR, IsContour);
-    mpBindings->GetDispatcher()->ExecuteList(FN_FRAME_WRAP_CONTOUR,
-            SfxCallMode::RECORD, { &aItem });
-}
-
 IMPL_LINK(WrapPropertyPanel, SpacingLBHdl, weld::ComboBox&, rBox, void)
 {
     sal_uInt16 nVal = rBox.get_active_id().toUInt32();
@@ -237,97 +149,11 @@ IMPL_LINK(WrapPropertyPanel, SpacingLBHdl, weld::ComboBox&, rBox, void)
             SfxCallMode::RECORD, { &aULItem });
 }
 
-IMPL_LINK_NOARG(WrapPropertyPanel, WrapTypeHdl, weld::ToggleButton&, void)
-{
-    sal_uInt16 nSlot = 0;
-    if ( mxRBWrapLeft->get_active() )
-    {
-        nSlot = FN_FRAME_WRAP_LEFT;
-    }
-    else if( mxRBWrapRight->get_active() )
-    {
-        nSlot = FN_FRAME_WRAP_RIGHT;
-    }
-    else if ( mxRBWrapParallel->get_active() )
-    {
-        nSlot = FN_FRAME_WRAP;
-    }
-    else if( mxRBWrapThrough->get_active() )
-    {
-        nSlot = FN_FRAME_WRAPTHRU;
-    }
-    else if( mxRBIdealWrap->get_active() )
-    {
-        nSlot = FN_FRAME_WRAP_IDEAL;
-    }
-    else
-    {
-        nSlot = FN_FRAME_NOWRAP;
-    }
-    SfxBoolItem bStateItem( nSlot, true );
-    mpBindings->GetDispatcher()->ExecuteList(nSlot,
-            SfxCallMode::RECORD, { &bStateItem });
-
-}
-
-void WrapPropertyPanel::UpdateEditContour()
-{
-    if (mxRBNoWrap->get_active() || mxRBWrapThrough->get_active())
-    {
-        mxEnableContour->set_active(false);
-        mxEnableContour->set_sensitive(false);
-    }
-    else
-    {
-        mxEnableContour->set_sensitive(true);
-    }
-
-}
-
 void WrapPropertyPanel::NotifyItemUpdate(
     const sal_uInt16 nSId,
     const SfxItemState eState,
     const SfxPoolItem* pState)
 {
-    if ( eState == SfxItemState::DEFAULT &&
-        dynamic_cast< const SfxBoolItem *>( pState ) !=  nullptr )
-    {
-        //Set Radio Button enable
-        mxRBNoWrap->set_sensitive(true);
-        mxRBWrapLeft->set_sensitive(true);
-        mxRBWrapRight->set_sensitive(true);
-        mxRBWrapParallel->set_sensitive(true);
-        mxRBWrapThrough->set_sensitive(true);
-        mxRBIdealWrap->set_sensitive(true);
-        mxEnableContour->set_sensitive(true);
-
-        const SfxBoolItem* pBoolItem = static_cast< const SfxBoolItem* >( pState );
-        switch( nSId )
-        {
-        case FN_FRAME_WRAP_RIGHT:
-            mxRBWrapRight->set_active( pBoolItem->GetValue() );
-            break;
-        case FN_FRAME_WRAP_LEFT:
-            mxRBWrapLeft->set_active( pBoolItem->GetValue() );
-            break;
-        case FN_FRAME_WRAPTHRU:
-            mxRBWrapThrough->set_active( pBoolItem->GetValue() );
-            break;
-        case FN_FRAME_WRAP_IDEAL:
-            mxRBIdealWrap->set_active( pBoolItem->GetValue() );
-            break;
-        case FN_FRAME_WRAP:
-            mxRBWrapParallel->set_active( pBoolItem->GetValue() );
-            break;
-        case FN_FRAME_WRAP_CONTOUR:
-            mxEnableContour->set_active( pBoolItem->GetValue() );
-            break;
-        case FN_FRAME_NOWRAP:
-            mxRBNoWrap->set_active( pBoolItem->GetValue() );
-            break;
-        }
-        UpdateEditContour();
-    }
     switch(nSId)
     {
         case SID_ATTR_LRSPACE:
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
index 9d1eeac36369..b62922eed009 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
@@ -21,6 +21,7 @@
 
 #include <svx/sidebar/PanelLayout.hxx>
 #include <sfx2/sidebar/ControllerItem.hxx>
+#include <sfx2/weldutils.hxx>
 #include <com/sun/star/frame/XFrame.hpp>
 #include <vcl/weld.hxx>
 
@@ -63,34 +64,20 @@ namespace sw { namespace sidebar {
         OUString aCustomEntry;
 
         // Controller Items
-        ::sfx2::sidebar::ControllerItem maSwNoWrapControl;
-        ::sfx2::sidebar::ControllerItem maSwWrapLeftControl;
-        ::sfx2::sidebar::ControllerItem maSwWrapRightControl;
-        ::sfx2::sidebar::ControllerItem maSwWrapParallelControl;
-        ::sfx2::sidebar::ControllerItem maSwWrapThroughControl;
-        ::sfx2::sidebar::ControllerItem maSwWrapIdealControl;
-        ::sfx2::sidebar::ControllerItem maSwEnableContourControl;
         ::sfx2::sidebar::ControllerItem maSwLRSpacingControl;
         ::sfx2::sidebar::ControllerItem maSwULSpacingControl;
 
-        std::unique_ptr<weld::RadioButton> mxRBNoWrap;
-        std::unique_ptr<weld::RadioButton> mxRBWrapLeft;
-        std::unique_ptr<weld::RadioButton> mxRBWrapRight;
-        std::unique_ptr<weld::RadioButton> mxRBWrapParallel;
-        std::unique_ptr<weld::RadioButton> mxRBWrapThrough;
-        std::unique_ptr<weld::RadioButton> mxRBIdealWrap;
-        std::unique_ptr<weld::Button> mxEditContour;
-        std::unique_ptr<weld::CheckButton> mxEnableContour;
+        std::unique_ptr<weld::Toolbar> mxWrapOptions1;
+        std::unique_ptr<ToolbarUnoDispatcher> mxWrapOptions1Dispatch;
+
+        std::unique_ptr<weld::Toolbar> mxWrapOptions2;
+        std::unique_ptr<ToolbarUnoDispatcher> mxWrapOptions2Dispatch;
+
         std::unique_ptr<weld::ComboBox> mxSpacingLB;
-        std::unique_ptr<weld::Label> mxCustomEntry;
 
         void Initialize();
-        void UpdateEditContour();
         void UpdateSpacingLB();
 
-        DECL_LINK(WrapTypeHdl, weld::ToggleButton&, void);
-        DECL_LINK(EnableContourHdl, weld::ToggleButton&, void);
-        DECL_LINK(EditContourHdl, weld::Button&, void);
         DECL_LINK(SpacingLBHdl, weld::ComboBox&, void);
     };
 
diff --git a/sw/uiconfig/swriter/ui/sidebarwrap.ui b/sw/uiconfig/swriter/ui/sidebarwrap.ui
index c193a7c91ec9..6d8e730804c2 100644
--- a/sw/uiconfig/swriter/ui/sidebarwrap.ui
+++ b/sw/uiconfig/swriter/ui/sidebarwrap.ui
@@ -5,253 +5,141 @@
   <object class="GtkGrid" id="WrapPropertyPanel">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="row_homogeneous">True</property>
-    <property name="column_homogeneous">True</property>
     <child>
-      <object class="GtkBox" id="box1">
+      <object class="GtkGrid">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
         <property name="border_width">6</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">12</property>
+        <property name="row_spacing">3</property>
+        <property name="column_spacing">6</property>
+        <property name="column_homogeneous">True</property>
         <child>
-          <object class="GtkBox" id="box2">
+          <object class="GtkLabel" id="label1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="spacing">6</property>
-            <property name="homogeneous">True</property>
-            <child>
-              <object class="GtkRadioButton" id="buttonnone">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonnone|tooltip_text">None</property>
-                <property name="use_underline">True</property>
-                <property name="xalign">0</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="buttonnone-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" context="sidebarwrap|buttonnone-atkobject">None</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkRadioButton" id="buttonparallel">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonparallel|tooltip_text">Parallel</property>
-                <property name="use_underline">True</property>
-                <property name="xalign">0</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">buttonnone</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="buttonparallel-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" context="sidebarwrap|buttonparallel-atkobject">Parallel</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkRadioButton" id="buttonoptimal">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonoptimal|tooltip_text">Optimal</property>
-                <property name="use_underline">True</property>
-                <property name="xalign">0</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">buttonnone</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="buttonoptimal-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" context="sidebarwrap|buttonoptimal-atkobject">Optimal</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
+            <property name="label" translatable="yes" context="sidebarwrap|label1">Spacing:</property>
+            <property name="use_underline">True</property>
+            <property name="mnemonic_widget">spacingLB</property>
+            <property name="xalign">0</property>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkComboBoxText" id="spacingLB">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="tooltip_text" translatable="yes" context="sidebarwrap|spacingLB|tooltip_text">Set the amount of space between the image and surrounding text</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToolbar" id="wrapoptions1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="toolbar_style">icons</property>
+            <property name="show_arrow">False</property>
+            <property name="icon_size">2</property>
             <child>
-              <object class="GtkRadioButton" id="buttonbefore">
+              <object class="GtkRadioToolButton" id=".uno:WrapOff">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonbefore|tooltip_text">Before</property>
+                <property name="can_focus">False</property>
+                <property name="tooltip_text" translatable="yes" context="sidebarwrap|wrapoff|tooltip_text">Wrap Off</property>
                 <property name="use_underline">True</property>
-                <property name="xalign">0</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">buttonnone</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="buttonbefore-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" context="sidebarwrap|buttonbefore-atkobject">Before</property>
-                  </object>
-                </child>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
+                <property name="homogeneous">False</property>
               </packing>
             </child>
             <child>
-              <object class="GtkRadioButton" id="buttonafter">
+              <object class="GtkRadioToolButton" id=".uno:WrapOn">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonafter|tooltip_text">After</property>
+                <property name="can_focus">False</property>
+                <property name="tooltip_text" translatable="yes" context="sidebarwrap|wrapon|tooltip_text">Wrap On</property>
                 <property name="use_underline">True</property>
-                <property name="xalign">0</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">buttonnone</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="buttonafter-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" context="sidebarwrap|buttonafter-atkobject">After</property>
-                  </object>
-                </child>
+                <property name="group">.uno:WrapOff</property>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">4</property>
+                <property name="homogeneous">False</property>
               </packing>
             </child>
             <child>
-              <object class="GtkRadioButton" id="buttonthrough">
+              <object class="GtkRadioToolButton" id=".uno:WrapIdeal">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes" context="sidebarwrap|buttonthrough|tooltip_text">Through</property>
+                <property name="can_focus">False</property>
+                <property name="tooltip_text" translatable="yes" context="sidebarwrap|wrapideal|tooltip_text">Wrap Ideal</property>
                 <property name="use_underline">True</property>
-                <property name="xalign">0</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">buttonnone</property>
-                <child internal-child="accessible">
-                  <object class="AtkObject" id="buttonthrough-atkobject">
-                    <property name="AtkObject::accessible-name" translatable="yes" context="sidebarwrap|buttonthrough-atkobject">Through</property>
-                  </object>
-                </child>
+                <property name="group">.uno:WrapOff</property>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">5</property>
+                <property name="homogeneous">False</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
+            <property name="left_attach">0</property>
+            <property name="top_attach">0</property>
           </packing>
         </child>
         <child>
-          <object class="GtkBox" id="box3">
+          <object class="GtkToolbar" id="wrapoptions2">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="spacing">6</property>
+            <property name="toolbar_style">icons</property>
+            <property name="show_arrow">False</property>
+            <property name="icon_size">2</property>
             <child>
-              <object class="GtkCheckButton" id="enablecontour">
-                <property name="label" translatable="yes" context="sidebarwrap|enablecontour">Enable Contour</property>
+              <object class="GtkRadioToolButton" id=".uno:WrapLeft">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="tooltip_text" translatable="yes" context="sidebarwrap|enablecontour|tooltip_text">Click to automatically trim unnecessary parts of the image</property>
+                <property name="can_focus">False</property>
+                <property name="tooltip_text" translatable="yes" context="sidebarwrap|wrapleft|tooltip_text">Wrap Left</property>
                 <property name="use_underline">True</property>
-                <property name="xalign">0</property>
-                <property name="draw_indicator">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="editcontour">
-                <property name="label" translatable="yes" context="sidebarwrap|editcontour">Edit Contour</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="tooltip_text" translatable="yes" context="sidebarwrap|editcontour|tooltip_text">Edit the trimmed area of the image</property>
+                <property name="group">.uno:WrapOff</property>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
+                <property name="homogeneous">False</property>
               </packing>
             </child>
-          </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkBox" id="box4">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="spacing">6</property>
             <child>
-              <object class="GtkLabel" id="label1">
+              <object class="GtkRadioToolButton" id=".uno:WrapRight">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes" context="sidebarwrap|label1">Spacing:</property>
+                <property name="tooltip_text" translatable="yes" context="sidebarwrap|wrapright|tooltip_text">Wrap Right</property>
+                <property name="use_underline">True</property>
+                <property name="group">.uno:WrapOff</property>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
+                <property name="homogeneous">False</property>
               </packing>
             </child>
             <child>
-              <object class="GtkComboBoxText" id="spacingLB">
+              <object class="GtkRadioToolButton" id=".uno:WrapThrough">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="tooltip_text" translatable="yes" context="sidebarwrap|spacingLB|tooltip_text">Set the amount of space between the image and surrounding text</property>
+                <property name="tooltip_text" translatable="yes" context="sidebarwrap|wrapthrough|tooltip_text">Wrap Through</property>
+                <property name="use_underline">True</property>
+                <property name="group">.uno:WrapOff</property>
               </object>
               <packing>
                 <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
+                <property name="homogeneous">False</property>
               </packing>
             </child>
           </object>
           <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkLabel" id="customlabel">
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes" context="sidebarwrap|customlabel">Custom</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">3</property>
+            <property name="left_attach">1</property>
+            <property name="top_attach">0</property>
           </packing>
         </child>
       </object>


More information about the Libreoffice-commits mailing list