Kaydet (Commit) 80761fd7 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld ShapeParagraphDialog

Change-Id: I8c3b3c0f6c0cfe133e1ec8eda8c10bbbaee5f010
Reviewed-on: https://gerrit.libreoffice.org/60584Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 3c24038f
......@@ -30,11 +30,9 @@ using namespace ::com::sun::star;
namespace chart
{
ShapeParagraphDialog::ShapeParagraphDialog(vcl::Window* pParent,
ShapeParagraphDialog::ShapeParagraphDialog(weld::Window* pParent,
const SfxItemSet* pAttr)
: SfxTabDialog(pParent, "ParagraphDialog",
"modules/schart/ui/paradialog.ui", pAttr)
, m_nTabPageId(0)
: SfxTabDialogController(pParent, "modules/schart/ui/paradialog.ui", "ParagraphDialog", pAttr)
{
SvtCJKOptions aCJKOptions;
......@@ -48,12 +46,12 @@ ShapeParagraphDialog::ShapeParagraphDialog(vcl::Window* pParent,
{
RemoveTabPage("labelTP_PARA_ASIAN");
}
m_nTabPageId = AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR);
AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR);
}
void ShapeParagraphDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage )
void ShapeParagraphDialog::PageCreated(const OString& rId, SfxTabPage& rPage)
{
if (nId == m_nTabPageId)
if (rId == "labelTP_TABULATOR")
{
SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
TabulatorDisableFlags const nFlags(( TabulatorDisableFlags::TypeMask &~TabulatorDisableFlags::TypeLeft ) |
......
......@@ -26,13 +26,12 @@ namespace chart
/** dialog for paragraph properties of shapes
*/
class ShapeParagraphDialog : public SfxTabDialog
class ShapeParagraphDialog : public SfxTabDialogController
{
public:
ShapeParagraphDialog(vcl::Window* pParent, const SfxItemSet* pAttr);
ShapeParagraphDialog(weld::Window* pParent, const SfxItemSet* pAttr);
private:
virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage) override;
sal_uInt16 m_nTabPageId;
virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
};
} // namespace chart
......
......@@ -547,10 +547,10 @@ void ShapeController::executeDispatch_ParagraphDialog()
aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) );
ScopedVclPtrInstance< ShapeParagraphDialog > pDlg( pChartWindow, &aNewAttr );
if ( pDlg->Execute() == RET_OK )
ShapeParagraphDialog aDlg(pChartWindow->GetFrameWeld(), &aNewAttr);
if (aDlg.execute() == RET_OK)
{
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
const SfxItemSet* pOutAttr = aDlg.GetOutputItemSet();
pDrawViewWrapper->SetAttributes( *pOutAttr );
}
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<!-- Generated with glade 3.22.1 -->
<interface domain="chart">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="ParagraphDialog">
......@@ -7,6 +7,9 @@
<property name="border_width">6</property>
<property name="title" translatable="yes" context="paradialog|ParagraphDialog">Paragraph</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>
......@@ -17,12 +20,10 @@
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<object class="GtkButton" id="reset">
<property name="label">gtk-revert-to-saved</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
......@@ -33,10 +34,12 @@
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
......@@ -47,8 +50,8 @@
</packing>
</child>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -58,12 +61,11 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="secondary">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="reset">
<property name="label">gtk-revert-to-saved</property>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -73,6 +75,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="secondary">True</property>
</packing>
</child>
</object>
......@@ -86,9 +89,10 @@
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="scrollable">True</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
......@@ -96,6 +100,30 @@
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="tab">
......@@ -115,6 +143,30 @@
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">1</property>
......@@ -139,6 +191,30 @@
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">2</property>
......@@ -162,6 +238,30 @@
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">3</property>
......@@ -188,10 +288,10 @@
</object>
</child>
<action-widgets>
<action-widget response="0">reset</action-widget>
<action-widget response="-5">ok</action-widget>
<action-widget response="-6">cancel</action-widget>
<action-widget response="-11">help</action-widget>
<action-widget response="0">reset</action-widget>
</action-widgets>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment