[Libreoffice-commits] core.git: include/vcl sw/inc sw/source sw/uiconfig vcl/inc vcl/source vcl/unx

2019-03-15 Thread Libreoffice Gerrit user
 include/vcl/weld.hxx |   10 +
 sw/inc/swabstdlg.hxx |2 
 sw/source/ui/dialog/swdlgfact.cxx|8 
 sw/source/ui/dialog/swdlgfact.hxx|2 
 sw/source/ui/misc/bookmark.cxx   |  273 +--
 sw/source/uibase/inc/bookmark.hxx|   62 ---
 sw/source/uibase/inc/condedit.hxx|   35 +++
 sw/source/uibase/shells/textsh1.cxx  |2 
 sw/source/uibase/utlui/condedit.cxx  |   61 ++
 sw/uiconfig/swriter/ui/insertbookmark.ui |  201 +-
 vcl/inc/unx/gtk/gtkframe.hxx |7 
 vcl/inc/unx/gtk/gtkinst.hxx  |   18 +-
 vcl/source/app/salvtables.cxx|5 
 vcl/unx/gtk3/gtk3gtkframe.cxx|   65 ---
 vcl/unx/gtk3/gtk3gtkinst.cxx |   59 ++
 15 files changed, 545 insertions(+), 265 deletions(-)

New commits:
commit 8bddb3c77048814b370351e0eb72c31f289fb34f
Author: Caolán McNamara 
AuthorDate: Thu Mar 14 12:51:31 2019 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 15 09:57:43 2019 +0100

add drop target support to welded widget

refactor the mega-widget dnd drop target to be reused at
mini-widget level

and weld SwInsertBookmarkDlg

Change-Id: I3f36e1cd902ecf166e369d0a05902d3df2b4f791
Reviewed-on: https://gerrit.libreoffice.org/69274
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index a3aeaf223142..75b33607d1dd 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -38,6 +38,13 @@ namespace awt
 {
 class XWindow;
 }
+namespace datatransfer
+{
+namespace dnd
+{
+class XDropTarget;
+}
+}
 namespace graphic
 {
 class XGraphic;
@@ -206,6 +213,8 @@ public:
 
 virtual VclPtr create_virtual_device() const = 0;
 
+virtual css::uno::Reference 
get_drop_target() = 0;
+
 virtual ~Widget() {}
 };
 
@@ -903,6 +912,7 @@ public:
 // nEndPos can be -1 in order to select all text
 virtual void select_region(int nStartPos, int nEndPos) = 0;
 virtual bool get_selection_bounds(int& rStartPos, int& rEndPos) = 0;
+// nCursorPos can be -1 to set to the end
 virtual void set_position(int nCursorPos) = 0;
 virtual int get_position() const = 0;
 virtual void set_editable(bool bEditable) = 0;
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index ac53affc4664..cef81a8148cb 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -373,7 +373,7 @@ public:
 virtual VclPtr CreateSwAddressAbstractDlg(weld::Window* 
pParent, const SfxItemSet& rSet) = 0;
 virtual VclPtr  
CreateSwAsciiFilterDlg(weld::Window* pParent, SwDocShell& rDocSh,
 SvStream* 
pStream) = 0;
-virtual VclPtr CreateSwInsertBookmarkDlg( vcl::Window 
*pParent, SwWrtShell &rSh, SfxRequest& rReq ) = 0;
+virtual VclPtr CreateSwInsertBookmarkDlg(weld::Window 
*pParent, SwWrtShell &rSh, SfxRequest& rReq) = 0;
 
 virtual VclPtr CreateSwBreakDlg(weld::Window *pParent, 
SwWrtShell &rSh) = 0;
 virtual VclPtr CreateSwChangeDBDlg(SwView& rVw) = 0;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 1566aba4c060..3292b44eb7ec 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -778,12 +778,10 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateSwAsciiFilt
 return 
VclPtr::Create(std::make_unique(pParent,
 rDocSh, pStream));
 }
 
