sfx2/source/dialog/alienwarn.cxx    |    2 +-
 sfx2/uiconfig/ui/alienwarndialog.ui |   17 +++++++++--------
 svx/source/dialog/graphctl.cxx      |   19 +++++++++----------
 svx/uiconfig/ui/sidebarpossize.ui   |    2 +-
 vcl/source/window/builder.cxx       |   12 +++++++-----
 5 files changed, 27 insertions(+), 25 deletions(-)

New commits:
commit daa654fb44772009017b0c918903093147df1620
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed Jan 8 13:30:06 2014 +0000

    GtkComboBox->VclComboBoxNumeric
    
    Change-Id: Iba1416692a619c1f566f26da5b06ed04342057b3

diff --git a/svx/uiconfig/ui/sidebarpossize.ui 
b/svx/uiconfig/ui/sidebarpossize.ui
index e0aa74b..c135e5c 100644
--- a/svx/uiconfig/ui/sidebarpossize.ui
+++ b/svx/uiconfig/ui/sidebarpossize.ui
@@ -234,7 +234,7 @@
                     <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
-                      <object class="GtkComboBox" id="rotation:0.00degrees">
+                      <object class="VclComboBoxNumeric" 
id="rotation:0.00degrees">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="has_tooltip">True</property>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 0d4ca57..5aac570 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1351,14 +1351,14 @@ Window *VclBuilder::makeObject(Window *pParent, const 
OString &name, const OStri
 
         if (!sPattern.isEmpty())
         {
+            connectNumericFormatterAdjustment(id, sAdjustment);
             OString sUnit = extractUnit(sPattern);
             FieldUnit eUnit = detectMetricUnit(sUnit);
             SAL_INFO("vcl.layout", "making metric box for " << name.getStr() 
<< " " << sUnit.getStr());
-            connectNumericFormatterAdjustment(id, sAdjustment);
-            MetricBox *pBox = new MetricBox(pParent, nBits|WB_BORDER);
-            if (bDropdown)
-                pBox->EnableAutoSize(true);
+            MetricBox *pBox = new MetricBox(pParent, nBits);
+            pBox->EnableAutoSize(true);
             pBox->SetUnit(eUnit);
+            pBox->SetDecimalDigits(extractDecimalDigits(sPattern));
             if (eUnit == FUNIT_CUSTOM)
                 pBox->SetCustomUnitText(OStringToOUString(sUnit, 
RTL_TEXTENCODING_UTF8));
             pWindow = pBox;
commit ef683ad85210455e64e9472161c91407fe173ddf
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed Jan 8 13:25:24 2014 +0000

    improve warning message
    
    Change-Id: I2d8aab3f4589750aecb0a9565c595a712fc7bc73

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 6b4cce4..0d4ca57 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1295,7 +1295,9 @@ Window *VclBuilder::makeObject(Window *pParent, const 
OString &name, const OStri
             connectNumericFormatterAdjustment(id, sAdjustment);
             OString sUnit = extractUnit(sPattern);
             FieldUnit eUnit = detectMetricUnit(sUnit);
-            SAL_WARN("vcl.layout", "making metric box for " << name.getStr() 
<< " " << sUnit.getStr()
+            SAL_WARN("vcl.layout", "making metric box for type: " << 
name.getStr()
+                << " unit: " << sUnit.getStr()
+                << " name: " << id.getStr()
                 << " use a VclComboBoxNumeric instead");
             MetricBox *pBox = new MetricBox(pParent, nBits);
             pBox->EnableAutoSize(true);
commit bce7c9b0688c6f6f73311cc87ac094831489eedb
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed Jan 8 12:21:36 2014 +0000

    swap button order in ui to match typical reality
    
    This has no effect on the rendering of this .ui as native button ordering is
    active. But it means that under the typical editing-under-GNOME that ones 
head
    is wrecked from the cognitive impedance of the editor and viewer not 
matching
    in order
    
    Change-Id: I8888d4263f05bcecff72496f4cf0ae67345dc644

diff --git a/sfx2/uiconfig/ui/alienwarndialog.ui 
b/sfx2/uiconfig/ui/alienwarndialog.ui
index 6513171..0e6141d 100644
--- a/sfx2/uiconfig/ui/alienwarndialog.ui
+++ b/sfx2/uiconfig/ui/alienwarndialog.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Wed Jan  8 12:08:58 2014 -->
+<!-- Generated with glade 3.16.0 on Wed Jan  8 12:15:41 2014 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkMessageDialog" id="AlienWarnDialog">
@@ -23,14 +23,13 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="save">
-                <property name="label" translatable="yes">_Use %FORMATNAME 
Format</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label" translatable="yes">Use _ODF 
Format</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_underline">True</property>
+                <property name="image_position">bottom</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -40,13 +39,14 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label" translatable="yes">Use _ODF 
Format</property>
+              <object class="GtkButton" id="save">
+                <property name="label" translatable="yes">_Use %FORMATNAME 
Format</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_underline">True</property>
-                <property name="image_position">bottom</property>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -82,8 +82,8 @@
       </object>
     </child>
     <action-widgets>
-      <action-widget response="1">save</action-widget>
       <action-widget response="0">cancel</action-widget>
+      <action-widget response="1">save</action-widget>
     </action-widgets>
   </object>
 </interface>
commit 2e8a1e1121bc23d442bf7be27e2ae6c15d101980
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed Jan 8 12:14:04 2014 +0000

    tweak button order for alien warn dialog
    
    Change-Id: I6e51951df3bff0d1829bff8e2a436e4030247baf

diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index 0ec75af..ad5290e 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -28,7 +28,7 @@ SfxAlienWarningDialog::SfxAlienWarningDialog(Window* pParent, 
const OUString& _r
     : MessageDialog(pParent, "AlienWarnDialog", "sfx/ui/alienwarndialog.ui")
 {
     get(m_pWarningOnBox, "ask");
-    get(m_pKeepCurrentBtn, "ok");
+    get(m_pKeepCurrentBtn, "save");
 
     // replace formatname (text)
     OUString sInfoText = get_primary_text();
diff --git a/sfx2/uiconfig/ui/alienwarndialog.ui 
b/sfx2/uiconfig/ui/alienwarndialog.ui
index 5975d10..6513171 100644
--- a/sfx2/uiconfig/ui/alienwarndialog.ui
+++ b/sfx2/uiconfig/ui/alienwarndialog.ui
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Wed Jan  8 12:08:58 2014 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkMessageDialog" id="AlienWarnDialog">
@@ -22,7 +23,7 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="ok">
+              <object class="GtkButton" id="save">
                 <property name="label" translatable="yes">_Use %FORMATNAME 
Format</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -81,7 +82,7 @@
       </object>
     </child>
     <action-widgets>
-      <action-widget response="1">ok</action-widget>
+      <action-widget response="1">save</action-widget>
       <action-widget response="0">cancel</action-widget>
     </action-widgets>
   </object>
commit 794f5af121906668870a58700aed25b660381240
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed Jan 8 11:22:25 2014 +0000

    Related: rhbz#1047174 avoid access to nonexisting parent dialog
    
    Change-Id: I0bf9116d088adde838993ac5e909a6f3481f883e

diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 5e87d51..3814189 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -309,6 +309,8 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
     KeyCode aCode( rKEvt.GetKeyCode() );
     bool    bProc = false;
 
+    Dialog* pDialog = GetParentDialog();
+
     switch ( aCode.GetCode() )
     {
         case KEY_DELETE:
@@ -318,8 +320,8 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
             {
                 pView->DeleteMarked();
                 bProc = true;
-                if( !pView->AreObjectsMarked() )
-                    GetParentDialog()->GrabFocusToFirstControl();
+                if (!pView->AreObjectsMarked() && pDialog)
+                    pDialog->GrabFocusToFirstControl();
             }
         }
         break;
@@ -328,9 +330,11 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
         {
             if ( bSdrMode )
             {
+                bool bGrabFocusToFirstControl = true;
                 if ( pView->IsAction() )
                 {
                     pView->BrkAction();
+                    bGrabFocusToFirstControl = false;
                 }
                 else if ( pView->AreObjectsMarked() )
                 {
@@ -340,16 +344,11 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
                     if(pHdl)
                     {
                         ((SdrHdlList&)rHdlList).ResetFocusHdl();
+                        bGrabFocusToFirstControl = false;
                     }
-                    else
-                    {
-                        GetParentDialog()->GrabFocusToFirstControl();
-                    }
-                }
-                else
-                {
-                    GetParentDialog()->GrabFocusToFirstControl();
                 }
+                if (bGrabFocusToFirstControl && pDialog)
+                    pDialog->GrabFocusToFirstControl();
                 bProc = true;
             }
         }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to