[ooo-build-commit] .: patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Apr 13 10:50:43 PDT 2010


 patches/dev300/apply                                  |    3 +
 patches/dev300/calc-distributed-cell-text-sc-fix.diff |   34 ++++++++++++++++++
 2 files changed, 37 insertions(+)

New commits:
commit 768a77d32d52a07d1a65e13a88b0341f033a8501
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Apr 13 13:48:12 2010 -0400

    Improve text rendering in Asian vertical mode.
    
    * patches/dev300/apply:
    * patches/dev300/calc-distributed-cell-text-sc-fix.diff: Removed
      incorrect offset along the y-axis for asian vertical mode, also
      slightly adjusted edit engine's "paper size" to improve line-
      breaking for asian vertical mode. (n#595625)

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 1cf90eb..82929a4 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3762,6 +3762,9 @@ calc-distributed-cell-text-svx.diff,    kohei
 calc-distributed-cell-text-xmloff.diff, kohei
 calc-distributed-cell-text-oox.diff,    kohei
 
+# Adjust edit engine geometry to improve text rendering in asian vertical mode.
+calc-distributed-cell-text-sc-fix.diff, n#595625, kohei
+
 # Add a new sheet tab in Calc.
 calc-insert-new-sheet-tab-sc.diff,            kohei
 calc-insert-new-sheet-tab-svtools.diff,       kohei
diff --git a/patches/dev300/calc-distributed-cell-text-sc-fix.diff b/patches/dev300/calc-distributed-cell-text-sc-fix.diff
new file mode 100644
index 0000000..212951d
--- /dev/null
+++ b/patches/dev300/calc-distributed-cell-text-sc-fix.diff
@@ -0,0 +1,34 @@
+diff --git sc/source/ui/view/output2.cxx sc/source/ui/view/output2.cxx
+index 0d8d3f6..083576b 100644
+--- sc/source/ui/view/output2.cxx
++++ sc/source/ui/view/output2.cxx
+@@ -2156,12 +2156,13 @@ void EditAlignmentParam::calcPaperSize(
+         rPaperSize.Height() = rAlignRect.GetHeight() - nTopM - nBottomM;
+     }
+ 
+-    if (mbAsianVertical && mbBreak)
++    if (mbAsianVertical)
+     {
+-        //	add some extra height (default margin value) for safety
+-        //	as long as GetEditArea isn't used below
+-        long nExtraHeight = static_cast<long>(20*nPPTY);
+-        rPaperSize.Height() = rAlignRect.GetHeight() - nTopM - nBottomM + nExtraHeight;
++        rPaperSize.Height() = rAlignRect.GetHeight() - nTopM - nBottomM;
++        // Subtract some extra value from the height or else the text would go
++        // outside the cell area.  The value of 5 is arbitrary, and is based
++        // entirely on heuristics.
++        rPaperSize.Height() -= 5;
+     }
+ }
+ 
+@@ -2944,8 +2945,8 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
+                                         aLogicStart.Y() += nTopM;
+                                 }
+ 
+-                                if ( ( aAlignParam.meOrient==SVX_ORIENTATION_STANDARD && !aAlignParam.mbAsianVertical ) ||
+-                                     aAlignParam.meOrient==SVX_ORIENTATION_STACKED || !aAlignParam.mbBreak )
++                                if (!aAlignParam.mbAsianVertical && 
++                                    (aAlignParam.meOrient == SVX_ORIENTATION_STANDARD || aAlignParam.meOrient == SVX_ORIENTATION_STACKED || !aAlignParam.mbBreak))
+                                 {
+                                     if (aAlignParam.meVerJust==SVX_VER_JUSTIFY_BOTTOM ||
+                                         aAlignParam.meVerJust==SVX_VER_JUSTIFY_STANDARD)


More information about the ooo-build-commit mailing list