[ooo-build-commit] .: 2 commits - cui/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Mon Sep 13 07:53:33 PDT 2010


 cui/source/tabpages/paragrph.cxx |   33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

New commits:
commit b41159c14ec698e01b43a545e6b93419d0206d5d
Author: Amelia Wang <amwang at novell.com>
Date:   Mon Sep 13 14:45:00 2010 +0200

    cjk-character-units-fix-376788.diff: add a new character unit
    
    i#376788

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index aa70c22..0c765b5 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -442,17 +442,25 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet )
 
     BOOL bApplyCharUnit = GetApplyCharUnit( rSet );
 
-    if ( bApplyCharUnit )
+    SvtCJKOptions aCJKOptions;
+    if(aCJKOptions.IsAsianTypographyEnabled() && bApplyCharUnit )
         eFUnit = FUNIT_CHAR;
+
     SetFieldUnit( aLeftIndent, eFUnit );
     SetFieldUnit( aRightIndent, eFUnit );
     SetFieldUnit( aFLineIndent, eFUnit );
-    if ( bApplyCharUnit )
-        eFUnit = FUNIT_LINE;
-    SetFieldUnit( aTopDist, eFUnit );
-    SetFieldUnit( aBottomDist, eFUnit );
-    eFUnit = FUNIT_POINT;
-    SetFieldUnit( aLineDistAtMetricBox, eFUnit );
+    if ( eFUnit == FUNIT_CHAR )
+    {
+        SetFieldUnit( aTopDist, FUNIT_LINE );
+        SetFieldUnit( aBottomDist, FUNIT_LINE );
+        SetFieldUnit( aLineDistAtMetricBox, FUNIT_POINT );
+    }
+    else
+    {
+        SetFieldUnit( aTopDist, eFUnit );
+        SetFieldUnit( aBottomDist, eFUnit );
+        SetFieldUnit( aLineDistAtMetricBox, eFUnit );
+    }
 
     USHORT _nWhich = GetWhich( SID_ATTR_LRSPACE );
     SfxItemState eItemState = rSet.GetItemState( _nWhich );
@@ -544,7 +552,10 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet )
             else
             {
                 aTopDist.SetRelative();
-                SetFieldUnit( aTopDist, eFUnit );
+                if ( eFUnit == FUNIT_CHAR )
+                    SetFieldUnit( aTopDist, FUNIT_LINE );
+                else
+                    SetFieldUnit( aTopDist, eFUnit );
                 SetMetricValue( aTopDist, rOldItem.GetUpper(), eUnit );
             }
 
@@ -556,7 +567,10 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet )
             else
             {
                 aBottomDist.SetRelative();
-                SetFieldUnit( aBottomDist, eFUnit );
+                if ( eFUnit == FUNIT_CHAR )
+                    SetFieldUnit( aBottomDist, FUNIT_LINE );
+                else
+                    SetFieldUnit( aBottomDist, eFUnit );
                 SetMetricValue( aBottomDist, rOldItem.GetLower(), eUnit );
             }
         }
commit 38d7e2c79e4207d8138a1740e077bf0e83c80856
Author: Amelia Wang <amwang at novell.com>
Date:   Mon Sep 13 14:37:50 2010 +0200

    cjk-character-units-imp.diff: add a new unit 'character unit'

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index d500078..aa70c22 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -38,6 +38,7 @@
 #define _SVX_PARAGRPH_CXX   0
 
 #include <svl/languageoptions.hxx>
+#include <svl/cjkoptions.hxx>
 #include <editeng/pgrditem.hxx>
 #include <cuires.hrc>
 #include "paragrph.hrc"
@@ -438,11 +439,19 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet )
 
     // Metrik einstellen
     FieldUnit eFUnit = GetModuleFieldUnit( rSet );
+
+    BOOL bApplyCharUnit = GetApplyCharUnit( rSet );
+
+    if ( bApplyCharUnit )
+        eFUnit = FUNIT_CHAR;
     SetFieldUnit( aLeftIndent, eFUnit );
     SetFieldUnit( aRightIndent, eFUnit );
     SetFieldUnit( aFLineIndent, eFUnit );
+    if ( bApplyCharUnit )
+        eFUnit = FUNIT_LINE;
     SetFieldUnit( aTopDist, eFUnit );
     SetFieldUnit( aBottomDist, eFUnit );
+    eFUnit = FUNIT_POINT;
     SetFieldUnit( aLineDistAtMetricBox, eFUnit );
 
     USHORT _nWhich = GetWhich( SID_ATTR_LRSPACE );


More information about the ooo-build-commit mailing list