diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-04 14:53:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-04 22:12:46 +0200 |
commit | 0920b04bca3d58d89b026bcf999ea43d0e855715 (patch) | |
tree | e819560b7822cda8cd76a0494a4ec6135f3585a9 /sw | |
parent | 2cab4acbe2aaaee6e5b9afeb68f3e555ecff2ec7 (diff) |
weld SwOutlineTabDialog
Change-Id: I55c0e9a62dd9dd970a87ef295bb5fbb82c80d2d8
Reviewed-on: https://gerrit.libreoffice.org/53848
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/swabstdlg.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/num.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/misc/outline.cxx | 94 | ||||
-rw-r--r-- | sw/source/uibase/inc/num.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/inc/outline.hxx | 20 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view0.cxx | 2 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/outlinenumbering.ui | 268 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/outlinenumberingpage.ui | 5 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/outlinepositionpage.ui | 20 |
11 files changed, 240 insertions, 190 deletions
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 3ed9b295a0b3..67aecd817661 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -463,7 +463,7 @@ public: virtual VclPtr<AbstractMailMergeCreateFromDlg> CreateMailMergeCreateFromDlg(vcl::Window* pParent) = 0; virtual VclPtr<AbstractMailMergeFieldConnectionsDlg> CreateMailMergeFieldConnectionsDlg(vcl::Window* pParent) = 0; virtual VclPtr<VclAbstractDialog> CreateMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr) = 0; - virtual VclPtr<SfxAbstractTabDialog> CreateOutlineTabDialog(vcl::Window* pParent, + virtual VclPtr<SfxAbstractTabDialog> CreateOutlineTabDialog(weld::Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell &) = 0; virtual VclPtr<SfxAbstractTabDialog> CreateSvxNumBulletTabDialog(vcl::Window* pParent, diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 60485e2137e4..c569a59652c0 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -1007,12 +1007,11 @@ VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSvxNumBulletTab return VclPtr<AbstractTabDialog_Impl>::Create( pDlg ); } -VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateOutlineTabDialog(vcl::Window* pParent, +VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateOutlineTabDialog(weld::Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell & rWrtSh ) { - VclPtr<SfxTabDialog> pDlg = VclPtr<SwOutlineTabDialog>::Create(pParent, pSwItemSet, rWrtSh); - return VclPtr<AbstractTabDialog_Impl>::Create( pDlg ); + return VclPtr<AbstractTabController_Impl>::Create(new SwOutlineTabDialog(pParent, pSwItemSet, rWrtSh)); } VclPtr<AbstractMultiTOXTabDialog> SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog( diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index f2f10176493f..dd6147e22c1c 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -636,7 +636,7 @@ public: virtual VclPtr<AbstractMailMergeCreateFromDlg> CreateMailMergeCreateFromDlg(vcl::Window* pParent) override; virtual VclPtr<AbstractMailMergeFieldConnectionsDlg> CreateMailMergeFieldConnectionsDlg(vcl::Window* pParent) override; virtual VclPtr<VclAbstractDialog> CreateMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr) override; - virtual VclPtr<SfxAbstractTabDialog> CreateOutlineTabDialog(vcl::Window* pParent, const SfxItemSet* pSwItemSet, + virtual VclPtr<SfxAbstractTabDialog> CreateOutlineTabDialog(weld::Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell &) override; virtual VclPtr<SfxAbstractTabDialog> CreateSvxNumBulletTabDialog(vcl::Window* pParent, const SfxItemSet* pSwItemSet, diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 28b4ba9ca185..906d46d580f0 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -142,7 +142,7 @@ SwNumPositionTabPage::~SwNumPositionTabPage() void SwNumPositionTabPage::dispose() { delete pActNum; - pOutlineDlg.clear(); + pOutlineDlg = nullptr; SfxTabPage::dispose(); } @@ -155,9 +155,9 @@ void SwNumPositionTabPage::InitControls() USHRT_MAX != nActNumLvl; m_xDistBorderMF->set_sensitive( !bLabelAlignmentPosAndSpaceModeActive && - ( bSingleSelection || bRelative || pOutlineDlg.get() != nullptr ) ); + ( bSingleSelection || bRelative || pOutlineDlg != nullptr ) ); m_xDistBorderFT->set_sensitive( !bLabelAlignmentPosAndSpaceModeActive && - ( bSingleSelection || bRelative || pOutlineDlg.get() != nullptr ) ); + ( bSingleSelection || bRelative || pOutlineDlg != nullptr ) ); bool bSetDistEmpty = false; bool bSameDistBorderNum = !bLabelAlignmentPosAndSpaceModeActive; @@ -349,7 +349,7 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) const SfxPoolItem* pItem; sal_uInt16 nTmpNumLvl = pOutlineDlg ? SwOutlineTabDialog::GetActNumLevel() : 0; - const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet(); + const SfxItemSet* pExampleSet = GetDialogController()->GetExampleSet(); if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, false, &pItem) != SfxItemState::UNKNOWN) { bPreset = static_cast<const SfxBoolItem*>(pItem)->GetValue(); diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 6baa4cc17535..8f225ec20ba2 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -124,7 +124,6 @@ SwNumNamesDlg::SwNumNamesDlg(weld::Window *pParent) m_xFormBox->connect_changed(LINK(this, SwNumNamesDlg, SelectHdl)); m_xFormBox->connect_row_activated(LINK(this, SwNumNamesDlg, DoubleClickHdl)); m_xFormBox->set_size_request(-1, m_xFormBox->get_height_rows(9)); - SelectHdl(*m_xFormBox); } static sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel) @@ -138,23 +137,22 @@ static sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel) sal_uInt16 SwOutlineTabDialog::nNumLevel = 1; -SwOutlineTabDialog::SwOutlineTabDialog(vcl::Window* pParent, const SfxItemSet* pSwItemSet, +SwOutlineTabDialog::SwOutlineTabDialog(weld::Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell &rSh) - : SfxTabDialog(pParent, "OutlineNumberingDialog", - "modules/swriter/ui/outlinenumbering.ui", pSwItemSet) + : SfxTabDialogController(pParent, "modules/swriter/ui/outlinenumbering.ui", "OutlineNumberingDialog", pSwItemSet) , rWrtSh(rSh) , pChapterNumRules(SW_MOD()->GetChapterNumRules()) , bModified(rWrtSh.IsModified()) + , m_xMenuButton(m_xBuilder->weld_menu_button("format")) { - PushButton* pUserButton = GetUserButton(); - pUserButton->SetClickHdl(LINK(this, SwOutlineTabDialog, FormHdl)); - pUserButton->SetAccessibleRole( css::accessibility::AccessibleRole::BUTTON_MENU ); + m_xMenuButton->connect_clicked(LINK(this, SwOutlineTabDialog, FormHdl)); + m_xMenuButton->connect_selected(LINK(this, SwOutlineTabDialog, MenuSelectHdl)); xNumRule.reset(new SwNumRule(*rSh.GetOutlineNumRule())); - GetCancelButton().SetClickHdl(LINK(this, SwOutlineTabDialog, CancelHdl)); + GetCancelButton().connect_clicked(LINK(this, SwOutlineTabDialog, CancelHdl)); - m_nNumPosId = AddTabPage("position", &SwNumPositionTabPage::Create, nullptr); - m_nOutlineId = AddTabPage("numbering", &SwOutlineSettingsTabPage::Create, nullptr); + AddTabPage("position", &SwNumPositionTabPage::Create, nullptr); + AddTabPage("numbering", &SwOutlineSettingsTabPage::Create, nullptr); OUString sHeadline; sal_uInt16 i; @@ -186,82 +184,71 @@ SwOutlineTabDialog::SwOutlineTabDialog(vcl::Window* pParent, const SfxItemSet* p SwOutlineTabDialog::~SwOutlineTabDialog() { - disposeOnce(); -} - -void SwOutlineTabDialog::dispose() -{ - xNumRule.reset(); - SfxTabDialog::dispose(); } -void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) +void SwOutlineTabDialog::PageCreated(const OString& rPageId, SfxTabPage& rPage) { - if (nPageId == m_nNumPosId) + if (rPageId == "position") { static_cast<SwNumPositionTabPage&>(rPage).SetWrtShell(&rWrtSh); static_cast<SwNumPositionTabPage&>(rPage).SetOutlineTabDialog(this); } - else if (nPageId == m_nOutlineId) + else if (rPageId == "numbering") { static_cast<SwOutlineSettingsTabPage&>(rPage).SetWrtShell(&rWrtSh); } } -IMPL_LINK_NOARG(SwOutlineTabDialog, CancelHdl, Button*, void) +IMPL_LINK_NOARG(SwOutlineTabDialog, CancelHdl, weld::Button&, void) { if (!bModified) rWrtSh.ResetModified(); - EndDialog(); + m_xDialog->response(RET_CANCEL); } -IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn, void ) +IMPL_LINK_NOARG(SwOutlineTabDialog, FormHdl, weld::Button&, void) { - PopupMenu *pFormMenu = get_menu("form"); // fill PopupMenu - for( sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i ) + for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i) { const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i); - if( pRules ) - pFormMenu->SetItemText(pFormMenu->GetItemId(i), pRules->GetName()); + if (!pRules) + continue; + m_xMenuButton->set_item_label("form" + OString::number(i + 1), pRules->GetName()); } - OString sHelpId(pFormMenu->GetHelpId(pFormMenu->GetItemId("form1"))); + OString sHelpId(m_xMenuButton->get_item_help_id("form1")); for (sal_Int32 i = 2; i <= 9; ++i) { - pFormMenu->SetHelpId(pFormMenu->GetItemId("form" + OString::number(i)), sHelpId); + m_xMenuButton->set_item_help_id("form" + OString::number(i), sHelpId); } - - pFormMenu->SetSelectHdl(LINK(this, SwOutlineTabDialog, MenuSelectHdl)); - pFormMenu->Execute(pBtn, tools::Rectangle(Point(0,0), pBtn->GetSizePixel()), PopupMenuFlags::ExecuteDown); } -IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu, bool ) +IMPL_LINK(SwOutlineTabDialog, MenuSelectHdl, const OString&, rIdent, void) { sal_uInt8 nLevelNo = 0; - OString sIdent = pMenu->GetCurItemIdent(); - if (sIdent == "form1") + if (rIdent == "form1") nLevelNo = 1; - else if (sIdent == "form2") + else if (rIdent == "form2") nLevelNo = 2; - else if (sIdent == "form3") + else if (rIdent == "form3") nLevelNo = 3; - else if (sIdent == "form4") + else if (rIdent == "form4") nLevelNo = 4; - else if (sIdent == "form5") + else if (rIdent == "form5") nLevelNo = 5; - else if (sIdent == "form6") + else if (rIdent == "form6") nLevelNo = 6; - else if (sIdent == "form7") + else if (rIdent == "form7") nLevelNo = 7; - else if (sIdent == "form8") + else if (rIdent == "form8") nLevelNo = 8; - else if (sIdent == "form9") + else if (rIdent == "form9") nLevelNo = 9; - else if (sIdent == "saveas") + else if (rIdent == "saveas") { - SwNumNamesDlg aDlg(GetFrameWeld()); + SwNumNamesDlg aDlg(m_xDialog.get()); const OUString *aStrArr[SwChapterNumRules::nMaxRules]; for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i) { @@ -277,9 +264,9 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu, bool ) const OUString aName(aDlg.GetName()); pChapterNumRules->ApplyNumRules( SwNumRulesWithName( *xNumRule, aName ), aDlg.GetCurEntryPos() ); - pMenu->SetItemText(pMenu->GetItemId(aDlg.GetCurEntryPos()), aName); + m_xMenuButton->set_item_label("form" + OString::number(aDlg.GetCurEntryPos() + 1), aName); } - return false; + return; } if( nLevelNo-- ) @@ -289,7 +276,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu, bool ) { xNumRule.reset(pRules->MakeNumRule(rWrtSh)); xNumRule->SetRuleType( OUTLINE_RULE ); - SfxTabPage* pOutlinePage = GetTabPage(m_nOutlineId); + SfxTabPage* pOutlinePage = GetTabPage("numbering"); assert(pOutlinePage); static_cast<SwOutlineSettingsTabPage*>(pOutlinePage)->SetNumRule(xNumRule.get()); } @@ -297,11 +284,8 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu, bool ) *xNumRule = *rWrtSh.GetOutlineNumRule(); } - sal_uInt16 nPageId = GetCurPageId(); - SfxTabPage* pPage = GetTabPage( nPageId ); + SfxTabPage* pPage = GetCurTabPage(); pPage->Reset(GetOutputItemSet()); - - return false; } sal_uInt16 SwOutlineTabDialog::GetLevel(const OUString &rFormatName) const @@ -316,7 +300,7 @@ sal_uInt16 SwOutlineTabDialog::GetLevel(const OUString &rFormatName) const short SwOutlineTabDialog::Ok() { - SfxTabDialog::Ok(); + SfxTabDialogController::Ok(); // set levels for all created templates; has to be done in order to // delete possibly cancelled assignments again. @@ -736,8 +720,8 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell) { pSh = pShell; // query this document's NumRules - pNumRule = static_cast<SwOutlineTabDialog*>(GetTabDialog())->GetNumRule(); - pCollNames = static_cast<SwOutlineTabDialog*>(GetTabDialog())->GetCollNames(); + pNumRule = static_cast<SwOutlineTabDialog*>(GetDialogController())->GetNumRule(); + pCollNames = static_cast<SwOutlineTabDialog*>(GetDialogController())->GetCollNames(); m_xPreviewWIN->SetNumRule(pNumRule); m_xPreviewWIN->SetOutlineNames(pCollNames); diff --git a/sw/source/uibase/inc/num.hxx b/sw/source/uibase/inc/num.hxx index 5d0817cd273e..6bedc870255f 100644 --- a/sw/source/uibase/inc/num.hxx +++ b/sw/source/uibase/inc/num.hxx @@ -41,8 +41,8 @@ class SwNumPositionTabPage : public SfxTabPage SwNumRule* pSaveNum; SwWrtShell* pWrtSh; - VclPtr<SwOutlineTabDialog> pOutlineDlg; - sal_uInt16 nActNumLvl; + SwOutlineTabDialog* pOutlineDlg; + sal_uInt16 nActNumLvl; bool bModified : 1; bool bPreset : 1; diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx index e788738a2c9e..da5c0e94fddf 100644 --- a/sw/source/uibase/inc/outline.hxx +++ b/sw/source/uibase/inc/outline.hxx @@ -43,13 +43,10 @@ class SwWrtShell; class SwNumRule; class SwChapterNumRules; -class SwOutlineTabDialog final : public SfxTabDialog +class SwOutlineTabDialog final : public SfxTabDialogController { static sal_uInt16 nNumLevel; - sal_uInt16 m_nNumPosId; - sal_uInt16 m_nOutlineId; - OUString aCollNames[MAXLEVEL]; SwWrtShell& rWrtSh; @@ -58,19 +55,18 @@ class SwOutlineTabDialog final : public SfxTabDialog bool bModified : 1; - DECL_LINK(CancelHdl, Button*, void); - DECL_LINK( FormHdl, Button *, void ); - DECL_LINK( MenuSelectHdl, Menu *, bool ); + std::unique_ptr<weld::MenuButton> m_xMenuButton; + + DECL_LINK(CancelHdl, weld::Button&, void); + DECL_LINK(FormHdl, weld::Button&, void); + DECL_LINK(MenuSelectHdl, const OString&, void); - virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) override; + virtual void PageCreated(const OString& rPageId, SfxTabPage& rPage) override; virtual short Ok() override; public: - SwOutlineTabDialog(vcl::Window* pParent, - const SfxItemSet* pSwItemSet, - SwWrtShell &); + SwOutlineTabDialog(weld::Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell &); virtual ~SwOutlineTabDialog() override; - virtual void dispose() override; SwNumRule* GetNumRule() { return xNumRule.get(); } sal_uInt16 GetLevel(const OUString &rFormatName) const; diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 4b7694b49584..f4913d84c9b9 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -610,7 +610,7 @@ void SwView::ExecNumberingOutline(SfxItemPool & rPool) SfxItemSet aTmp(rPool, svl::Items<FN_PARAM_1, FN_PARAM_1>{}); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert(pFact && "Dialog creation failed!"); - ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateOutlineTabDialog(GetWindow(), &aTmp, GetWrtShell())); + ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateOutlineTabDialog(GetFrameWeld(), &aTmp, GetWrtShell())); assert(pDlg && "Dialog creation failed!"); pDlg->Execute(); } diff --git a/sw/uiconfig/swriter/ui/outlinenumbering.ui b/sw/uiconfig/swriter/ui/outlinenumbering.ui index ffb495c9280f..ae5abdf63a8f 100644 --- a/sw/uiconfig/swriter/ui/outlinenumbering.ui +++ b/sw/uiconfig/swriter/ui/outlinenumbering.ui @@ -1,13 +1,105 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.0 --> +<!-- Generated with glade 3.20.4 --> <interface domain="sw"> <requires lib="gtk+" version="3.18"/> + <object class="GtkMenu" id="form"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkMenuItem" id="form1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="outlinenumbering|form1">Untitled 1</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="form2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="outlinenumbering|form2">Untitled 2</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="form3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="outlinenumbering|form3">Untitled 3</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="form4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="outlinenumbering|form4">Untitled 4</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="form5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="outlinenumbering|form5">Untitled 5</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="form6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="outlinenumbering|form6">Untitled 6</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="form7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="outlinenumbering|form7">Untitled 7</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="form8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="outlinenumbering|form8">Untitled 8</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="form9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="outlinenumbering|form9">Untitled 9</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkSeparatorMenuItem" id="menuitem10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="saveas"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="outlinenumbering|saveas">Save _As...</property> + <property name="use_underline">True</property> + </object> + </child> + </object> <object class="GtkDialog" id="OutlineNumberingDialog"> <property name="can_focus">False</property> <property name="border_width">6</property> <property name="title" translatable="yes" context="outlinenumbering|OutlineNumberingDialog">Chapter Numbering</property> <property name="resizable">False</property> <property name="modal">True</property> + <property name="default_width">0</property> + <property name="default_height">0</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> @@ -19,14 +111,16 @@ <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="GtkMenuButton" id="format"> + <property name="label" translatable="yes" context="outlinenumbering|user">_Format</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> + <property name="use_underline">True</property> + <property name="popup">form</property> + <child> + <placeholder/> + </child> </object> <packing> <property name="expand">False</property> @@ -35,12 +129,12 @@ </packing> </child> <child> - <object class="GtkButton" id="user"> - <property name="label" translatable="yes" context="outlinenumbering|user">_Format</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="receives_default">True</property> - <property name="use_underline">True</property> + <property name="use_stock">True</property> </object> <packing> <property name="expand">False</property> @@ -49,10 +143,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> @@ -63,8 +159,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> @@ -74,12 +170,11 @@ <property name="expand">False</property> <property name="fill">True</property> <property name="position">3</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> @@ -89,6 +184,7 @@ <property name="expand">False</property> <property name="fill">True</property> <property name="position">4</property> + <property name="secondary">True</property> </packing> </child> </object> @@ -112,6 +208,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"> @@ -131,6 +251,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> @@ -157,101 +301,13 @@ </object> </child> <action-widgets> + <action-widget response="0">reset</action-widget> <action-widget response="-5">ok</action-widget> - <action-widget response="0">user</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> - <object class="GtkMenu" id="form"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <object class="GtkMenuItem" id="form1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="outlinenumbering|form1">Untitled 1</property> - <property name="use_underline">True</property> - </object> - </child> - <child> - <object class="GtkMenuItem" id="form2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="outlinenumbering|form2">Untitled 2</property> - <property name="use_underline">True</property> - </object> - </child> <child> - <object class="GtkMenuItem" id="form3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="outlinenumbering|form3">Untitled 3</property> - <property name="use_underline">True</property> - </object> - </child> - <child> - <object class="GtkMenuItem" id="form4"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="outlinenumbering|form4">Untitled 4</property> - <property name="use_underline">True</property> - </object> - </child> - <child> - <object class="GtkMenuItem" id="form5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="outlinenumbering|form5">Untitled 5</property> - <property name="use_underline">True</property> - </object> - </child> - <child> - <object class="GtkMenuItem" id="form6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="outlinenumbering|form6">Untitled 6</property> - <property name="use_underline">True</property> - </object> - </child> - <child> - <object class="GtkMenuItem" id="form7"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="outlinenumbering|form7">Untitled 7</property> - <property name="use_underline">True</property> - </object> - </child> - <child> - <object class="GtkMenuItem" id="form8"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="outlinenumbering|form8">Untitled 8</property> - <property name="use_underline">True</property> - </object> - </child> - <child> - <object class="GtkMenuItem" id="form9"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="outlinenumbering|form9">Untitled 9</property> - <property name="use_underline">True</property> - </object> - </child> - <child> - <object class="GtkSeparatorMenuItem" id="menuitem10"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - </child> - <child> - <object class="GtkMenuItem" id="saveas"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="outlinenumbering|saveas">Save _As...</property> - <property name="use_underline">True</property> - </object> + <placeholder/> </child> </object> </interface> diff --git a/sw/uiconfig/swriter/ui/outlinenumberingpage.ui b/sw/uiconfig/swriter/ui/outlinenumberingpage.ui index a85ac72b6cc7..63ca632a366b 100644 --- a/sw/uiconfig/swriter/ui/outlinenumberingpage.ui +++ b/sw/uiconfig/swriter/ui/outlinenumberingpage.ui @@ -2,7 +2,6 @@ <!-- Generated with glade 3.20.4 --> <interface domain="sw"> <requires lib="gtk+" version="3.18"/> - <requires lib="LibreOffice" version="1.0"/> <object class="GtkAdjustment" id="adjustment1"> <property name="upper">999</property> <property name="step_increment">1</property> @@ -26,6 +25,8 @@ <object class="GtkBox" id="OutlineNumberingPage"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> <property name="border_width">6</property> <property name="spacing">12</property> <child> @@ -44,8 +45,6 @@ <object class="GtkScrolledWindow"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> <property name="shadow_type">in</property> <child> <object class="GtkTreeView" id="level"> diff --git a/sw/uiconfig/swriter/ui/outlinepositionpage.ui b/sw/uiconfig/swriter/ui/outlinepositionpage.ui index b310ef8bfa19..d0f356a36a33 100644 --- a/sw/uiconfig/swriter/ui/outlinepositionpage.ui +++ b/sw/uiconfig/swriter/ui/outlinepositionpage.ui @@ -18,6 +18,21 @@ <property name="step_increment">0.050000000000000003</property> <property name="page_increment">10</property> </object> + <object class="GtkAdjustment" id="adjustment4"> + <property name="upper">100</property> + <property name="step_increment">0.01</property> + <property name="page_increment">1</property> + </object> + <object class="GtkAdjustment" id="adjustment5"> + <property name="upper">100</property> + <property name="step_increment">0.01</property> + <property name="page_increment">1</property> + </object> + <object class="GtkAdjustment" id="adjustment6"> + <property name="upper">100</property> + <property name="step_increment">0.01</property> + <property name="page_increment">1</property> + </object> <object class="GtkListStore" id="liststore1"> <columns> <!-- column-name text --> @@ -49,8 +64,6 @@ <object class="GtkScrolledWindow"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> <property name="shadow_type">in</property> <child> <object class="GtkTreeView" id="levellb"> @@ -275,6 +288,7 @@ numbering and text:</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="activates_default">True</property> + <property name="adjustment">adjustment6</property> <property name="digits">2</property> </object> <packing> @@ -325,6 +339,7 @@ numbering and text:</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="activates_default">True</property> + <property name="adjustment">adjustment4</property> <property name="digits">2</property> </object> <packing> @@ -351,6 +366,7 @@ numbering and text:</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="activates_default">True</property> + <property name="adjustment">adjustment5</property> <property name="digits">2</property> </object> <packing> |