tdf#126070 Show scroll bars when preview overflows.

Change-Id: Ibb904fc1c5d283d8ca9d8ff8b2249d25d7091b5b
Reviewed-on: https://gerrit.libreoffice.org/75954
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
diff --git a/cui/uiconfig/ui/bulletandposition.ui b/cui/uiconfig/ui/bulletandposition.ui
index 1ac89c4..1b8c825 100644
--- a/cui/uiconfig/ui/bulletandposition.ui
+++ b/cui/uiconfig/ui/bulletandposition.ui
@@ -97,6 +97,9 @@
    <property name="default_width">0</property>
    <property name="default_height">0</property>
    <property name="type_hint">dialog</property>
    <child>
      <placeholder/>
    </child>
    <child internal-child="vbox">
      <object class="GtkBox" id="dialog-vbox1">
        <property name="can_focus">False</property>
@@ -622,7 +625,7 @@
                                        <property name="can_focus">True</property>
                                        <property name="receives_default">False</property>
                                        <property name="xalign">0</property>
                                        <property name="draw_indicator">True</property>
                                        <property name="draw_indicator">False</property>
                                        <child>
                                          <placeholder/>
                                        </child>
@@ -989,9 +992,9 @@
                        <property name="width_request">150</property>
                        <property name="visible">True</property>
                        <property name="can_focus">True</property>
                        <property name="hscrollbar_policy">never</property>
                        <property name="vscrollbar_policy">never</property>
                        <property name="shadow_type">in</property>
                        <property name="max_content_width">150</property>
                        <property name="max_content_height">300</property>
                        <child>
                          <object class="GtkViewport">
                            <property name="visible">True</property>
diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index 38c7b7e..26e8187 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -1215,6 +1215,10 @@ IMPL_LINK(SvxBulletAndPositionDlg, DistanceHdl_Impl, weld::MetricSpinButton&, rF
    {
        m_xDistBorderMF->set_text("");
    }

    sal_Int32 aLastLevelLSpace
        = pActNum->GetLevel(pActNum->GetLevelCount() - 1).GetAbsLSpace() / 40;
    m_aPreviewWIN.set_size_request(aLastLevelLSpace, 300);
}

IMPL_LINK(SvxBulletAndPositionDlg, RelativeHdl_Impl, weld::ToggleButton&, rBox, void)