Kaydet (Commit) 7a22e8a7 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

No more need to restrict paper width to USHRT_MAX

...after 288d694f "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/48845Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 4bdbb550
......@@ -137,7 +137,6 @@ private:
void setAlignmentToEngine();
bool adjustHorAlignment(ScFieldEditEngine* pEngine);
void adjustForRTL();
void adjustForHyperlinkInPDF(Point aURLStart, const OutputDevice* pDev);
};
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment