[Libreoffice-commits] .: 2 commits - cui/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jan 23 00:49:40 PST 2013


 cui/source/tabpages/chardlg.cxx |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 3f02531d4aaf270f452dd7e04f58a6b022df1af1
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Jan 23 10:48:43 2013 +0200

    Use English
    
    Change-Id: I9c460c22a5c938851f7ce1db1527c0dadf09582b

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 7e0614f..a5b199e 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -81,8 +81,8 @@ using namespace ::com::sun::star;
 #define CLEARTITEM  rSet.InvalidateItem(nWhich)
 
 #define LW_NORMAL   0
-#define LW_GESPERRT 1
-#define LW_SCHMAL   2
+#define LW_EXPANDED 1
+#define LW_CONDENSED   2
 
 // static ----------------------------------------------------------------
 
@@ -2755,7 +2755,7 @@ IMPL_LINK_NOARG(SvxCharPositionPage, KerningSelectHdl_Impl)
         m_pKerningFT->Enable();
         m_pKerningMF->Enable();
 
-        if ( m_pKerningLB->GetSelectEntryPos() == LW_SCHMAL )
+        if ( m_pKerningLB->GetSelectEntryPos() == LW_CONDENSED )
         {
             // Condensed -> max value == 1/6 of the current font height
             SvxFont& rFont = GetPreviewFont();
@@ -2790,7 +2790,7 @@ IMPL_LINK_NOARG(SvxCharPositionPage, KerningModifyHdl_Impl)
     long nKern = (short)m_pKerningMF->Denormalize( nVal );
 
     // Condensed? -> then negative
-    if ( m_pKerningLB->GetSelectEntryPos() == LW_SCHMAL )
+    if ( m_pKerningLB->GetSelectEntryPos() == LW_CONDENSED )
         nKern *= -1;
 
     SvxFont& rFont = GetPreviewFont();
@@ -2854,7 +2854,7 @@ void  SvxCharPositionPage::ActivatePage( const SfxItemSet& rSet )
 
     //the only thing that has to be checked is the max. allowed value for the
     //condense edit field
-    if ( m_pKerningLB->GetSelectEntryPos() == LW_SCHMAL )
+    if ( m_pKerningLB->GetSelectEntryPos() == LW_CONDENSED )
     {
         // Condensed -> max value == 1/6 of the current font height
         SvxFont& rFont = GetPreviewFont();
@@ -3003,11 +3003,11 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet )
 
         if ( nKerning > 0 )
         {
-            m_pKerningLB->SelectEntryPos( LW_GESPERRT );
+            m_pKerningLB->SelectEntryPos( LW_EXPANDED );
         }
         else if ( nKerning < 0 )
         {
-            m_pKerningLB->SelectEntryPos( LW_SCHMAL );
+            m_pKerningLB->SelectEntryPos( LW_CONDENSED );
             nKerning = -nKerning;
         }
         else
@@ -3178,13 +3178,13 @@ sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet )
     short nKerning = 0;
     SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich );
 
-    if ( nPos == LW_GESPERRT || nPos == LW_SCHMAL )
+    if ( nPos == LW_EXPANDED || nPos == LW_CONDENSED )
     {
         long nTmp = static_cast<long>(m_pKerningMF->GetValue());
         long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)eUnit );
         nKerning = (short)m_pKerningMF->Denormalize( nVal );
 
-        if ( nPos == LW_SCHMAL )
+        if ( nPos == LW_CONDENSED )
             nKerning *= - 1;
     }
 
commit e37f024ce08f894e4bc926737d368806b3aea739
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Jan 23 10:38:49 2013 +0200

    When we have symbolic names why not use them consistently then
    
    Change-Id: Iec2e6dfa5b8bdc30e275862cf9f84e5f32818933

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 9c35aff..7e0614f 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2750,12 +2750,12 @@ IMPL_LINK( SvxCharPositionPage, FitToLineHdl_Impl, CheckBox*, pBox )
 
 IMPL_LINK_NOARG(SvxCharPositionPage, KerningSelectHdl_Impl)
 {
-    if ( m_pKerningLB->GetSelectEntryPos() > 0 )
+    if ( m_pKerningLB->GetSelectEntryPos() > LW_NORMAL )
     {
         m_pKerningFT->Enable();
         m_pKerningMF->Enable();
 
-        if ( m_pKerningLB->GetSelectEntryPos() == 2 )
+        if ( m_pKerningLB->GetSelectEntryPos() == LW_SCHMAL )
         {
             // Condensed -> max value == 1/6 of the current font height
             SvxFont& rFont = GetPreviewFont();
@@ -2790,7 +2790,7 @@ IMPL_LINK_NOARG(SvxCharPositionPage, KerningModifyHdl_Impl)
     long nKern = (short)m_pKerningMF->Denormalize( nVal );
 
     // Condensed? -> then negative
-    if ( m_pKerningLB->GetSelectEntryPos() == 2 )
+    if ( m_pKerningLB->GetSelectEntryPos() == LW_SCHMAL )
         nKern *= -1;
 
     SvxFont& rFont = GetPreviewFont();
@@ -2854,7 +2854,7 @@ void  SvxCharPositionPage::ActivatePage( const SfxItemSet& rSet )
 
     //the only thing that has to be checked is the max. allowed value for the
     //condense edit field
-    if ( m_pKerningLB->GetSelectEntryPos() == 2 )
+    if ( m_pKerningLB->GetSelectEntryPos() == LW_SCHMAL )
     {
         // Condensed -> max value == 1/6 of the current font height
         SvxFont& rFont = GetPreviewFont();


More information about the Libreoffice-commits mailing list