[Libreoffice-commits] core.git: 2 commits - sw/inc sw/source sw/uiconfig
Caolán McNamara
caolanm at redhat.com
Tue Apr 17 08:04:17 UTC 2018
sw/inc/swabstdlg.hxx | 4
sw/source/ui/dialog/swdlgfact.cxx | 30 ++-
sw/source/ui/dialog/swdlgfact.hxx | 26 ++-
sw/source/ui/dialog/swuiexp.cxx | 1
sw/source/ui/fldui/javaedit.cxx | 225 ++++++++++++----------------
sw/source/ui/index/multmrk.cxx | 50 ++----
sw/source/uibase/inc/javaedit.hxx | 73 ++++-----
sw/source/uibase/inc/multmrk.hxx | 29 +--
sw/source/uibase/shells/textfld.cxx | 4
sw/source/uibase/shells/textidx.cxx | 2
sw/uiconfig/swriter/ui/insertscript.ui | 212 ++++++++++++++------------
sw/uiconfig/swriter/ui/selectindexdialog.ui | 49 +++++-
12 files changed, 371 insertions(+), 334 deletions(-)
New commits:
commit 8a35cafb58c38e84541a44f8534c0511d2400e75
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 16 20:52:37 2018 +0100
weld SwMultiTOXMarkDlg
Change-Id: Idff6120f0a04bd94ec8402ae02daa9599f133698
Reviewed-on: https://gerrit.libreoffice.org/53004
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 862f8bb94751..2c24fc1bfbe1 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -477,7 +477,7 @@ public:
const css::uno::Reference< css::sdbc::XConnection>& xConnection ) = 0;
virtual VclPtr<AbstractMailMergeCreateFromDlg> CreateMailMergeCreateFromDlg(vcl::Window* pParent) = 0;
virtual VclPtr<AbstractMailMergeFieldConnectionsDlg> CreateMailMergeFieldConnectionsDlg(vcl::Window* pParent) = 0;
- virtual VclPtr<VclAbstractDialog> CreateMultiTOXMarkDlg(vcl::Window* pParent, SwTOXMgr &rTOXMgr) = 0;
+ virtual VclPtr<VclAbstractDialog> CreateMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateOutlineTabDialog(vcl::Window* pParent,
const SfxItemSet* pSwItemSet,
SwWrtShell &) = 0;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 6796a973c5dc..e3e9559a3331 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -123,6 +123,10 @@ short AbstractSwSortDlg_Impl::Execute()
{
return m_xDlg->execute();
}
+short AbstractMultiTOXMarkDlg_Impl::Execute()
+{
+ return m_xDlg->execute();
+}
IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
short AbstractSwConvertTableDlg_Impl::Execute()
{
@@ -987,10 +991,9 @@ VclPtr<AbstractMailMergeFieldConnectionsDlg> SwAbstractDialogFactory_Impl::Creat
return VclPtr<AbstractMailMergeFieldConnectionsDlg_Impl>::Create( pDlg );
}
-VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateMultiTOXMarkDlg(vcl::Window* pParent, SwTOXMgr &rTOXMgr)
+VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr)
{
- VclPtr<Dialog> pDlg = VclPtr<SwMultiTOXMarkDlg>::Create(pParent, rTOXMgr);
- return VclPtr<VclAbstractDialog_Impl>::Create(pDlg);
+ return VclPtr<AbstractMultiTOXMarkDlg_Impl>::Create(new SwMultiTOXMarkDlg(pParent, rTOXMgr));
}
VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSvxNumBulletTabDialog(vcl::Window* pParent,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 904e005276c4..d53aad217e3c 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -25,6 +25,7 @@ class SwInsertAbstractDlg;
class SwAsciiFilterDlg;
class Dialog;
class SwBreakDlg;
+class SwMultiTOXMarkDlg;
class SwSortDlg;
class SwTableHeightDlg;
class SwTableWidthDlg;
@@ -135,6 +136,18 @@ public:
virtual short Execute() override;
};
+class AbstractMultiTOXMarkDlg_Impl : public VclAbstractDialog
+{
+protected:
+ std::unique_ptr<SwMultiTOXMarkDlg> m_xDlg;
+public:
+ explicit AbstractMultiTOXMarkDlg_Impl(SwMultiTOXMarkDlg* p)
+ : m_xDlg(p)
+ {
+ }
+ virtual short Execute() override;
+};
+
class AbstractSwBreakDlg_Impl : public AbstractSwBreakDlg
{
protected:
@@ -591,7 +604,7 @@ public:
const css::uno::Reference< css::sdbc::XConnection>& xConnection ) override;
virtual VclPtr<AbstractMailMergeCreateFromDlg> CreateMailMergeCreateFromDlg(vcl::Window* pParent) override;
virtual VclPtr<AbstractMailMergeFieldConnectionsDlg> CreateMailMergeFieldConnectionsDlg(vcl::Window* pParent) override;
- virtual VclPtr<VclAbstractDialog> CreateMultiTOXMarkDlg(vcl::Window* pParent, SwTOXMgr &rTOXMgr) override;
+ virtual VclPtr<VclAbstractDialog> CreateMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr) override;
virtual VclPtr<SfxAbstractTabDialog> CreateOutlineTabDialog(vcl::Window* pParent, const SfxItemSet* pSwItemSet,
SwWrtShell &) override;
virtual VclPtr<SfxAbstractTabDialog> CreateSvxNumBulletTabDialog(vcl::Window* pParent,
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index f541a4507909..ba351e57ced5 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -37,6 +37,7 @@
#include <mailmrge.hxx>
#include <mailmergewizard.hxx>
#include <mergetbl.hxx>
+#include <multmrk.hxx>
#include <regionsw.hxx>
#include <rowht.hxx>
#include <selglos.hxx>
diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx
index 0e16c05355ae..735927a58ff5 100644
--- a/sw/source/ui/index/multmrk.cxx
+++ b/sw/source/ui/index/multmrk.cxx
@@ -18,56 +18,46 @@
*/
#include <swtypes.hxx>
-
#include <multmrk.hxx>
#include <toxmgr.hxx>
-SwMultiTOXMarkDlg::SwMultiTOXMarkDlg(vcl::Window* pParent, SwTOXMgr& rTOXMgr)
- : SvxStandardDialog(pParent, "SelectIndexDialog",
- "modules/swriter/ui/selectindexdialog.ui")
- , rMgr(rTOXMgr)
- , nPos(0)
+SwMultiTOXMarkDlg::SwMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr& rTOXMgr)
+ : GenericDialogController(pParent, "modules/swriter/ui/selectindexdialog.ui", "SelectIndexDialog")
+ , m_rMgr(rTOXMgr)
+ , m_nPos(0)
+ , m_xTextFT(m_xBuilder->weld_label("type"))
+ , m_xTOXLB(m_xBuilder->weld_tree_view("treeview"))
{
- get(m_pTextFT, "type");
- get(m_pTOXLB, "treeview");
- m_pTOXLB->set_height_request(m_pTOXLB->GetTextHeight() * 10);
- m_pTOXLB->set_width_request(m_pTOXLB->approximate_char_width() * 25);
+ m_xTOXLB->set_size_request(m_xTOXLB->get_approximate_digit_width() * 32,
+ m_xTOXLB->get_height_rows(8));
- m_pTOXLB->SetSelectHdl(LINK(this, SwMultiTOXMarkDlg, SelectHdl));
+ m_xTOXLB->connect_changed(LINK(this, SwMultiTOXMarkDlg, SelectHdl));
- sal_uInt16 nSize = rMgr.GetTOXMarkCount();
+ sal_uInt16 nSize = m_rMgr.GetTOXMarkCount();
for(sal_uInt16 i=0; i < nSize; ++i)
- m_pTOXLB->InsertEntry(rMgr.GetTOXMark(i)->GetText());
+ m_xTOXLB->append_text(m_rMgr.GetTOXMark(i)->GetText());
- m_pTOXLB->SelectEntryPos(0);
- m_pTextFT->SetText(rMgr.GetTOXMark(0)->GetTOXType()->GetTypeName());
+ m_xTOXLB->select(0);
+ m_xTextFT->set_label(m_rMgr.GetTOXMark(0)->GetTOXType()->GetTypeName());
}
-IMPL_LINK( SwMultiTOXMarkDlg, SelectHdl, ListBox&, rBox, void )
+IMPL_LINK( SwMultiTOXMarkDlg, SelectHdl, weld::TreeView&, rBox, void )
{
- if(rBox.GetSelectedEntryPos() != LISTBOX_ENTRY_NOTFOUND)
- { SwTOXMark* pMark = rMgr.GetTOXMark(rBox.GetSelectedEntryPos());
- m_pTextFT->SetText(pMark->GetTOXType()->GetTypeName());
- nPos = rBox.GetSelectedEntryPos();
+ if (rBox.get_selected_index() != -1)
+ {
+ SwTOXMark* pMark = m_rMgr.GetTOXMark(rBox.get_selected_index());
+ m_xTextFT->set_label(pMark->GetTOXType()->GetTypeName());
+ m_nPos = rBox.get_selected_index();
}
}
void SwMultiTOXMarkDlg::Apply()
{
- rMgr.SetCurTOXMark(nPos);
+ m_rMgr.SetCurTOXMark(m_nPos);
}
SwMultiTOXMarkDlg::~SwMultiTOXMarkDlg()
{
- disposeOnce();
}
-void SwMultiTOXMarkDlg::dispose()
-{
- m_pTextFT.clear();
- m_pTOXLB.clear();
- SvxStandardDialog::dispose();
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/multmrk.hxx b/sw/source/uibase/inc/multmrk.hxx
index e8068e1d5cb5..0e7959433d01 100644
--- a/sw/source/uibase/inc/multmrk.hxx
+++ b/sw/source/uibase/inc/multmrk.hxx
@@ -20,28 +20,31 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_MULTMRK_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_MULTMRK_HXX
-#include <svx/stddlg.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/button.hxx>
+#include <vcl/weld.hxx>
class SwTOXMgr;
// insert mark for index entry
-class SwMultiTOXMarkDlg : public SvxStandardDialog
+class SwMultiTOXMarkDlg : public weld::GenericDialogController
{
- DECL_LINK( SelectHdl, ListBox&, void );
- VclPtr<FixedText> m_pTextFT;
- VclPtr<ListBox> m_pTOXLB;
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+ SwTOXMgr& m_rMgr;
+ sal_uInt16 m_nPos;
- SwTOXMgr& rMgr;
- sal_uInt16 nPos;
+ std::unique_ptr<weld::Label> m_xTextFT;
+ std::unique_ptr<weld::TreeView> m_xTOXLB;
- void Apply() override;
+ void Apply();
public:
- SwMultiTOXMarkDlg( vcl::Window* pParent, SwTOXMgr &rTOXMgr );
+ SwMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr);
virtual ~SwMultiTOXMarkDlg() override;
- virtual void dispose() override;
+ short execute()
+ {
+ short nRet = run();
+ if (nRet == RET_OK)
+ Apply();
+ return nRet;
+ }
};
#endif // INCLUDED_SW_SOURCE_UIBASE_INC_MULTMRK_HXX
diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx
index e2ce8d906be6..099c5c4448fe 100644
--- a/sw/source/uibase/shells/textidx.cxx
+++ b/sw/source/uibase/shells/textidx.cxx
@@ -82,7 +82,7 @@ void SwTextShell::ExecIdx(SfxRequest const &rReq)
{ // Several marks, which should it be?
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- ScopedVclPtr<VclAbstractDialog> pMultDlg(pFact->CreateMultiTOXMarkDlg(pMDI, aMgr));
+ ScopedVclPtr<VclAbstractDialog> pMultDlg(pFact->CreateMultiTOXMarkDlg(GetView().GetFrameWeld(), aMgr));
OSL_ENSURE(pMultDlg, "Dialog creation failed!");
nRet = pMultDlg->Execute();
}
diff --git a/sw/uiconfig/swriter/ui/selectindexdialog.ui b/sw/uiconfig/swriter/ui/selectindexdialog.ui
index 9762c79f1391..50b940124a27 100644
--- a/sw/uiconfig/swriter/ui/selectindexdialog.ui
+++ b/sw/uiconfig/swriter/ui/selectindexdialog.ui
@@ -1,12 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.4 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
+ <object class="GtkListStore" id="liststore1">
+ <columns>
+ <!-- column-name text -->
+ <column type="gchararray"/>
+ <!-- column-name id -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
<object class="GtkDialog" id="SelectIndexDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="selectindexdialog|SelectIndexDialog">Index Markings</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">
@@ -79,9 +90,9 @@
<object class="GtkLabel" id="type">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">treeview:border</property>
+ <property name="mnemonic_widget">treeview</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -90,13 +101,36 @@
</packing>
</child>
<child>
- <object class="GtkTreeView" id="treeview:border">
+ <object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection1"/>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTreeView" id="treeview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="vexpand">True</property>
+ <property name="model">liststore1</property>
+ <property name="headers_visible">False</property>
+ <property name="headers_clickable">False</property>
+ <property name="search_column">0</property>
+ <property name="show_expanders">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ </object>
</child>
</object>
<packing>
@@ -132,5 +166,8 @@
<action-widget response="-5">ok</action-widget>
<action-widget response="-6">cancel</action-widget>
</action-widgets>
+ <child>
+ <placeholder/>
+ </child>
</object>
</interface>
commit 82fb4c66103073043d17b5cea845e35410b826f3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 16 12:57:00 2018 +0100
weld SwJavaEditDialog
Change-Id: I409e66ed7446ad56933bb806093aa7f7b1d62a4e
Reviewed-on: https://gerrit.libreoffice.org/53000
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 8e35a4114fc9..862f8bb94751 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -467,7 +467,7 @@ public:
virtual VclPtr<VclAbstractDialog> CreateTitlePageDlg ( vcl::Window * pParent ) = 0;
virtual VclPtr<VclAbstractDialog> CreateVclSwViewDialog(SwView& rView) = 0;
virtual VclPtr<AbstractInsTableDlg> CreateInsTableDlg(SwView& rView) = 0;
- virtual VclPtr<AbstractJavaEditDialog> CreateJavaEditDialog(vcl::Window* pParent,
+ virtual VclPtr<AbstractJavaEditDialog> CreateJavaEditDialog(weld::Window* pParent,
SwWrtShell* pWrtSh) = 0;
virtual VclPtr<AbstractMailMergeDlg> CreateMailMergeDlg(
vcl::Window* pParent, SwWrtShell& rSh,
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 7aa070b94d4c..6796a973c5dc 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -155,7 +155,11 @@ short AbstractInsTableDlg_Impl::Execute()
return m_xDlg->run();
}
-IMPL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl);
+short AbstractJavaEditDialog_Impl::Execute()
+{
+ return m_xDlg->run();
+}
+
IMPL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractMailMergeCreateFromDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractMailMergeFieldConnectionsDlg_Impl);
@@ -493,27 +497,27 @@ void AbstractInsTableDlg_Impl::GetValues( OUString& rName, sal_uInt16& rRow, sal
OUString AbstractJavaEditDialog_Impl::GetScriptText() const
{
- return pDlg->GetScriptText();
+ return m_xDlg->GetScriptText();
}
OUString AbstractJavaEditDialog_Impl::GetScriptType() const
{
- return pDlg->GetScriptType();
+ return m_xDlg->GetScriptType();
}
bool AbstractJavaEditDialog_Impl::IsUrl() const
{
- return pDlg->IsUrl();
+ return m_xDlg->IsUrl();
}
bool AbstractJavaEditDialog_Impl::IsNew() const
{
- return pDlg->IsNew();
+ return m_xDlg->IsNew();
}
bool AbstractJavaEditDialog_Impl::IsUpdate() const
{
- return pDlg->IsUpdate();
+ return m_xDlg->IsUpdate();
}
DBManagerOptions AbstractMailMergeDlg_Impl::GetMergeType()
@@ -955,10 +959,9 @@ VclPtr<AbstractInsTableDlg> SwAbstractDialogFactory_Impl::CreateInsTableDlg(SwVi
}
VclPtr<AbstractJavaEditDialog> SwAbstractDialogFactory_Impl::CreateJavaEditDialog(
- vcl::Window* pParent, SwWrtShell* pWrtSh)
+ weld::Window* pParent, SwWrtShell* pWrtSh)
{
- VclPtr<SwJavaEditDialog> pDlg = VclPtr<SwJavaEditDialog>::Create(pParent, pWrtSh);
- return VclPtr<AbstractJavaEditDialog_Impl>::Create( pDlg );
+ return VclPtr<AbstractJavaEditDialog_Impl>::Create(new SwJavaEditDialog(pParent, pWrtSh));
}
VclPtr<AbstractMailMergeDlg> SwAbstractDialogFactory_Impl::CreateMailMergeDlg(
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 503049b63f8b..904e005276c4 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -389,7 +389,14 @@ public:
class SwJavaEditDialog;
class AbstractJavaEditDialog_Impl : public AbstractJavaEditDialog
{
- DECL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl,SwJavaEditDialog)
+protected:
+ std::unique_ptr<SwJavaEditDialog> m_xDlg;
+public:
+ explicit AbstractJavaEditDialog_Impl(SwJavaEditDialog* p)
+ : m_xDlg(p)
+ {
+ }
+ virtual short Execute() override;
virtual OUString GetScriptText() const override;
virtual OUString GetScriptType() const override;
virtual bool IsUrl() const override;
@@ -574,7 +581,7 @@ public:
virtual VclPtr<VclAbstractDialog> CreateTitlePageDlg ( vcl::Window * pParent ) override;
virtual VclPtr<VclAbstractDialog> CreateVclSwViewDialog(SwView& rView) override;
virtual VclPtr<AbstractInsTableDlg> CreateInsTableDlg(SwView& rView) override;
- virtual VclPtr<AbstractJavaEditDialog> CreateJavaEditDialog(vcl::Window* pParent,
+ virtual VclPtr<AbstractJavaEditDialog> CreateJavaEditDialog(weld::Window* pParent,
SwWrtShell* pWrtSh) override;
virtual VclPtr<AbstractMailMergeDlg> CreateMailMergeDlg(
vcl::Window* pParent, SwWrtShell& rSh,
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index 847e1217ee92..1088cb693d17 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -37,105 +37,78 @@
using namespace ::com::sun::star;
-SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) :
- SvxStandardDialog(pParent, "InsertScriptDialog", "modules/swriter/ui/insertscript.ui"),
-
- bNew(true),
- bIsUrl(false),
-
- pSh(pWrtSh),
- pFileDlg(nullptr)
+SwJavaEditDialog::SwJavaEditDialog(weld::Window* pParent, SwWrtShell* pWrtSh)
+ : GenericDialogController(pParent, "modules/swriter/ui/insertscript.ui", "InsertScriptDialog")
+ , m_bNew(true)
+ , m_bIsUrl(false)
+ , m_pSh(pWrtSh)
+ , m_pFileDlg(nullptr)
+ , m_xTypeED(m_xBuilder->weld_entry("scripttype"))
+ , m_xUrlRB(m_xBuilder->weld_radio_button("url"))
+ , m_xEditRB(m_xBuilder->weld_radio_button("text"))
+ , m_xUrlPB(m_xBuilder->weld_button("browse"))
+ , m_xUrlED(m_xBuilder->weld_entry("urlentry"))
+ , m_xEditED(m_xBuilder->weld_text_view("textentry"))
+ , m_xOKBtn(m_xBuilder->weld_button("ok"))
+ , m_xPrevBtn(m_xBuilder->weld_button("previous"))
+ , m_xNextBtn(m_xBuilder->weld_button("next"))
{
- get(m_pTypeED, "scripttype");
- get(m_pUrlRB, "url");
- get(m_pUrlED, "urlentry");
- get(m_pUrlPB, "browse");
- get(m_pEditRB, "text");
- get(m_pEditED, "textentry");
-
- get(m_pOKBtn, "ok");
- get(m_pPrevBtn, "previous");
- get(m_pNextBtn, "next");
-
// install handler
- m_pPrevBtn->SetClickHdl( LINK( this, SwJavaEditDialog, PrevHdl ) );
- m_pNextBtn->SetClickHdl( LINK( this, SwJavaEditDialog, NextHdl ) );
- m_pOKBtn->SetClickHdl( LINK( this, SwJavaEditDialog, OKHdl ) );
-
- Link<Button*,void> aLk = LINK(this, SwJavaEditDialog, RadioButtonHdl);
- m_pUrlRB->SetClickHdl(aLk);
- m_pEditRB->SetClickHdl(aLk);
- m_pUrlPB->SetClickHdl(LINK(this, SwJavaEditDialog, InsertFileHdl));
+ m_xPrevBtn->connect_clicked( LINK( this, SwJavaEditDialog, PrevHdl ) );
+ m_xNextBtn->connect_clicked( LINK( this, SwJavaEditDialog, NextHdl ) );
+ m_xOKBtn->connect_clicked( LINK( this, SwJavaEditDialog, OKHdl ) );
- vcl::Font aFont( m_pEditED->GetFont() );
- aFont.SetWeight( WEIGHT_LIGHT );
- m_pEditED->SetFont( aFont );
+ Link<weld::Button&,void> aLk = LINK(this, SwJavaEditDialog, RadioButtonHdl);
+ m_xUrlRB->connect_clicked(aLk);
+ m_xEditRB->connect_clicked(aLk);
+ m_xUrlPB->connect_clicked(LINK(this, SwJavaEditDialog, InsertFileHdl));
- pMgr = new SwFieldMgr(pSh);
- pField = static_cast<SwScriptField*>(pMgr->GetCurField());
+ m_pMgr = new SwFieldMgr(m_pSh);
+ m_pField = static_cast<SwScriptField*>(m_pMgr->GetCurField());
- bNew = !(pField && pField->GetTyp()->Which() == SwFieldIds::Script);
+ m_bNew = !(m_pField && m_pField->GetTyp()->Which() == SwFieldIds::Script);
CheckTravel();
- if( !bNew )
- SetText( SwResId( STR_JAVA_EDIT ) );
+ if (!m_bNew)
+ m_xDialog->set_title(SwResId(STR_JAVA_EDIT));
- RadioButtonHdl(nullptr);
+ RadioButtonHdl(*m_xUrlRB);
}
SwJavaEditDialog::~SwJavaEditDialog()
{
- disposeOnce();
+ m_pSh->EnterStdMode();
+ delete m_pMgr;
+ delete m_pFileDlg;
}
-void SwJavaEditDialog::dispose()
+IMPL_LINK_NOARG(SwJavaEditDialog, PrevHdl, weld::Button&, void)
{
- pSh->EnterStdMode();
- delete pMgr;
- delete pFileDlg;
- m_pTypeED.clear();
- m_pUrlRB.clear();
- m_pEditRB.clear();
- m_pUrlPB.clear();
- m_pUrlED.clear();
- m_pEditED.clear();
- m_pOKBtn.clear();
- m_pPrevBtn.clear();
- m_pNextBtn.clear();
- SvxStandardDialog::dispose();
-}
-
-IMPL_LINK_NOARG(SwJavaEditDialog, PrevHdl, Button*, void)
-{
- pSh->EnterStdMode();
+ m_pSh->EnterStdMode();
SetField();
- pMgr->GoPrev();
- pField = static_cast<SwScriptField*>(pMgr->GetCurField());
+ m_pMgr->GoPrev();
+ m_pField = static_cast<SwScriptField*>(m_pMgr->GetCurField());
CheckTravel();
- RadioButtonHdl(nullptr);
+ RadioButtonHdl(*m_xUrlRB);
}
-IMPL_LINK_NOARG(SwJavaEditDialog, NextHdl, Button*, void)
+IMPL_LINK_NOARG(SwJavaEditDialog, NextHdl, weld::Button&, void)
{
- pSh->EnterStdMode();
+ m_pSh->EnterStdMode();
SetField();
- pMgr->GoNext();
- pField = static_cast<SwScriptField*>(pMgr->GetCurField());
+ m_pMgr->GoNext();
+ m_pField = static_cast<SwScriptField*>(m_pMgr->GetCurField());
CheckTravel();
- RadioButtonHdl(nullptr);
+ RadioButtonHdl(*m_xUrlRB);
}
-IMPL_LINK_NOARG(SwJavaEditDialog, OKHdl, Button*, void)
+IMPL_LINK_NOARG(SwJavaEditDialog, OKHdl, weld::Button&, void)
{
SetField();
- EndDialog( RET_OK );
-}
-
-void SwJavaEditDialog::Apply()
-{
+ m_xDialog->response(RET_OK);
}
void SwJavaEditDialog::CheckTravel()
@@ -143,135 +116,135 @@ void SwJavaEditDialog::CheckTravel()
bool bTravel = false;
bool bNext(false), bPrev(false);
- if(!bNew)
+ if (!m_bNew)
{
// Traveling only when more than one field
- pSh->StartAction();
- pSh->CreateCursor();
+ m_pSh->StartAction();
+ m_pSh->CreateCursor();
- bNext = pMgr->GoNext();
+ bNext = m_pMgr->GoNext();
if( bNext )
- pMgr->GoPrev();
+ m_pMgr->GoPrev();
- bPrev = pMgr->GoPrev();
+ bPrev = m_pMgr->GoPrev();
if( bPrev )
- pMgr->GoNext();
+ m_pMgr->GoNext();
bTravel |= bNext || bPrev;
- pSh->DestroyCursor();
- pSh->EndAction();
+ m_pSh->DestroyCursor();
+ m_pSh->EndAction();
- if (pField->IsCodeURL())
+ if (m_pField->IsCodeURL())
{
- OUString sURL(pField->GetPar2());
+ OUString sURL(m_pField->GetPar2());
if(!sURL.isEmpty())
{
INetURLObject aINetURL(sURL);
if(INetProtocol::File == aINetURL.GetProtocol())
sURL = aINetURL.PathToFileName();
}
- m_pUrlED->SetText(sURL);
- m_pEditED->SetText(OUString());
- m_pUrlRB->Check();
+ m_xUrlED->set_text(sURL);
+ m_xEditED->set_text(OUString());
+ m_xUrlRB->set_active(true);
}
else
{
- m_pEditED->SetText(pField->GetPar2());
- m_pUrlED->SetText(OUString());
- m_pEditRB->Check();
+ m_xEditED->set_text(m_pField->GetPar2());
+ m_xUrlED->set_text(OUString());
+ m_xEditRB->set_active(true);
}
- m_pTypeED->SetText(pField->GetPar1());
+ m_xTypeED->set_text(m_pField->GetPar1());
}
if ( !bTravel )
{
- m_pPrevBtn->Hide();
- m_pNextBtn->Hide();
+ m_xPrevBtn->hide();
+ m_xNextBtn->hide();
}
else
{
- m_pPrevBtn->Enable(bPrev);
- m_pNextBtn->Enable(bNext);
+ m_xPrevBtn->set_sensitive(bPrev);
+ m_xNextBtn->set_sensitive(bNext);
}
}
void SwJavaEditDialog::SetField()
{
- if( !m_pOKBtn->IsEnabled() )
+ if( !m_xOKBtn->get_sensitive() )
return ;
- aType = m_pTypeED->GetText();
- bIsUrl = m_pUrlRB->IsChecked();
+ m_aType = m_xTypeED->get_text();
+ m_bIsUrl = m_xUrlRB->get_active();
- if( bIsUrl )
+ if (m_bIsUrl)
{
- aText = m_pUrlED->GetText();
- if (!aText.isEmpty())
+ m_aText = m_xUrlED->get_text();
+ if (!m_aText.isEmpty())
{
- SfxMedium* pMedium = pSh->GetView().GetDocShell()->GetMedium();
+ SfxMedium* pMedium = m_pSh->GetView().GetDocShell()->GetMedium();
INetURLObject aAbs;
if( pMedium )
aAbs = pMedium->GetURLObject();
- aText = URIHelper::SmartRel2Abs(
- aAbs, aText, URIHelper::GetMaybeFileHdl());
+ m_aText = URIHelper::SmartRel2Abs(
+ aAbs, m_aText, URIHelper::GetMaybeFileHdl());
}
}
else
- aText = m_pEditED->GetText();
+ m_aText = m_xEditED->get_text();
- if( aType.isEmpty() )
- aType = "JavaScript";
+ if (m_aType.isEmpty())
+ m_aType = "JavaScript";
}
bool SwJavaEditDialog::IsUpdate() const
{
- return pField && ( sal_uInt32(bIsUrl ? 1 : 0) != pField->GetFormat() || pField->GetPar2() != aType || pField->GetPar1() != aText );
+ return m_pField && ( sal_uInt32(m_bIsUrl ? 1 : 0) != m_pField->GetFormat() || m_pField->GetPar2() != m_aType || m_pField->GetPar1() != m_aText );
}
-IMPL_LINK_NOARG(SwJavaEditDialog, RadioButtonHdl, Button*, void)
+IMPL_LINK_NOARG(SwJavaEditDialog, RadioButtonHdl, weld::Button&, void)
{
- bool bEnable = m_pUrlRB->IsChecked();
- m_pUrlPB->Enable(bEnable);
- m_pUrlED->Enable(bEnable);
- m_pEditED->Enable(!bEnable);
+ bool bEnable = m_xUrlRB->get_active();
+ m_xUrlPB->set_sensitive(bEnable);
+ m_xUrlED->set_sensitive(bEnable);
+ m_xEditED->set_sensitive(!bEnable);
- if( !bNew )
+ if (!m_bNew)
{
- bEnable = !pSh->IsReadOnlyAvailable() || !pSh->HasReadonlySel();
- m_pOKBtn->Enable( bEnable );
- m_pUrlED->SetReadOnly( !bEnable );
- m_pEditED->SetReadOnly( !bEnable);
- m_pTypeED->SetReadOnly( !bEnable);
- if( m_pUrlPB->IsEnabled() && !bEnable )
- m_pUrlPB->Enable( false );
+ bEnable = !m_pSh->IsReadOnlyAvailable() || !m_pSh->HasReadonlySel();
+ m_xOKBtn->set_sensitive(bEnable);
+ m_xUrlED->set_editable(bEnable);
+ m_xEditED->set_editable(bEnable);
+ m_xTypeED->set_editable(bEnable);
+ if( m_xUrlPB->get_sensitive() && !bEnable )
+ m_xUrlPB->set_sensitive( false );
}
}
-IMPL_LINK_NOARG( SwJavaEditDialog, InsertFileHdl, Button *, void )
+IMPL_LINK_NOARG( SwJavaEditDialog, InsertFileHdl, weld::Button&, void )
{
- if ( !pFileDlg )
+ if (!m_pFileDlg)
{
- pFileDlg = new ::sfx2::FileDialogHelper(
+ m_pFileDlg = new ::sfx2::FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::Insert, "swriter", SfxFilterFlags::NONE, SfxFilterFlags::NONE, GetFrameWeld());
+ FileDialogFlags::Insert, "swriter", SfxFilterFlags::NONE, SfxFilterFlags::NONE, m_xDialog.get());
}
- pFileDlg->StartExecuteModal( LINK( this, SwJavaEditDialog, DlgClosedHdl ) );
+ m_pFileDlg->StartExecuteModal( LINK( this, SwJavaEditDialog, DlgClosedHdl ) );
}
IMPL_LINK_NOARG(SwJavaEditDialog, DlgClosedHdl, sfx2::FileDialogHelper *, void)
{
- if ( pFileDlg->GetError() == ERRCODE_NONE )
+ if (m_pFileDlg->GetError() == ERRCODE_NONE)
{
- OUString sFileName = pFileDlg->GetPath();
+ OUString sFileName = m_pFileDlg->GetPath();
if ( !sFileName.isEmpty() )
{
INetURLObject aINetURL( sFileName );
if ( INetProtocol::File == aINetURL.GetProtocol() )
sFileName = aINetURL.PathToFileName();
}
- m_pUrlED->SetText( sFileName );
+ m_xUrlED->set_text(sFileName);
}
}
diff --git a/sw/source/uibase/inc/javaedit.hxx b/sw/source/uibase/inc/javaedit.hxx
index 22b8c4ce7c4f..ccd83e3ecb9f 100644
--- a/sw/source/uibase/inc/javaedit.hxx
+++ b/sw/source/uibase/inc/javaedit.hxx
@@ -19,10 +19,7 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_JAVAEDIT_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_JAVAEDIT_HXX
-#include <svx/stddlg.hxx>
-#include <vcl/fixed.hxx>
-#include <svtools/svmedit.hxx>
-#include <vcl/button.hxx>
+#include <vcl/weld.hxx>
class SwWrtShell;
class SwFieldMgr;
@@ -30,54 +27,50 @@ class SwScriptField;
namespace sfx2 { class FileDialogHelper; }
-class SwJavaEditDialog : public SvxStandardDialog
+class SwJavaEditDialog : public weld::GenericDialogController
{
private:
- VclPtr<Edit> m_pTypeED;
- VclPtr<RadioButton> m_pUrlRB;
- VclPtr<RadioButton> m_pEditRB;
- VclPtr<PushButton> m_pUrlPB;
- VclPtr<Edit> m_pUrlED;
- VclPtr<VclMultiLineEdit> m_pEditED;
-
- VclPtr<OKButton> m_pOKBtn;
- VclPtr<PushButton> m_pPrevBtn;
- VclPtr<PushButton> m_pNextBtn;
-
- OUString aText;
- OUString aType;
-
- bool bNew;
- bool bIsUrl;
-
- SwScriptField* pField;
- SwFieldMgr* pMgr;
- SwWrtShell* pSh;
- sfx2::FileDialogHelper* pFileDlg;
-
- DECL_LINK(OKHdl, Button*, void);
- DECL_LINK(PrevHdl, Button*, void);
- DECL_LINK(NextHdl, Button*, void);
- DECL_LINK(RadioButtonHdl, Button*, void);
- DECL_LINK(InsertFileHdl, Button *, void);
+ OUString m_aText;
+ OUString m_aType;
+
+ bool m_bNew;
+ bool m_bIsUrl;
+
+ SwScriptField* m_pField;
+ SwFieldMgr* m_pMgr;
+ SwWrtShell* m_pSh;
+ sfx2::FileDialogHelper* m_pFileDlg;
+
+ std::unique_ptr<weld::Entry> m_xTypeED;
+ std::unique_ptr<weld::RadioButton> m_xUrlRB;
+ std::unique_ptr<weld::RadioButton> m_xEditRB;
+ std::unique_ptr<weld::Button> m_xUrlPB;
+ std::unique_ptr<weld::Entry> m_xUrlED;
+ std::unique_ptr<weld::TextView> m_xEditED;
+ std::unique_ptr<weld::Button> m_xOKBtn;
+ std::unique_ptr<weld::Button> m_xPrevBtn;
+ std::unique_ptr<weld::Button> m_xNextBtn;
+
+ DECL_LINK(OKHdl, weld::Button&, void);
+ DECL_LINK(PrevHdl, weld::Button&, void);
+ DECL_LINK(NextHdl, weld::Button&, void);
+ DECL_LINK(RadioButtonHdl, weld::Button&, void);
+ DECL_LINK(InsertFileHdl, weld::Button&, void);
DECL_LINK(DlgClosedHdl, sfx2::FileDialogHelper *, void);
- virtual void Apply() override;
-
void CheckTravel();
void SetField();
public:
- SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh);
+ SwJavaEditDialog(weld::Window* pParent, SwWrtShell* pWrtSh);
virtual ~SwJavaEditDialog() override;
- virtual void dispose() override;
- const OUString& GetScriptText() const { return aText; }
+ const OUString& GetScriptText() const { return m_aText; }
- const OUString& GetScriptType() const { return aType; }
+ const OUString& GetScriptType() const { return m_aType; }
- bool IsUrl() const { return bIsUrl; }
- bool IsNew() const { return bNew; }
+ bool IsUrl() const { return m_bIsUrl; }
+ bool IsNew() const { return m_bNew; }
bool IsUpdate() const;
};
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index bb2131fcc500..fc7735bd7ec2 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -592,7 +592,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
assert(pFact2 && "Dialog creation failed!");
- ScopedVclPtr<AbstractSvxPostItDialog> pDlg(pFact2->CreateSvxPostItDialog(pMDI->GetFrameWeld(), aSet, bTravel));
+ ScopedVclPtr<AbstractSvxPostItDialog> pDlg(pFact2->CreateSvxPostItDialog(GetView().GetFrameWeld(), aSet, bTravel));
assert(pDlg && "Dialog creation failed!");
pDlg->HideAuthor();
@@ -651,7 +651,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "Dialog creation failed!");
- ScopedVclPtr<AbstractJavaEditDialog> pDlg(pFact->CreateJavaEditDialog(pMDI, &rSh));
+ ScopedVclPtr<AbstractJavaEditDialog> pDlg(pFact->CreateJavaEditDialog(GetView().GetFrameWeld(), &rSh));
assert(pDlg && "Dialog creation failed!");
if ( pDlg->Execute() )
{
diff --git a/sw/uiconfig/swriter/ui/insertscript.ui b/sw/uiconfig/swriter/ui/insertscript.ui
index 631582daaf4e..6b99bab44862 100644
--- a/sw/uiconfig/swriter/ui/insertscript.ui
+++ b/sw/uiconfig/swriter/ui/insertscript.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.4 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<object class="GtkImage" id="image1">
@@ -16,17 +16,117 @@
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="insertscript|InsertScriptDialog">Insert Script</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">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_spacing">6</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkButton" id="previous">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image1</property>
+ <property name="image_position">right</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="next">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</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="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>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <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>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <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>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
<child>
<object class="GtkGrid" id="grid1">
<property name="width_request">400</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
@@ -44,6 +144,7 @@
<object class="GtkEntry" id="scripttype">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="activates_default">True</property>
<property name="text" translatable="yes" context="insertscript|scripttype">JavaScript</property>
</object>
<packing>
@@ -58,8 +159,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="halign">start</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<property name="group">text</property>
@@ -74,6 +175,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
+ <property name="activates_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -99,12 +201,11 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="halign">start</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
- <property name="group">url</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -116,11 +217,15 @@
<property name="height_request">200</property>
<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="GtkTextView" id="textentry:border">
+ <object class="GtkTextView" id="textentry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
</object>
</child>
</object>
@@ -143,100 +248,6 @@
<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>
- <property name="layout_style">end</property>
- <child>
- <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>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <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>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <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>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid" id="grid2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkButton" id="previous">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">image1</property>
- <property name="image_position">right</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="next">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="image">image2</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- <property name="secondary">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
</child>
<action-widgets>
@@ -244,5 +255,8 @@
<action-widget response="-6">cancel</action-widget>
<action-widget response="-11">help</action-widget>
</action-widgets>
+ <child>
+ <placeholder/>
+ </child>
</object>
</interface>
More information about the Libreoffice-commits
mailing list