-VclPtr 
SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( vcl::Window *pParent,
-   
SwWrtShell &rSh,
-   
SfxRequest& rReq )
+VclPtr 
SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg(weld::Window *pParent,
+   
   SwWrtShell &rSh, SfxRequest& rReq)
 {
-VclPtr pDlg = VclPtr::Create( 
pParent, rSh, rReq );
-return VclPtr::Create( pDlg );
+return 
VclPtr::Create(std::make_unique(pParent,
 rSh, rReq));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateSwBreakDlg(weld::Window* pParent, 
SwWrtShell &rSh)
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 308a603c572a..8fb02a4c4ac6 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -597,7 +597,7 @@ public:
 virtual VclPtr CreateSwAddressAbstractDlg(weld::Window* 
pParent, const SfxItemSet& rSet) override;
 virtual VclPtr  
CreateSwAsciiFilterDlg(weld::Window* pParent, SwDocShell& rDocSh,
 SvStream* 
pStream) override;
-virtual VclPtr CreateSwInsertBookmarkDlg( vcl::Window 
*pParent, SwWrtShell &rSh, SfxRequest& rReq ) override;
+virtual VclPtr CreateSwInsertBookmarkDlg(

[Libreoffice-commits] core.git: include/vcl sw/inc sw/source sw/uiconfig vcl/inc vcl/source vcl/unx

2018-04-16 Thread Caolán McNamara
 include/vcl/weld.hxx  |3 
 sw/inc/swabstdlg.hxx  |2 
 sw/source/ui/dialog/swdlgfact.cxx |   25 ++-
 sw/source/ui/dialog/swdlgfact.hxx |   11 +
 sw/source/ui/misc/insfnote.cxx|  223 +-
 sw/source/uibase/inc/insfnote.hxx |   71 -
 sw/source/uibase/shells/textsh1.cxx   |6 
 sw/source/uibase/uiview/viewdlg2.cxx  |2 
 sw/uiconfig/swriter/ui/insertfootnote.ui  |   22 ++
 vcl/inc/unx/gtk/gtkinst.hxx   |2 
 vcl/source/app/salvtables.cxx |   10 +
 vcl/unx/gtk3/gtk3gtkinst.cxx  |   84 +++
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx |5 
 13 files changed, 284 insertions(+), 182 deletions(-)

New commits:
commit 6703b806a7d33f27bdec53d5c897beac94308fd9
Author: Caolán McNamara 
Date:   Mon Apr 16 10:44:32 2018 +0100

weld SwInsFootNoteDlg

Change-Id: I54849e2336d093e9044d4b32275387fa04e3bab9
Reviewed-on: https://gerrit.libreoffice.org/52963
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 52585c65b506..74ce9a7ab37d 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -409,6 +409,9 @@ public:
 virtual void set_position(int nCursorPos) = 0;
 virtual void set_editable(bool bEditable) = 0;
 
+virtual vcl::Font get_font() = 0;
+virtual void set_font(const vcl::Font& rFont) = 0;
+
 void connect_changed(const Link& rLink) { m_aChangeHdl = 
rLink; }
 
 void connect_insert_text(const Link& rLink) { 
m_aInsertTextHdl = rLink; }
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index a72a8f17fde1..8e35a4114fc9 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -462,7 +462,7 @@ public:
 SwWrtShell *pWrtShell) = 0;
 virtual VclPtr
CreateFieldInputDlg(vcl::Window *pParent,
 SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton) 
= 0;
-virtual VclPtr 
CreateInsFootNoteDlg(vcl::Window * pParent,
+virtual VclPtr 
CreateInsFootNoteDlg(weld::Window * pParent,
 SwWrtShell &rSh, bool bEd = false) = 0;
 virtual VclPtr  CreateTitlePageDlg ( 
vcl::Window * pParent ) = 0;
 virtual VclPtr CreateVclSwViewDialog(SwView& 
rView) = 0;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index b105bd332808..880792e93a84 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -145,11 +145,17 @@ short AbstractSwRenameXNamedDlg_Impl::Execute()
 IMPL_ABSTDLG_BASE(AbstractSwModalRedlineAcceptDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractGlossaryDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractFieldInputDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractInsFootNoteDlg_Impl);
+
+short AbstractInsFootNoteDlg_Impl::Execute()
+{
+return m_xDlg->execute();
+}
+
 short AbstractInsTableDlg_Impl::Execute()
 {
 return m_xDlg->run();
 }
+
 IMPL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractMailMergeCreateFromDlg_Impl);
@@ -456,27 +462,27 @@ bool AbstractFieldInputDlg_Impl::NextButtonPressed() const
 
 OUString AbstractInsFootNoteDlg_Impl::GetFontName()
 {
-return pDlg->GetFontName();
+return m_xDlg->GetFontName();
 }
 
 bool AbstractInsFootNoteDlg_Impl::IsEndNote()
 {
-return pDlg->IsEndNote();
+return m_xDlg->IsEndNote();
 }
 
 OUString AbstractInsFootNoteDlg_Impl::GetStr()
 {
-return pDlg->GetStr();
+return m_xDlg->GetStr();
 }
 
-void AbstractInsFootNoteDlg_Impl::SetHelpId( const OString& sHelpId )
+void AbstractInsFootNoteDlg_Impl::SetHelpId(const OString& rHelpId)
 {
-pDlg->SetHelpId( sHelpId );
+m_xDlg->set_help_id(rHelpId);
 }
 
 void AbstractInsFootNoteDlg_Impl::SetText( const OUString& rStr )
 {
-pDlg->SetText( rStr );
+m_xDlg->set_title(rStr);
 }
 
 void AbstractInsTableDlg_Impl::GetValues( OUString& rName, sal_uInt16& rRow, 
sal_uInt16& rCol,
@@ -928,10 +934,9 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateFieldInputDlg(
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg(
-vcl::Window * pParent, SwWrtShell &rSh, bool bEd )
+weld::Window * pParent, SwWrtShell &rSh, bool bEd )
 {
-VclPtr pDlg = VclPtr::Create(pParent, 
rSh, bEd);
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
SwInsFootNoteDlg(pParent, rSh, bEd));
 }
 
 VclPtr SwAbstractDialogFactory_Impl::CreateTitlePageDlg ( 
vcl::Window *pParent )
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 363f110362d4..503049b63f8b 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -354,7 +354,14 @@ class AbstractFieldInputDlg_Impl : public 
AbstractFieldInputDlg
 class SwInsFootNoteDlg;
 class AbstractInsFootNoteDlg_Impl : public AbstractInsFootNoteDlg