summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2018-05-24 23:23:48 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2018-05-26 14:09:32 +0200
commit8c1470787f42b20cd12a3f32798edc5d7233ad9d (patch)
tree972d879b5da6f63f7a9f75806528e18ae97d11d3 /sc/source/ui/view
parent40e431def06b72cc87226cd50c271b42a1adfbbe (diff)
Rename bNeedEdit → bUseEditEngine
Make it a bit clear that edit here means edit engine not merely text editing as one would naïvely assume. Took me a while to realize that! Change-Id: I570a0556d3272c480dc1ae95640de32f56ab9607 Reviewed-on: https://gerrit.libreoffice.org/54783 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/output2.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 60fa18819e16..035bd3730cc6 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1500,7 +1500,7 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
SCCOL nCellX = nX; // position where the cell really starts
SCROW nCellY = nY;
bool bDoCell = false;
- bool bNeedEdit = false;
+ bool bUseEditEngine = false;
// Part of a merged cell?
@@ -1589,17 +1589,17 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
if (aCell.isEmpty())
bDoCell = false;
else if (aCell.meType == CELLTYPE_EDIT)
- bNeedEdit = true;
+ bUseEditEngine = true;
}
// Check if this cell is mis-spelled.
- if (bDoCell && !bNeedEdit && aCell.meType == CELLTYPE_STRING)
+ if (bDoCell && !bUseEditEngine && aCell.meType == CELLTYPE_STRING)
{
if (mpSpellCheckCxt && mpSpellCheckCxt->isMisspelled(nCellX, nCellY))
- bNeedEdit = true;
+ bUseEditEngine = true;
}
- if (bDoCell && !bNeedEdit)
+ if (bDoCell && !bUseEditEngine)
{
if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 )
{
@@ -1677,20 +1677,20 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
// use edit engine for rotated, stacked or mixed-script text
if ( aVars.GetOrient() == SvxCellOrientation::Stacked ||
aVars.IsRotated() || IsAmbiguousScript(nScript) )
- bNeedEdit = true;
+ bUseEditEngine = true;
}
- if (bDoCell && !bNeedEdit)
+ if (bDoCell && !bUseEditEngine)
{
bool bFormulaCell = (aCell.meType == CELLTYPE_FORMULA);
if ( bFormulaCell )
lcl_CreateInterpretProgress(bProgress, mpDoc, aCell.mpFormula);
if ( aVars.SetText(aCell) )
pOldPattern = nullptr;
- bNeedEdit = aVars.HasEditCharacters() || (bFormulaCell && aCell.mpFormula->IsMultilineResult());
+ bUseEditEngine = aVars.HasEditCharacters() || (bFormulaCell && aCell.mpFormula->IsMultilineResult());
}
long nTotalMargin = 0;
SvxCellHorJustify eOutHorJust = SvxCellHorJustify::Standard;
- if (bDoCell && !bNeedEdit)
+ if (bDoCell && !bUseEditEngine)
{
CellType eCellType = aCell.meType;
bCellIsValue = ( eCellType == CELLTYPE_VALUE );
@@ -1731,7 +1731,7 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
{
// Only horizontal scaling is handled here.
// DrawEdit is used to vertically scale 90 deg rotated text.
- bNeedEdit = true;
+ bUseEditEngine = true;
}
else if ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) // horizontal
{
@@ -1796,23 +1796,23 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
if ( bBreak )
{
if ( aVars.GetOrient() == SvxCellOrientation::Standard )
- bNeedEdit = ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip );
+ bUseEditEngine = ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip );
else
{
long nHeight = aVars.GetTextSize().Height() +
static_cast<long>(aVars.GetMargin()->GetTopMargin()*mnPPTY) +
static_cast<long>(aVars.GetMargin()->GetBottomMargin()*mnPPTY);
- bNeedEdit = ( nHeight > aAreaParam.maClipRect.GetHeight() );
+ bUseEditEngine = ( nHeight > aAreaParam.maClipRect.GetHeight() );
}
}
- if (!bNeedEdit)
+ if (!bUseEditEngine)
{
- bNeedEdit =
+ bUseEditEngine =
aVars.GetHorJust() == SvxCellHorJustify::Block &&
aVars.GetHorJustMethod() == SvxCellJustifyMethod::Distribute;
}
}
- if (bNeedEdit)
+ if (bUseEditEngine)
{
// mark the cell in CellInfo to be drawn in DrawEdit:
// Cells to the left are marked directly, cells to the