summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-14 10:47:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-14 13:05:56 +0200
commit01062f27774a5c0adec8ba6e3bb10994538c8a82 (patch)
tree5dde4eafe65593aa77cb2a8407eb39b82fc227e8 /sc
parentdb12ecd5d77670db5a61fb16b9372d7fd7da858c (diff)
convert SvxCellOrientation to scoped enum
Change-Id: Ia4c75c6394b47805f24a7daca593e0074a8ddf0b Reviewed-on: https://gerrit.libreoffice.org/42268 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/attarray.cxx2
-rw-r--r--sc/source/core/data/column2.cxx18
-rw-r--r--sc/source/core/data/patattr.cxx10
-rw-r--r--sc/source/core/tool/autoform.cxx4
-rw-r--r--sc/source/filter/qpro/qprostyle.cxx4
-rw-r--r--sc/source/ui/inc/output.hxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx106
8 files changed, 74 insertions, 74 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 9109336115ca..c3023fed67a2 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1354,7 +1354,7 @@ bool ScAttrArray::HasAttrib_Impl(const ScPatternAttr* pPattern, HasAttrFlags nMa
}
if ( nMask & HasAttrFlags::NeedHeight )
{
- if (pPattern->GetCellOrientation() != SVX_ORIENTATION_STANDARD)
+ if (pPattern->GetCellOrientation() != SvxCellOrientation::Standard)
bFound = true;
else if (static_cast<const SfxBoolItem&>(pPattern->GetItem( ATTR_LINEBREAK )).GetValue())
bFound = true;
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index b6432a735132..4f8183938a3c 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -191,7 +191,7 @@ long ScColumn::GetNeededSize(
// get other attributes from pattern and conditional formatting
SvxCellOrientation eOrient = pPattern->GetCellOrientation( pCondSet );
- bool bAsianVertical = ( eOrient == SVX_ORIENTATION_STACKED &&
+ bool bAsianVertical = ( eOrient == SvxCellOrientation::Stacked &&
static_cast<const SfxBoolItem&>(pPattern->GetItem( ATTR_VERTICAL_ASIAN, pCondSet )).GetValue() );
if ( bAsianVertical )
bBreak = false;
@@ -201,7 +201,7 @@ long ScColumn::GetNeededSize(
long nRotate = 0;
SvxRotateMode eRotMode = SVX_ROTATE_MODE_STANDARD;
- if ( eOrient == SVX_ORIENTATION_STANDARD )
+ if ( eOrient == SvxCellOrientation::Standard )
{
if (pCondSet &&
pCondSet->GetItemState(ATTR_ROTATE_VALUE, true, &pCondItem) == SfxItemState::SET)
@@ -225,7 +225,7 @@ long ScColumn::GetNeededSize(
if ( eHorJust == SvxCellHorJustify::Repeat )
{
// ignore orientation/rotation if "repeat" is active
- eOrient = SVX_ORIENTATION_STANDARD;
+ eOrient = SvxCellOrientation::Standard;
nRotate = 0;
bAsianVertical = false;
}
@@ -253,7 +253,7 @@ long ScColumn::GetNeededSize(
// bGetFont is set also if script type changes
if (rOptions.bGetFont)
{
- Fraction aFontZoom = ( eOrient == SVX_ORIENTATION_STANDARD ) ? rZoomX : rZoomY;
+ Fraction aFontZoom = ( eOrient == SvxCellOrientation::Standard ) ? rZoomX : rZoomY;
vcl::Font aFont;
// font color doesn't matter here
pPattern->GetFont( aFont, SC_AUTOCOL_BLACK, pDev, &aFontZoom, pCondSet, nScript );
@@ -264,7 +264,7 @@ long ScColumn::GetNeededSize(
CellType eCellType = aCell.meType;
bool bEditEngine = (eCellType == CELLTYPE_EDIT ||
- eOrient == SVX_ORIENTATION_STACKED ||
+ eOrient == SvxCellOrientation::Stacked ||
IsAmbiguousScript(nScript) ||
((eCellType == CELLTYPE_FORMULA) && aCell.mpFormula->IsMultilineResult()));
@@ -280,7 +280,7 @@ long ScColumn::GetNeededSize(
// SetFont is moved up
Size aSize( pDev->GetTextWidth( aValStr ), pDev->GetTextHeight() );
- if ( eOrient != SVX_ORIENTATION_STANDARD )
+ if ( eOrient != SvxCellOrientation::Standard )
{
long nTemp = aSize.Width();
aSize.Width() = aSize.Height();
@@ -398,7 +398,7 @@ long ScColumn::GetNeededSize(
}
Size aPaper = Size( 1000000, 1000000 );
- if ( eOrient==SVX_ORIENTATION_STACKED && !bAsianVertical )
+ if ( eOrient==SvxCellOrientation::Stacked && !bAsianVertical )
aPaper.Width() = 1;
else if (bBreak)
{
@@ -458,7 +458,7 @@ long ScColumn::GetNeededSize(
pEngine->SetUpdateMode( true );
bool bEdWidth = bWidth;
- if ( eOrient != SVX_ORIENTATION_STANDARD && eOrient != SVX_ORIENTATION_STACKED )
+ if ( eOrient != SvxCellOrientation::Standard && eOrient != SvxCellOrientation::Stacked )
bEdWidth = !bEdWidth;
if ( nRotate )
{
@@ -809,7 +809,7 @@ void ScColumn::GetOptimalHeight(
}
else
{
- bool bStdAllowed = (pPattern->GetCellOrientation() == SVX_ORIENTATION_STANDARD);
+ bool bStdAllowed = (pPattern->GetCellOrientation() == SvxCellOrientation::Standard);
bool bStdOnly = false;
if (bStdAllowed)
{
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 11cb935f89a1..e61a217a353a 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -145,19 +145,19 @@ bool ScPatternAttr::operator==( const SfxPoolItem& rCmp ) const
SvxCellOrientation ScPatternAttr::GetCellOrientation( const SfxItemSet& rItemSet, const SfxItemSet* pCondSet )
{
- SvxCellOrientation eOrient = SVX_ORIENTATION_STANDARD;
+ SvxCellOrientation eOrient = SvxCellOrientation::Standard;
if( static_cast<const SfxBoolItem&>(GetItem( ATTR_STACKED, rItemSet, pCondSet )).GetValue() )
{
- eOrient = SVX_ORIENTATION_STACKED;
+ eOrient = SvxCellOrientation::Stacked;
}
else
{
sal_Int32 nAngle = static_cast<const SfxInt32Item&>(GetItem( ATTR_ROTATE_VALUE, rItemSet, pCondSet )).GetValue();
if( nAngle == 9000 )
- eOrient = SVX_ORIENTATION_BOTTOMTOP;
+ eOrient = SvxCellOrientation::BottomUp;
else if( nAngle == 27000 )
- eOrient = SVX_ORIENTATION_TOPBOTTOM;
+ eOrient = SvxCellOrientation::TopBottom;
}
return eOrient;
@@ -1326,7 +1326,7 @@ const SfxPoolItem& ScPatternAttr::GetItem( sal_uInt16 nSubWhich, const SfxItemSe
long ScPatternAttr::GetRotateVal( const SfxItemSet* pCondSet ) const
{
long nAttrRotate = 0;
- if ( GetCellOrientation() == SVX_ORIENTATION_STANDARD )
+ if ( GetCellOrientation() == SvxCellOrientation::Standard )
{
bool bRepeat = ( static_cast<const SvxHorJustifyItem&>(GetItem(ATTR_HOR_JUSTIFY, pCondSet)).
GetValue() == SvxCellHorJustify::Repeat );
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 0a83470057a8..5a82dad4130d 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -196,7 +196,7 @@ void ScAfVersions::Write(SvStream& rStream, sal_uInt16 fileVersion)
rStream.WriteUInt16( SvxHorJustifyItem(SvxCellHorJustify::Standard, ATTR_HOR_JUSTIFY).GetVersion(fileVersion) );
rStream.WriteUInt16( SvxVerJustifyItem(SVX_VER_JUSTIFY_STANDARD, ATTR_VER_JUSTIFY).GetVersion(fileVersion) );
- rStream.WriteUInt16( SvxOrientationItem(SVX_ORIENTATION_STANDARD, 0).GetVersion(fileVersion) );
+ rStream.WriteUInt16( SvxOrientationItem(SvxCellOrientation::Standard, 0).GetVersion(fileVersion) );
rStream.WriteUInt16( SvxMarginItem(ATTR_MARGIN).GetVersion(fileVersion) );
rStream.WriteUInt16( SfxBoolItem(ATTR_LINEBREAK).GetVersion(fileVersion) );
rStream.WriteUInt16( SfxInt32Item(ATTR_ROTATE_VALUE).GetVersion(fileVersion) );
@@ -295,7 +295,7 @@ void ScAutoFormatDataField::SetAdjust( const SvxAdjustItem& rAdjust )
bool ScAutoFormatDataField::Load( SvStream& rStream, const ScAfVersions& rVersions, sal_uInt16 nVer )
{
SfxPoolItem* pNew;
- SvxOrientationItem aOrientation( SVX_ORIENTATION_STANDARD, 0 );
+ SvxOrientationItem aOrientation( SvxCellOrientation::Standard, 0 );
READ( aFont, SvxFontItem, rVersions.nFontVersion)
READ( aHeight, SvxFontHeightItem, rVersions.nFontHeightVersion)
diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx
index 6a3c56d49220..f4e45c73a67e 100644
--- a/sc/source/filter/qpro/qprostyle.cxx
+++ b/sc/source/filter/qpro/qprostyle.cxx
@@ -110,11 +110,11 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow,
rItemSet.Put(SvxVerJustifyItem( eVerJustify, ATTR_VER_JUSTIFY ) );
// Orientation
- SvxCellOrientation eOrient = SVX_ORIENTATION_STANDARD;
+ SvxCellOrientation eOrient = SvxCellOrientation::Standard;
switch( nOrient )
{
case 0x20:
- eOrient = SVX_ORIENTATION_TOPBOTTOM;
+ eOrient = SvxCellOrientation::TopBottom;
break;
}
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 3215f1dbf1e9..e1555de9f7c3 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -222,7 +222,7 @@ private:
void ShrinkEditEngine( EditEngine& rEngine, const tools::Rectangle& rAlignRect,
long nLeftM, long nTopM, long nRightM, long nBottomM,
- bool bWidth, sal_uInt16 nOrient, long nAttrRotate, bool bPixelToLogic,
+ bool bWidth, SvxCellOrientation nOrient, long nAttrRotate, bool bPixelToLogic,
long& rEngineWidth, long& rEngineHeight, long& rNeededPixel,
bool& rLeftClip, bool& rRightClip );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c885935b69ec..be4d38060249 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5074,7 +5074,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
// vertical can not (yet) be clicked:
- if (pPattern->GetCellOrientation() != SVX_ORIENTATION_STANDARD)
+ if (pPattern->GetCellOrientation() != SvxCellOrientation::Standard)
return false;
bool bBreak = static_cast<const SfxBoolItem&>(pPattern->GetItem(ATTR_LINEBREAK)).GetValue() ||
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 8ac4e24845c6..a4aab11ba9bf 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -183,7 +183,7 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, bool bPTL) :
pPattern ( nullptr ),
pCondSet ( nullptr ),
nAscentPixel(0),
- eAttrOrient ( SVX_ORIENTATION_STANDARD ),
+ eAttrOrient ( SvxCellOrientation::Standard ),
eAttrHorJust( SvxCellHorJustify::Standard ),
eAttrVerJust( SVX_VER_JUSTIFY_BOTTOM ),
eAttrHorJustMethod( SvxCellJustifyMethod::Auto ),
@@ -343,7 +343,7 @@ void ScDrawStringsVars::SetPattern(
if ( bRepeat )
{
// "repeat" disables rotation (before constructing the font)
- eAttrOrient = SVX_ORIENTATION_STANDARD;
+ eAttrOrient = SvxCellOrientation::Standard;
// #i31843# "repeat" with "line breaks" is treated as default alignment (but rotation is still disabled)
if ( bLineBreak )
@@ -353,20 +353,20 @@ void ScDrawStringsVars::SetPattern(
short nRot;
switch (eAttrOrient)
{
- case SVX_ORIENTATION_STANDARD:
+ case SvxCellOrientation::Standard:
nRot = 0;
bRotated = static_cast<const SfxInt32Item&>(pPattern->GetItem( ATTR_ROTATE_VALUE, pCondSet )).GetValue() != 0 &&
!bRepeat;
break;
- case SVX_ORIENTATION_STACKED:
+ case SvxCellOrientation::Stacked:
nRot = 0;
bRotated = false;
break;
- case SVX_ORIENTATION_TOPBOTTOM:
+ case SvxCellOrientation::TopBottom:
nRot = 2700;
bRotated = false;
break;
- case SVX_ORIENTATION_BOTTOMTOP:
+ case SvxCellOrientation::BottomUp:
nRot = 900;
bRotated = false;
break;
@@ -695,7 +695,7 @@ void ScDrawStringsVars::SetAutoText( const OUString& rAutoText )
}
aTextSize.Height() = aMetric.GetAscent() + aMetric.GetDescent();
- if ( GetOrient() != SVX_ORIENTATION_STANDARD )
+ if ( GetOrient() != SvxCellOrientation::Standard )
{
long nTemp = aTextSize.Height();
aTextSize.Height() = aTextSize.Width();
@@ -765,7 +765,7 @@ void ScDrawStringsVars::TextChanged()
}
aTextSize.Height() = aMetric.GetAscent() + aMetric.GetDescent();
- if ( GetOrient() != SVX_ORIENTATION_STANDARD )
+ if ( GetOrient() != SvxCellOrientation::Standard )
{
long nTemp = aTextSize.Height();
aTextSize.Height() = aTextSize.Width();
@@ -1669,7 +1669,7 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
}
// use edit engine for rotated, stacked or mixed-script text
- if ( aVars.GetOrient() == SVX_ORIENTATION_STACKED ||
+ if ( aVars.GetOrient() == SvxCellOrientation::Stacked ||
aVars.IsRotated() || IsAmbiguousScript(nScript) )
bNeedEdit = true;
}
@@ -1721,7 +1721,7 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
aVars.RepeatToFill( aAreaParam.mnColWidth - nTotalMargin );
if ( bShrink )
{
- if ( aVars.GetOrient() != SVX_ORIENTATION_STANDARD )
+ if ( aVars.GetOrient() != SvxCellOrientation::Standard )
{
// Only horizontal scaling is handled here.
// DrawEdit is used to vertically scale 90 deg rotated text.
@@ -1789,7 +1789,7 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
// use edit engine if automatic line breaks are needed
if ( bBreak )
{
- if ( aVars.GetOrient() == SVX_ORIENTATION_STANDARD )
+ if ( aVars.GetOrient() == SvxCellOrientation::Standard )
bNeedEdit = ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip );
else
{
@@ -1974,13 +1974,13 @@ tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, co
switch (aVars.GetOrient())
{
- case SVX_ORIENTATION_STANDARD:
+ case SvxCellOrientation::Standard:
nJustPosY += aVars.GetAscent();
break;
- case SVX_ORIENTATION_TOPBOTTOM:
+ case SvxCellOrientation::TopBottom:
nJustPosX += aVars.GetTextSize().Width() - aVars.GetAscent();
break;
- case SVX_ORIENTATION_BOTTOMTOP:
+ case SvxCellOrientation::BottomUp:
nJustPosY += aVars.GetTextSize().Height();
nJustPosX += aVars.GetAscent();
break;
@@ -2242,7 +2242,7 @@ static long lcl_GetEditSize( EditEngine& rEngine, bool bWidth, bool bSwap, long
void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const tools::Rectangle& rAlignRect,
long nLeftM, long nTopM, long nRightM, long nBottomM,
- bool bWidth, sal_uInt16 nOrient, long nAttrRotate, bool bPixelToLogic,
+ bool bWidth, SvxCellOrientation nOrient, long nAttrRotate, bool bPixelToLogic,
long& rEngineWidth, long& rEngineHeight, long& rNeededPixel, bool& rLeftClip, bool& rRightClip )
{
if ( !bWidth )
@@ -2257,7 +2257,7 @@ void ScOutputData::ShrinkEditEngine( EditEngine& rEngine, const tools::Rectangle
if ( nScaleSize <= rAlignRect.GetHeight() )
return;
- bool bSwap = ( nOrient == SVX_ORIENTATION_TOPBOTTOM || nOrient == SVX_ORIENTATION_BOTTOMTOP );
+ bool bSwap = ( nOrient == SvxCellOrientation::TopBottom || nOrient == SvxCellOrientation::BottomUp );
long nAvailable = rAlignRect.GetHeight() - nTopM - nBottomM;
long nScale = ( nAvailable * 100 ) / nScaleSize;
@@ -2436,7 +2436,7 @@ void ScOutputData::DrawEditParam::setPatternToEngine(bool bUseStyleColor)
mpOldPreviewFontSet = mpPreviewFontSet;
EEControlBits nControl = mpEngine->GetControlWord();
- if (meOrient == SVX_ORIENTATION_STACKED)
+ if (meOrient == SvxCellOrientation::Stacked)
nControl |= EEControlBits::ONECHARPERLINE;
else
nControl &= ~EEControlBits::ONECHARPERLINE;
@@ -2506,7 +2506,7 @@ void ScOutputData::DrawEditParam::calcPaperSize(
void ScOutputData::DrawEditParam::getEngineSize(ScFieldEditEngine* pEngine, long& rWidth, long& rHeight) const
{
long nEngineWidth = 0;
- if (!mbBreak || meOrient == SVX_ORIENTATION_STACKED || mbAsianVertical)
+ if (!mbBreak || meOrient == SvxCellOrientation::Stacked || mbAsianVertical)
nEngineWidth = static_cast<long>(pEngine->CalcTextWidth());
long nEngineHeight = pEngine->GetTextHeight();
@@ -2518,7 +2518,7 @@ void ScOutputData::DrawEditParam::getEngineSize(ScFieldEditEngine* pEngine, long
nEngineHeight = nTemp;
}
- if (meOrient == SVX_ORIENTATION_STACKED)
+ if (meOrient == SvxCellOrientation::Stacked)
nEngineWidth = nEngineWidth * 11 / 10;
rWidth = nEngineWidth;
@@ -2527,7 +2527,7 @@ void ScOutputData::DrawEditParam::getEngineSize(ScFieldEditEngine* pEngine, long
bool ScOutputData::DrawEditParam::hasLineBreak() const
{
- return (mbBreak || (meOrient == SVX_ORIENTATION_STACKED) || mbAsianVertical);
+ return (mbBreak || (meOrient == SvxCellOrientation::Stacked) || mbAsianVertical);
}
bool ScOutputData::DrawEditParam::isHyperlinkCell() const
@@ -2540,7 +2540,7 @@ bool ScOutputData::DrawEditParam::isHyperlinkCell() const
bool ScOutputData::DrawEditParam::isVerticallyOriented() const
{
- return (meOrient == SVX_ORIENTATION_TOPBOTTOM || meOrient == SVX_ORIENTATION_BOTTOMTOP);
+ return (meOrient == SvxCellOrientation::TopBottom || meOrient == SvxCellOrientation::BottomUp);
}
void ScOutputData::DrawEditParam::calcStartPosForVertical(
@@ -2581,7 +2581,7 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
switch (meVerJust)
{
case SVX_VER_JUSTIFY_TOP:
- eSvxAdjust = (meOrient == SVX_ORIENTATION_TOPBOTTOM || mbAsianVertical) ?
+ eSvxAdjust = (meOrient == SvxCellOrientation::TopBottom || mbAsianVertical) ?
SvxAdjust::Left : SvxAdjust::Right;
break;
case SVX_VER_JUSTIFY_CENTER:
@@ -2589,7 +2589,7 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
break;
case SVX_VER_JUSTIFY_BOTTOM:
case SVX_VER_JUSTIFY_STANDARD:
- eSvxAdjust = (meOrient == SVX_ORIENTATION_TOPBOTTOM || mbAsianVertical) ?
+ eSvxAdjust = (meOrient == SvxCellOrientation::TopBottom || mbAsianVertical) ?
SvxAdjust::Right : SvxAdjust::Left;
break;
case SVX_VER_JUSTIFY_BLOCK:
@@ -2610,11 +2610,11 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
// -> always set adjustment
SvxAdjust eSvxAdjust = SvxAdjust::Left;
- if (meOrient == SVX_ORIENTATION_STACKED)
+ if (meOrient == SvxCellOrientation::Stacked)
eSvxAdjust = SvxAdjust::Center;
else if (mbBreak)
{
- if (meOrient == SVX_ORIENTATION_STANDARD)
+ if (meOrient == SvxCellOrientation::Standard)
switch (meHorJustResult)
{
case SvxCellHorJustify::Repeat: // repeat is not yet implemented
@@ -2742,7 +2742,7 @@ void ScOutputData::DrawEditParam::adjustForHyperlinkInPDF(Point aURLStart, const
void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
{
- OSL_ASSERT(rParam.meOrient == SVX_ORIENTATION_STANDARD);
+ OSL_ASSERT(rParam.meOrient == SvxCellOrientation::Standard);
OSL_ASSERT(!rParam.mbAsianVertical);
Size aRefOne = mpRefDevice->PixelToLogic(Size(1,1));
@@ -2755,7 +2755,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
if ( rParam.meHorJustAttr == SvxCellHorJustify::Repeat )
{
// ignore orientation/rotation if "repeat" is active
- rParam.meOrient = SVX_ORIENTATION_STANDARD;
+ rParam.meOrient = SvxCellOrientation::Standard;
nAttrRotate = 0;
// #i31843# "repeat" with "line breaks" is treated as default alignment
@@ -2875,7 +2875,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
{
ShrinkEditEngine( *rParam.mpEngine, aAreaParam.maAlignRect,
nLeftM, nTopM, nRightM, nBottomM, true,
- sal::static_int_cast<sal_uInt16>(rParam.meOrient), 0, rParam.mbPixelToLogic,
+ rParam.meOrient, 0, rParam.mbPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel,
aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
}
@@ -3356,7 +3356,7 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
{
ShrinkEditEngine( *rParam.mpEngine, aAreaParam.maAlignRect,
nLeftM, nTopM, nRightM, nBottomM, false,
- sal::static_int_cast<sal_uInt16>(rParam.meOrient), 0, rParam.mbPixelToLogic,
+ (rParam.meOrient), 0, rParam.mbPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel,
aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
}
@@ -3617,7 +3617,7 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam)
{
ShrinkEditEngine( *rParam.mpEngine, aAreaParam.maAlignRect,
nLeftM, nTopM, nRightM, nBottomM, false,
- sal::static_int_cast<sal_uInt16>(rParam.meOrient), 0, rParam.mbPixelToLogic,
+ rParam.meOrient, 0, rParam.mbPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel,
aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
}
@@ -3794,7 +3794,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
if ( rParam.mbAsianVertical )
{
// in asian mode, use EditEngine::SetVertical instead of EEControlBits::ONECHARPERLINE
- rParam.meOrient = SVX_ORIENTATION_STANDARD;
+ rParam.meOrient = SvxCellOrientation::Standard;
DrawEditAsianVertical(rParam);
return;
}
@@ -3890,7 +3890,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
ShrinkEditEngine( *rParam.mpEngine, aAreaParam.maAlignRect,
nLeftM, nTopM, nRightM, nBottomM, true,
- sal::static_int_cast<sal_uInt16>(rParam.meOrient), 0, rParam.mbPixelToLogic,
+ rParam.meOrient, 0, rParam.mbPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel,
aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
@@ -4126,7 +4126,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
{
// When in asian vertical orientation, the orientation value is STANDARD,
// and the asian vertical boolean is true.
- OSL_ASSERT(rParam.meOrient == SVX_ORIENTATION_STANDARD);
+ OSL_ASSERT(rParam.meOrient == SvxCellOrientation::Standard);
OSL_ASSERT(rParam.mbAsianVertical);
OSL_ASSERT(rParam.meHorJustAttr != SvxCellHorJustify::Repeat);
@@ -4248,7 +4248,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
{
ShrinkEditEngine( *rParam.mpEngine, aAreaParam.maAlignRect,
nLeftM, nTopM, nRightM, nBottomM, false,
- sal::static_int_cast<sal_uInt16>(rParam.meOrient), 0, rParam.mbPixelToLogic,
+ rParam.meOrient, 0, rParam.mbPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel,
aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
}
@@ -4352,7 +4352,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
// Only with automatic line breaks, to avoid having to find
// the cells with the horizontal end of the text again.
if ( nEngineHeight - aCellSize.Height() > 100 &&
- ( rParam.mbBreak || rParam.meOrient == SVX_ORIENTATION_STACKED ) &&
+ ( rParam.mbBreak || rParam.meOrient == SvxCellOrientation::Stacked ) &&
!rParam.mbAsianVertical && bMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
@@ -4599,17 +4599,17 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
if (aParam.meHorJustAttr == SvxCellHorJustify::Repeat)
{
// ignore orientation/rotation if "repeat" is active
- aParam.meOrient = SVX_ORIENTATION_STANDARD;
+ aParam.meOrient = SvxCellOrientation::Standard;
}
switch (aParam.meOrient)
{
- case SVX_ORIENTATION_BOTTOMTOP:
+ case SvxCellOrientation::BottomUp:
DrawEditBottomTop(aParam);
break;
- case SVX_ORIENTATION_TOPBOTTOM:
+ case SvxCellOrientation::TopBottom:
DrawEditTopBottom(aParam);
break;
- case SVX_ORIENTATION_STACKED:
+ case SvxCellOrientation::Stacked:
// this can be vertically stacked or asian vertical.
DrawEditStacked(aParam);
break;
@@ -4738,7 +4738,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
long nStartY = nPosY;
if (nX<nX1)
{
- if ((bBreak || eOrient!=SVX_ORIENTATION_STANDARD) && !bMerged)
+ if ((bBreak || eOrient!=SvxCellOrientation::Standard) && !bMerged)
bHidden = true;
else
{
@@ -4782,7 +4782,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
// adjustment for EditEngine
SvxAdjust eSvxAdjust = SvxAdjust::Left;
- if (eOrient==SVX_ORIENTATION_STACKED)
+ if (eOrient==SvxCellOrientation::Stacked)
eSvxAdjust = SvxAdjust::Center;
// adjustment for bBreak is omitted here
pSet->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
@@ -4792,7 +4792,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
pOldCondSet = pCondSet;
EEControlBits nControl = pEngine->GetControlWord();
- if (eOrient==SVX_ORIENTATION_STACKED)
+ if (eOrient==SvxCellOrientation::Stacked)
nControl |= EEControlBits::ONECHARPERLINE;
else
nControl &= ~EEControlBits::ONECHARPERLINE;
@@ -4842,7 +4842,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
double nSin = 0.0;
double nCos = 1.0;
SvxRotateMode eRotMode = SVX_ROTATE_MODE_STANDARD;
- if ( eOrient == SVX_ORIENTATION_STANDARD )
+ if ( eOrient == SvxCellOrientation::Standard )
{
nAttrRotate = static_cast<const SfxInt32Item&>(pPattern->
GetItem(ATTR_ROTATE_VALUE, pCondSet)).GetValue();
@@ -4864,7 +4864,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
}
Size aPaperSize( 1000000, 1000000 );
- if (eOrient==SVX_ORIENTATION_STACKED)
+ if (eOrient==SvxCellOrientation::Stacked)
aPaperSize.Width() = nOutWidth; // to center
else if (bBreak)
{
@@ -4876,7 +4876,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
//! With offset rows the following would be correct:
aPaperSize.Width() = (long)(nOutHeight / fabs(nSin));
}
- else if (eOrient == SVX_ORIENTATION_STANDARD)
+ else if (eOrient == SvxCellOrientation::Standard)
aPaperSize.Width() = nOutWidth;
else
aPaperSize.Width() = nOutHeight - 1;
@@ -5045,14 +5045,14 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
// always do height
ShrinkEditEngine( *pEngine, aAreaParam.maAlignRect, nLeftM, nTopM, nRightM, nBottomM,
- false, sal::static_int_cast<sal_uInt16>(eOrient), nAttrRotate, bPixelToLogic,
+ false, eOrient, nAttrRotate, bPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel, aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
if ( eRotMode == SVX_ROTATE_MODE_STANDARD )
{
// do width only if rotating within the cell (standard mode)
ShrinkEditEngine( *pEngine, aAreaParam.maAlignRect, nLeftM, nTopM, nRightM, nBottomM,
- true, sal::static_int_cast<sal_uInt16>(eOrient), nAttrRotate, bPixelToLogic,
+ true, eOrient, nAttrRotate, bPixelToLogic,
nEngineWidth, nEngineHeight, nNeededPixel, aAreaParam.mbLeftClip, aAreaParam.mbRightClip );
}
@@ -5116,11 +5116,11 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
aLogicStart = mpRefDevice->PixelToLogic( Point(nStartX,nStartY) );
else
aLogicStart = Point(nStartX, nStartY);
- if ( eOrient!=SVX_ORIENTATION_STANDARD || !bBreak )
+ if ( eOrient!=SvxCellOrientation::Standard || !bBreak )
{
long nAvailWidth = aCellSize.Width();
if (eType==OUTTYPE_WINDOW &&
- eOrient!=SVX_ORIENTATION_STACKED &&
+ eOrient!=SvxCellOrientation::Stacked &&
pInfo->bAutoFilter)
{
// filter drop-down width is now independent from row height
@@ -5134,7 +5134,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
// horizontal orientation
- if (eOrient==SVX_ORIENTATION_STANDARD && !nAttrRotate)
+ if (eOrient==SvxCellOrientation::Standard && !nAttrRotate)
{
if (eHorJust==SvxCellHorJustify::Right ||
eHorJust==SvxCellHorJustify::Center)
@@ -5176,8 +5176,8 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
aLogicStart.X() -= nCellWidth;
}
- if ( eOrient==SVX_ORIENTATION_STANDARD ||
- eOrient==SVX_ORIENTATION_STACKED || !bBreak )
+ if ( eOrient==SvxCellOrientation::Standard ||
+ eOrient==SvxCellOrientation::Stacked || !bBreak )
{
if (eVerJust==SVX_VER_JUSTIFY_BOTTOM ||
eVerJust==SVX_VER_JUSTIFY_STANDARD)
@@ -5204,7 +5204,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
}
// TOPBOTTON and BOTTOMTOP are handled in DrawStrings/DrawEdit
- OSL_ENSURE( eOrient == SVX_ORIENTATION_STANDARD && nAttrRotate,
+ OSL_ENSURE( eOrient == SvxCellOrientation::Standard && nAttrRotate,
"DrawRotated: no rotation" );
long nOriVal = 0;