tdf#130933 wraptools are berserk

probably a regression from...

commit a22de0aacc9fb4197e9051f572b1a9298b2472e2
Date:   Thu Jan 23 23:34:59 2020 +0100

    tdf#130096 Wrap Sidebar update use common .uno commands and layout

because there were two toolbars with radiobuttons each toolbar has
to have one active radiobutton so they fight it out toggling on and
off when attempting to make one toolbar with all inactive radiobuttons

Change-Id: Iafe70dc1328ad80744cb4569365e25bf5eba6b53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89596
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
index 78f8137..e0770cb 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx
@@ -71,10 +71,8 @@ WrapPropertyPanel::WrapPropertyPanel(
    // controller items
    , maSwLRSpacingControl(SID_ATTR_LRSPACE, *pBindings, *this)
    , maSwULSpacingControl(SID_ATTR_ULSPACE, *pBindings, *this)
    , mxWrapOptions1(m_xBuilder->weld_toolbar("wrapoptions1"))
    , mxWrapOptions1Dispatch(new ToolbarUnoDispatcher(*mxWrapOptions1, rxFrame))
    , mxWrapOptions2(m_xBuilder->weld_toolbar("wrapoptions2"))
    , mxWrapOptions2Dispatch(new ToolbarUnoDispatcher(*mxWrapOptions2, rxFrame))
    , mxWrapOptions(m_xBuilder->weld_toolbar("wrapoptions"))
    , mxWrapOptionsDispatch(new ToolbarUnoDispatcher(*mxWrapOptions, rxFrame))
    , mxSpacingLB(m_xBuilder->weld_combo_box("spacingLB"))
{
    FieldUnit eMetric = ::GetDfltMetric(false);
@@ -92,10 +90,8 @@ void WrapPropertyPanel::dispose()
{
    mxSpacingLB.reset();

    mxWrapOptions2Dispatch.reset();
    mxWrapOptions2.reset();
    mxWrapOptions1Dispatch.reset();
    mxWrapOptions1.reset();
    mxWrapOptionsDispatch.reset();
    mxWrapOptions.reset();

    maSwLRSpacingControl.dispose();
    maSwULSpacingControl.dispose();
diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
index befe9dd..d093474 100644
--- a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
+++ b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx
@@ -66,11 +66,8 @@ namespace sw { namespace sidebar {
        ::sfx2::sidebar::ControllerItem maSwLRSpacingControl;
        ::sfx2::sidebar::ControllerItem maSwULSpacingControl;

        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::Toolbar> mxWrapOptions;
        std::unique_ptr<ToolbarUnoDispatcher> mxWrapOptionsDispatch;

        std::unique_ptr<weld::ComboBox> mxSpacingLB;

diff --git a/sw/uiconfig/swriter/ui/sidebarwrap.ui b/sw/uiconfig/swriter/ui/sidebarwrap.ui
index 1cf1609..b48338b 100644
--- a/sw/uiconfig/swriter/ui/sidebarwrap.ui
+++ b/sw/uiconfig/swriter/ui/sidebarwrap.ui
@@ -60,7 +60,7 @@
            <property name="can_focus">False</property>
            <property name="halign">end</property>
            <child>
              <object class="GtkToolbar" id="wrapoptions1">
              <object class="GtkToolbar" id="wrapoptions">
                <property name="visible">True</property>
                <property name="can_focus">False</property>
                <property name="toolbar_style">icons</property>
@@ -105,20 +105,6 @@
                    <property name="homogeneous">False</property>
                  </packing>
                </child>
              </object>
              <packing>
                <property name="expand">False</property>
                <property name="fill">True</property>
                <property name="position">0</property>
              </packing>
            </child>
            <child>
              <object class="GtkToolbar" id="wrapoptions2">
                <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="GtkRadioToolButton" id=".uno:WrapLeft">
                    <property name="visible">True</property>
@@ -162,7 +148,7 @@
              <packing>
                <property name="expand">False</property>
                <property name="fill">True</property>
                <property name="position">1</property>
                <property name="position">0</property>
              </packing>
            </child>
          </object>