[Libreoffice-commits] core.git: cui/source cui/uiconfig include/tools rsc/source sc/uiconfig sd/source sd/uiconfig svx/source svx/uiconfig vcl/source

Caolán McNamara caolanm at redhat.com
Mon Jul 8 10:40:33 PDT 2013


 cui/source/inc/cuitabarea.hxx            |    2 -
 cui/source/options/optgdlg.cxx           |    3 -
 cui/source/options/optgdlg.hxx           |    3 -
 cui/source/tabpages/tpgradnt.cxx         |    3 -
 cui/source/tabpages/tphatch.cxx          |    3 -
 cui/uiconfig/ui/gradientpage.ui          |   38 -------------------
 cui/uiconfig/ui/hatchpage.ui             |   57 +++++++++--------------------
 cui/uiconfig/ui/optviewpage.ui           |   59 ++++++++++++-------------------
 include/tools/fldunit.hxx                |    2 -
 rsc/source/parser/rscibas.cxx            |    2 +
 sc/uiconfig/scalc/ui/sidebaralignment.ui |    2 -
 sd/source/ui/dlg/copydlg.cxx             |    2 -
 sd/uiconfig/sdraw/ui/copydlg.ui          |   36 +++---------------
 svx/source/svdraw/svdmodel.cxx           |    2 +
 svx/source/svdraw/svdtrans.cxx           |    2 +
 svx/uiconfig/ui/optgridpage.ui           |   12 +++---
 vcl/source/control/field.cxx             |    8 +++-
 vcl/source/src/units.src                 |    3 +
 vcl/source/window/builder.cxx            |    4 ++
 19 files changed, 78 insertions(+), 165 deletions(-)

New commits:
commit d0e65716347377628635c053ccb425d6284e3533
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 8 16:27:04 2013 +0100

    add degrees and pixels as known spin field units
    
    Change-Id: I5937843a5c5485f469ef1fb6b5844aa15c33a14d

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 9bcc996..ea850cc 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -370,7 +370,6 @@ private:
     MetricField*        m_pMtrCenterY;
     FixedText*          m_pFtAngle;
     MetricField*        m_pMtrAngle;
-    FixedText*          m_pFtAngleDegrees;
     MetricField*        m_pMtrBorder;
     ColorLB*            m_pLbColorFrom;
     MetricField*        m_pMtrColorFrom;
@@ -448,7 +447,6 @@ class SvxHatchTabPage : public SvxTabPage
 private:
     MetricField*        m_pMtrDistance;
     MetricField*        m_pMtrAngle;
-    FixedText*          m_pFtAngleDegrees;
     SvxRectCtl*         m_pCtlAngle;
     ListBox*            m_pLbLineType;
     ColorLB*            m_pLbLineColor;
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index e11eef5..a0f6284 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -543,7 +543,6 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet)
     get(m_pFontAntiAliasing, "aafont");
     get(m_pAAPointLimitLabel, "aafrom");
     get(m_pAAPointLimit, "aanf");
-    get(m_pAAPointLimitUnits, "aaunits");
     get(m_pMenuIconsLB, "menuicons");
     get(m_pFontShowCB, "showfontpreview");
     get(m_pFontHistoryCB, "showfonthistory");
@@ -562,7 +561,6 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet)
     m_pFontAntiAliasing->Hide();
     m_pAAPointLimitLabel->Hide();
     m_pAAPointLimit->Hide();
-    m_pAAPointLimitUnits->Hide();
 
 #endif
 
@@ -637,7 +635,6 @@ IMPL_LINK( OfaViewTabPage, OnAntialiasingToggled, void*, NOTINTERESTEDIN )
 
     m_pAAPointLimitLabel->Enable( bAAEnabled );
     m_pAAPointLimit->Enable( bAAEnabled );
