Be sure the number format dialog content is in correct place
- use special container for content which is always above action area (place where ok/cancel buttons are) Change-Id: I53dea3d98e7c74d0b571fdc8a35932deb48a8ad6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138668 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140578 Tested-by: Jenkins
This commit is contained in:
@@ -31,12 +31,13 @@ using namespace ::com::sun::star;
|
||||
|
||||
NumberFormatDialog::NumberFormatDialog(weld::Window* pParent, const SfxItemSet& rSet)
|
||||
: SfxSingleTabDialogController(pParent, &rSet, "cui/ui/formatnumberdialog.ui", "FormatNumberDialog")
|
||||
, m_xContent( m_xBuilder->weld_container("content") )
|
||||
{
|
||||
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
|
||||
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT );
|
||||
if (fnCreatePage)
|
||||
{
|
||||
std::unique_ptr<SfxTabPage> xTabPage = (*fnCreatePage)(get_content_area(), this, &rSet);
|
||||
std::unique_ptr<SfxTabPage> xTabPage = (*fnCreatePage)(m_xContent.get(), this, &rSet);
|
||||
xTabPage->PageCreated(rSet);
|
||||
SetTabPage(std::move(xTabPage));
|
||||
}
|
||||
|
@@ -23,6 +23,7 @@
|
||||
namespace weld
|
||||
{
|
||||
class Window;
|
||||
class Container;
|
||||
}
|
||||
class SfxItemSet;
|
||||
class SfxItemPool;
|
||||
@@ -31,6 +32,8 @@ namespace chart
|
||||
{
|
||||
class NumberFormatDialog : public SfxSingleTabDialogController
|
||||
{
|
||||
std::unique_ptr<weld::Container> m_xContent;
|
||||
|
||||
public:
|
||||
NumberFormatDialog(weld::Window* pParent, const SfxItemSet& rSet);
|
||||
|
||||
|
@@ -11,14 +11,26 @@
|
||||
<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>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="content">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox" id="dialog-action_area1">
|
||||
<property name="can_focus">False</property>
|
||||
@@ -76,9 +88,6 @@
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
|
@@ -28,13 +28,14 @@
|
||||
|
||||
SwNumFormatDlg::SwNumFormatDlg(weld::Widget* pParent, const SfxItemSet& rSet)
|
||||
: SfxSingleTabDialogController(pParent, &rSet, "cui/ui/formatnumberdialog.ui", "FormatNumberDialog")
|
||||
, m_xContent( m_xBuilder->weld_container("content") )
|
||||
{
|
||||
// Create TabPage
|
||||
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
|
||||
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc(RID_SVXPAGE_NUMBERFORMAT);
|
||||
if ( fnCreatePage )
|
||||
{
|
||||
std::unique_ptr<SfxTabPage> xNewPage = (*fnCreatePage)(get_content_area(), this, &rSet);
|
||||
std::unique_ptr<SfxTabPage> xNewPage = (*fnCreatePage)(m_xContent.get(), this, &rSet);
|
||||
SfxAllItemSet aSet(*(rSet.GetPool()));
|
||||
aSet.Put(xNewPage->GetItemSet().Get( SID_ATTR_NUMBERFORMAT_INFO));
|
||||
xNewPage->PageCreated(aSet);
|
||||
|
@@ -24,11 +24,14 @@
|
||||
namespace weld
|
||||
{
|
||||
class Window;
|
||||
class Container;
|
||||
}
|
||||
class SfxItemSet;
|
||||
|
||||
class SwNumFormatDlg final : public SfxSingleTabDialogController
|
||||
{
|
||||
std::unique_ptr<weld::Container> m_xContent;
|
||||
|
||||
public:
|
||||
SwNumFormatDlg(weld::Widget* pParent, const SfxItemSet& rSet);
|
||||
};
|
||||
|
Reference in New Issue
Block a user