[ooo-build-commit] .: patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Wed Apr 21 11:01:54 PDT 2010
patches/dev300/apply | 3 +
patches/dev300/calc-distributed-cell-text-sc-fix2.diff | 48 +++++++++++++++++
2 files changed, 51 insertions(+)
New commits:
commit 241830461c71f51b7eeccdbecd2f7a4c89a0e91e
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Wed Apr 21 13:58:28 2010 -0400
Keep the vertical state of edit object instance in sync.
* patches/dev300/apply:
* patches/dev300/calc-distributed-cell-text-sc-fix2.diff: Under some
circumstances the text remains horizontally flowing even though the
cell is set to asian vertical mode. It was all because the edit
object instance also stores vertical mode state in addition to the
edit engine instance doing exactly the same. Verfy confusing but
sadly this is how it's working. (n#597658)
diff --git a/patches/dev300/apply b/patches/dev300/apply
index c610ea8..a1eb113 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3932,6 +3932,9 @@ 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
+# Set the vertical state with the text object, to keep it in sync.
+calc-distributed-cell-text-sc-fix2.diff, n#597658, 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-fix2.diff b/patches/dev300/calc-distributed-cell-text-sc-fix2.diff
new file mode 100644
index 0000000..9d23d6a
--- /dev/null
+++ b/patches/dev300/calc-distributed-cell-text-sc-fix2.diff
@@ -0,0 +1,48 @@
+diff --git sc/source/ui/view/output2.cxx sc/source/ui/view/output2.cxx
+index ebd1616..008dd8f 100644
+--- sc/source/ui/view/output2.cxx
++++ sc/source/ui/view/output2.cxx
+@@ -2101,7 +2101,7 @@ public:
+ */
+ bool isVerticallyOriented() const;
+
+- void setAlignmentItems(ScFieldEditEngine* pEngine);
++ void setAlignmentItems(ScFieldEditEngine* pEngine, ScBaseCell* pCell);
+ bool adjustHorAlignment(ScFieldEditEngine* pEngine);
+
+ private:
+@@ -2203,7 +2203,7 @@ bool EditAlignmentParam::isVerticallyOriented() const
+ return (meOrient == SVX_ORIENTATION_TOPBOTTOM || meOrient == SVX_ORIENTATION_BOTTOMTOP);
+ }
+
+-void EditAlignmentParam::setAlignmentItems(ScFieldEditEngine* pEngine)
++void EditAlignmentParam::setAlignmentItems(ScFieldEditEngine* pEngine, ScBaseCell* pCell)
+ {
+ if (isVerticallyOriented() || mbAsianVertical)
+ {
+@@ -2300,6 +2300,16 @@ void EditAlignmentParam::setAlignmentItems(ScFieldEditEngine* pEngine)
+ }
+
+ pEngine->SetVertical(mbAsianVertical);
++ if (pCell && pCell->GetCellType() == CELLTYPE_EDIT)
++ {
++ // We need to synchronize the vertical mode in the EditTextObject
++ // instance too. No idea why we keep this state in two separate
++ // instances.
++ ScEditCell* pEditCell = static_cast<ScEditCell*>(pCell);
++ const EditTextObject* pData = pEditCell->GetData();
++ if (pData)
++ const_cast<EditTextObject*>(pData)->SetVertical(mbAsianVertical);
++ }
+ }
+
+ bool EditAlignmentParam::adjustHorAlignment(ScFieldEditEngine* pEngine)
+@@ -2600,7 +2609,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic)
+ pEngine->SetBackgroundColor( aBackCol );
+ }
+
+- aAlignParam.setAlignmentItems(pEngine);
++ aAlignParam.setAlignmentItems(pEngine, pCell);
+
+ // Read content from cell
+
More information about the ooo-build-commit
mailing list