-    m_pAAPointLimitUnits->Enable( bAAEnabled );
 
     return 0L;
 }
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 49c7fdf..56057e4 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -84,8 +84,7 @@ private:
 
     CheckBox*       m_pFontAntiAliasing;
     FixedText*      m_pAAPointLimitLabel;
-    NumericField*   m_pAAPointLimit;
-    FixedText*      m_pAAPointLimitUnits;
+    MetricField*    m_pAAPointLimit;
 
     ListBox*        m_pMenuIconsLB;
 
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 897605e..fc3e04b 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -72,9 +72,6 @@ SvxGradientTabPage::SvxGradientTabPage
     get(m_pMtrCenterY,     "centerymtr");
     get(m_pFtAngle,        "angleft");
     get(m_pMtrAngle,       "anglemtr");
-    m_pMtrAngle->SetUnit(FUNIT_CUSTOM);
-    get(m_pFtAngleDegrees, "anglemtrdegrees");
-    m_pMtrAngle->SetCustomUnitText(m_pFtAngleDegrees->GetText());
     get(m_pMtrBorder,      "bordermtr");
     get(m_pLbColorFrom,    "colorfromlb");
     get(m_pMtrColorFrom,   "colorfrommtr");
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 1076807..2305c65 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -70,9 +70,6 @@ SvxHatchTabPage::SvxHatchTabPage
 {
     get(m_pMtrDistance, "distancemtr");
     get(m_pMtrAngle, "anglemtr");
-    get(m_pFtAngleDegrees, "anglemtrdegrees");
-    m_pMtrAngle->SetUnit(FUNIT_CUSTOM);
-    m_pMtrAngle->SetCustomUnitText(m_pFtAngleDegrees->GetText());
     get(m_pCtlAngle, "anglectl");
     m_pCtlAngle->SetCS(CS_ANGLE);
     Size aSize = LogicToPixel(Size(39, 39), MAP_APPFONT);
diff --git a/cui/uiconfig/ui/gradientpage.ui b/cui/uiconfig/ui/gradientpage.ui
index d2e6147..daaba62 100644
--- a/cui/uiconfig/ui/gradientpage.ui
+++ b/cui/uiconfig/ui/gradientpage.ui
@@ -155,7 +155,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkSpinButton" id="anglemtr:0">
+                      <object class="GtkSpinButton" id="anglemtr:0degrees">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="invisible_char">●</property>
@@ -285,42 +285,6 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="anglemtrdegrees">
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes"> degrees</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">3</property>
-                        <property name="width">1</property>
-                        <property name="height">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
-                    </child>
-                    <child>
                       <placeholder/>
                     </child>
                     <child>
diff --git a/cui/uiconfig/ui/hatchpage.ui b/cui/uiconfig/ui/hatchpage.ui
index b78951e..c174531 100644
--- a/cui/uiconfig/ui/hatchpage.ui
+++ b/cui/uiconfig/ui/hatchpage.ui
@@ -2,6 +2,15 @@
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkAdjustment" id="angleadjustment">
+    <property name="upper">359</property>
+    <property name="step_increment">15</property>
+  </object>
+  <object class="GtkAdjustment" id="distanceadjustment">
+    <property name="lower">0.29999999999999999</property>
+    <property name="upper">99</property>
+    <property name="step_increment">100</property>
+  </object>
   <object class="GtkImage" id="image1">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -71,6 +80,7 @@
                         <property name="xalign">0</property>
                         <property name="label" translatable="yes">A_ngle</property>
                         <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">anglemtr:0degrees</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
@@ -156,50 +166,28 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkBox" id="box1">
+                      <object class="svxlo-SvxRectCtl" id="anglectl">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <child>
-                          <object class="GtkSpinButton" id="anglemtr:0">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="invisible_char">●</property>
-                            <property name="invisible_char_set">True</property>
-                            <property name="adjustment">angleadjustment</property>
-                          </object>
-                          <packing>
-                            <property name="expand">True</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="anglemtrdegrees">
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes"> degrees</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
-                        <property name="top_attach">1</property>
+                        <property name="top_attach">2</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="svxlo-SvxRectCtl" id="anglectl">
+                      <object class="GtkSpinButton" id="anglemtr:0degrees">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">●</property>
+                        <property name="invisible_char_set">True</property>
+                        <property name="adjustment">angleadjustment</property>
                       </object>
                       <packing>
                         <property name="left_attach">1</property>
-                        <property name="top_attach">2</property>
+                        <property name="top_attach">1</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
@@ -393,13 +381,4 @@
       </packing>
     </child>
   </object>
-  <object class="GtkAdjustment" id="angleadjustment">
-    <property name="upper">359</property>
-    <property name="step_increment">15</property>
-  </object>
-  <object class="GtkAdjustment" id="distanceadjustment">
-    <property name="lower">0.29999999999999999</property>
-    <property name="upper">99</property>
-    <property name="step_increment">100</property>
-  </object>
 </interface>
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index b537723..c5ac1fb 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -1,6 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">80</property>
+    <property name="upper">130</property>
+    <property name="value">100</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="lower">1</property>
+    <property name="upper">10000</property>
+    <property name="value">8</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="lower">10</property>
+    <property name="upper">90</property>
+    <property name="value">75</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkBox" id="OptViewPage">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -187,7 +208,7 @@
                             <property name="can_focus">False</property>
                             <property name="label" translatable="yes">fro_m</property>
                             <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">aanf</property>
+                            <property name="mnemonic_widget">aanf:0pixels</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -197,20 +218,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="aaunits">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">pixels</property>
-                          </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>
-                        <child>
-                          <object class="GtkSpinButton" id="aanf">
+                          <object class="GtkSpinButton" id="aanf:0pixels">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">•</property>
@@ -668,25 +676,4 @@
       </packing>
     </child>
   </object>
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="lower">80</property>
-    <property name="upper">130</property>
-    <property name="value">100</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment2">
-    <property name="lower">1</property>
-    <property name="upper">10000</property>
-    <property name="value">8</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment3">
-    <property name="lower">10</property>
-    <property name="upper">90</property>
-    <property name="value">75</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
 </interface>
diff --git a/include/tools/fldunit.hxx b/include/tools/fldunit.hxx
index 2b4a915..df2b84a 100644
--- a/include/tools/fldunit.hxx
+++ b/include/tools/fldunit.hxx
@@ -22,7 +22,7 @@
 enum FieldUnit { FUNIT_NONE, FUNIT_MM, FUNIT_CM, FUNIT_M, FUNIT_KM,
                  FUNIT_TWIP, FUNIT_POINT, FUNIT_PICA,
                  FUNIT_INCH, FUNIT_FOOT, FUNIT_MILE, FUNIT_CHAR, FUNIT_LINE, FUNIT_CUSTOM,
-                 FUNIT_PERCENT, FUNIT_100TH_MM };
+                 FUNIT_PERCENT, FUNIT_100TH_MM, FUNIT_PIXEL, FUNIT_DEGREE };
 
 #endif
 
diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx
index 54afe1c..b79c90f 100644
--- a/rsc/source/parser/rscibas.cxx
+++ b/rsc/source/parser/rscibas.cxx
@@ -194,6 +194,8 @@ RscEnum * RscTypCont::InitFieldUnitsType()
     SETCONST( pFieldUnits, "FUNIT_CHAR", FUNIT_CHAR );
     SETCONST( pFieldUnits, "FUNIT_LINE", FUNIT_LINE );
     SETCONST( pFieldUnits, "FUNIT_PERCENT", FUNIT_PERCENT );
+    SETCONST( pFieldUnits, "FUNIT_DEGREE",  FUNIT_DEGREE);
+    SETCONST( pFieldUnits, "FUNIT_PIXEL",   FUNIT_PIXEL );
 
     return pFieldUnits;
 }
diff --git a/sc/uiconfig/scalc/ui/sidebaralignment.ui b/sc/uiconfig/scalc/ui/sidebaralignment.ui
index 6f8335c..cff8cca 100644
--- a/sc/uiconfig/scalc/ui/sidebaralignment.ui
+++ b/sc/uiconfig/scalc/ui/sidebaralignment.ui
@@ -309,7 +309,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBox" id="orientationdegrees:0 degrees">
+                  <object class="GtkComboBox" id="orientationdegrees:0degrees">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="has_tooltip">True</property>
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index caf6956..4f8baa3 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -55,8 +55,6 @@ CopyDlg::CopyDlg(::Window* pWindow, const SfxItemSet& rInAttrs,
     get(m_pMtrFldMoveX, "x");
     get(m_pMtrFldMoveY, "y");
     get(m_pMtrFldAngle, "angle");
-    m_pMtrFldAngle->SetUnit(FUNIT_CUSTOM);
-    m_pMtrFldAngle->SetCustomUnitText(get<FixedText>("degrees")->GetText());
     get(m_pMtrFldWidth, "width");
     get(m_pMtrFldHeight, "height");
     get(m_pLbStartColor, "start");
diff --git a/sd/uiconfig/sdraw/ui/copydlg.ui b/sd/uiconfig/sdraw/ui/copydlg.ui
index 6719126..5d8f320 100644
--- a/sd/uiconfig/sdraw/ui/copydlg.ui
+++ b/sd/uiconfig/sdraw/ui/copydlg.ui
@@ -228,6 +228,7 @@
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">_Angle</property>
                             <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">angle:0degrees</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -269,36 +270,13 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkBox" id="box3">
+                          <object class="GtkSpinButton" id="angle:0degrees">
                             <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <child>
-                              <object class="GtkSpinButton" id="angle:0">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="hexpand">True</property>
-                                <property name="invisible_char">●</property>
-                                <property name="invisible_char_set">True</property>
-                                <property name="adjustment">adjustment2</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="degrees">
-                                <property name="can_focus">False</property>
-                                <property name="no_show_all">True</property>
-                                <property name="label" translatable="yes"> degrees</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="invisible_char">●</property>
+                            <property name="invisible_char_set">True</property>
+                            <property name="adjustment">adjustment2</property>
                           </object>
                           <packing>
                             <property name="left_attach">1</property>
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 06119bb..e29c94a 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1040,6 +1040,8 @@ void SdrModel::ImpSetUIUnit()
         // TODO: Add code to handle the following if needed (added to remove warning)
         case FUNIT_CHAR   : break;
         case FUNIT_LINE   : break;
+        case FUNIT_PIXEL  : break;
+        case FUNIT_DEGREE : break;
     } // switch
 
     // check if mapping is from metric to inch and adapt
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 60710ed..b257530 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -777,6 +777,8 @@ void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, boo
         // TODO: Add code to handle the following (added to remove warning)
         case FUNIT_CHAR     : break;
         case FUNIT_LINE     : break;
