[Libreoffice-commits] core.git: 3 commits - include/sfx2 include/svx sfx2/source svx/inc svx/source svx/uiconfig

Caolán McNamara caolanm at redhat.com
Wed Jul 9 02:56:03 PDT 2014


 include/sfx2/frame.hxx                              |    1 
 include/svx/imapdlg.hxx                             |    1 
 sfx2/source/view/frame.cxx                          |   19 +-
 svx/inc/helpid.hrc                                  |   19 --
 svx/source/dialog/imapdlg.cxx                       |   50 ++-----
 svx/source/dialog/imapwnd.cxx                       |    5 
 svx/source/dialog/imapwnd.hxx                       |    1 
 svx/uiconfig/ui/imapdialog.ui                       |  127 ++++++++++----------
 svx/uiconfig/ui/querymodifyimagemapchangesdialog.ui |    5 
 svx/uiconfig/ui/querysaveimagemapchangesdialog.ui   |    5 
 10 files changed, 109 insertions(+), 124 deletions(-)

New commits:
commit 1fab8521b28516086dea4d11bf7d1f5620c5a851
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 9 10:51:19 2014 +0100

    drop unused helpids
    
    Change-Id: I385fcf216645a79d5c6cdadd31a37be20938371a

diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc
index acb9fb3..c697252 100644
--- a/svx/inc/helpid.hrc
+++ b/svx/inc/helpid.hrc
@@ -83,25 +83,6 @@
 #define HID_GALLERY_RENAME                                    "SVX_HID_GALLERY_RENAME"
 #define HID_GALLERY_THEMELIST                                 "SVX_HID_GALLERY_THEMELIST"
 #define HID_GALLERY_WINDOW                                    "SVX_HID_GALLERY_WINDOW"
-#define HID_IMAPDLG_ACTIVE                                    "SVX_HID_IMAPDLG_ACTIVE"
-#define HID_IMAPDLG_APPLY                                     "SVX_HID_IMAPDLG_APPLY"
-#define HID_IMAPDLG_CIRCLE                                    "SVX_HID_IMAPDLG_CIRCLE"
-#define HID_IMAPDLG_FREEPOLY                                  "SVX_HID_IMAPDLG_FREEPOLY"
-#define HID_IMAPDLG_GRAPHWND                                  "SVX_HID_IMAPDLG_GRAPHWND"
-#define HID_IMAPDLG_MACRO                                     "SVX_HID_IMAPDLG_MACRO"
-#define HID_IMAPDLG_OPEN                                      "SVX_HID_IMAPDLG_OPEN"
-#define HID_IMAPDLG_POLY                                      "SVX_HID_IMAPDLG_POLY"
-#define HID_IMAPDLG_POLYDELETE                                "SVX_HID_IMAPDLG_POLYDELETE"
-#define HID_IMAPDLG_POLYEDIT                                  "SVX_HID_IMAPDLG_POLYEDIT"
-#define HID_IMAPDLG_POLYINSERT                                "SVX_HID_IMAPDLG_POLYINSERT"
-#define HID_IMAPDLG_POLYMOVE                                  "SVX_HID_IMAPDLG_POLYMOVE"
-#define HID_IMAPDLG_PROPERTY                                  "SVX_HID_IMAPDLG_PROPERTY"
-#define HID_IMAPDLG_RECT                                      "SVX_HID_IMAPDLG_RECT"
-#define HID_IMAPDLG_REDO                                      "SVX_HID_IMAPDLG_REDO"
-#define HID_IMAPDLG_SAVEAS                                    "SVX_HID_IMAPDLG_SAVEAS"
-#define HID_IMAPDLG_SELECT                                    "SVX_HID_IMAPDLG_SELECT"
-#define HID_IMAPDLG_TOOLBOX                                   "SVX_HID_IMAPDLG_TOOLBOX"
-#define HID_IMAPDLG_UNDO                                      "SVX_HID_IMAPDLG_UNDO"
 #define HID_MENU_EXTRUSION_DEPTH                              "SVX_HID_MENU_EXTRUSION_DEPTH"
 #define HID_MENU_EXTRUSION_DIRECTION                          "SVX_HID_MENU_EXTRUSION_DIRECTION"
 #define HID_MENU_EXTRUSION_LIGHTING                           "SVX_HID_MENU_EXTRUSION_LIGHTING"
