[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - 4 commits - editeng/inc editeng/source sd/source svx/source

navin patidar patidar at kacst.edu.sa
Thu Mar 14 06:23:09 PDT 2013


 editeng/inc/editeng/outliner.hxx     |    2 -
 editeng/source/outliner/outliner.cxx |   38 ++---------------------------------
 sd/source/core/sdpage.cxx            |    2 -
 svx/source/table/tablelayouter.cxx   |    2 -
 4 files changed, 6 insertions(+), 38 deletions(-)

New commits:
commit b6b0e5527cce681fe157b2f091b67a7ae8cf9aa2
Author: navin patidar <patidar at kacst.edu.sa>
Date:   Mon Mar 11 09:06:45 2013 +0300

    fix fdo#62143: set TEXT_LAYOUT_BIDI_STRONG flag.
    
    Change-Id: I19ed1874ff73c3a8002934fa3456d718e383c5d6
    Reviewed-on: https://gerrit.libreoffice.org/2664
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
    (cherry picked from commit 68c3dfc3119a50ee9c9c6d65f4c656637152bbad)
    
    Signed-off-by: Lior Kaplan <kaplanlior at gmail.com>

diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 9688e89..6ddec87 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -984,7 +984,7 @@ void Outliner::PaintBullet( sal_uInt16 nPara, const Point& rStartPos,
                 sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
                 nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG);
                 if ( bRightToLeftPara )
-                    nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
+                    nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT | TEXT_LAYOUT_BIDI_STRONG;
                 pOutDev->SetLayoutMode( nLayoutMode );
 
                 if(bStrippingPortions)
commit 4c13903e61017b3d7869882aac1ec272a2c4474c
Author: K_Karthikeyan <karthikeyan at kacst.edu.sa>
Date:   Mon Feb 25 11:01:46 2013 +0300

    Resolves fdo#60554
    
    Resolves fdo#60554 borders disappear while merging cells
    
    Change-Id: I3d3464e8b75cc9b72a1592d8ef276243202e68b8
    Reviewed-on: https://gerrit.libreoffice.org/2375
    Reviewed-by: Ahmad Harthi <aalharthi at kacst.edu.sa>
    Tested-by: Ahmad Harthi <aalharthi at kacst.edu.sa>
    (cherry picked from commit 45a5dad0460a1a7d1a44716968b8c9ff4a23e04b)
    
    Signed-off-by: Lior Kaplan <kaplanlior at gmail.com>

diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 15d85e9..b581d8f 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -1024,7 +1024,7 @@ void TableLayouter::UpdateBorderLayout()
         for( aPos.mnCol = 0; aPos.mnCol < nColCount; aPos.mnCol++ )
         {
             CellRef xCell( getCell( aPos ) );
-            if( !xCell.is() || xCell->isMerged() )
+            if( !xCell.is() )
                 continue;
 
             const SvxBoxItem* pThisAttr = (const SvxBoxItem*)xCell->GetItemSet().GetItem( SDRATTR_TABLE_BORDER );
commit cbfcc02027b64f71b2d888e438a2e964d9da0f50
Author: Faisal M. Al-Otaibi <fmalotaibi at kacst.edu.sa>
Date:   Sun Feb 24 14:26:17 2013 +0300

    Fix fdo#60855 RTL UI: handout show boxes out of page border
    
    Change-Id: Ie0103d7c2911dcf184d39b5c394cffae4dbe122f
    Reviewed-on: https://gerrit.libreoffice.org/2356
    Reviewed-by: Ahmad Harthi <aalharthi at kacst.edu.sa>
    Tested-by: Ahmad Harthi <aalharthi at kacst.edu.sa>
    (cherry picked from commit 12de9b3361236e1d6c931409cf0ad0d4f9924008)
    
    Signed-off-by: Lior Kaplan <kaplanlior at gmail.com>

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 7e1bf02..ecc38f4 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2989,7 +2989,7 @@ void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout,
 
         const long nOffsetX = (aPartArea.Width() + nGapW) * (bRTL ? -1 : 1);
         const long nOffsetY = aPartArea.Height() + nGapH;
-        const long nStartX = bRTL ? nOffsetX*(1 - nColCnt) - nX : nX;
+        const long nStartX = bRTL ? nOffsetX*(1 - nColCnt) + nX : nX;
 
         for(sal_uInt16 nRow = 0; nRow < nRowCnt; nRow++)
         {
commit c1ab08f2559d3996ba595cfbdad287e5a7038f81
Author: navin <patidar at kacst.edu.sa>
Date:   Sat Feb 23 17:58:11 2013 +0300

    fix fdo#38951, use paragraph’s writing direction.
    
    In case of RTL, we want bullet text e.g. “1. ,1)” to be reversed
    e.g. “.1,(1”, so we need to check only paragraph’s writing direction
    and pass that direction to DrawingText().
    and fix drawing position calculation logic.
    
    Change-Id: I303dc1b04ae5e66b1b5d25a40794be308f36668b
    Reviewed-on: https://gerrit.libreoffice.org/2348
    Reviewed-by: Ahmad Harthi <aalharthi at kacst.edu.sa>
    Tested-by: Ahmad Harthi <aalharthi at kacst.edu.sa>
    (cherry picked from commit 2738fa9fdc3aec9a64f2eab1d9d48942218c199e)
    
    Signed-off-by: Lior Kaplan <kaplanlior at gmail.com>

diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index fcc90bb..61e6a41 100644
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -389,7 +389,7 @@ public:
     unsigned            mbEndOfBullet : 1;
 
     sal_uInt8 GetBiDiLevel() const { return mnBiDiLevel; }
-    sal_Bool IsRTL() const;
+    sal_Bool IsRTL() const { return mnBiDiLevel % 2 ? sal_True : sal_False; }
 
     DrawPortionInfo(
         const Point& rPos,
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 4fa52bd..9688e89 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -950,7 +950,7 @@ void Outliner::PaintBullet( sal_uInt16 nPara, const Point& rStartPos,
                     if ( !bRightToLeftPara )
                         aTextPos.X() = rStartPos.X() + aBulletArea.Left();
                     else
-                        aTextPos.X() = rStartPos.X() + GetPaperSize().Width() - aBulletArea.Left();
+                        aTextPos.X() = rStartPos.X() + GetPaperSize().Width() - aBulletArea.Right();
                 }
                 else
                 {
@@ -984,7 +984,7 @@ void Outliner::PaintBullet( sal_uInt16 nPara, const Point& rStartPos,
                 sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
                 nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG);
                 if ( bRightToLeftPara )
-                    nLayoutMode |= TEXT_LAYOUT_BIDI_RTL;
+                    nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
                 pOutDev->SetLayoutMode( nLayoutMode );
 
                 if(bStrippingPortions)
@@ -1001,7 +1001,7 @@ void Outliner::PaintBullet( sal_uInt16 nPara, const Point& rStartPos,
                     }
 
                     DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().getLength(), pBuf,
-                        aSvxFont, nPara, 0xFFFF, 0xFF, 0, 0, false, false, true, 0, Color(), Color());
+                        aSvxFont, nPara, 0xFFFF, bRightToLeftPara, 0, 0, false, false, true, 0, Color(), Color());
 
                     delete[] pBuf;
                 }
@@ -2099,36 +2099,4 @@ bool Outliner::HasParaFlag( const Paragraph* pPara, sal_uInt16 nFlag ) const
     return pPara && pPara->HasFlag( nFlag );
 }
 
-
-sal_Bool DrawPortionInfo::IsRTL() const
-{
-    if(0xFF == mnBiDiLevel)
-    {
-        // Use Bidi functions from icu 2.0 to calculate if this portion
-        // is RTL or not.
-        UErrorCode nError(U_ZERO_ERROR);
-        UBiDi* pBidi = ubidi_openSized(mrText.Len(), 0, &nError);
-        nError = U_ZERO_ERROR;
-
-        // I do not have this info here. Is it necessary? I'll have to ask MT.
-        const sal_uInt8 nDefaultDir = UBIDI_LTR; //IsRightToLeft( nPara ) ? UBIDI_RTL : UBIDI_LTR;
-
-        ubidi_setPara(pBidi, reinterpret_cast<const UChar *>(mrText.GetBuffer()), mrText.Len(), nDefaultDir, NULL, &nError);    // UChar != sal_Unicode in MinGW
-        nError = U_ZERO_ERROR;
-
-        int32_t nStart(0);
-        int32_t nEnd;
-        UBiDiLevel nCurrDir;
-
-        ubidi_getLogicalRun(pBidi, nStart, &nEnd, &nCurrDir);
-
-        ubidi_close(pBidi);
-
-        // remember on-demand calculated state
-        ((DrawPortionInfo*)this)->mnBiDiLevel = nCurrDir;
-    }
-
-    return (1 == (mnBiDiLevel % 2));
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list