+        case FUNIT_PIXEL    : break;
+        case FUNIT_DEGREE   : break;
     } // switch
     rnKomma=nKomma;
     rbMetr=bMetr;
diff --git a/svx/uiconfig/ui/optgridpage.ui b/svx/uiconfig/ui/optgridpage.ui
index f027e83..5231441 100644
--- a/svx/uiconfig/ui/optgridpage.ui
+++ b/svx/uiconfig/ui/optgridpage.ui
@@ -500,7 +500,7 @@
                         <property name="row_spacing">6</property>
                         <property name="column_spacing">12</property>
                         <child>
-                          <object class="GtkSpinButton" id="mtrfldsnaparea:0 Pixels">
+                          <object class="GtkSpinButton" id="mtrfldsnaparea:0pixels">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">●</property>
@@ -520,7 +520,7 @@
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">_Snap range</property>
                             <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">mtrfldsnaparea:0 Pixels</property>
+                            <property name="mnemonic_widget">mtrfldsnaparea:0pixels</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -618,7 +618,7 @@
                         <property name="row_spacing">6</property>
                         <property name="column_spacing">12</property>
                         <child>
-                          <object class="GtkSpinButton" id="mtrfldangle:0.00 degrees">
+                          <object class="GtkSpinButton" id="mtrfldangle:0.00degrees">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">●</property>
@@ -645,7 +645,7 @@
                             <property name="xalign">0</property>
                             <property name="draw_indicator">True</property>
                             <accessibility>