commit ac696f8b2d4ef40d6bf50207bcab8d902cd06415
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 9 10:47:33 2014 +0100

    tweak conversion a bit
    
    a) rework to remove the need for a ::Resize impl
    b) move the explicit pixel size into relative APP_FONT size
    c) lock down the target combobox size so it doesn't jump around
    
    Change-Id: Iad995453c178234d1ad0f794b5193920dcd275fe

diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx
index 1ac0191..dbf06f2 100644
--- a/include/svx/imapdlg.hxx
+++ b/include/svx/imapdlg.hxx
@@ -134,7 +134,6 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow
     void*               pCheckObj;
     SvxIMapDlgItem      aIMapItem;
 
-    virtual void        Resize() SAL_OVERRIDE;
     virtual bool    Close() SAL_OVERRIDE;
 
     DECL_LINK( TbxClickHdl, ToolBox* );
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index c153103..64bcedd 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -125,12 +125,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeStatusBar(Window *pParent,
     return new StatusBar(pParent);
 }
 
-SvxIMapDlg::SvxIMapDlg( SfxBindings *_pBindings, SfxChildWindow *pCW,
-                        Window* _pParent ) :
-        SfxModelessDialog   ( _pBindings, pCW, _pParent, "ImapDialog", "svx/ui/imapdialog.ui" ),
-        maImageList         ( SVX_RES( IL_IMAPDLG ) ),
-        pCheckObj           ( NULL ),
-        aIMapItem           ( SID_IMAP_EXEC, *this, *_pBindings )
+SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, Window* _pParent)
+    : SfxModelessDialog(_pBindings, pCW, _pParent, "ImapDialog", "svx/ui/imapdialog.ui")
+    , maImageList(SVX_RES(IL_IMAPDLG))
+    , pCheckObj(NULL)
+    , aIMapItem(SID_IMAP_EXEC, *this, *_pBindings)
 {
     get(m_pTbxIMapDlg1, "toolbar");
     m_pTbxIMapDlg1->InsertSeparator(3, 5);
@@ -180,10 +179,23 @@ SvxIMapDlg::SvxIMapDlg( SfxBindings *_pBindings, SfxChildWindow *pCW,
     get(m_pEdtText, "text");
     get(m_pFtTarget, "targetft");
     get(m_pCbbTarget, "target");
+
+    //lock this down so it doesn't jump around in size
+    //as entries are added later on
+    TargetList aTmpList;
+    SfxFrame::GetDefaultTargetList(aTmpList);
+    for (size_t i = 0, n = aTmpList.size(); i < n; ++i)
+        m_pCbbTarget->InsertEntry(aTmpList[i]);
+    Size aPrefSize(m_pCbbTarget->get_preferred_size());
+    m_pCbbTarget->set_width_request(aPrefSize.Width());
+    m_pCbbTarget->Clear();
+
     get(m_pStbStatus, "statusbar");
 
     VclVBox* _pContainer = get<VclVBox>("container");
     pIMapWnd = new IMapWindow( _pContainer, WB_BORDER, _pBindings->GetActiveFrame() );
+    pIMapWnd->set_hexpand(true);
+    pIMapWnd->set_vexpand(true);
     pIMapWnd->Show();
 
     ApplyImageList();
@@ -237,30 +249,6 @@ SvxIMapDlg::~SvxIMapDlg()
     delete pOwnData;
 }
 
-void SvxIMapDlg::Resize()
-{
-    Size aMinSize( GetMinOutputSizePixel() );
-    Size aNewSize( GetOutputSizePixel() );
-
-    if ( aNewSize.Height() >= aMinSize.Height() )
-    {
-        VclVBox *_pMainBox = get<VclVBox>("mainbox");
-        _pMainBox->SetSizePixel( aNewSize );
-
-        Size    _aSize( m_pStbStatus->GetSizePixel() );
-        Point   aPoint( 0, aNewSize.Height() - _aSize.Height() );
-
-        // Position the EditWindow
-        VclVBox *_pContainer = get<VclVBox>("container");
-        _aSize.Width() = aNewSize.Width() - 6;
-        _aSize.Height() = aPoint.Y() - _pContainer->GetPosPixel().Y() - 12;
-
-        pIMapWnd->SetSizePixel( _aSize );
-
-        aLastSize = aNewSize;
-    }
-}
-
 bool SvxIMapDlg::Close()
 {
     bool bRet = true;
@@ -317,7 +305,7 @@ const ImageMap& SvxIMapDlg::GetImageMap() const
 
 void SvxIMapDlg::SetTargetList( const TargetList& rTargetList )
 {
-    TargetList  aNewList( rTargetList );
+    TargetList aNewList( rTargetList );
 
     pIMapWnd->SetTargetList( aNewList );
 
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 3b62e39..67fe824 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -75,6 +75,11 @@ IMapWindow::~IMapWindow()
     delete[] pItemInfo;
 }
 
+Size IMapWindow::GetOptimalSize() const
+{
+    return LogicToPixel(Size(270, 170), MAP_APPFONT);
+}
+
 void IMapWindow::SetImageMap( const ImageMap& rImageMap )
 {
     ReplaceImageMap( rImageMap, false );
diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx
index 1d2ee7e..f62a832 100644
--- a/svx/source/dialog/imapwnd.hxx
+++ b/svx/source/dialog/imapwnd.hxx
@@ -107,6 +107,7 @@ protected:
 
     // GraphCtrl
     virtual void        MouseButtonUp(const MouseEvent& rMEvt) SAL_OVERRIDE;
+    virtual Size        GetOptimalSize() const SAL_OVERRIDE;
     virtual void        Command(const CommandEvent& rCEvt) SAL_OVERRIDE;
     virtual void        RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
     virtual void        SdrObjCreated( const SdrObject& rObj ) SAL_OVERRIDE;
diff --git a/svx/uiconfig/ui/imapdialog.ui b/svx/uiconfig/ui/imapdialog.ui
index 8c249e1..45be178 100644
--- a/svx/uiconfig/ui/imapdialog.ui
+++ b/svx/uiconfig/ui/imapdialog.ui
@@ -1,11 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <!-- interface-requires LibreOffice 1.0 -->
   <object class="GtkWindow" id="ImapDialog">
     <property name="can_focus">False</property>
     <property name="hexpand">True</property>
     <property name="vexpand">True</property>
+    <property name="border_width">6</property>
     <property name="title" translatable="yes">ImageMap Editor</property>
     <child>
       <object class="GtkBox" id="mainbox">
@@ -26,7 +28,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_APPLY</property>
                 <property name="label" translatable="yes">Apply</property>
                 <property name="icon_name">svx/res/id01.png</property>
@@ -42,7 +43,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_OPEN</property>
                 <property name="label" translatable="yes">Open...</property>
                 <property name="icon_name">svx/res/id02.png</property>
@@ -58,7 +58,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_SAVEAS</property>
                 <property name="label" translatable="yes">Save...</property>
                 <property name="icon_name">svx/res/id03.png</property>
@@ -74,7 +73,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_SELECT</property>
                 <property name="label" translatable="yes">Select</property>
                 <property name="icon_name">svx/res/id04.png</property>
@@ -90,7 +88,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_RECT</property>
                 <property name="label" translatable="yes">Rectangle</property>
                 <property name="icon_name">svx/res/id05.png</property>
@@ -106,7 +103,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_CIRCLE</property>
                 <property name="label" translatable="yes">Ellipse</property>
                 <property name="icon_name">svx/res/id06.png</property>
@@ -122,7 +118,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_POLY</property>
                 <property name="label" translatable="yes">Polygon</property>
                 <property name="icon_name">svx/res/id07.png</property>
@@ -138,7 +133,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_FREEPOLY</property>
                 <property name="label" translatable="yes">Freeform Polygon</property>
                 <property name="icon_name">svx/res/id08.png</property>
@@ -154,7 +148,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_POLYEDIT</property>
                 <property name="label" translatable="yes">Edit Points</property>
                 <property name="icon_name">svx/res/id030.png</property>
@@ -170,7 +163,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_POLYMOVE</property>
                 <property name="label" translatable="yes">Move Points</property>
                 <property name="icon_name">svx/res/id031.png</property>
@@ -186,7 +178,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_POLYINSERT</property>
                 <property name="label" translatable="yes">Insert Points</property>
                 <property name="icon_name">svx/res/id032.png</property>
@@ -202,7 +193,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_POLYDELETE</property>
                 <property name="label" translatable="yes">Delete Points</property>
                 <property name="icon_name">svx/res/id033.png</property>
@@ -218,7 +208,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_UNDO</property>
                 <property name="label" translatable="yes">Undo </property>
                 <property name="icon_name">svx/res/id040.png</property>
@@ -234,7 +223,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_REDO</property>
                 <property name="label" translatable="yes">Redo</property>
                 <property name="icon_name">svx/res/id041.png</property>
@@ -250,7 +238,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_ACTIVE</property>
                 <property name="label" translatable="yes">Active</property>
                 <property name="icon_name">svx/res/id016.png</property>
@@ -266,7 +253,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_MACRO</property>
                 <property name="label" translatable="yes">Macro...</property>
                 <property name="icon_name">svx/res/id018.png</property>
@@ -282,7 +268,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="valign">start</property>
-                <property name="use_action_appearance">False</property>
                 <property name="action_name">TBI_PROPERTY</property>
                 <property name="label" translatable="yes">Properties...</property>
                 <property name="icon_name">svx/res/id019.png</property>
@@ -304,13 +289,15 @@
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="row_spacing">6</property>
-            <property name="column_spacing">6</property>
+            <property name="column_spacing">12</property>
             <child>
               <object class="GtkLabel" id="urlft">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="halign">start</property>
                 <property name="label" translatable="yes">Address:</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">url</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
@@ -320,38 +307,71 @@
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="textft">
+              <object class="svtlo-SvtURLBox" id="url">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes">Text:</property>
               </object>
               <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="targetft">
+              <object class="GtkGrid" id="grid2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="halign">start</property>
-                <property name="label" translatable="yes">Frame:</property>
-              </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkEntry" id="text">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
+                <child>
+                  <object class="GtkLabel" id="targetft">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes">Frame:</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">target</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="text">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBox" id="target">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="has_entry">True</property>
+                    <child internal-child="entry">
+                      <object class="GtkEntry" id="combobox-entry">
+                        <property name="can_focus">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">2</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
               </object>
               <packing>
                 <property name="left_attach">1</property>
@@ -361,32 +381,16 @@
               </packing>
             </child>
             <child>
-              <object class="svtlo-SvtURLBox" id="url">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="hexpand">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">0</property>
-                <property name="width">3</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkComboBox" id="target">
+              <object class="GtkLabel" id="textft">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="hexpand">True</property>
-                <property name="has_entry">True</property>
-                <child internal-child="entry">
-                  <object class="GtkEntry" id="combobox-entry">
-                    <property name="can_focus">False</property>
-                  </object>
-                </child>
+                <property name="halign">start</property>
+                <property name="label" translatable="yes">Text:</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">text</property>
               </object>
               <packing>
-                <property name="left_attach">3</property>
+                <property name="left_attach">0</property>
                 <property name="top_attach">1</property>
                 <property name="width">1</property>
                 <property name="height">1</property>
@@ -401,7 +405,6 @@
         </child>
         <child>
           <object class="GtkBox" id="container:border">
-            <property name="height_request">200</property>
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="hexpand">True</property>
diff --git a/svx/uiconfig/ui/querymodifyimagemapchangesdialog.ui b/svx/uiconfig/ui/querymodifyimagemapchangesdialog.ui
index 33e388e..c7a6a44 100644
--- a/svx/uiconfig/ui/querymodifyimagemapchangesdialog.ui
+++ b/svx/uiconfig/ui/querymodifyimagemapchangesdialog.ui
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkMessageDialog" id="QueryModifyImageMapChangesDialog">
     <property name="can_focus">False</property>
     <property name="border_width">12</property>
@@ -26,6 +27,8 @@
                 <property name="label">gtk-cancel</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>
diff --git a/svx/uiconfig/ui/querysaveimagemapchangesdialog.ui b/svx/uiconfig/ui/querysaveimagemapchangesdialog.ui
index bf49e73..2a56108 100644
--- a/svx/uiconfig/ui/querysaveimagemapchangesdialog.ui
+++ b/svx/uiconfig/ui/querysaveimagemapchangesdialog.ui
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
 <interface>
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.0"/>
   <object class="GtkMessageDialog" id="QuerySaveImageMapChangesDialog">
     <property name="can_focus">False</property>
     <property name="border_width">12</property>
@@ -26,6 +27,8 @@
                 <property name="label">gtk-cancel</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>
commit d8f53bbe2bb705fc067ee8cf653446916b469eb2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 9 10:46:44 2014 +0100

    provide a route to get the default document targets
    
    Change-Id: Ia163d2a69b33c18e18f81f0f82855d1caa4c2c1a

diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index d8e5cab..8730dbd 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -149,6 +149,7 @@ public:
     bool                IsParent( SfxFrame* ) const;
 
     sal_uInt32          GetFrameType() const;
+    static void         GetDefaultTargetList( TargetList& );
     void                GetTargetList( TargetList& ) const;
     SAL_DLLPRIVATE SfxFrame* GetContainingDocFrame_Impl( SfxFrame* pSelf );
     void                UpdateDescriptor( SfxObjectShell *pDoc );
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 283c211..1c2d447 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -475,18 +475,21 @@ SfxFrameDescriptor* SfxFrame::GetDescriptor() const
     return pImp->pDescr;
 }
 
-
+void SfxFrame::GetDefaultTargetList(TargetList& rList)
+{
+    // An empty string for 'No Target'
+    rList.push_back( OUString() );
+    rList.push_back( OUString( "_top" ) );
+    rList.push_back( OUString( "_parent" ) );
+    rList.push_back( OUString( "_blank" ) );
+    rList.push_back( OUString( "_self" ) );
+}
 
 void SfxFrame::GetTargetList( TargetList& rList ) const
 {
     if ( !GetParentFrame() )
     {
-        // An empty string for 'No Target'
-        rList.push_back( OUString() );
-        rList.push_back( OUString( "_top" ) );
-        rList.push_back( OUString( "_parent" ) );
-        rList.push_back( OUString( "_blank" ) );
-        rList.push_back( OUString( "_self" ) );
+        SfxFrame::GetDefaultTargetList(rList);
     }
 
     SfxViewFrame* pView = GetCurrentViewFrame();
@@ -501,8 +504,6 @@ void SfxFrame::GetTargetList( TargetList& rList ) const
     }
 }
 
-
-
 bool SfxFrame::IsParent( SfxFrame *pFrame ) const
 {
     SfxFrame *pParent = pParentFrame;


More information about the Libreoffice-commits mailing list