[Libreoffice-commits] core.git: sc/source

Stephan Bergmann sbergman at redhat.com
Mon Jan 29 21:16:20 UTC 2018


 sc/source/ui/inc/output.hxx   |    1 -
 sc/source/ui/view/output2.cxx |   39 ---------------------------------------
 2 files changed, 40 deletions(-)

New commits:
commit 7a22e8a726a7cbae007326a3af5f6c0c20945cc8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 29 15:59:42 2018 +0100

    No more need to restrict paper width to USHRT_MAX
    
    ...after 288d694ff695ef83cbe4224db87dd65281c75a8f "LOK - Calc: Text is not
    visible in cell when entering numerical input" changed EditLine::nStartPosX from
    sal_uInt16 to long
    
    Change-Id: Ib1d364015c7ab0b5f81fb740659110c66aed002a
    Reviewed-on: https://gerrit.libreoffice.org/48845
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index c41433609b9e..dfe973897760 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -137,7 +137,6 @@ private:
 
         void setAlignmentToEngine();
         bool adjustHorAlignment(ScFieldEditEngine* pEngine);
-        void adjustForRTL();
         void adjustForHyperlinkInPDF(Point aURLStart, const OutputDevice* pDev);
     };
 
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 9105c30870ac..f1e1fbd3eccf 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2682,23 +2682,6 @@ bool ScOutputData::DrawEditParam::adjustHorAlignment(ScFieldEditEngine* pEngine)
     return false;
 }
 
-void ScOutputData::DrawEditParam::adjustForRTL()
-{
-    if (!mpEngine->IsRightToLeft(0))
-        // No RTL mode.
-        return;
-
-    //  For right-to-left, EditEngine always calculates its lines
-    //  beginning from the right edge, but EditLine::nStartPosX is
-    //  of sal_uInt16 type, so the PaperSize must be limited to USHRT_MAX.
-    Size aLogicPaper = mpEngine->GetPaperSize();
-    if ( aLogicPaper.Width() > USHRT_MAX )
-    {
-        aLogicPaper.Width() = USHRT_MAX;
-        mpEngine->SetPaperSize(aLogicPaper);
-    }
-}
-
 void ScOutputData::DrawEditParam::adjustForHyperlinkInPDF(Point aURLStart, const OutputDevice* pDev)
 {
     // PDF: whole-cell hyperlink from formula?
@@ -3141,8 +3124,6 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
 
         aURLStart = aLogicStart;      // copy before modifying for orientation
 
-        rParam.adjustForRTL();
-
         // bMoveClipped handling has been replaced by complete alignment
         // handling (also extending to the left).
 
@@ -3465,7 +3446,6 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
             }
         }
 
-        rParam.adjustForRTL();
         rParam.mpEngine->Draw(mpDev, aLogicStart, 900);
     }
 
@@ -3700,8 +3680,6 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam)
             }
         }
 
-        rParam.adjustForRTL();
-
         // bMoveClipped handling has been replaced by complete alignment
         // handling (also extending to the left).
 
@@ -3975,8 +3953,6 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
         aPaperLogic.Width() = nEngineWidth;
         rParam.mpEngine->SetPaperSize(aPaperLogic);
 
-        rParam.adjustForRTL();
-
         // bMoveClipped handling has been replaced by complete alignment
         // handling (also extending to the left).
 
@@ -4247,8 +4223,6 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
 
         aURLStart = aLogicStart;      // copy before modifying for orientation
 
-        rParam.adjustForRTL();
-
         // bMoveClipped handling has been replaced by complete alignment
         // handling (also extending to the left).
 
@@ -5076,19 +5050,6 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
 
                                 //  bSimClip is not used here (because nOriVal is set)
 
-                                if ( pEngine->IsRightToLeft( 0 ) )
-                                {
-                                    //  For right-to-left, EditEngine always calculates its lines
-                                    //  beginning from the right edge, but EditLine::nStartPosX is
-                                    //  of sal_uInt16 type, so the PaperSize must be limited to USHRT_MAX.
-                                    Size aLogicPaper = pEngine->GetPaperSize();
-                                    if ( aLogicPaper.Width() > USHRT_MAX )
-                                    {
-                                        aLogicPaper.Width() = USHRT_MAX;
-                                        pEngine->SetPaperSize(aLogicPaper);
-                                    }
-                                }
-
                                 pEngine->Draw( mpDev, aLogicStart, static_cast<short>(nOriVal) );
 
                                 if (bMetaFile)


More information about the Libreoffice-commits mailing list