-                              <relation type="label-for" target="mtrfldangle:0.00 degrees"/>
+                              <relation type="label-for" target="mtrfldangle:0.00degrees"/>
                             </accessibility>
                           </object>
                           <packing>
@@ -656,7 +656,7 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkSpinButton" id="mtrfldbezangle:0.00 degrees">
+                          <object class="GtkSpinButton" id="mtrfldbezangle:0.00degrees">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">●</property>
@@ -677,7 +677,7 @@
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Point reducti_on</property>
                             <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">mtrfldbezangle:0.00 degrees</property>
+                            <property name="mnemonic_widget">mtrfldbezangle:0.00degrees</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 7ed2a71..bf81a41 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1293,8 +1293,12 @@ double MetricField::ConvertDoubleValue( double nValue, sal_Int64 mnBaseValue, sa
         else if ( eOutUnit == FUNIT_PERCENT ||
                   eOutUnit == FUNIT_CUSTOM ||
                   eOutUnit == FUNIT_NONE ||
+                  eOutUnit == FUNIT_DEGREE ||
+                  eOutUnit == FUNIT_PIXEL ||
                   eInUnit  == FUNIT_CUSTOM ||
-                  eInUnit  == FUNIT_NONE )
+                  eInUnit  == FUNIT_NONE ||
+                  eInUnit  == FUNIT_DEGREE ||
+                  eInUnit  == FUNIT_PIXEL )
              return nValue;
         else
         {
@@ -1383,6 +1387,8 @@ double MetricField::ConvertDoubleValue( double nValue, sal_uInt16 nDigits,
     if ( eInUnit == FUNIT_PERCENT ||
          eInUnit == FUNIT_CUSTOM ||
          eInUnit == FUNIT_NONE ||
+         eInUnit == FUNIT_DEGREE ||
+         eInUnit == FUNIT_PIXEL ||
          eOutUnit == MAP_PIXEL ||
          eOutUnit == MAP_SYSFONT ||
          eOutUnit == MAP_APPFONT ||
diff --git a/vcl/source/src/units.src b/vcl/source/src/units.src
index 5bc928d..744d4d3 100644
--- a/vcl/source/src/units.src
+++ b/vcl/source/src/units.src
@@ -43,6 +43,9 @@ StringArray SV_FUNIT_STRINGS
         < "ch" ; FUNIT_CHAR ; > ;
         < "line" ; FUNIT_LINE ; > ;
         < "%" ; FUNIT_PERCENT ; > ;
+        < " pixels" ; FUNIT_PIXEL ; > ;
+        < " pixel" ; FUNIT_PIXEL ; > ;
+        < "°" ; FUNIT_DEGREE ; > ;
     };
 };
 
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index ed66c5d..37d54a0 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -782,6 +782,10 @@ namespace
             eUnit = FUNIT_LINE;
         else if (sUnit == "%")
             eUnit = FUNIT_PERCENT;
+        else if ((sUnit == "pixels") || (sUnit == "pixel") || (sUnit == "px"))
+            eUnit = FUNIT_PIXEL;
+        else if ((sUnit == "degrees") || (sUnit == "degree"))
+            eUnit = FUNIT_DEGREE;
         else if (sUnit != "0")
             eUnit = FUNIT_CUSTOM;
 


More information about the Libreoffice-commits mailing list