summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhilash Singh <abhilash300singh@gmail.com>2017-01-10 17:33:56 +0530
committerjan iversen <jani@documentfoundation.org>2017-01-17 06:55:22 +0000
commitbc8eb82877f544d8cf80e6f3ea02a9993e058491 (patch)
treee18314c9124175a05cfd48c4aa8b6c24eed801ef
parentf5e9c29136079b596e68f888e74e524605c12713 (diff)
tdf#103574 Imagemap dialog lacks on confirmation button
Change-Id: I95af2542fdb29efabd2d671597837c79e6336f37 Reviewed-on: https://gerrit.libreoffice.org/32925 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
-rw-r--r--include/svx/imapdlg.hxx1
-rw-r--r--svx/source/dialog/imapdlg.cxx14
-rw-r--r--svx/uiconfig/ui/imapdialog.ui14
3 files changed, 25 insertions, 4 deletions
diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx
index b5e48d861be6..284b38fd30f7 100644
--- a/include/svx/imapdlg.hxx
+++ b/include/svx/imapdlg.hxx
@@ -109,6 +109,7 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow
sal_uInt16 mnActiveId;
sal_uInt16 mnMacroId;
sal_uInt16 mnPropertyId;
+ sal_uInt16 mnCloseId;
Size aLastSize;
VclPtr<IMapWindow> pIMapWnd;
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 37eb9297413a..569210dc51d4 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -121,14 +121,15 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window
, aIMapItem(*this, *_pBindings)
{
get(m_pTbxIMapDlg1, "toolbar");
- m_pTbxIMapDlg1->InsertSeparator(3, 5);
- m_pTbxIMapDlg1->InsertSeparator(9, 5);
- m_pTbxIMapDlg1->InsertSeparator(14, 5);
- m_pTbxIMapDlg1->InsertSeparator(17, 5);
+ m_pTbxIMapDlg1->InsertSeparator(4, 5);
+ m_pTbxIMapDlg1->InsertSeparator(10, 5);
+ m_pTbxIMapDlg1->InsertSeparator(15, 5);
+ m_pTbxIMapDlg1->InsertSeparator(18, 5);
mnApplyId = m_pTbxIMapDlg1->GetItemId("TBI_APPLY");
mnOpenId = m_pTbxIMapDlg1->GetItemId("TBI_OPEN");
mnSaveAsId = m_pTbxIMapDlg1->GetItemId("TBI_SAVEAS");
+ mnCloseId = m_pTbxIMapDlg1->GetItemId("TBI_CLOSE");
mnSelectId = m_pTbxIMapDlg1->GetItemId("TBI_SELECT");
mnRectId = m_pTbxIMapDlg1->GetItemId("TBI_RECT");
mnCircleId = m_pTbxIMapDlg1->GetItemId("TBI_CIRCLE");
@@ -344,6 +345,11 @@ IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx, void )
DoOpen();
else if(nNewItemId == mnSaveAsId)
DoSave();
+ else if(nNewItemId == mnCloseId)
+ {
+ SvxIMapDlg* pDlg = GetIMapDlg();
+ pDlg->Close();
+ }
else if(nNewItemId == mnSelectId)
{
SetActiveTool( nNewItemId );
diff --git a/svx/uiconfig/ui/imapdialog.ui b/svx/uiconfig/ui/imapdialog.ui
index 45be1786aee8..a26e3afdad51 100644
--- a/svx/uiconfig/ui/imapdialog.ui
+++ b/svx/uiconfig/ui/imapdialog.ui
@@ -68,6 +68,20 @@
</packing>
</child>
<child>
+ <object class="GtkToolButton" id="TBI_CLOSE">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">start</property>
+ <property name="action_name">TBI_CLOSE</property>
+ <property name="label" translatable="yes">Close</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkToolButton" id="TBI_SELECT">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>