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

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Sep 24 21:37:22 PDT 2010


 patches/dev300/apply                         |    5 ++
 patches/dev300/calc-cell-270-degree-fix.diff |   63 +++++++++++++++++++++++++++
 2 files changed, 68 insertions(+)

New commits:
commit 6205b4cc4b208fd39971834ff898665788cf93ed
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Sat Sep 25 00:32:47 2010 -0400

    Fixed a bug in cell content rendering.
    
    Under certain conditions, cell content just disappeared.  This patch
    fixes this.  Previously, a cell content disappeared when
    
    * the text was rotated at 270 degrees,
    * text wrapping was OFF, and
    * automatic spell checking was ON.
    
    Please keep an eye on any potential regression caused by this change,
    I was very careful, but the code here is very complex so I'm not sure if
    I've covered all corners. (n#640128)

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 2cf1c6a..5399ba4 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2968,3 +2968,8 @@ vEdit-13-August.diff, jopsen
 [ OOXML ]
 oox-pptx-import-fix-placeholder-text-style.diff, n#592906, n#479834, rodo
 oox-pptx-import-fix-text-body-properties.diff, n#621744, rodo
+
+[ CalcFixes ]
+
+# Fix the bug that caused cell content to disappear under certain conditions.
+calc-cell-270-degree-fix.diff, n#640128, kohei
diff --git a/patches/dev300/calc-cell-270-degree-fix.diff b/patches/dev300/calc-cell-270-degree-fix.diff
new file mode 100644
index 0000000..ff5c486
--- /dev/null
+++ b/patches/dev300/calc-cell-270-degree-fix.diff
@@ -0,0 +1,63 @@
+diff --git sc/source/ui/view/output2.cxx sc/source/ui/view/output2.cxx
+index 8c96d95..780123b 100644
+--- sc/source/ui/view/output2.cxx
++++ sc/source/ui/view/output2.cxx
+@@ -3011,7 +3011,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
+                                         aLogicStart.Y() += nTopM;
+                                 }
+ 
+-                                if (!aAlignParam.mbAsianVertical &&
++                                if (!aAlignParam.mbAsianVertical && !aAlignParam.isVerticallyOriented() &&
+                                     (aAlignParam.meOrient == SVX_ORIENTATION_STANDARD || aAlignParam.meOrient == SVX_ORIENTATION_STACKED || !aAlignParam.mbBreak))
+                                 {
+                                     if (aAlignParam.meVerJust==SVX_VER_JUSTIFY_BOTTOM ||
+@@ -3055,7 +3055,49 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
+                                     // nOriVal = -900;
+                                     nOriVal = 2700;
+                                     if (aAlignParam.meHorJust != SVX_HOR_JUSTIFY_BLOCK)
++                                    {
+                                         aLogicStart.X() += nEngineWidth;
++                                        if (!aAlignParam.mbBreak)
++                                        {
++                                            // Set the paper width to text size.
++                                            Size aPSize = pEngine->GetPaperSize();
++                                            aPSize.Width() = pEngine->CalcTextWidth();
++                                            pEngine->SetPaperSize(aPSize);
++
++                                            long nGap = 0;
++                                            long nTopOffset = 0; // offset by top margin
++                                            if (bPixelToLogic)
++                                            {
++                                                nGap = pRefDevice->LogicToPixel(aPSize).Width() - pRefDevice->LogicToPixel(aCellSize).Height();
++                                                nGap = pRefDevice->PixelToLogic(Size(0, nGap)).Height();
++                                                nTopOffset = pRefDevice->PixelToLogic(Size(0,nTopM)).Height();
++                                            }
++                                            else
++                                            {
++                                                nGap = aPSize.Width() - aCellSize.Height();
++                                                nTopOffset = nTopM;
++                                            }
++                                            aLogicStart.Y() += nTopOffset;
++
++                                            switch (aAlignParam.meVerJust)
++                                            {
++                                                case SVX_VER_JUSTIFY_STANDARD:
++                                                case SVX_VER_JUSTIFY_BOTTOM:
++                                                    // align to bottom
++                                                    aLogicStart.Y() -= nGap;
++                                                break;
++                                                case SVX_VER_JUSTIFY_CENTER:
++                                                    // center it.
++                                                    aLogicStart.Y() -= nGap / 2;
++                                                break;
++                                                case SVX_VER_JUSTIFY_BLOCK:
++                                                case SVX_VER_JUSTIFY_TOP:
++                                                    // align to top (do nothing)
++                                                default:
++                                                    ;
++                                            }
++                                        }
++                                    }
+                                 }
+                                 else if (aAlignParam.meOrient == SVX_ORIENTATION_BOTTOMTOP)
+                                 {


More information about the ooo-build-commit mailing list