summaryrefslogtreecommitdiff
path: root/sw/source/uibase/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-06 17:57:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-06 20:55:30 +0200
commit692c4f4d2c5995660baf747f2d15929896f6e992 (patch)
tree9ca59a05b3c3816efb6075db10ef7d9393c02825 /sw/source/uibase/inc
parent1dc6a3aeec6d0f67990c2e18c31f094fc3edeba7 (diff)
weld SwSelGlossaryDlg
Change-Id: I8d8b4a3b7ed461275eb4af86f3fd7709bab30586 Reviewed-on: https://gerrit.libreoffice.org/61476 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/inc')
-rw-r--r--sw/source/uibase/inc/gloshdl.hxx4
-rw-r--r--sw/source/uibase/inc/selglos.hxx23
2 files changed, 11 insertions, 16 deletions
diff --git a/sw/source/uibase/inc/gloshdl.hxx b/sw/source/uibase/inc/gloshdl.hxx
index 34bd0f719c65..d065aa9302a5 100644
--- a/sw/source/uibase/inc/gloshdl.hxx
+++ b/sw/source/uibase/inc/gloshdl.hxx
@@ -39,7 +39,7 @@ class SW_DLLPUBLIC SwGlossaryHdl
std::unique_ptr<SwTextBlocks>
pCurGrp;
- SAL_DLLPRIVATE bool Expand( const OUString& rShortName,
+ SAL_DLLPRIVATE bool Expand(weld::Window* pParent, const OUString& rShortName,
SwGlossaries* pGlossaries,
std::unique_ptr<SwTextBlocks> pGlossary );
@@ -70,7 +70,7 @@ public:
bool DelGlossary(const OUString&);
bool CopyToClipboard(SwWrtShell& rSh, const OUString& rShortName);
- bool ExpandGlossary();
+ bool ExpandGlossary(weld::Window* pParent);
bool InsertGlossary(const OUString &rName);
void SetMacros(const OUString& rName,
diff --git a/sw/source/uibase/inc/selglos.hxx b/sw/source/uibase/inc/selglos.hxx
index a8a0f00c7ff2..28a7821e3c96 100644
--- a/sw/source/uibase/inc/selglos.hxx
+++ b/sw/source/uibase/inc/selglos.hxx
@@ -19,35 +19,30 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_SELGLOS_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_SELGLOS_HXX
-#include <vcl/dialog.hxx>
+#include <vcl/weld.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/fixed.hxx>
-
-#include <vcl/button.hxx>
-
-class SwSelGlossaryDlg final : public ModalDialog
+class SwSelGlossaryDlg final : public weld::GenericDialogController
{
- VclPtr<ListBox> m_pGlosBox;
+ std::unique_ptr<weld::Frame> m_xFrame;
+ std::unique_ptr<weld::TreeView> m_xGlosBox;
- DECL_LINK(DoubleClickHdl, ListBox&, void);
+ DECL_LINK(DoubleClickHdl, weld::TreeView&, void);
public:
- SwSelGlossaryDlg(vcl::Window * pParent, const OUString &rShortName);
+ SwSelGlossaryDlg(weld::Window * pParent, const OUString &rShortName);
virtual ~SwSelGlossaryDlg() override;
- virtual void dispose() override;
void InsertGlos(const OUString &rRegion, const OUString &rGlosName)
{
const OUString aTmp = rRegion + ":" + rGlosName;
- m_pGlosBox->InsertEntry(aTmp);
+ m_xGlosBox->append_text(aTmp);
}
sal_Int32 GetSelectedIdx() const
{
- return m_pGlosBox->GetSelectedEntryPos();
+ return m_xGlosBox->get_selected_index();
}
void SelectEntryPos(sal_Int32 nIdx)
{
- m_pGlosBox->SelectEntryPos(nIdx);
+ m_xGlosBox->select(nIdx);
}
};