[Libreoffice-commits] core.git: 3 commits - sc/uiconfig starmath/uiconfig svx/source sw/source

Caolán McNamara caolanm at redhat.com
Tue Jun 18 08:04:12 PDT 2013


 sc/uiconfig/scalc/ui/optsortlists.ui                |   23 +-------
 starmath/uiconfig/smath/ui/smathsettings.ui         |    5 +
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |   57 ++++++++++----------
 sw/source/core/draw/dcontact.cxx                    |   20 +++++--
 4 files changed, 56 insertions(+), 49 deletions(-)

New commits:
commit 3ed731fc136f958a8a38c9117fbd1e4a068d838b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 18 16:03:02 2013 +0100

    put some borders around these widgets
    
    Change-Id: I252f637d87a33253e2a90b77db013c2f712f1d39

diff --git a/sc/uiconfig/scalc/ui/optsortlists.ui b/sc/uiconfig/scalc/ui/optsortlists.ui
index 45fc9be..34dec77 100644
--- a/sc/uiconfig/scalc/ui/optsortlists.ui
+++ b/sc/uiconfig/scalc/ui/optsortlists.ui
@@ -141,7 +141,7 @@
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Lists</property>
                 <property name="use_underline">True</property>
-                <property name="mnemonic_widget">lists</property>
+                <property name="mnemonic_widget">lists:border</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
@@ -157,7 +157,7 @@
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">_Entries</property>
                 <property name="use_underline">True</property>
-                <property name="mnemonic_widget">entries</property>
+                <property name="mnemonic_widget">entries:border</property>
               </object>
               <packing>
                 <property name="left_attach">1</property>
@@ -167,7 +167,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkTextView" id="entries">
+              <object class="GtkTextView" id="entries:border">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
@@ -181,7 +181,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkTreeView" id="lists">
+              <object class="GtkTreeView" id="lists:border">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="hexpand">True</property>
commit 9f8c4f50e441e640d52712f1866b4037dab4da36
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 18 15:43:25 2013 +0100

    a few HIG tweaks
    
    Change-Id: I063c5fac1727ea7ba2bf5c8054d425af4598395c

diff --git a/sc/uiconfig/scalc/ui/optsortlists.ui b/sc/uiconfig/scalc/ui/optsortlists.ui
index ce603c9..45fc9be 100644
--- a/sc/uiconfig/scalc/ui/optsortlists.ui
+++ b/sc/uiconfig/scalc/ui/optsortlists.ui
@@ -1,13 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="lower">1</property>
-    <property name="upper">32000</property>
-    <property name="value">1</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
   <object class="GtkBox" id="OptSortLists">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -30,11 +23,9 @@
             <child>
               <object class="GtkButton" id="new">
                 <property name="label" translatable="yes">_New</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -46,11 +37,9 @@
             <child>
               <object class="GtkButton" id="add">
                 <property name="label" translatable="yes">_Add</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -62,11 +51,9 @@
             <child>
               <object class="GtkButton" id="delete">
                 <property name="label" translatable="yes">_Delete</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -86,11 +73,9 @@
         <child>
           <object class="GtkButton" id="copy">
             <property name="label" translatable="yes">_Copy</property>
-            <property name="use_action_appearance">False</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
-            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
           </object>
           <packing>
diff --git a/starmath/uiconfig/smath/ui/smathsettings.ui b/starmath/uiconfig/smath/ui/smathsettings.ui
index c7d6c77..550dc8d 100644
--- a/starmath/uiconfig/smath/ui/smathsettings.ui
+++ b/starmath/uiconfig/smath/ui/smathsettings.ui
@@ -12,7 +12,9 @@
     <property name="can_focus">False</property>
     <property name="hexpand">True</property>
     <property name="vexpand">True</property>
+    <property name="border_width">6</property>
     <property name="orientation">vertical</property>
+    <property name="spacing">12</property>
     <child>
       <object class="GtkFrame" id="contents">
         <property name="visible">True</property>
@@ -157,7 +159,7 @@
                   <object class="GtkBox" id="box3">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
+                    <property name="spacing">12</property>
                     <child>
                       <object class="GtkRadioButton" id="sizezoomed">
                         <property name="label" translatable="yes">_Scaling</property>
@@ -256,6 +258,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
commit 6c5c5584eb1adb64fee3aaf76196115ba3812e2c
Author: Armin Le Grand <alg at apache.org>
Date:   Tue Jun 18 13:10:42 2013 +0000

    Resolves: #i121917# Corrected access to text object
    
    (cherry picked from commit 2c9c9923fdf042c41cebaf9a15def7caac86032d)
    
    Conflicts:
    	sw/source/core/draw/dcontact.cxx
    
    Change-Id: Ia214127ca540c4f4036a0006e7c227649fb39134

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 5854e36..20879f1 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -150,6 +150,34 @@ void PosSizePropertyPanel::ShowMenu (void)
 
 
 
+namespace
+{
+    bool hasText(const SdrView& rSdrView)
+    {
+        const SdrMarkList& rMarkList = rSdrView.GetMarkedObjectList();
+
+        if(1 == rMarkList.GetMarkCount())
+        {
+            const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+            const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier());
+
+            if((pObj->GetObjInventor() == SdrInventor) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind))
+            {
+                const SdrTextObj* pSdrTextObj = dynamic_cast< const SdrTextObj* >(pObj);
+
+                if(pSdrTextObj && pSdrTextObj->HasText())
+                {
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+} // end of anonymous namespace
+
+
+
 void PosSizePropertyPanel::Initialize()
 {
     mpFtPosX->SetBackground(Wallpaper());
@@ -222,18 +250,7 @@ void PosSizePropertyPanel::Initialize()
     if ( mpView != NULL )
     {
         maUIScale = mpView->GetModel()->GetUIScale();
-
-        const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
-        if(1 == rMarkList.GetMarkCount())
-        {
-            const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-            const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier());
-
-            if((pObj->GetObjInventor() == SdrInventor) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) && ((SdrTextObj*)pObj)->HasText())
-            {
-                mbAdjustEnabled = true;
-            }
-        }
+        mbAdjustEnabled = hasText(*mpView);
     }
 
     mePoolUnit = maTransfWidthControl.GetCoreMetric();
@@ -701,20 +718,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
     if ( mpView == NULL )
         return;
 
-    const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
-
-    if(1 == rMarkList.GetMarkCount())
-    {
-        const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-        const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier());
-
-        if((pObj->GetObjInventor() == SdrInventor) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) && ((SdrTextObj*)pObj)->HasText())
-            mbAdjustEnabled = true;
-        else
-            mbAdjustEnabled = false;
-    }
-    else
-        mbAdjustEnabled = false;
+    mbAdjustEnabled = hasText(*mpView);
 
     // Pool unit and dialog unit may have changed, make sure that we
     // have the current values.
@@ -938,6 +942,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
     }
 
     const sal_Int32 nCombinedContext(maContext.GetCombinedContext_DI());
+    const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
 
     switch (rMarkList.GetMarkCount())
     {
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index cc6f1a5..6026513 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -2332,8 +2332,16 @@ basegfx::B2DPolyPolygon SwDrawVirtObj::TakeContour() const
 SdrHdl* SwDrawVirtObj::GetHdl(sal_uInt32 nHdlNum) const
 {
     SdrHdl* pHdl = rRefObj.GetHdl(nHdlNum);
-    Point aP(pHdl->GetPos() + GetOffset());
-    pHdl->SetPos(aP);
+
+    if(pHdl)
+    {
+        Point aP(pHdl->GetPos() + GetOffset());
+        pHdl->SetPos(aP);
+    }
+    else
+    {
+        OSL_ENSURE(false, "Got no SdrHdl(!)");
+    }
 
     return pHdl;
 }
@@ -2342,8 +2350,14 @@ SdrHdl* SwDrawVirtObj::GetPlusHdl(const SdrHdl& rHdl, sal_uInt16 nPlNum) const
 {
     SdrHdl* pHdl = rRefObj.GetPlusHdl(rHdl, nPlNum);
 
-    if (pHdl)
+    if(pHdl)
+    {
         pHdl->SetPos(pHdl->GetPos() + GetOffset());
+    }
+    else
+    {
+        OSL_ENSURE(false, "Got no SdrHdl(!)");
+    }
 
     return pHdl;
 }


More information about the Libreoffice-commits mailing list