summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx2
-rw-r--r--cui/source/tabpages/numpages.cxx20
-rw-r--r--cui/source/tabpages/paragrph.cxx48
-rw-r--r--editeng/source/editeng/eehtml.cxx12
-rw-r--r--editeng/source/editeng/eerdll.cxx2
-rw-r--r--editeng/source/editeng/impedit2.cxx12
-rw-r--r--editeng/source/editeng/impedit3.cxx16
-rw-r--r--editeng/source/editeng/impedit4.cxx4
-rw-r--r--editeng/source/items/numitem.cxx4
-rw-r--r--editeng/source/items/paraitem.cxx25
-rw-r--r--editeng/source/outliner/outliner.cxx8
-rw-r--r--editeng/source/rtf/rtfitem.cxx8
-rw-r--r--editeng/source/uno/unonrule.cxx19
-rw-r--r--filter/source/msfilter/svdfppt.cxx2
-rw-r--r--forms/source/richtext/rtattributehandler.cxx26
-rw-r--r--include/editeng/adjustitem.hxx34
-rw-r--r--include/editeng/svxenum.hxx15
-rw-r--r--include/svx/nbdtmg.hxx2
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx2
-rw-r--r--sc/source/core/data/patattr.cxx20
-rw-r--r--sc/source/core/tool/autoform.cxx4
-rw-r--r--sc/source/filter/excel/xiescher.cxx30
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx8
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeader.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx12
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx14
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx24
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconcustomshape.cxx2
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx10
-rw-r--r--sc/source/ui/view/output2.cxx38
-rw-r--r--sc/source/ui/view/printfun.cxx8
-rw-r--r--sc/source/ui/view/viewdata.cxx14
-rw-r--r--sd/qa/unit/misc-tests.cxx12
-rw-r--r--sd/source/core/drawdoc4.cxx12
-rw-r--r--sd/source/core/sdpage.cxx12
-rw-r--r--sd/source/core/stlpool.cxx8
-rw-r--r--sd/source/ui/func/fuconcs.cxx2
-rw-r--r--sd/source/ui/func/fuconrec.cxx2
-rw-r--r--sd/source/ui/view/drtxtob.cxx8
-rw-r--r--sd/source/ui/view/drtxtob1.cxx28
-rw-r--r--sd/source/ui/view/drviews3.cxx8
-rw-r--r--sd/source/ui/view/drviewsf.cxx8
-rw-r--r--svx/source/dialog/paraprev.cxx20
-rw-r--r--svx/source/sdr/properties/textproperties.cxx2
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx6
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx20
-rw-r--r--sw/source/core/bastyp/init.cxx2
-rw-r--r--sw/source/core/crsr/crstrvl.cxx10
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx8
-rw-r--r--sw/source/core/doc/htmltbl.cxx6
-rw-r--r--sw/source/core/doc/tblafmt.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx16
-rw-r--r--sw/source/core/table/swtable.cxx8
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx10
-rw-r--r--sw/source/core/text/frmform.cxx4
-rw-r--r--sw/source/core/text/guess.cxx6
-rw-r--r--sw/source/core/text/itradj.cxx14
-rw-r--r--sw/source/core/text/itrcrsr.cxx22
-rw-r--r--sw/source/core/text/itrform2.cxx8
-rw-r--r--sw/source/core/text/itrtxt.hxx6
-rw-r--r--sw/source/core/text/porlay.cxx2
-rw-r--r--sw/source/core/text/pormulti.cxx4
-rw-r--r--sw/source/core/text/porrst.cxx4
-rw-r--r--sw/source/core/text/txtfld.cxx4
-rw-r--r--sw/source/core/text/txtfrm.cxx6
-rw-r--r--sw/source/core/text/txtftn.cxx6
-rw-r--r--sw/source/core/unocore/unosett.cxx9
-rw-r--r--sw/source/filter/html/css1atr.cxx8
-rw-r--r--sw/source/filter/html/htmlatr.cxx10
-rw-r--r--sw/source/filter/html/htmlcss1.cxx8
-rw-r--r--sw/source/filter/html/htmlctxt.cxx2
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx2
-rw-r--r--sw/source/filter/html/htmlform.cxx2
-rw-r--r--sw/source/filter/html/htmlsect.cxx6
-rw-r--r--sw/source/filter/html/htmltab.cxx58
-rw-r--r--sw/source/filter/html/svxcss1.cxx18
-rw-r--r--sw/source/filter/html/swhtml.cxx34
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx16
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx14
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx6
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx10
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx20
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx24
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx4
-rw-r--r--sw/source/ui/misc/num.cxx10
-rw-r--r--sw/source/ui/table/tautofmt.cxx4
-rw-r--r--sw/source/uibase/app/docshini.cxx2
-rw-r--r--sw/source/uibase/ribbar/concustomshape.cxx2
-rw-r--r--sw/source/uibase/shells/annotsh.cxx30
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx31
-rw-r--r--sw/source/uibase/shells/txtattr.cxx54
-rw-r--r--sw/source/uibase/shells/txtnum.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx2
100 files changed, 584 insertions, 569 deletions
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 9072f31c99e4..e52994d1aa9a 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -167,7 +167,7 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj )
}
if ( !bAttributesAppliedFromGallery )
{
- pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, 0 ) );
+ pObj->SetMergedItem( SvxAdjustItem( SvxAdjust::Center, 0 ) );
pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 7ebc6d171d29..edd9a15056b4 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1583,9 +1583,9 @@ void SvxNumOptionsTabPage::InitControls()
if(bSameAdjust)
{
sal_Int32 nPos = 1; // centered
- if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
+ if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Left)
nPos = 0;
- else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
+ else if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Right)
nPos = 2;
m_pAlignLB->SelectEntryPos(nPos);
}
@@ -2265,11 +2265,11 @@ void SvxNumOptionsTabPage::EditModifyHdl_Impl( Edit* pEdit )
else //align
{
sal_Int32 nPos = m_pAlignLB->GetSelectEntryPos();
- SvxAdjust eAdjust = SVX_ADJUST_CENTER;
+ SvxAdjust eAdjust = SvxAdjust::Center;
if(nPos == 0)
- eAdjust = SVX_ADJUST_LEFT;
+ eAdjust = SvxAdjust::Left;
else if(nPos == 2)
- eAdjust = SVX_ADJUST_RIGHT;
+ eAdjust = SvxAdjust::Right;
aNumFmt.SetNumAdjust( eAdjust );
}
pActNum->SetLevel(i, aNumFmt);
@@ -2898,9 +2898,9 @@ void SvxNumPositionTabPage::InitControls()
if(bSameAdjust)
{
sal_Int32 nPos = 1; // centered
- if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
+ if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Left)
nPos = 0;
- else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
+ else if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Right)
nPos = 2;
m_pAlignLB->SelectEntryPos(nPos);
m_pAlign2LB->SelectEntryPos( nPos );
@@ -3207,11 +3207,11 @@ IMPL_LINK_NOARG(SvxNumPositionTabPage, EditModifyHdl_Impl, ListBox&, void)
const sal_Int32 nPos = m_pAlignLB->IsVisible()
? m_pAlignLB->GetSelectEntryPos()
: m_pAlign2LB->GetSelectEntryPos();
- SvxAdjust eAdjust = SVX_ADJUST_CENTER;
+ SvxAdjust eAdjust = SvxAdjust::Center;
if(nPos == 0)
- eAdjust = SVX_ADJUST_LEFT;
+ eAdjust = SvxAdjust::Left;
else if(nPos == 2)
- eAdjust = SVX_ADJUST_RIGHT;
+ eAdjust = SvxAdjust::Right;
aNumFmt.SetNumAdjust( eAdjust );
pActNum->SetLevel(i, aNumFmt);
}
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 5a3e94cf758f..63876219713c 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1093,29 +1093,29 @@ bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* rOutSet )
bool bModified = false;
bool bAdj = false, bChecked = false;
- SvxAdjust eAdjust = SVX_ADJUST_LEFT;
+ SvxAdjust eAdjust = SvxAdjust::Left;
if ( m_pLeft->IsChecked() )
{
- eAdjust = SVX_ADJUST_LEFT;
+ eAdjust = SvxAdjust::Left;
bAdj = !m_pLeft->GetSavedValue();
bChecked = true;
}
else if ( m_pRight->IsChecked() )
{
- eAdjust = SVX_ADJUST_RIGHT;
+ eAdjust = SvxAdjust::Right;
bAdj = !m_pRight->GetSavedValue();
bChecked = true;
}
else if ( m_pCenter->IsChecked() )
{
- eAdjust = SVX_ADJUST_CENTER;
+ eAdjust = SvxAdjust::Center;
bAdj = !m_pCenter->GetSavedValue();
bChecked = true;
}
else if ( m_pJustify->IsChecked() )
{
- eAdjust = SVX_ADJUST_BLOCK;
+ eAdjust = SvxAdjust::Block;
bAdj = !m_pJustify->GetSavedValue() ||
m_pExpandCB->IsValueChangedFromSaved() ||
m_pLastLineLB->IsValueChangedFromSaved();
@@ -1127,15 +1127,15 @@ bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* rOutSet )
{
const SvxAdjustItem* pOld = static_cast<const SvxAdjustItem*>(GetOldItem( *rOutSet, SID_ATTR_PARA_ADJUST ));
- SvxAdjust eOneWord = m_pExpandCB->IsChecked() ? SVX_ADJUST_BLOCK : SVX_ADJUST_LEFT;
+ SvxAdjust eOneWord = m_pExpandCB->IsChecked() ? SvxAdjust::Block : SvxAdjust::Left;
sal_Int32 nLBPos = m_pLastLineLB->GetSelectEntryPos();
- SvxAdjust eLastBlock = SVX_ADJUST_LEFT;
+ SvxAdjust eLastBlock = SvxAdjust::Left;
if ( 1 == nLBPos )
- eLastBlock = SVX_ADJUST_CENTER;
+ eLastBlock = SvxAdjust::Center;
else if ( 2 == nLBPos )
- eLastBlock = SVX_ADJUST_BLOCK;
+ eLastBlock = SvxAdjust::Block;
bool bNothingWasChecked =
!m_pLeft->GetSavedValue() && !m_pRight->GetSavedValue() &&
@@ -1190,13 +1190,13 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet )
switch ( rAdj.GetAdjust() /*!!! ask VB rAdj.GetLastBlock()*/ )
{
- case SVX_ADJUST_LEFT: m_pLeft->Check(); break;
+ case SvxAdjust::Left: m_pLeft->Check(); break;
- case SVX_ADJUST_RIGHT: m_pRight->Check(); break;
+ case SvxAdjust::Right: m_pRight->Check(); break;
- case SVX_ADJUST_CENTER: m_pCenter->Check(); break;
+ case SvxAdjust::Center: m_pCenter->Check(); break;
- case SVX_ADJUST_BLOCK: m_pJustify->Check(); break;
+ case SvxAdjust::Block: m_pJustify->Check(); break;
default: ; //prevent warning
}
bool bEnable = m_pJustify->IsChecked();
@@ -1205,15 +1205,15 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet )
switch(rAdj.GetLastBlock())
{
- case SVX_ADJUST_LEFT: nLBSelect = 0; break;
+ case SvxAdjust::Left: nLBSelect = 0; break;
- case SVX_ADJUST_CENTER: nLBSelect = 1; break;
+ case SvxAdjust::Center: nLBSelect = 1; break;
- case SVX_ADJUST_BLOCK: nLBSelect = 2; break;
+ case SvxAdjust::Block: nLBSelect = 2; break;
default: ; //prevent warning
}
m_pExpandCB->Enable(bEnable && nLBSelect == 2);
- m_pExpandCB->Check(SVX_ADJUST_BLOCK == rAdj.GetOneWord());
+ m_pExpandCB->Check(SvxAdjust::Block == rAdj.GetOneWord());
}
else
{
@@ -1324,20 +1324,20 @@ IMPL_LINK_NOARG(SvxParaAlignTabPage, TextDirectionHdl_Impl, ListBox&, void)
void SvxParaAlignTabPage::UpdateExample_Impl()
{
if ( m_pLeft->IsChecked() )
- m_pExampleWin->SetAdjust( SVX_ADJUST_LEFT );
+ m_pExampleWin->SetAdjust( SvxAdjust::Left );
else if ( m_pRight->IsChecked() )
- m_pExampleWin->SetAdjust( SVX_ADJUST_RIGHT );
+ m_pExampleWin->SetAdjust( SvxAdjust::Right );
else if ( m_pCenter->IsChecked() )
- m_pExampleWin->SetAdjust( SVX_ADJUST_CENTER );
+ m_pExampleWin->SetAdjust( SvxAdjust::Center );
else if ( m_pJustify->IsChecked() )
{
- m_pExampleWin->SetAdjust( SVX_ADJUST_BLOCK );
- SvxAdjust eLastBlock = SVX_ADJUST_LEFT;
+ m_pExampleWin->SetAdjust( SvxAdjust::Block );
+ SvxAdjust eLastBlock = SvxAdjust::Left;
sal_Int32 nLBPos = m_pLastLineLB->GetSelectEntryPos();
if(nLBPos == 1)
- eLastBlock = SVX_ADJUST_CENTER;
+ eLastBlock = SvxAdjust::Center;
else if(nLBPos == 2)
- eLastBlock = SVX_ADJUST_BLOCK;
+ eLastBlock = SvxAdjust::Block;
m_pExampleWin->SetLastLine( eLastBlock );
}
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index b76fbe86b67f..965a18a1902d 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -217,7 +217,7 @@ void EditHTMLParser::NextToken( int nToken )
SfxItemSet aItems( aCurSel.Max().GetNode()->GetContentAttribs().GetItems() );
aItems.ClearItem( EE_PARA_JUST );
if ( nToken == HTML_CENTER_ON )
- aItems.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ aItems.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
mpEditEngine->SetParaAttribsOnly(nNode, aItems);
}
break;
@@ -698,7 +698,7 @@ void EditHTMLParser::StartPara( bool bReal )
if ( bReal )
{
const HTMLOptions& aOptions = GetOptions();
- SvxAdjust eAdjust = SVX_ADJUST_LEFT;
+ SvxAdjust eAdjust = SvxAdjust::Left;
for (const auto & aOption : aOptions)
{
switch( aOption.GetToken() )
@@ -707,13 +707,13 @@ void EditHTMLParser::StartPara( bool bReal )
{
OUString const& rTmp(aOption.GetString());
if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_right))
- eAdjust = SVX_ADJUST_RIGHT;
+ eAdjust = SvxAdjust::Right;
else if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_middle))
- eAdjust = SVX_ADJUST_CENTER;
+ eAdjust = SvxAdjust::Center;
else if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_center))
- eAdjust = SVX_ADJUST_CENTER;
+ eAdjust = SvxAdjust::Center;
else
- eAdjust = SVX_ADJUST_LEFT;
+ eAdjust = SvxAdjust::Left;
}
break;
}
diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx
index 94f97607d18c..f2c298063391 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -123,7 +123,7 @@ std::vector<SfxPoolItem*>* GlobalEditData::GetDefItems()
rDefItems[11] = new SvxLRSpaceItem( EE_PARA_LRSPACE );
rDefItems[12] = new SvxULSpaceItem( EE_PARA_ULSPACE );
rDefItems[13] = new SvxLineSpacingItem( 0, EE_PARA_SBL );
- rDefItems[14] = new SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST );
+ rDefItems[14] = new SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST );
rDefItems[15] = new SvxTabStopItem( 0, 0, SvxTabAdjust::Left, EE_PARA_TABS );
rDefItems[16] = new SvxJustifyMethodItem( SvxCellJustifyMethod::Auto, EE_PARA_JUST_METHOD );
rDefItems[17] = new SvxVerJustifyItem( SVX_VER_JUSTIFY_STANDARD, EE_PARA_VER_JUST );
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index ad99ca978c67..1341ec7b031f 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1993,7 +1993,7 @@ sal_uInt8 ImpEditEngine::GetRightToLeft( sal_Int32 nPara, sal_Int32 nPos, sal_In
SvxAdjust ImpEditEngine::GetJustification( sal_Int32 nPara ) const
{
- SvxAdjust eJustification = SVX_ADJUST_LEFT;
+ SvxAdjust eJustification = SvxAdjust::Left;
if ( !aStatus.IsOutliner() )
{
@@ -2001,10 +2001,10 @@ SvxAdjust ImpEditEngine::GetJustification( sal_Int32 nPara ) const
if ( IsRightToLeft( nPara ) )
{
- if ( eJustification == SVX_ADJUST_LEFT )
- eJustification = SVX_ADJUST_RIGHT;
- else if ( eJustification == SVX_ADJUST_RIGHT )
- eJustification = SVX_ADJUST_LEFT;
+ if ( eJustification == SvxAdjust::Left )
+ eJustification = SvxAdjust::Right;
+ else if ( eJustification == SvxAdjust::Right )
+ eJustification = SvxAdjust::Left;
}
}
return eJustification;
@@ -3126,7 +3126,7 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine,
break;
case PortionKind::TEXT:
{
- if ( ( eJustification != SVX_ADJUST_BLOCK ) || ( !bIgnoreExtraSpace ) )
+ if ( ( eJustification != SvxAdjust::Block ) || ( !bIgnoreExtraSpace ) )
{
nWidth += rTextPortion.GetSize().Width();
}
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 1453427b29cb..10ae5407dd51 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -525,7 +525,7 @@ void ImpEditEngine::CheckAutoPageSize()
ParaPortion* pParaPortion = GetParaPortions()[nPara];
ContentNode* pNode = pParaPortion->GetNode();
SvxAdjust eJustification = GetJustification( nPara );
- if ( eJustification != SVX_ADJUST_LEFT )
+ if ( eJustification != SvxAdjust::Left )
{
pParaPortion->MarkSelectionInvalid( 0, pNode->Len() );
CreateLines( nPara, 0 ); // 0: For AutoPageSize no TextRange!
@@ -1457,14 +1457,14 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
pLine->SetTextWidth( aTextSize.Width() );
switch ( eJustification )
{
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
{
long n = ( nMaxLineWidth - aTextSize.Width() ) / 2;
n += nStartX; // Indentation is kept.
pLine->SetStartPosX( n );
}
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
{
// For automatically wrapped lines, which has a blank at the end
// the blank must not be displayed!
@@ -1473,7 +1473,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
pLine->SetStartPosX( n );
}
break;
- case SVX_ADJUST_BLOCK:
+ case SvxAdjust::Block:
{
bool bDistLastLine = (GetJustifyMethod(nPara) == SvxCellJustifyMethod::Distribute);
long nRemainingSpace = nMaxLineWidth - aTextSize.Width();
@@ -1691,9 +1691,9 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
long nTextXOffset = 0;
if ( nMaxLineWidth < 0 )
nMaxLineWidth = 1;
- if ( eJustification == SVX_ADJUST_CENTER )
+ if ( eJustification == SvxAdjust::Center )
nStartX = nMaxLineWidth / 2;
- else if ( eJustification == SVX_ADJUST_RIGHT )
+ else if ( eJustification == SvxAdjust::Right )
nStartX = nMaxLineWidth;
nStartX = nStartX + nTextXOffset;
@@ -1997,9 +1997,9 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
if ( !bCompressBlank && !bHangingPunctuation )
{
- // When justification is not SVX_ADJUST_LEFT, it's important to compress
+ // When justification is not SvxAdjust::Left, it's important to compress
// the trailing space even if there is enough room for the space...
- // Don't check for SVX_ADJUST_LEFT, doesn't matter to compress in this case too...
+ // Don't check for SvxAdjust::Left, doesn't matter to compress in this case too...
DBG_ASSERT( nBreakPos > pLine->GetStart(), "ImpBreakLines - BreakPos not expected!" );
if ( pNode->GetChar( nBreakPos-1 ) == ' ' )
bCompressBlank = true;
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 53fe08351869..2a5f702b8732 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -769,9 +769,9 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
SvxAdjust eJustification = static_cast<const SvxAdjustItem&>(rItem).GetAdjust();
switch ( eJustification )
{
- case SVX_ADJUST_CENTER: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_QC );
+ case SvxAdjust::Center: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_QC );
break;
- case SVX_ADJUST_RIGHT: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_QR );
+ case SvxAdjust::Right: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_QR );
break;
default: rOutput.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_QL );
break;
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 54eef3e96bef..695e00f136bc 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -150,7 +150,7 @@ OUString SvxNumberType::GetNumStr( sal_uLong nNo, const css::lang::Locale& rLoca
SvxNumberFormat::SvxNumberFormat( SvxNumType eType,
SvxNumPositionAndSpaceMode ePositionAndSpaceMode )
: SvxNumberType(eType),
- eNumAdjust(SVX_ADJUST_LEFT),
+ eNumAdjust(SvxAdjust::Left),
nInclUpperLevels(0),
nStart(1),
cBullet(SVX_DEF_BULLET),
@@ -255,7 +255,7 @@ void SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pConverte
rStream.WriteUInt16( NUMITEM_VERSION_04 );
rStream.WriteUInt16( GetNumberingType() );
- rStream.WriteUInt16( eNumAdjust );
+ rStream.WriteUInt16( (sal_uInt16)eNumAdjust );
rStream.WriteUInt16( nInclUpperLevels );
rStream.WriteUInt16( nStart );
rStream.WriteUInt16( cBullet );
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 760e77fa5ebf..2a99d6efb99f 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/style/LineSpacingMode.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/extract.hxx>
#include <unotools/syslocale.hxx>
#include <comphelper/types.hxx>
#include <tools/mapunit.hxx>
@@ -54,7 +55,7 @@ using namespace ::com::sun::star;
SfxPoolItem* SvxLineSpacingItem::CreateDefault() { return new SvxLineSpacingItem(LINE_SPACE_DEFAULT_HEIGHT, 0);}
-SfxPoolItem* SvxAdjustItem::CreateDefault() { return new SvxAdjustItem(SVX_ADJUST_LEFT, 0);}
+SfxPoolItem* SvxAdjustItem::CreateDefault() { return new SvxAdjustItem(SvxAdjust::Left, 0);}
SfxPoolItem* SvxWidowsItem::CreateDefault() { return new SvxWidowsItem(0, 0);}
SfxPoolItem* SvxOrphansItem::CreateDefault() { return new SvxOrphansItem(0, 0);}
SfxPoolItem* SvxHyphenZoneItem::CreateDefault() { return new SvxHyphenZoneItem(false, 0);}
@@ -375,22 +376,16 @@ bool SvxAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case MID_LAST_LINE_ADJUST :
{
sal_Int32 eVal = - 1;
- try
- {
- eVal = ::comphelper::getEnumAsINT32(rVal);
- }
- catch(...) {}
+ ::cppu::enum2int(eVal,rVal);
if(eVal >= 0 && eVal <= 4)
{
+ SvxAdjust eAdjust = (SvxAdjust)eVal;
if(MID_LAST_LINE_ADJUST == nMemberId &&
- eVal != SVX_ADJUST_LEFT &&
- eVal != SVX_ADJUST_BLOCK &&
- eVal != SVX_ADJUST_CENTER)
+ eAdjust != SvxAdjust::Left &&
+ eAdjust != SvxAdjust::Block &&
+ eAdjust != SvxAdjust::Center)
return false;
- if(eVal < (sal_uInt16)SVX_ADJUST_END)
- nMemberId == MID_PARA_ADJUST ?
- SetAdjust((SvxAdjust)eVal) :
- SetLastBlock((SvxAdjust)eVal);
+ nMemberId == MID_PARA_ADJUST ? SetAdjust(eAdjust) : SetLastBlock(eAdjust);
}
}
break;
@@ -430,13 +425,13 @@ bool SvxAdjustItem::GetPresentation
sal_uInt16 SvxAdjustItem::GetValueCount() const
{
- return SVX_ADJUST_END; // SVX_ADJUST_BLOCKLINE + 1
+ return (sal_uInt16)SvxAdjust::End; // SvxAdjust::BlockLine + 1
}
OUString SvxAdjustItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
- DBG_ASSERT( nPos <= (sal_uInt16)SVX_ADJUST_BLOCKLINE, "enum overflow!" );
+ DBG_ASSERT( nPos <= (sal_uInt16)SvxAdjust::BlockLine, "enum overflow!" );
return EE_RESSTR(RID_SVXITEMS_ADJUST_BEGIN + nPos);
}
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 236e265e7d2d..ec6e5caa83b8 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -1535,8 +1535,8 @@ Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bRetu
{
// Adjust when centered or align right
const SvxAdjustItem& rItem = static_cast<const SvxAdjustItem&>(pEditEngine->GetParaAttrib( nPara, EE_PARA_JUST ));
- if ( ( !pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_LEFT ) ) ||
- ( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SVX_ADJUST_RIGHT ) ) )
+ if ( ( !pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SvxAdjust::Left ) ) ||
+ ( pEditEngine->IsRightToLeft( nPara ) && ( rItem.GetAdjust() != SvxAdjust::Right ) ) )
{
aTopLeft.X() = pEditEngine->GetFirstLineStartX( nPara ) - nBulletWidth;
}
@@ -1569,11 +1569,11 @@ Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bRetu
}
// Horizontal:
- if( pFmt->GetNumAdjust() == SVX_ADJUST_RIGHT )
+ if( pFmt->GetNumAdjust() == SvxAdjust::Right )
{
aTopLeft.X() += nBulletWidth - aBulletSize.Width();
}
- else if( pFmt->GetNumAdjust() == SVX_ADJUST_CENTER )
+ else if( pFmt->GetNumAdjust() == SvxAdjust::Center )
{
aTopLeft.X() += ( nBulletWidth - aBulletSize.Width() ) / 2;
}
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 1e4efcfc7524..8b8fb4330dac 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -322,25 +322,25 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
case RTF_QL:
if( aPardMap.nAdjust )
{
- pSet->Put( SvxAdjustItem( SVX_ADJUST_LEFT, aPardMap.nAdjust ));
+ pSet->Put( SvxAdjustItem( SvxAdjust::Left, aPardMap.nAdjust ));
}
break;
case RTF_QR:
if( aPardMap.nAdjust )
{
- pSet->Put( SvxAdjustItem( SVX_ADJUST_RIGHT, aPardMap.nAdjust ));
+ pSet->Put( SvxAdjustItem( SvxAdjust::Right, aPardMap.nAdjust ));
}
break;
case RTF_QJ:
if( aPardMap.nAdjust )
{
- pSet->Put( SvxAdjustItem( SVX_ADJUST_BLOCK, aPardMap.nAdjust ));
+ pSet->Put( SvxAdjustItem( SvxAdjust::Block, aPardMap.nAdjust ));
}
break;
case RTF_QC:
if( aPardMap.nAdjust )
{
- pSet->Put( SvxAdjustItem( SVX_ADJUST_CENTER, aPardMap.nAdjust ));
+ pSet->Put( SvxAdjustItem( SvxAdjust::Center, aPardMap.nAdjust ));
}
break;
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 07a7703b2f50..e9b987799586 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -38,6 +38,7 @@
#include <editeng/unonrule.hxx>
#include <editeng/editids.hrc>
#include <editeng/numdef.hxx>
+#include <o3tl/enumarray.hxx>
#include <memory>
using ::com::sun::star::util::XCloneable;
@@ -52,16 +53,16 @@ using namespace ::com::sun::star::container;
const SvxAdjust aUnoToSvxAdjust[] =
{
- SVX_ADJUST_LEFT,
- SVX_ADJUST_RIGHT,
- SVX_ADJUST_CENTER,
- SVX_ADJUST_LEFT,
- SVX_ADJUST_LEFT,
- SVX_ADJUST_LEFT,
- SVX_ADJUST_BLOCK
+ SvxAdjust::Left,
+ SvxAdjust::Right,
+ SvxAdjust::Center,
+ SvxAdjust::Left,
+ SvxAdjust::Left,
+ SvxAdjust::Left,
+ SvxAdjust::Block
};
-const unsigned short aSvxToUnoAdjust[] =
+const o3tl::enumarray<SvxAdjust, unsigned short> aSvxToUnoAdjust
{
text::HoriOrientation::LEFT,
text::HoriOrientation::RIGHT,
@@ -79,7 +80,7 @@ SvxAdjust ConvertUnoAdjust( unsigned short nAdjust )
unsigned short ConvertUnoAdjust( SvxAdjust eAdjust )
{
- DBG_ASSERT( eAdjust <= 6, "Enum hat sich geaendert! [CL]" );
+ DBG_ASSERT( (int)eAdjust <= 6, "Enum hat sich geaendert! [CL]" );
return aSvxToUnoAdjust[eAdjust];
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 5cb4cafad44d..45730aba4e81 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -6235,7 +6235,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
{
if ( nVal <= 3 )
{ // paragraph adjustment
- static SvxAdjust const aAdj[ 4 ] = { SVX_ADJUST_LEFT, SVX_ADJUST_CENTER, SVX_ADJUST_RIGHT, SVX_ADJUST_BLOCK };
+ static SvxAdjust const aAdj[ 4 ] = { SvxAdjust::Left, SvxAdjust::Center, SvxAdjust::Right, SvxAdjust::Block };
rSet.Put( SvxAdjustItem( aAdj[ nVal ], EE_PARA_JUST ) );
}
}
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index 19eaa93fc898..baedb907cf65 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -166,14 +166,14 @@ namespace frm
ParaAlignmentHandler::ParaAlignmentHandler( AttributeId _nAttributeId )
:AttributeHandler( _nAttributeId, EE_PARA_JUST )
- ,m_eAdjust( SVX_ADJUST_CENTER )
+ ,m_eAdjust( SvxAdjust::Center )
{
switch ( getAttribute() )
{
- case SID_ATTR_PARA_ADJUST_LEFT : m_eAdjust = SVX_ADJUST_LEFT; break;
- case SID_ATTR_PARA_ADJUST_CENTER: m_eAdjust = SVX_ADJUST_CENTER; break;
- case SID_ATTR_PARA_ADJUST_RIGHT : m_eAdjust = SVX_ADJUST_RIGHT; break;
- case SID_ATTR_PARA_ADJUST_BLOCK : m_eAdjust = SVX_ADJUST_BLOCK; break;
+ case SID_ATTR_PARA_ADJUST_LEFT : m_eAdjust = SvxAdjust::Left; break;
+ case SID_ATTR_PARA_ADJUST_CENTER: m_eAdjust = SvxAdjust::Center; break;
+ case SID_ATTR_PARA_ADJUST_RIGHT : m_eAdjust = SvxAdjust::Right; break;
+ case SID_ATTR_PARA_ADJUST_BLOCK : m_eAdjust = SvxAdjust::Block; break;
default:
OSL_FAIL( "ParaAlignmentHandler::ParaAlignmentHandler: invalid slot!" );
break;
@@ -376,21 +376,21 @@ namespace frm
ParagraphDirectionHandler::ParagraphDirectionHandler( AttributeId _nAttributeId )
:AttributeHandler( _nAttributeId, EE_PARA_WRITINGDIR )
,m_eParagraphDirection( FRMDIR_HORI_LEFT_TOP )
- ,m_eDefaultAdjustment( SVX_ADJUST_RIGHT )
- ,m_eOppositeDefaultAdjustment( SVX_ADJUST_LEFT )
+ ,m_eDefaultAdjustment( SvxAdjust::Right )
+ ,m_eOppositeDefaultAdjustment( SvxAdjust::Left )
{
switch ( getAttributeId() )
{
- case SID_ATTR_PARA_LEFT_TO_RIGHT: m_eParagraphDirection = FRMDIR_HORI_LEFT_TOP; m_eDefaultAdjustment = SVX_ADJUST_LEFT; break;
- case SID_ATTR_PARA_RIGHT_TO_LEFT: m_eParagraphDirection = FRMDIR_HORI_RIGHT_TOP; m_eDefaultAdjustment = SVX_ADJUST_RIGHT; break;
+ case SID_ATTR_PARA_LEFT_TO_RIGHT: m_eParagraphDirection = FRMDIR_HORI_LEFT_TOP; m_eDefaultAdjustment = SvxAdjust::Left; break;
+ case SID_ATTR_PARA_RIGHT_TO_LEFT: m_eParagraphDirection = FRMDIR_HORI_RIGHT_TOP; m_eDefaultAdjustment = SvxAdjust::Right; break;
default:
OSL_FAIL( "ParagraphDirectionHandler::ParagraphDirectionHandler: invalid attribute id!" );
}
- if ( SVX_ADJUST_RIGHT == m_eDefaultAdjustment )
- m_eOppositeDefaultAdjustment = SVX_ADJUST_LEFT;
+ if ( SvxAdjust::Right == m_eDefaultAdjustment )
+ m_eOppositeDefaultAdjustment = SvxAdjust::Left;
else
- m_eOppositeDefaultAdjustment = SVX_ADJUST_RIGHT;
+ m_eOppositeDefaultAdjustment = SvxAdjust::Right;
}
@@ -408,7 +408,7 @@ namespace frm
// if the current adjustment of the was the default adjustment for the *previous* text direction,
// then we toggle the adjustment, too
- SvxAdjust eCurrentAdjustment = SVX_ADJUST_LEFT;
+ SvxAdjust eCurrentAdjustment = SvxAdjust::Left;
const SfxPoolItem* pCurrentAdjustment = nullptr;
if ( SfxItemState::SET == _rCurrentAttribs.GetItemState( EE_PARA_JUST, true, &pCurrentAdjustment ) )
eCurrentAdjustment = static_cast< const SvxAdjustItem* >( pCurrentAdjustment )->GetAdjust();
diff --git a/include/editeng/adjustitem.hxx b/include/editeng/adjustitem.hxx
index 04a04ff36ee3..8c71878cae65 100644
--- a/include/editeng/adjustitem.hxx
+++ b/include/editeng/adjustitem.hxx
@@ -49,7 +49,7 @@ class EDITENG_DLLPUBLIC SvxAdjustItem : public SfxEnumItemInterface
public:
static SfxPoolItem* CreateDefault();
- SvxAdjustItem( const SvxAdjust eAdjst /*= SVX_ADJUST_LEFT*/,
+ SvxAdjustItem( const SvxAdjust eAdjst /*= SvxAdjust::Left*/,
const sal_uInt16 nId );
// "pure virtual Methods" from SfxPoolItem
@@ -73,53 +73,53 @@ public:
void SetOneWord( const SvxAdjust eType )
{
- bOneBlock = eType == SVX_ADJUST_BLOCK;
+ bOneBlock = eType == SvxAdjust::Block;
}
void SetLastBlock( const SvxAdjust eType )
{
- bLastBlock = eType == SVX_ADJUST_BLOCK;
- bLastCenter = eType == SVX_ADJUST_CENTER;
+ bLastBlock = eType == SvxAdjust::Block;
+ bLastCenter = eType == SvxAdjust::Center;
}
void SetAdjust( const SvxAdjust eType )
{
- bLeft = eType == SVX_ADJUST_LEFT;
- bRight = eType == SVX_ADJUST_RIGHT;
- bCenter = eType == SVX_ADJUST_CENTER;
- bBlock = eType == SVX_ADJUST_BLOCK;
+ bLeft = eType == SvxAdjust::Left;
+ bRight = eType == SvxAdjust::Right;
+ bCenter = eType == SvxAdjust::Center;
+ bBlock = eType == SvxAdjust::Block;
}
SvxAdjust GetLastBlock() const
{
- SvxAdjust eRet = SVX_ADJUST_LEFT;
+ SvxAdjust eRet = SvxAdjust::Left;
if ( bLastBlock )
- eRet = SVX_ADJUST_BLOCK;
+ eRet = SvxAdjust::Block;
else if( bLastCenter )
- eRet = SVX_ADJUST_CENTER;
+ eRet = SvxAdjust::Center;
return eRet;
}
SvxAdjust GetOneWord() const
{
- SvxAdjust eRet = SVX_ADJUST_LEFT;
+ SvxAdjust eRet = SvxAdjust::Left;
if ( bBlock && bOneBlock )
- eRet = SVX_ADJUST_BLOCK;
+ eRet = SvxAdjust::Block;
return eRet;
}
SvxAdjust GetAdjust() const
{
- SvxAdjust eRet = SVX_ADJUST_LEFT;
+ SvxAdjust eRet = SvxAdjust::Left;
if ( bRight )
- eRet = SVX_ADJUST_RIGHT;
+ eRet = SvxAdjust::Right;
else if ( bCenter )
- eRet = SVX_ADJUST_CENTER;
+ eRet = SvxAdjust::Center;
else if ( bBlock )
- eRet = SVX_ADJUST_BLOCK;
+ eRet = SvxAdjust::Block;
return eRet;
}
};
diff --git a/include/editeng/svxenum.hxx b/include/editeng/svxenum.hxx
index 670c360bc9de..12b1f4ba5901 100644
--- a/include/editeng/svxenum.hxx
+++ b/include/editeng/svxenum.hxx
@@ -73,14 +73,15 @@ enum class SvxInterLineSpaceRule
Fix
};
-enum SvxAdjust
+enum class SvxAdjust
{
- SVX_ADJUST_LEFT,
- SVX_ADJUST_RIGHT,
- SVX_ADJUST_BLOCK,
- SVX_ADJUST_CENTER,
- SVX_ADJUST_BLOCKLINE,
- SVX_ADJUST_END
+ Left,
+ Right,
+ Block,
+ Center,
+ BlockLine,
+ End,
+ LAST = End
};
enum class SvxBreak
diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx
index 992bd8330773..52285b1924e1 100644
--- a/include/svx/nbdtmg.hxx
+++ b/include/svx/nbdtmg.hxx
@@ -63,7 +63,7 @@ class SVX_DLLPUBLIC NumSettings_Impl
, nParentNumbering(0)
, eLabelFollowedBy(SvxNumberFormat::NOTHING)
, nTabValue (0)
- , eNumAlign(SVX_ADJUST_LEFT)
+ , eNumAlign(SvxAdjust::Left)
, nNumAlignAt(0)
, nNumIndentAt(0)
, pBrushItem(nullptr)
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 8693298db752..b05a85a53348 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -639,7 +639,7 @@ void OReportSection::createDefault(const OUString& _sType,SdrObject* _pObj)
}
if ( !bAttributesAppliedFromGallery )
{
- _pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER ,ITEMID_ADJUST) );
+ _pObj->SetMergedItem( SvxAdjustItem( SvxAdjust::Center ,ITEMID_ADJUST) );
_pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
_pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
_pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 133b9809eb33..40ac77231f62 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -912,24 +912,24 @@ void ScPatternAttr::GetFromEditItemSet( SfxItemSet& rDestSet, const SfxItemSet&
SvxCellHorJustify eVal;
switch ( static_cast<const SvxAdjustItem*>(pItem)->GetAdjust() )
{
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
// EditEngine Default is always set in the GetAttribs() ItemSet !
// whether left or right, is decided in text / number
eVal = SVX_HOR_JUSTIFY_STANDARD;
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
eVal = SVX_HOR_JUSTIFY_RIGHT;
break;
- case SVX_ADJUST_BLOCK:
+ case SvxAdjust::Block:
eVal = SVX_HOR_JUSTIFY_BLOCK;
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
eVal = SVX_HOR_JUSTIFY_CENTER;
break;
- case SVX_ADJUST_BLOCKLINE:
+ case SvxAdjust::BlockLine:
eVal = SVX_HOR_JUSTIFY_BLOCK;
break;
- case SVX_ADJUST_END:
+ case SvxAdjust::End:
eVal = SVX_HOR_JUSTIFY_RIGHT;
break;
default:
@@ -959,10 +959,10 @@ void ScPatternAttr::FillEditParaItems( SfxItemSet* pEditSet ) const
SvxAdjust eSvxAdjust;
switch (eHorJust)
{
- case SVX_HOR_JUSTIFY_RIGHT: eSvxAdjust = SVX_ADJUST_RIGHT; break;
- case SVX_HOR_JUSTIFY_CENTER: eSvxAdjust = SVX_ADJUST_CENTER; break;
- case SVX_HOR_JUSTIFY_BLOCK: eSvxAdjust = SVX_ADJUST_BLOCK; break;
- default: eSvxAdjust = SVX_ADJUST_LEFT; break;
+ case SVX_HOR_JUSTIFY_RIGHT: eSvxAdjust = SvxAdjust::Right; break;
+ case SVX_HOR_JUSTIFY_CENTER: eSvxAdjust = SvxAdjust::Center; break;
+ case SVX_HOR_JUSTIFY_BLOCK: eSvxAdjust = SvxAdjust::Block; break;
+ default: eSvxAdjust = SvxAdjust::Left; break;
}
pEditSet->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
}
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 6d48398f8c7c..935041eafa18 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -188,7 +188,7 @@ void ScAfVersions::Write(SvStream& rStream, sal_uInt16 fileVersion)
rStream.WriteUInt16( SvxLineItem(SID_FRAME_LINESTYLE).GetVersion(fileVersion) );
rStream.WriteUInt16( SvxBrushItem(ATTR_BACKGROUND).GetVersion(fileVersion) );
- rStream.WriteUInt16( SvxAdjustItem(SVX_ADJUST_LEFT, 0).GetVersion(fileVersion) );
+ rStream.WriteUInt16( SvxAdjustItem(SvxAdjust::Left, 0).GetVersion(fileVersion) );
if (fileVersion >= SOFFICE_FILEFORMAT_50)
WriteAutoFormatSwBlob( rStream, swVersions );
@@ -229,7 +229,7 @@ ScAutoFormatDataField::ScAutoFormatDataField() :
aTLBR( ATTR_BORDER_TLBR ),
aBLTR( ATTR_BORDER_BLTR ),
aBackground( ATTR_BACKGROUND ),
- aAdjust( SVX_ADJUST_LEFT, 0 ),
+ aAdjust( SvxAdjust::Left, 0 ),
aHorJustify( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY ),
aVerJustify( SVX_VER_JUSTIFY_STANDARD, ATTR_VER_JUSTIFY ),
aMargin( ATTR_MARGIN ),
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index b70b3b913ce5..227cdead15ef 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1464,7 +1464,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
(with no content) while exporting to XLS, which can cause a
corrupted exported document. */
- SvxAdjust eHorAlign = SVX_ADJUST_LEFT;
+ SvxAdjust eHorAlign = SvxAdjust::Left;
SdrTextVertAdjust eVerAlign = SDRTEXTVERTADJUST_TOP;
// orientation (this is only a fake, drawing does not support real text orientation)
@@ -1478,10 +1478,10 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
eWriteMode = csst::WritingMode_LR_TB;
switch( maTextData.maData.GetHorAlign() )
{
- case EXC_OBJ_HOR_LEFT: eHorAlign = SVX_ADJUST_LEFT; break;
- case EXC_OBJ_HOR_CENTER: eHorAlign = SVX_ADJUST_CENTER; break;
- case EXC_OBJ_HOR_RIGHT: eHorAlign = SVX_ADJUST_RIGHT; break;
- case EXC_OBJ_HOR_JUSTIFY: eHorAlign = SVX_ADJUST_BLOCK; break;
+ case EXC_OBJ_HOR_LEFT: eHorAlign = SvxAdjust::Left; break;
+ case EXC_OBJ_HOR_CENTER: eHorAlign = SvxAdjust::Center; break;
+ case EXC_OBJ_HOR_RIGHT: eHorAlign = SvxAdjust::Right; break;
+ case EXC_OBJ_HOR_JUSTIFY: eHorAlign = SvxAdjust::Block; break;
}
switch( maTextData.maData.GetVerAlign() )
{
@@ -1520,7 +1520,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
case mso_anchorMiddleCentered :
case mso_anchorBottomCentered :
{
- eHorAlign = SVX_ADJUST_CENTER;
+ eHorAlign = SvxAdjust::Center;
}
break;
@@ -1528,10 +1528,10 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
{
switch( maTextData.maData.GetVerAlign() )
{
- case EXC_OBJ_VER_TOP: eHorAlign = SVX_ADJUST_RIGHT; break;
- case EXC_OBJ_VER_CENTER: eHorAlign = SVX_ADJUST_CENTER; break;
- case EXC_OBJ_VER_BOTTOM: eHorAlign = SVX_ADJUST_LEFT; break;
- case EXC_OBJ_VER_JUSTIFY: eHorAlign = SVX_ADJUST_BLOCK; break;
+ case EXC_OBJ_VER_TOP: eHorAlign = SvxAdjust::Right; break;
+ case EXC_OBJ_VER_CENTER: eHorAlign = SvxAdjust::Center; break;
+ case EXC_OBJ_VER_BOTTOM: eHorAlign = SvxAdjust::Left; break;
+ case EXC_OBJ_VER_JUSTIFY: eHorAlign = SvxAdjust::Block; break;
}
}
}
@@ -1560,7 +1560,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
case mso_anchorMiddleCentered :
case mso_anchorBottomCentered :
{
- eHorAlign = SVX_ADJUST_CENTER;
+ eHorAlign = SvxAdjust::Center;
}
break;
@@ -1568,10 +1568,10 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
{
switch( maTextData.maData.GetVerAlign() )
{
- case EXC_OBJ_VER_TOP: eHorAlign = SVX_ADJUST_LEFT; break;
- case EXC_OBJ_VER_CENTER: eHorAlign = SVX_ADJUST_CENTER; break;
- case EXC_OBJ_VER_BOTTOM: eHorAlign = SVX_ADJUST_RIGHT; break;
- case EXC_OBJ_VER_JUSTIFY: eHorAlign = SVX_ADJUST_BLOCK; break;
+ case EXC_OBJ_VER_TOP: eHorAlign = SvxAdjust::Left; break;
+ case EXC_OBJ_VER_CENTER: eHorAlign = SvxAdjust::Center; break;
+ case EXC_OBJ_VER_BOTTOM: eHorAlign = SvxAdjust::Right; break;
+ case EXC_OBJ_VER_JUSTIFY: eHorAlign = SvxAdjust::Block; break;
}
}
}
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 4b0ad2bc2fd7..15fce02a13c0 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -165,7 +165,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
// EditView.GetAttribs always returns complete Set filled with
// defaults
const SfxPoolItem& rItem = aSet.Get( EE_PARA_JUST );
- if ( static_cast<const SvxAdjustItem&>(rItem).GetAdjust() == SVX_ADJUST_LEFT )
+ if ( static_cast<const SvxAdjustItem&>(rItem).GetAdjust() == SvxAdjust::Left )
aSet.ClearItem( EE_PARA_JUST );
// Test whether simple String without mixed attributes
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 0af246550f11..6a7ca5c2cc4a 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -738,10 +738,10 @@ static sal_uInt8 lcl_GetHorAlignFromItemSet( const SfxItemSet& rItemSet )
switch( static_cast< const SvxAdjustItem& >( rItemSet.Get( EE_PARA_JUST ) ).GetAdjust() )
{
- case SVX_ADJUST_LEFT: nHorAlign = EXC_OBJ_HOR_LEFT; break;
- case SVX_ADJUST_CENTER: nHorAlign = EXC_OBJ_HOR_CENTER; break;
- case SVX_ADJUST_RIGHT: nHorAlign = EXC_OBJ_HOR_RIGHT; break;
- case SVX_ADJUST_BLOCK: nHorAlign = EXC_OBJ_HOR_JUSTIFY; break;
+ case SvxAdjust::Left: nHorAlign = EXC_OBJ_HOR_LEFT; break;
+ case SvxAdjust::Center: nHorAlign = EXC_OBJ_HOR_CENTER; break;
+ case SvxAdjust::Right: nHorAlign = EXC_OBJ_HOR_RIGHT; break;
+ case SvxAdjust::Block: nHorAlign = EXC_OBJ_HOR_JUSTIFY; break;
default:;
}
return nHorAlign;
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
index 85bc9c31da63..aa7015cbbc36 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
@@ -206,9 +206,9 @@ sal_Int32 SAL_CALL ScAccessiblePageHeader::getAccessibleChildCount()
nPageWhichId = mpViewShell->GetLocationData().IsFooterLeft() ? ATTR_PAGE_FOOTERLEFT : ATTR_PAGE_FOOTERRIGHT;
const ScPageHFItem& rPageItem = static_cast<const ScPageHFItem&>(pStyle->GetItemSet().Get(nPageWhichId));
- AddChild(rPageItem.GetLeftArea(), 0, SVX_ADJUST_LEFT);
- AddChild(rPageItem.GetCenterArea(), 1, SVX_ADJUST_CENTER);
- AddChild(rPageItem.GetRightArea(), 2, SVX_ADJUST_RIGHT);
+ AddChild(rPageItem.GetLeftArea(), 0, SvxAdjust::Left);
+ AddChild(rPageItem.GetCenterArea(), 1, SvxAdjust::Center);
+ AddChild(rPageItem.GetRightArea(), 2, SvxAdjust::Right);
}
}
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index 7931dc50bcf8..26715505cf37 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -206,13 +206,13 @@ OUString SAL_CALL ScAccessiblePageHeaderArea::createAccessibleDescription()
OUString sDesc;
switch (meAdjust)
{
- case SVX_ADJUST_LEFT :
+ case SvxAdjust::Left :
sDesc = OUString(ScResId(STR_ACC_LEFTAREA_DESCR));
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
sDesc = OUString(ScResId(STR_ACC_RIGHTAREA_DESCR));
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
sDesc = OUString(ScResId(STR_ACC_CENTERAREA_DESCR));
break;
default:
@@ -227,13 +227,13 @@ OUString SAL_CALL ScAccessiblePageHeaderArea::createAccessibleName()
OUString sName;
switch (meAdjust)
{
- case SVX_ADJUST_LEFT :
+ case SvxAdjust::Left :
sName = OUString(ScResId(STR_ACC_LEFTAREA_NAME));
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
sName = OUString(ScResId(STR_ACC_RIGHTAREA_NAME));
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
sName = OUString(ScResId(STR_ACC_CENTERAREA_NAME));
break;
default:
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 11346e1c5d2c..6f4fb2d85d97 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -779,7 +779,7 @@ SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder()
// #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
if ( eHorJust == SVX_HOR_JUSTIFY_STANDARD && rDoc.HasValueData( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab() ) )
{
- pEditEngine->SetDefaultItem( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ pEditEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
}
Size aTextSize;
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 5cb601796539..751fe84f11f3 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1953,20 +1953,20 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
ScDocument& rDoc = pActiveViewSh->GetViewData().GetDocShell()->GetDocument();
bNumber = ( rDoc.GetCellType( aCursorPos ) == CELLTYPE_VALUE );
}
- eSvxAdjust = bNumber ? SVX_ADJUST_RIGHT : SVX_ADJUST_LEFT;
+ eSvxAdjust = bNumber ? SvxAdjust::Right : SvxAdjust::Left;
}
break;
case SVX_HOR_JUSTIFY_BLOCK:
- eSvxAdjust = SVX_ADJUST_BLOCK;
+ eSvxAdjust = SvxAdjust::Block;
break;
case SVX_HOR_JUSTIFY_CENTER:
- eSvxAdjust = SVX_ADJUST_CENTER;
+ eSvxAdjust = SvxAdjust::Center;
break;
case SVX_HOR_JUSTIFY_RIGHT:
- eSvxAdjust = SVX_ADJUST_RIGHT;
+ eSvxAdjust = SvxAdjust::Right;
break;
default: // SVX_HOR_JUSTIFY_LEFT
- eSvxAdjust = SVX_ADJUST_LEFT;
+ eSvxAdjust = SvxAdjust::Left;
break;
}
@@ -1976,7 +1976,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
if ( bAsianVertical )
{
// Always edit at top of cell -> LEFT when editing vertically
- eSvxAdjust = SVX_ADJUST_LEFT;
+ eSvxAdjust = SvxAdjust::Left;
}
pEditDefaults->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
@@ -2329,7 +2329,7 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, bool bSetModified )
{
ScViewData& rViewData = pActiveViewSh->GetViewData();
- bool bNeedGrow = ( rViewData.GetEditAdjust() != SVX_ADJUST_LEFT ); // Always right-aligned
+ bool bNeedGrow = ( rViewData.GetEditAdjust() != SvxAdjust::Left ); // Always right-aligned
if (!bNeedGrow)
{
// Cursor before the end?
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 3d503b4c30db..b320ba7f9f8c 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1135,7 +1135,7 @@ static void lcl_ExtendEditFontAttribs( SfxItemSet& rSet )
static void lcl_ModifyRTLDefaults( SfxItemSet& rSet )
{
- rSet.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ rSet.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
// always using rtl writing direction would break formulas
//rSet.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 7d35de73891d..5e08e624f769 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -674,25 +674,25 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
case SID_ALIGNLEFT:
case SID_ALIGN_ANY_LEFT:
case SID_ATTR_PARA_ADJUST_LEFT:
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
break;
case SID_ALIGNCENTERHOR:
case SID_ALIGN_ANY_HCENTER:
case SID_ATTR_PARA_ADJUST_CENTER:
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
break;
case SID_ALIGNRIGHT:
case SID_ALIGN_ANY_RIGHT:
case SID_ATTR_PARA_ADJUST_RIGHT:
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
break;
case SID_ALIGNBLOCK:
case SID_ALIGN_ANY_JUSTIFIED:
case SID_ATTR_PARA_ADJUST_BLOCK:
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Block, EE_PARA_JUST ) );
break;
case SID_ATTR_PARA_LINESPACE_10:
@@ -1007,25 +1007,25 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
SvxAdjust eAdj = static_cast<const SvxAdjustItem&>(aAttrSet.Get(EE_PARA_JUST)).GetAdjust();
switch( eAdj )
{
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
{
rDestSet.Put( SfxBoolItem( SID_ALIGNLEFT, true ) );
rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, true ) );
}
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
{
rDestSet.Put( SfxBoolItem( SID_ALIGNCENTERHOR, true ) );
rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, true ) );
}
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
{
rDestSet.Put( SfxBoolItem( SID_ALIGNRIGHT, true ) );
rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, true ) );
}
break;
- case SVX_ADJUST_BLOCK:
+ case SvxAdjust::Block:
{
rDestSet.Put( SfxBoolItem( SID_ALIGNBLOCK, true ) );
rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, true ) );
@@ -1037,10 +1037,10 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet )
}
}
// pseudo slots for Format menu
- rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_LEFT, eAdj == SVX_ADJUST_LEFT ) );
- rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_HCENTER, eAdj == SVX_ADJUST_CENTER ) );
- rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_RIGHT, eAdj == SVX_ADJUST_RIGHT ) );
- rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_JUSTIFIED, eAdj == SVX_ADJUST_BLOCK ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_LEFT, eAdj == SvxAdjust::Left ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_HCENTER, eAdj == SvxAdjust::Center ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_RIGHT, eAdj == SvxAdjust::Right ) );
+ rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_JUSTIFIED, eAdj == SvxAdjust::Block ) );
SvxLRSpaceItem aLR = static_cast<const SvxLRSpaceItem&>(aAttrSet.Get( EE_PARA_LRSPACE ));
aLR.SetWhich(SID_ATTR_PARA_LRSPACE);
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index a7eb77aea3e7..9cf130add9dd 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -171,7 +171,7 @@ void ScDrawTextObjectBar::ExecuteExtra( SfxRequest &rReq )
bLeft ? FRMDIR_HORI_LEFT_TOP : FRMDIR_HORI_RIGHT_TOP,
EE_PARA_WRITINGDIR ) );
aAttr.Put( SvxAdjustItem(
- bLeft ? SVX_ADJUST_LEFT : SVX_ADJUST_RIGHT,
+ bLeft ? SvxAdjust::Left : SvxAdjust::Right,
EE_PARA_JUST ) );
pView->SetAttributes( aAttr );
pViewData->GetScDrawView()->InvalidateDrawTextAttrs();
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index eb484b99cc23..299236908121 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -235,7 +235,7 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj )
}
if ( !bAttributesAppliedFromGallery )
{
- pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, 0 ) );
+ pObj->SetMergedItem( SvxAdjustItem( SvxAdjust::Center, 0 ) );
pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 3585996edfba..6232b14f3f79 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -167,7 +167,7 @@ void ScEditWindow::SetFont( const ScPatternAttr& rPattern )
pNewItem.reset(rPattern.GetItem(ATTR_CTL_FONT_HEIGHT).CloneSetWhich(EE_CHAR_FONTHEIGHT_CTL));
pSet->Put( *pNewItem );
if (mbRTL)
- pSet->Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ pSet->Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
pEdEngine->SetDefaults( pSet );
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 54ad1b0b9a1c..8debb68bc758 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4978,22 +4978,22 @@ SvxAdjust toSvxAdjust( const ScPatternAttr& rPat )
static_cast<SvxCellHorJustify>(
static_cast<const SvxHorJustifyItem&>(rPat.GetItem(ATTR_HOR_JUSTIFY)).GetValue());
- SvxAdjust eSvxAdjust = SVX_ADJUST_LEFT;
+ SvxAdjust eSvxAdjust = SvxAdjust::Left;
switch (eHorJust)
{
case SVX_HOR_JUSTIFY_LEFT:
case SVX_HOR_JUSTIFY_REPEAT: // not implemented
case SVX_HOR_JUSTIFY_STANDARD: // always Text if an EditCell type
- eSvxAdjust = SVX_ADJUST_LEFT;
+ eSvxAdjust = SvxAdjust::Left;
break;
case SVX_HOR_JUSTIFY_RIGHT:
- eSvxAdjust = SVX_ADJUST_RIGHT;
+ eSvxAdjust = SvxAdjust::Right;
break;
case SVX_HOR_JUSTIFY_CENTER:
- eSvxAdjust = SVX_ADJUST_CENTER;
+ eSvxAdjust = SvxAdjust::Center;
break;
case SVX_HOR_JUSTIFY_BLOCK:
- eSvxAdjust = SVX_ADJUST_BLOCK;
+ eSvxAdjust = SvxAdjust::Block;
break;
}
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 0e5569708f4d..b689f3ccc6d5 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2587,23 +2587,23 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
{
if (isVerticallyOriented() || mbAsianVertical)
{
- SvxAdjust eSvxAdjust = SVX_ADJUST_LEFT;
+ SvxAdjust eSvxAdjust = SvxAdjust::Left;
switch (meVerJust)
{
case SVX_VER_JUSTIFY_TOP:
eSvxAdjust = (meOrient == SVX_ORIENTATION_TOPBOTTOM || mbAsianVertical) ?
- SVX_ADJUST_LEFT : SVX_ADJUST_RIGHT;
+ SvxAdjust::Left : SvxAdjust::Right;
break;
case SVX_VER_JUSTIFY_CENTER:
- eSvxAdjust = SVX_ADJUST_CENTER;
+ eSvxAdjust = SvxAdjust::Center;
break;
case SVX_VER_JUSTIFY_BOTTOM:
case SVX_VER_JUSTIFY_STANDARD:
eSvxAdjust = (meOrient == SVX_ORIENTATION_TOPBOTTOM || mbAsianVertical) ?
- SVX_ADJUST_RIGHT : SVX_ADJUST_LEFT;
+ SvxAdjust::Right : SvxAdjust::Left;
break;
case SVX_VER_JUSTIFY_BLOCK:
- eSvxAdjust = SVX_ADJUST_BLOCK;
+ eSvxAdjust = SvxAdjust::Block;
break;
}
@@ -2619,9 +2619,9 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
// (for values with number formats with mixed script types)
// -> always set adjustment
- SvxAdjust eSvxAdjust = SVX_ADJUST_LEFT;
+ SvxAdjust eSvxAdjust = SvxAdjust::Left;
if (meOrient == SVX_ORIENTATION_STACKED)
- eSvxAdjust = SVX_ADJUST_CENTER;
+ eSvxAdjust = SvxAdjust::Center;
else if (mbBreak)
{
if (meOrient == SVX_ORIENTATION_STANDARD)
@@ -2632,33 +2632,33 @@ void ScOutputData::DrawEditParam::setAlignmentToEngine()
SAL_WARN("sc.ui","meHorJustResult does not match getAlignmentFromContext()");
SAL_FALLTHROUGH;
case SVX_HOR_JUSTIFY_LEFT:
- eSvxAdjust = SVX_ADJUST_LEFT;
+ eSvxAdjust = SvxAdjust::Left;
break;
case SVX_HOR_JUSTIFY_CENTER:
- eSvxAdjust = SVX_ADJUST_CENTER;
+ eSvxAdjust = SvxAdjust::Center;
break;
case SVX_HOR_JUSTIFY_RIGHT:
- eSvxAdjust = SVX_ADJUST_RIGHT;
+ eSvxAdjust = SvxAdjust::Right;
break;
case SVX_HOR_JUSTIFY_BLOCK:
- eSvxAdjust = SVX_ADJUST_BLOCK;
+ eSvxAdjust = SvxAdjust::Block;
break;
}
else
switch (meVerJust)
{
case SVX_VER_JUSTIFY_TOP:
- eSvxAdjust = SVX_ADJUST_RIGHT;
+ eSvxAdjust = SvxAdjust::Right;
break;
case SVX_VER_JUSTIFY_CENTER:
- eSvxAdjust = SVX_ADJUST_CENTER;
+ eSvxAdjust = SvxAdjust::Center;
break;
case SVX_VER_JUSTIFY_BOTTOM:
case SVX_VER_JUSTIFY_STANDARD:
- eSvxAdjust = SVX_ADJUST_LEFT;
+ eSvxAdjust = SvxAdjust::Left;
break;
case SVX_VER_JUSTIFY_BLOCK:
- eSvxAdjust = SVX_ADJUST_BLOCK;
+ eSvxAdjust = SvxAdjust::Block;
break;
}
}
@@ -2696,7 +2696,7 @@ bool ScOutputData::DrawEditParam::adjustHorAlignment(ScFieldEditEngine* pEngine)
if (meHorJustResult == SVX_HOR_JUSTIFY_RIGHT || meHorJustResult == SVX_HOR_JUSTIFY_CENTER)
{
SvxAdjust eEditAdjust = (meHorJustResult == SVX_HOR_JUSTIFY_CENTER) ?
- SVX_ADJUST_CENTER : SVX_ADJUST_RIGHT;
+ SvxAdjust::Center : SvxAdjust::Right;
pEngine->SetUpdateMode(false);
pEngine->SetDefaultItem( SvxAdjustItem(eEditAdjust, EE_PARA_JUST) );
@@ -4791,9 +4791,9 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
pPattern->FillEditItemSet( pSet, pCondSet );
// adjustment for EditEngine
- SvxAdjust eSvxAdjust = SVX_ADJUST_LEFT;
+ SvxAdjust eSvxAdjust = SvxAdjust::Left;
if (eOrient==SVX_ORIENTATION_STACKED)
- eSvxAdjust = SVX_ADJUST_CENTER;
+ eSvxAdjust = SvxAdjust::Center;
// adjustment for bBreak is omitted here
pSet->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
@@ -5160,7 +5160,7 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
SvxAdjust eSvxAdjust =
(eHorJust==SVX_HOR_JUSTIFY_RIGHT) ?
- SVX_ADJUST_RIGHT : SVX_ADJUST_CENTER;
+ SvxAdjust::Right : SvxAdjust::Center;
pEngine->SetDefaultItem(
SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index def4e2aa3c9c..569e0c059c0a 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -1801,7 +1801,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY,
const EditTextObject* pObject = pHFItem->GetLeftArea();
if (pObject)
{
- pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+ pEditDefaults->Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
Point aDraw = aStart;
long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
@@ -1815,7 +1815,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY,
pObject = pHFItem->GetCenterArea();
if (pObject)
{
- pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ pEditDefaults->Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
Point aDraw = aStart;
long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
@@ -1829,7 +1829,7 @@ void ScPrintFunc::PrintHF( long nPageNo, bool bHeader, long nStartY,
pObject = pHFItem->GetRightArea();
if (pObject)
{
- pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ pEditDefaults->Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
pEditEngine->SetTextNewDefaults( *pObject, *pEditDefaults, false );
Point aDraw = aStart;
long nDif = aPaperSize.Height() - (long) pEditEngine->GetTextHeight();
@@ -1854,7 +1854,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, bool bDoPrint, ScPreviewLocationData
pDev->SetMapMode(aTwipMode);
MakeEditEngine();
- pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+ pEditDefaults->Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
pEditEngine->SetDefaults( *pEditDefaults );
vcl::Font aMarkFont;
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 93c9a4ad5643..f2253f4d1709 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -349,7 +349,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
nPasteFlags ( ScPasteFlags::NONE ),
eEditActivePart( SC_SPLIT_BOTTOMLEFT ),
nFillMode ( ScFillMode::NONE ),
- eEditAdjust ( SVX_ADJUST_LEFT ),
+ eEditAdjust ( SvxAdjust::Left ),
bActive ( true ), // how to initialize?
bIsRefMode ( false ),
bDelMarkValid( false ),
@@ -1052,7 +1052,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
// when right-aligned, leave space for the cursor
// in vertical mode, editing is always right-aligned
- if ( GetEditAdjust() == SVX_ADJUST_RIGHT || bAsianVertical )
+ if ( GetEditAdjust() == SvxAdjust::Right || bAsianVertical )
aPixRect.Right() += 1;
Rectangle aOutputArea = pWin->PixelToLogic( aPixRect, GetLogicMode() );
@@ -1128,12 +1128,12 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
Size aPaper = pNewEngine->GetPaperSize();
Rectangle aVis = pEditView[eWhich]->GetVisArea();
long nDiff = aVis.Right() - aVis.Left();
- if ( GetEditAdjust() == SVX_ADJUST_RIGHT )
+ if ( GetEditAdjust() == SvxAdjust::Right )
{
aVis.Right() = aPaper.Width() - 1;
bMoveArea = !bLayoutRTL;
}
- else if ( GetEditAdjust() == SVX_ADJUST_CENTER )
+ else if ( GetEditAdjust() == SvxAdjust::Center )
{
aVis.Right() = ( aPaper.Width() - 1 + nDiff ) / 2;
bMoveArea = true; // always
@@ -1347,7 +1347,7 @@ void ScViewData::EditGrowX()
{
// switch to center-aligned (undo?) and reset VisArea to center
- pEngine->SetDefaultItem( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ pEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
long nCenter = aSize.Width() / 2;
long nVisSize = aArea.GetWidth();
@@ -1358,7 +1358,7 @@ void ScViewData::EditGrowX()
{
// switch to right-aligned (undo?) and reset VisArea to the right
- pEngine->SetDefaultItem( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ pEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
aVis.Right() = aSize.Width() - 1;
aVis.Left() = aSize.Width() - aArea.GetWidth(); // with the new, increased area
@@ -1367,7 +1367,7 @@ void ScViewData::EditGrowX()
{
// switch to left-aligned (undo?) and reset VisArea to the left
- pEngine->SetDefaultItem( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+ pEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
long nMove = aVis.Left();
aVis.Left() = 0;
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 2a1620c28f21..87c6beb66ca0 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -73,6 +73,12 @@ private:
sd::DrawDocShellRef Load(const OUString& rURL, sal_Int32 nFormat);
};
+std::ostream& operator<<(std::ostream& s, SvxAdjust n)
+{
+ s << (int)n;
+ return s;
+}
+
sd::DrawDocShellRef SdMiscTest::Load(const OUString& rURL, sal_Int32 nFormat)
{
uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(::comphelper::getProcessComponentContext());
@@ -204,7 +210,7 @@ void SdMiscTest::testTdf99396TextEdit()
SfxItemSet aEditAttr(xDocSh->GetDoc()->GetPool());
pView->GetAttributes(aEditAttr);
SfxItemSet aNewAttr(*(aEditAttr.GetPool()), aEditAttr.GetRanges());
- aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_RIGHT, EE_PARA_JUST));
+ aNewAttr.Put(SvxAdjustItem(SvxAdjust::Right, EE_PARA_JUST));
aRequest.Done(aNewAttr);
const SfxItemSet* pArgs = aRequest.GetArgs();
pView->SetAttributes(*pArgs);
@@ -228,7 +234,7 @@ void SdMiscTest::testTdf99396TextEdit()
const EditTextObject& rEdit = pTableObject->getText(0)->GetOutlinerParaObject()->GetTextObject();
const SfxItemSet& rParaAttribs = rEdit.GetParaAttribs(0);
auto pAdjust = static_cast<const SvxAdjustItem*>(rParaAttribs.GetItem(EE_PARA_JUST));
- CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_RIGHT, pAdjust->GetAdjust());
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, pAdjust->GetAdjust());
}
// Now undo.
@@ -246,7 +252,7 @@ void SdMiscTest::testTdf99396TextEdit()
const EditTextObject& rEdit = pTableObject->getText(0)->GetOutlinerParaObject()->GetTextObject();
const SfxItemSet& rParaAttribs = rEdit.GetParaAttribs(0);
auto pAdjust = static_cast<const SvxAdjustItem*>(rParaAttribs.GetItem(EE_PARA_JUST));
- CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_CENTER, pAdjust->GetAdjust());
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Center, pAdjust->GetAdjust());
}
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 306f3394e4f2..3afd771c6292 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -340,7 +340,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(XLineStyleItem(drawing::LineStyle_NONE));
pISet->Put(XFillStyleItem(drawing::FillStyle_NONE));
- pISet->Put(SvxAdjustItem(SVX_ADJUST_BLOCK, EE_PARA_JUST ));
+ pISet->Put(SvxAdjustItem(SvxAdjust::Block, EE_PARA_JUST ));
// Text body, indented
aName = SD_RESSTR(STR_POOLSHEET_TEXTBODY_INDENT);
@@ -387,7 +387,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(SvxFontHeightItem(846, 100, EE_CHAR_FONTHEIGHT )); // 24 pt
- pISet->Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
+ pISet->Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST ));
// Title2
@@ -416,7 +416,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(SvxULSpaceItem(100, 100, EE_PARA_ULSPACE )); // Paragraph margin above/below: 1 mm
- pISet->Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
+ pISet->Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST ));
// Headline
@@ -1210,7 +1210,7 @@ void SdDrawDocument::SetTextDefaults() const
aNumberFormat.SetBulletRelSize(45);
aNumberFormat.SetBulletColor(Color(COL_AUTO));
aNumberFormat.SetStart(1);
- aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
+ aNumberFormat.SetNumAdjust(SvxAdjust::Left);
SvxNumRule aNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR | SvxNumRuleFlags::CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
@@ -1270,10 +1270,10 @@ void SdDrawDocument::SetDefaultWritingMode(css::text::WritingMode eMode )
SvxFrameDirectionItem aModeItem( nVal, EE_PARA_WRITINGDIR );
pItemPool->SetPoolDefaultItem( aModeItem );
- SvxAdjustItem aAdjust( SVX_ADJUST_LEFT, EE_PARA_JUST );
+ SvxAdjustItem aAdjust( SvxAdjust::Left, EE_PARA_JUST );
if( eMode == css::text::WritingMode_RL_TB )
- aAdjust.SetEnumValue( SVX_ADJUST_RIGHT );
+ aAdjust.SetAdjust( SvxAdjust::Right );
pItemPool->SetPoolDefaultItem( aAdjust );
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 70326eaae0f1..d74dccf36efd 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -478,22 +478,22 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
aTempAttr.Put( SvxFontHeightItem( 493, 100, EE_CHAR_FONTHEIGHT_CTL ) );
aTempAttr.Put( SvxFontHeightItem( 493, 100, EE_CHAR_FONTHEIGHT_CJK ) );
- SvxAdjust eH = SVX_ADJUST_LEFT;
+ SvxAdjust eH = SvxAdjust::Left;
if( (eObjKind == PRESOBJ_DATETIME) && (mePageKind != PageKind::Standard ) )
{
- eH = SVX_ADJUST_RIGHT;
+ eH = SvxAdjust::Right;
}
else if( (eObjKind == PRESOBJ_FOOTER) && (mePageKind == PageKind::Standard ) )
{
- eH = SVX_ADJUST_CENTER;
+ eH = SvxAdjust::Center;
}
else if( eObjKind == PRESOBJ_SLIDENUMBER )
{
- eH = SVX_ADJUST_RIGHT;
+ eH = SvxAdjust::Right;
}
- if( eH != SVX_ADJUST_LEFT )
+ if( eH != SvxAdjust::Left )
aTempAttr.Put(SvxAdjustItem(eH, EE_PARA_JUST ));
pSdrObj->SetMergedItemSet(aTempAttr);
@@ -537,7 +537,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
{
SfxItemSet aSet( static_cast<SdDrawDocument*>(pModel)->GetPool() );
aSet.Put( makeSdrTextContourFrameItem( true ) );
- aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ aSet.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
pSdrObj->SetMergedItemSet(aSet);
}
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 29afb37dc523..d16e2fb76106 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -364,7 +364,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rTitleSet.Put( SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF ) );
rTitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
rTitleSet.Put(SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ));
- rTitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
+ rTitleSet.Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST ));
rTitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
// #i16874# enable kerning by default but only for new documents
rTitleSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) );
@@ -410,7 +410,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rSubtitleSet.Put( SvxCharReliefItem(FontRelief::NONE, EE_CHAR_RELIEF ) );
rSubtitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
rSubtitleSet.Put(SvxBackgroundColorItem( Color(COL_AUTO), EE_CHAR_BKGCOLOR ));
- rSubtitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
+ rSubtitleSet.Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST ));
rSubtitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
// #i16874# enable kerning by default but only for new documents
rSubtitleSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) );
@@ -1097,7 +1097,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetBulletRelSize(45);
aNumberFormat.SetBulletColor(Color(COL_AUTO));
aNumberFormat.SetStart(1);
- aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
+ aNumberFormat.SetNumAdjust(SvxAdjust::Left);
SvxNumRule aNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR | SvxNumRuleFlags::CHAR_TEXT_DISTANCE, SVX_MAX_NUM, false);
@@ -1154,7 +1154,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
SvxNumberFormat aNumberFormat(SVX_NUM_CHAR_SPECIAL);
aNumberFormat.SetBulletColor(Color(COL_AUTO));
aNumberFormat.SetStart(1);
- aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
+ aNumberFormat.SetNumAdjust(SvxAdjust::Left);
SvxNumRule aNumRule( SvxNumRuleFlags::BULLET_REL_SIZE | SvxNumRuleFlags::BULLET_COLOR |
SvxNumRuleFlags::CHAR_TEXT_DISTANCE | SvxNumRuleFlags::SYMBOL_ALIGNMENT,
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index 95eaad97eeb6..51d73079020e 100644
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -224,7 +224,7 @@ void FuConstructCustomShape::SetAttributes( SdrObject* pObj )
}
if ( !bAttributesAppliedFromGallery )
{
- pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ pObj->SetMergedItem( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 4551bc712195..ea54683d072f 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -466,7 +466,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
else
rAttr.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_BLOCK ) );
- rAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ rAttr.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
rAttr.Put( makeSdrTextLeftDistItem( 100 ) );
rAttr.Put( makeSdrTextRightDistItem( 100 ) );
rAttr.Put( makeSdrTextUpperDistItem( 100 ) );
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index ef1926241799..17015f8b35ee 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -481,16 +481,16 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
SvxAdjust eAdj = static_cast<const SvxAdjustItem&>( aAttrSet.Get( EE_PARA_JUST ) ).GetAdjust();
switch( eAdj )
{
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, true ) );
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, true ) );
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, true ) );
break;
- case SVX_ADJUST_BLOCK:
+ case SvxAdjust::Block:
rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, true ) );
break;
default:
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 00d2434140f8..801664d60671 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -491,22 +491,22 @@ void TextObjectBar::Execute( SfxRequest &rReq )
case SID_ATTR_PARA_ADJUST_LEFT:
{
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
}
break;
case SID_ATTR_PARA_ADJUST_CENTER:
{
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
}
break;
case SID_ATTR_PARA_ADJUST_RIGHT:
{
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
}
break;
case SID_ATTR_PARA_ADJUST_BLOCK:
{
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Block, EE_PARA_JUST ) );
}
break;
case SID_ATTR_PARA_LINESPACE_10:
@@ -579,21 +579,21 @@ void TextObjectBar::Execute( SfxRequest &rReq )
{
bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
- sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ SvxAdjust nAdjust = SvxAdjust::Left;
if( SfxItemState::SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) )
- nAdjust = static_cast<const SvxAdjustItem*>(pPoolItem)->GetEnumValue();
+ nAdjust = static_cast<const SvxAdjustItem*>(pPoolItem)->GetAdjust();
if( bLeftToRight )
{
aNewAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ) );
- if( nAdjust == SVX_ADJUST_RIGHT )
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+ if( nAdjust == SvxAdjust::Right )
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
}
else
{
aNewAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
- if( nAdjust == SVX_ADJUST_LEFT )
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ if( nAdjust == SvxAdjust::Left )
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
}
rReq.Done( aNewAttr );
@@ -627,22 +627,22 @@ void TextObjectBar::Execute( SfxRequest &rReq )
{
case SID_ATTR_PARA_ADJUST_LEFT:
{
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
}
break;
case SID_ATTR_PARA_ADJUST_CENTER:
{
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ) );
}
break;
case SID_ATTR_PARA_ADJUST_RIGHT:
{
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
}
break;
case SID_ATTR_PARA_ADJUST_BLOCK:
{
- aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST ) );
+ aNewAttr.Put( SvxAdjustItem( SvxAdjust::Block, EE_PARA_JUST ) );
}
break;
}
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index ea73c9427ab7..99220ac085eb 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -685,7 +685,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
break;
case SID_ATTR_PARA_ADJUST_LEFT:
{
- SvxAdjustItem aItem( SVX_ADJUST_LEFT, EE_PARA_JUST );
+ SvxAdjustItem aItem( SvxAdjust::Left, EE_PARA_JUST );
SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
aEditAttr.Put( aItem );
@@ -696,7 +696,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
break;
case SID_ATTR_PARA_ADJUST_CENTER:
{
- SvxAdjustItem aItem( SVX_ADJUST_CENTER, EE_PARA_JUST );
+ SvxAdjustItem aItem( SvxAdjust::Center, EE_PARA_JUST );
SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
aEditAttr.Put( aItem );
@@ -707,7 +707,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
break;
case SID_ATTR_PARA_ADJUST_RIGHT:
{
- SvxAdjustItem aItem( SVX_ADJUST_RIGHT, EE_PARA_JUST );
+ SvxAdjustItem aItem( SvxAdjust::Right, EE_PARA_JUST );
SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
aEditAttr.Put( aItem );
@@ -718,7 +718,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
break;
case SID_ATTR_PARA_ADJUST_BLOCK:
{
- SvxAdjustItem aItem( SVX_ADJUST_BLOCK, EE_PARA_JUST );
+ SvxAdjustItem aItem( SvxAdjust::Block, EE_PARA_JUST );
SfxItemSet aEditAttr( GetPool(), EE_PARA_JUST, EE_PARA_JUST );
aEditAttr.Put( aItem );
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 0a7c7e0a6124..e07c835f5ec1 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -291,7 +291,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
SvxAdjust eAdj = aItem.GetAdjust();
- if ( eAdj == SVX_ADJUST_LEFT)
+ if ( eAdj == SvxAdjust::Left)
{
rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, true ) );
}
@@ -308,7 +308,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
SvxAdjust eAdj = aItem.GetAdjust();
- if ( eAdj == SVX_ADJUST_CENTER)
+ if ( eAdj == SvxAdjust::Center)
{
rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, true ) );
}
@@ -325,7 +325,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
SvxAdjust eAdj = aItem.GetAdjust();
- if ( eAdj == SVX_ADJUST_RIGHT)
+ if ( eAdj == SvxAdjust::Right)
{
rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, true ) );
}
@@ -342,7 +342,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
SvxAdjustItem aItem= static_cast<const SvxAdjustItem&>( aAttrs.Get( EE_PARA_JUST ) );
SvxAdjust eAdj = aItem.GetAdjust();
- if ( eAdj == SVX_ADJUST_BLOCK)
+ if ( eAdj == SvxAdjust::Block)
{
rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, true ) );
}
diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx
index ef7013c59505..4a9da503e533 100644
--- a/svx/source/dialog/paraprev.cxx
+++ b/svx/source/dialog/paraprev.cxx
@@ -29,8 +29,8 @@ SvxParaPrevWindow::SvxParaPrevWindow( vcl::Window* pParent, WinBits nBits) :
nFirstLineOfst ( 0 ),
nUpper ( 0 ),
nLower ( 0 ),
- eAdjust ( SVX_ADJUST_LEFT ),
- eLastLine ( SVX_ADJUST_LEFT ),
+ eAdjust ( SvxAdjust::Left ),
+ eLastLine ( SvxAdjust::Left ),
eLine ( SvxPrevLineSpace::N1 ),
nLineVal ( 0 )
@@ -156,31 +156,31 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& rRenderContext)
switch (eAdjust)
{
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
aPnt.X() += ( aSiz.Width() - nLW );
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
aPnt.X() += ( aSiz.Width() - nLW ) / 2;
break;
default: ; //prevent warning
}
- if (SVX_ADJUST_BLOCK == eAdjust)
+ if (SvxAdjust::Block == eAdjust)
{
if(5 == i)
{
switch( eLastLine )
{
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
aPnt.X() += ( aSiz.Width() - nLW );
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
aPnt.X() += ( aSiz.Width() - nLW ) / 2;
break;
- case SVX_ADJUST_BLOCK:
+ case SvxAdjust::Block:
nLW = aSiz.Width();
break;
default: ; //prevent warning
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index 884f9be39bca..cdb03d67bdd3 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -381,7 +381,7 @@ namespace sdr
}
else
{
- mpItemSet->Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST));
+ mpItemSet->Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST));
mpItemSet->Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_CENTER));
mpItemSet->Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_CENTER));
}
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index ce9d893971e6..926ae34dfc31 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1026,9 +1026,9 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
SvxAdjust eAdjust = static_cast<const SvxAdjustItem&>(GetObjectItemSet().Get(EE_PARA_JUST)).GetAdjust();
switch(eAdjust)
{
- case SVX_ADJUST_LEFT: eHAdj = SDRTEXTHORZADJUST_LEFT; break;
- case SVX_ADJUST_RIGHT: eHAdj = SDRTEXTHORZADJUST_RIGHT; break;
- case SVX_ADJUST_CENTER: eHAdj = SDRTEXTHORZADJUST_CENTER; break;
+ case SvxAdjust::Left: eHAdj = SDRTEXTHORZADJUST_LEFT; break;
+ case SvxAdjust::Right: eHAdj = SDRTEXTHORZADJUST_RIGHT; break;
+ case SvxAdjust::Center: eHAdj = SDRTEXTHORZADJUST_CENTER; break;
default: break;
}
}
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index a48caad2e67d..562bfd13d027 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -359,6 +359,12 @@ private:
SwDoc* createDoc(const char* pName = nullptr);
};
+std::ostream& operator<<(std::ostream& s, SvxAdjust n)
+{
+ s << (int)n;
+ return s;
+}
+
SwDoc* SwUiWriterTest::createDoc(const char* pName)
{
if (!pName)
@@ -1567,12 +1573,12 @@ void SwUiWriterTest::testTdf79236()
SvxAdjustItem AdjustItem = rAttrSet.GetAdjust();
SvxAdjust initialAdjust = AdjustItem.GetAdjust();
//By default the adjust is LEFT
- CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_LEFT, initialAdjust);
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, initialAdjust);
//Changing the adjust to RIGHT
- AdjustItem.SetAdjust(SVX_ADJUST_RIGHT);
+ AdjustItem.SetAdjust(SvxAdjust::Right);
//Checking whether the change is made or not
SvxAdjust modifiedAdjust = AdjustItem.GetAdjust();
- CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_RIGHT, modifiedAdjust);
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, modifiedAdjust);
//Modifying the itemset, putting *one* item
pNewSet->Put(AdjustItem);
//The count should increment by 1
@@ -1586,7 +1592,7 @@ void SwUiWriterTest::testTdf79236()
const SvxAdjustItem& rAdjustItem2 = rAttrSet2.GetAdjust();
SvxAdjust Adjust2 = rAdjustItem2.GetAdjust();
//The adjust should be RIGHT as per the modifications made
- CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_RIGHT, Adjust2);
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, Adjust2);
//Undo the changes
rUndoManager.Undo();
SwTextFormatColl* pTextFormat3 = pDoc->FindTextFormatCollByName("Text Body");
@@ -1594,7 +1600,7 @@ void SwUiWriterTest::testTdf79236()
const SvxAdjustItem& rAdjustItem3 = rAttrSet3.GetAdjust();
SvxAdjust Adjust3 = rAdjustItem3.GetAdjust();
//The adjust should be back to default, LEFT
- CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_LEFT, Adjust3);
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, Adjust3);
//Redo the changes
rUndoManager.Redo();
SwTextFormatColl* pTextFormat4 = pDoc->FindTextFormatCollByName("Text Body");
@@ -1602,7 +1608,7 @@ void SwUiWriterTest::testTdf79236()
const SvxAdjustItem& rAdjustItem4 = rAttrSet4.GetAdjust();
SvxAdjust Adjust4 = rAdjustItem4.GetAdjust();
//The adjust should be RIGHT as per the modifications made
- CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_RIGHT, Adjust4);
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Right, Adjust4);
//Undo the changes
rUndoManager.Undo();
SwTextFormatColl* pTextFormat5 = pDoc->FindTextFormatCollByName("Text Body");
@@ -1610,7 +1616,7 @@ void SwUiWriterTest::testTdf79236()
const SvxAdjustItem& rAdjustItem5 = rAttrSet5.GetAdjust();
SvxAdjust Adjust5 = rAdjustItem5.GetAdjust();
//The adjust should be back to default, LEFT
- CPPUNIT_ASSERT_EQUAL(SVX_ADJUST_LEFT, Adjust5);
+ CPPUNIT_ASSERT_EQUAL(SvxAdjust::Left, Adjust5);
}
void SwUiWriterTest::testTextSearch()
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 45500bfc5f16..59764a4c93c3 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -536,7 +536,7 @@ void InitCore()
aAttrTab[ RES_TXTATR_DUMMY3 - POOLATTR_BEGIN ] = new SfxBoolItem( RES_TXTATR_DUMMY3 );
aAttrTab[ RES_PARATR_LINESPACING- POOLATTR_BEGIN ] = new SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
- aAttrTab[ RES_PARATR_ADJUST- POOLATTR_BEGIN ] = new SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST );
+ aAttrTab[ RES_PARATR_ADJUST- POOLATTR_BEGIN ] = new SvxAdjustItem( SvxAdjust::Left, RES_PARATR_ADJUST );
aAttrTab[ RES_PARATR_SPLIT- POOLATTR_BEGIN ] = new SvxFormatSplitItem( true, RES_PARATR_SPLIT );
aAttrTab[ RES_PARATR_WIDOWS- POOLATTR_BEGIN ] = new SvxWidowsItem( 0, RES_PARATR_WIDOWS );
aAttrTab[ RES_PARATR_ORPHANS- POOLATTR_BEGIN ] = new SvxOrphansItem( 0, RES_PARATR_ORPHANS );
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index ea71014b361a..d756d994a6d4 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1922,8 +1922,8 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode )
const SvxAdjustItem& rAdj = static_cast<const SvxAdjustItem&>(pCNd->
GetAttr( RES_PARATR_ADJUST ));
- if( SVX_ADJUST_LEFT != rAdj.GetAdjust() )
- aSet.Put( SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ) );
+ if( SvxAdjust::Left != rAdj.GetAdjust() )
+ aSet.Put( SvxAdjustItem( SvxAdjust::Left, RES_PARATR_ADJUST ) );
GetDoc()->getIDocumentContentOperations().InsertItemSet( *m_pCurrentCursor, aSet );
}
@@ -1947,14 +1947,14 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode )
case FILL_MARGIN:
if( text::HoriOrientation::NONE != aFPos.eOrient )
{
- SvxAdjustItem aAdj( SVX_ADJUST_LEFT, RES_PARATR_ADJUST );
+ SvxAdjustItem aAdj( SvxAdjust::Left, RES_PARATR_ADJUST );
switch( aFPos.eOrient )
{
case text::HoriOrientation::CENTER:
- aAdj.SetAdjust( SVX_ADJUST_CENTER );
+ aAdj.SetAdjust( SvxAdjust::Center );
break;
case text::HoriOrientation::RIGHT:
- aAdj.SetAdjust( SVX_ADJUST_RIGHT );
+ aAdj.SetAdjust( SvxAdjust::Right );
break;
default:
break;
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index c5d8fa09388a..7da1a12a2553 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -358,7 +358,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
if (GetDefaultFrameDirection(nAppLanguage) ==
FRMDIR_HORI_RIGHT_TOP)
{
- SvxAdjustItem aAdjust(SVX_ADJUST_RIGHT, RES_PARATR_ADJUST );
+ SvxAdjustItem aAdjust(SvxAdjust::Right, RES_PARATR_ADJUST );
aSet.Put(aAdjust);
}
if (nAppLanguage == LANGUAGE_KOREAN)
@@ -592,7 +592,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
case RES_POOLCOLL_TABLE_HDLN:
{
SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD, RES_CHRATR_WEIGHT ) );
- aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ) );
+ aSet.Put( SvxAdjustItem( SvxAdjust::Center, RES_PARATR_ADJUST ) );
SwFormatLineNumber aLN;
aLN.SetCountLines( false );
aSet.Put( aLN );
@@ -977,7 +977,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD, RES_CHRATR_WEIGHT ) );
SetAllScriptItem( aSet, SvxFontHeightItem( PT_28, 100, RES_CHRATR_FONTSIZE ) );
- aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ) );
+ aSet.Put( SvxAdjustItem( SvxAdjust::Center, RES_PARATR_ADJUST ) );
pNewColl->SetNextTextFormatColl( *GetTextCollFromPool( RES_POOLCOLL_TEXT ));
}
@@ -989,7 +989,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
aSet.Put( aUL );
SetAllScriptItem( aSet, SvxFontHeightItem( PT_18, 100, RES_CHRATR_FONTSIZE ));
- aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ));
+ aSet.Put( SvxAdjustItem( SvxAdjust::Center, RES_PARATR_ADJUST ));
pNewColl->SetNextTextFormatColl( *GetTextCollFromPool( RES_POOLCOLL_TEXT ));
}
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 3cd3468ec796..3009976b54ca 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -1497,12 +1497,12 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
// Calculate the size and position of the additional cells.
switch( m_eTableAdjust )
{
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
nAbsLeftFill = nAbsLeftFill + nAbsDist;
m_nRelLeftFill = m_nRelLeftFill + nRelDist;
nParentInhAbsLeftSpace = nParentInhAbsSpace;
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
{
sal_uInt16 nAbsLeftDist = nAbsDist / 2;
nAbsLeftFill = nAbsLeftFill + nAbsLeftDist;
@@ -1515,7 +1515,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
nParentInhAbsLeftSpace;
}
break;
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
default:
nAbsRightFill = nAbsRightFill + nAbsDist;
m_nRelRightFill = m_nRelRightFill + nRelDist;
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 4ca88ca80b1d..08bf146b14d3 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -288,7 +288,7 @@ SwBoxAutoFormat::SwBoxAutoFormat()
m_aTLBR( 0 ),
m_aBLTR( 0 ),
m_aBackground( RES_BACKGROUND ),
- m_aAdjust( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ),
+ m_aAdjust( SvxAdjust::Left, RES_PARATR_ADJUST ),
m_aTextOrientation(FRMDIR_ENVIRONMENT, RES_FRAMEDIR),
m_aVerticalAlignment(0, css::text::VertOrientation::NONE, css::text::RelOrientation::FRAME),
m_aHorJustify( SVX_HOR_JUSTIFY_STANDARD, 0),
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 168a0834fd57..59982f7a3c3c 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -645,8 +645,8 @@ bool SwAutoFormat::DoTable()
sal_Int16 eHori;
switch( m_pCurTextNd->GetSwAttrSet().GetAdjust().GetAdjust() )
{
- case SVX_ADJUST_CENTER: eHori = text::HoriOrientation::CENTER; break;
- case SVX_ADJUST_RIGHT: eHori = text::HoriOrientation::RIGHT; break;
+ case SvxAdjust::Center: eHori = text::HoriOrientation::CENTER; break;
+ case SvxAdjust::Right: eHori = text::HoriOrientation::RIGHT; break;
default:
if( nSttPos )
@@ -1010,9 +1010,9 @@ void SwAutoFormat::SetColl( sal_uInt16 nId, bool bHdLineOrText )
false, reinterpret_cast<const SfxPoolItem**>(&pAdj) ))
{
SvxAdjust eAdj = pAdj->GetAdjust();
- if( bHdLineOrText ? (SVX_ADJUST_RIGHT != eAdj &&
- SVX_ADJUST_CENTER != eAdj)
- : SVX_ADJUST_BLOCK != eAdj )
+ if( bHdLineOrText ? (SvxAdjust::Right != eAdj &&
+ SvxAdjust::Center != eAdj)
+ : SvxAdjust::Block != eAdj )
aSet.ClearItem( RES_PARATR_ADJUST );
}
}
@@ -1474,7 +1474,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
if( !aFormat.GetCharFormat() )
aFormat.SetCharFormat( pCFormat );
if( bRTL )
- aFormat.SetNumAdjust( SVX_ADJUST_RIGHT );
+ aFormat.SetNumAdjust( SvxAdjust::Right );
aRule.Set( n, aFormat );
@@ -1535,7 +1535,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
aFormat.SetNumberingType((SvxNumType)(aNumTypes[ 0 ] - '0'));
if( bRTL )
- aFormat.SetNumAdjust( SVX_ADJUST_RIGHT );
+ aFormat.SetNumAdjust( SvxAdjust::Right );
aRule.Set( nLvl, aFormat );
}
else
@@ -1561,7 +1561,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
if( !aFormat.GetCharFormat() )
aFormat.SetCharFormat( pCFormat );
if( bRTL )
- aFormat.SetNumAdjust( SVX_ADJUST_RIGHT );
+ aFormat.SetNumAdjust( SvxAdjust::Right );
aRule.Set( n, aFormat );
}
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 4f48f916f24c..dc8d917b8a62 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1970,10 +1970,10 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
{
pItem = &pTNd->SwContentNode::GetAttr( RES_PARATR_ADJUST );
SvxAdjust eAdjust = static_cast<const SvxAdjustItem*>(pItem)->GetAdjust();
- if( SVX_ADJUST_LEFT == eAdjust || SVX_ADJUST_BLOCK == eAdjust )
+ if( SvxAdjust::Left == eAdjust || SvxAdjust::Block == eAdjust )
{
SvxAdjustItem aAdjust( *static_cast<const SvxAdjustItem*>(pItem) );
- aAdjust.SetAdjust( SVX_ADJUST_RIGHT );
+ aAdjust.SetAdjust( SvxAdjust::Right );
pTNd->SetAttr( aAdjust );
}
}
@@ -2097,9 +2097,9 @@ void ChgNumToText( SwTableBox& rBox, sal_uLong nFormat )
// assign adjustment
if( bChgAlign && pAttrSet && SfxItemState::SET == pAttrSet->GetItemState(
RES_PARATR_ADJUST, false, &pItem ) &&
- SVX_ADJUST_RIGHT == static_cast<const SvxAdjustItem*>(pItem)->GetAdjust() )
+ SvxAdjust::Right == static_cast<const SvxAdjustItem*>(pItem)->GetAdjust() )
{
- pTNd->SetAttr( SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ) );
+ pTNd->SetAttr( SvxAdjustItem( SvxAdjust::Left, RES_PARATR_ADJUST ) );
}
// assign color or save "user color"
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 6b2b5d7528cf..24adab070a1c 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -631,13 +631,13 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
OSL_ENSURE( pFrame->IsTextFrame(), "Frame type <-> tag attribute mismatch" );
const SwAttrSet& aSet = static_cast<const SwTextFrame*>(pFrame)->GetTextNode()->GetSwAttrSet();
const SvxAdjust nAdjust = aSet.GetAdjust().GetAdjust();
- if ( SVX_ADJUST_BLOCK == nAdjust || SVX_ADJUST_CENTER == nAdjust ||
- ( (pFrame->IsRightToLeft() && SVX_ADJUST_LEFT == nAdjust) ||
- (!pFrame->IsRightToLeft() && SVX_ADJUST_RIGHT == nAdjust) ) )
+ if ( SvxAdjust::Block == nAdjust || SvxAdjust::Center == nAdjust ||
+ ( (pFrame->IsRightToLeft() && SvxAdjust::Left == nAdjust) ||
+ (!pFrame->IsRightToLeft() && SvxAdjust::Right == nAdjust) ) )
{
- eVal = SVX_ADJUST_BLOCK == nAdjust ?
+ eVal = SvxAdjust::Block == nAdjust ?
vcl::PDFWriter::Justify :
- SVX_ADJUST_CENTER == nAdjust ?
+ SvxAdjust::Center == nAdjust ?
vcl::PDFWriter::Center :
vcl::PDFWriter::End;
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index c30e6a231395..ee4844c48f4d 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1663,8 +1663,8 @@ void SwTextFrame::Format_( vcl::RenderContext* pRenderContext, SwParaPortion *pP
if( 1 < aLine.GetDropLines() )
{
- if( SVX_ADJUST_LEFT != aLine.GetAdjust() &&
- SVX_ADJUST_BLOCK != aLine.GetAdjust() )
+ if( SvxAdjust::Left != aLine.GetAdjust() &&
+ SvxAdjust::Block != aLine.GetAdjust() )
{
aLine.CalcDropAdjust();
aLine.SetPaintDrop( true );
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index b3dfd58a253f..49301f7a3dc4 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -81,7 +81,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf,
{
if ( rInf.GetTextFrame()->GetNode()->getIDocumentSettingAccess()->get( DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS ) )
{
- if ( rAdjust == SVX_ADJUST_RIGHT || rAdjust == SVX_ADJUST_CENTER )
+ if ( rAdjust == SvxAdjust::Right || rAdjust == SvxAdjust::Center )
{
sal_Int32 nSpaceCnt = 0;
for ( int i = (rInf.GetText().getLength() - 1); i >= rInf.GetIdx(); --i )
@@ -241,7 +241,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf,
nBreakPos = nCutPos;
sal_Int32 nX = nBreakPos;
- if ( rAdjust == SVX_ADJUST_LEFT )
+ if ( rAdjust == SvxAdjust::Left )
{
// we step back until a non blank character has been found
// or there is only one more character left
@@ -451,7 +451,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf,
CHAR_SOFTHYPHEN == rInf.GetText()[ nBreakPos - 1 ] )
nBreakPos = rInf.GetIdx() - 1;
- if( rAdjust != SVX_ADJUST_LEFT )
+ if( rAdjust != SvxAdjust::Left )
{
// Delete any blanks at the end of a line, but be careful:
// If a field has been expanded, we do not want to delete any
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 512d9d8e8f76..08c6938028b3 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -246,7 +246,7 @@ static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTextSizeInfo& rInf, SwT
void SwTextAdjuster::CalcNewBlock( SwLineLayout *pCurrent,
const SwLinePortion *pStopAt, SwTwips nReal, bool bSkipKashida )
{
- OSL_ENSURE( GetInfo().IsMulti() || SVX_ADJUST_BLOCK == GetAdjust(),
+ OSL_ENSURE( GetInfo().IsMulti() || SvxAdjust::Block == GetAdjust(),
"CalcNewBlock: Why?" );
OSL_ENSURE( pCurrent->Height(), "SwTextAdjuster::CalcBlockAdjust: missing CalcLine()" );
@@ -602,7 +602,7 @@ void SwTextAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent )
// in tab compat mode we do not want to change tab portions
// in non tab compat mode we do not want to change margins if we
// found a multi portion with tabs
- if( SVX_ADJUST_RIGHT == GetAdjust() )
+ if( SvxAdjust::Right == GetAdjust() )
static_cast<SwGluePortion*>(pPos)->MoveAllGlue( pGlue );
else
{
@@ -644,7 +644,7 @@ void SwTextAdjuster::CalcFlyAdjust( SwLineLayout *pCurrent )
pPos = pPos->GetPortion();
}
- if( ! bTabCompat && ! bMultiTab && SVX_ADJUST_RIGHT == GetAdjust() )
+ if( ! bTabCompat && ! bMultiTab && SvxAdjust::Right == GetAdjust() )
// portions are moved to the right if possible
pLeft->AdjustRight( pCurrent );
}
@@ -659,14 +659,14 @@ void SwTextAdjuster::CalcAdjLine( SwLineLayout *pCurrent )
switch( GetAdjust() )
{
- case SVX_ADJUST_RIGHT:
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Right:
+ case SvxAdjust::Center:
{
CalcFlyAdjust( pCurrent );
pPara->GetRepaint().SetOfst( 0 );
break;
}
- case SVX_ADJUST_BLOCK:
+ case SvxAdjust::Block:
{
FormatBlock();
break;
@@ -726,7 +726,7 @@ SwFlyPortion *SwTextAdjuster::CalcFlyPortion( const long nRealWidth,
// CalcDropAdjust is called at the end by Format() if needed
void SwTextAdjuster::CalcDropAdjust()
{
- OSL_ENSURE( 1<GetDropLines() && SVX_ADJUST_LEFT!=GetAdjust() && SVX_ADJUST_BLOCK!=GetAdjust(),
+ OSL_ENSURE( 1<GetDropLines() && SvxAdjust::Left!=GetAdjust() && SvxAdjust::Block!=GetAdjust(),
"CalcDropAdjust: No reason for DropAdjustment." );
const sal_uInt16 nLineNumber = GetLineNr();
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 50976db46f36..63bd04455597 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -326,20 +326,20 @@ void SwTextMargin::CtorInitTextMargin( SwTextFrame *pNewFrame, SwTextSizeInfo *p
nFirst = nRight - 1;
}
const SvxAdjustItem& rAdjust = m_pFrame->GetTextNode()->GetSwAttrSet().GetAdjust();
- nAdjust = static_cast<sal_uInt16>(rAdjust.GetAdjust());
+ nAdjust = rAdjust.GetAdjust();
// left is left and right is right
if ( m_pFrame->IsRightToLeft() )
{
- if ( SVX_ADJUST_LEFT == nAdjust )
- nAdjust = SVX_ADJUST_RIGHT;
- else if ( SVX_ADJUST_RIGHT == nAdjust )
- nAdjust = SVX_ADJUST_LEFT;
+ if ( SvxAdjust::Left == nAdjust )
+ nAdjust = SvxAdjust::Right;
+ else if ( SvxAdjust::Right == nAdjust )
+ nAdjust = SvxAdjust::Left;
}
- m_bOneBlock = rAdjust.GetOneWord() == SVX_ADJUST_BLOCK;
- m_bLastBlock = rAdjust.GetLastBlock() == SVX_ADJUST_BLOCK;
- m_bLastCenter = rAdjust.GetLastBlock() == SVX_ADJUST_CENTER;
+ m_bOneBlock = rAdjust.GetOneWord() == SvxAdjust::Block;
+ m_bLastBlock = rAdjust.GetLastBlock() == SvxAdjust::Block;
+ m_bLastCenter = rAdjust.GetLastBlock() == SvxAdjust::Center;
// #i91133#
mnTabLeft = pNode->GetLeftMarginForTabCalculation();
@@ -368,14 +368,14 @@ void SwTextMargin::DropInit()
SwTwips SwTextMargin::GetLineStart() const
{
SwTwips nRet = GetLeftMargin();
- if( GetAdjust() != SVX_ADJUST_LEFT &&
+ if( GetAdjust() != SvxAdjust::Left &&
!m_pCurr->GetFirstPortion()->IsMarginPortion() )
{
// If the first portion is a Margin, then the
// adjustment is expressed by the portions.
- if( GetAdjust() == SVX_ADJUST_RIGHT )
+ if( GetAdjust() == SvxAdjust::Right )
nRet = Right() - CurrWidth();
- else if( GetAdjust() == SVX_ADJUST_CENTER )
+ else if( GetAdjust() == SvxAdjust::Center )
nRet += (GetLineWidth() - CurrWidth()) / 2;
}
return nRet;
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 3f820673e357..22604422d285 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -714,7 +714,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
void SwTextFormatter::CalcAdjustLine( SwLineLayout *pCurrent )
{
- if( SVX_ADJUST_LEFT != GetAdjust() && !pMulti)
+ if( SvxAdjust::Left != GetAdjust() && !pMulti)
{
pCurrent->SetFormatAdj(true);
if( IsFlyInCntBase() )
@@ -1960,7 +1960,7 @@ bool SwTextFormatter::AllowRepaintOpt() const
{
switch( GetAdjust() )
{
- case SVX_ADJUST_BLOCK:
+ case SvxAdjust::Block:
{
if( IsLastBlock() || IsLastCenter() )
bOptimizeRepaint = false;
@@ -1978,8 +1978,8 @@ bool SwTextFormatter::AllowRepaintOpt() const
}
break;
}
- case SVX_ADJUST_CENTER:
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Center:
+ case SvxAdjust::Right:
bOptimizeRepaint = false;
break;
default: ;
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index 3501ffdb8b3a..da394e1fbbdb 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -149,7 +149,7 @@ private:
sal_uInt16 nDropHeight;
sal_uInt16 nDropDescent;
sal_uInt16 nDropLines;
- sal_uInt16 nAdjust;
+ SvxAdjust nAdjust;
// #i91133#
SwTwips mnTabLeft;
@@ -167,7 +167,7 @@ protected:
, nDropHeight(0)
, nDropDescent(0)
, nDropLines(0)
- , nAdjust(0)
+ , nAdjust(SvxAdjust::Left)
, mnTabLeft(0)
{
}
@@ -188,7 +188,7 @@ public:
bool IsOneBlock() const { return m_bOneBlock; }
bool IsLastBlock() const { return m_bLastBlock; }
bool IsLastCenter() const { return m_bLastCenter; }
- sal_uInt16 GetAdjust() const { return nAdjust; }
+ SvxAdjust GetAdjust() const { return nAdjust; }
sal_uInt16 GetLineWidth() const
{ return sal_uInt16( Right() - GetLeftMargin() + 1 ); }
SwTwips GetLeftMin() const { return nFirst < nLeft ? nFirst : nLeft; }
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 779e6f0096bf..5762965b182d 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -743,7 +743,7 @@ void SwScriptInfo::InitScriptInfo( const SwTextNode& rNode, bool bRTL )
const CharCompressType aCompEnum = rNode.getIDocumentSettingAccess()->getCharacterCompressionType();
// justification type
- const bool bAdjustBlock = SVX_ADJUST_BLOCK ==
+ const bool bAdjustBlock = SvxAdjust::Block ==
rNode.GetSwAttrSet().GetAdjust().GetAdjust();
// FIND INVALID RANGES IN SCRIPT INFO ARRAYS:
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 94458d90b05e..3734f5a07e34 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -1924,8 +1924,8 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
// kashida justification is accomplished by elongating characters at certain chosen points.
// Kashida justification can be combined with white-space justification to various extents.
// The default value of bSkipKashida (the 4th parameter passed to 'CalcNewBlock') is false.
- // Only when Adjust is SVX_ADJUST_BLOCK ( alignment is justify ), multiportion will be showed in justification in new code.
- CalcNewBlock( pLine, nullptr, rMulti.Width(), GetAdjust() != SVX_ADJUST_BLOCK );
+ // Only when Adjust is SvxAdjust::Block ( alignment is justify ), multiportion will be showed in justification in new code.
+ CalcNewBlock( pLine, nullptr, rMulti.Width(), GetAdjust() != SvxAdjust::Block );
GetInfo().SetMulti( false );
}
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 21866544c57f..92d16a4b0eb6 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -291,8 +291,8 @@ bool SwTextFrame::FormatEmpty()
return false;
const SwAttrSet& aSet = GetTextNode()->GetSwAttrSet();
const SvxAdjust nAdjust = aSet.GetAdjust().GetAdjust();
- if( !bCollapse && ( ( ( ! IsRightToLeft() && ( SVX_ADJUST_LEFT != nAdjust ) ) ||
- ( IsRightToLeft() && ( SVX_ADJUST_RIGHT != nAdjust ) ) ) ||
+ if( !bCollapse && ( ( ( ! IsRightToLeft() && ( SvxAdjust::Left != nAdjust ) ) ||
+ ( IsRightToLeft() && ( SvxAdjust::Right != nAdjust ) ) ) ||
aSet.GetRegister().GetValue() ) )
return false;
const SvxLineSpacingItem &rSpacing = aSet.GetLineSpacing();
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 028eb23b7c2f..15be6de18b68 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -469,8 +469,8 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con
nLevel = MAXLEVEL - 1;
const SwNumFormat &rNumFormat = pNumRule->Get( nLevel );
- const bool bLeft = SVX_ADJUST_LEFT == rNumFormat.GetNumAdjust();
- const bool bCenter = SVX_ADJUST_CENTER == rNumFormat.GetNumAdjust();
+ const bool bLeft = SvxAdjust::Left == rNumFormat.GetNumAdjust();
+ const bool bCenter = SvxAdjust::Center == rNumFormat.GetNumAdjust();
const bool bLabelAlignmentPosAndSpaceModeActive(
rNumFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT );
const sal_uInt16 nMinDist = bLabelAlignmentPosAndSpaceModeActive
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index ee613621febe..25cef9fc8347 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -2208,13 +2208,13 @@ void SwTextFrame::CalcAdditionalFirstLineOffset()
}
if ( ( IsRightToLeft() &&
- rNumFormat.GetNumAdjust() == SVX_ADJUST_LEFT ) ||
+ rNumFormat.GetNumAdjust() == SvxAdjust::Left ) ||
( !IsRightToLeft() &&
- rNumFormat.GetNumAdjust() == SVX_ADJUST_RIGHT ) )
+ rNumFormat.GetNumAdjust() == SvxAdjust::Right ) )
{
mnAdditionalFirstLineOffset = -nNumberPortionWidth;
}
- else if ( rNumFormat.GetNumAdjust() == SVX_ADJUST_CENTER )
+ else if ( rNumFormat.GetNumAdjust() == SvxAdjust::Center )
{
mnAdditionalFirstLineOffset = -(nNumberPortionWidth/2);
}
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 595bf5fe0feb..3c5b7ccc8595 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1139,7 +1139,7 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset )
{
switch( GetAdjust() )
{
- case SVX_ADJUST_BLOCK:
+ case SvxAdjust::Block:
{
if( !m_pCurr->GetLen() ||
CH_BREAK != GetInfo().GetChar(m_nStart+m_pCurr->GetLen()-1))
@@ -1147,13 +1147,13 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset )
nQuoWidth = nQuoWidth + nLastLeft;
break;
}
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
{
nLastLeft = pQuo->GetAscent();
nQuoWidth = nQuoWidth + nLastLeft;
break;
}
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
{
nQuoWidth = nQuoWidth + pQuo->GetAscent();
long nDiff = nLastLeft - nQuoWidth;
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index b7892a0c05d5..ab4e5a5a6926 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -53,6 +53,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <o3tl/any.hxx>
+#include <o3tl/enumarray.hxx>
#include <vcl/font.hxx>
#include <editeng/flstitem.hxx>
#include <vcl/metric.hxx>
@@ -239,7 +240,7 @@ static SwPageDesc* lcl_GetPageDesc(SwDoc* pDoc, const uno::Any& aValue)
}
// Numbering
-const unsigned short aSvxToUnoAdjust[] =
+const o3tl::enumarray<SvxAdjust, unsigned short> aSvxToUnoAdjust
{
text::HoriOrientation::LEFT, //3
text::HoriOrientation::RIGHT, //1
@@ -252,9 +253,9 @@ const unsigned short aSvxToUnoAdjust[] =
const unsigned short aUnoToSvxAdjust[] =
{
USHRT_MAX,
- SVX_ADJUST_RIGHT, // 1
- SVX_ADJUST_CENTER, // 3
- SVX_ADJUST_LEFT, // 0
+ (unsigned short)SvxAdjust::Right, // 1
+ (unsigned short)SvxAdjust::Center, // 3
+ (unsigned short)SvxAdjust::Left, // 0
USHRT_MAX,
USHRT_MAX
};
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 8ea04cccf67b..a430ce238964 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -2725,10 +2725,10 @@ static Writer& OutCSS1_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt )
const sal_Char* pStr = nullptr;
switch( static_cast<const SvxAdjustItem&>(rHt).GetAdjust() )
{
- case SVX_ADJUST_LEFT: pStr = sCSS1_PV_left; break;
- case SVX_ADJUST_RIGHT: pStr = sCSS1_PV_right; break;
- case SVX_ADJUST_BLOCK: pStr = sCSS1_PV_justify; break;
- case SVX_ADJUST_CENTER: pStr = sCSS1_PV_center; break;
+ case SvxAdjust::Left: pStr = sCSS1_PV_left; break;
+ case SvxAdjust::Right: pStr = sCSS1_PV_right; break;
+ case SvxAdjust::Block: pStr = sCSS1_PV_justify; break;
+ case SvxAdjust::Center: pStr = sCSS1_PV_center; break;
default:
;
}
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 6d9830e5c3cd..a6801dcf3816 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -665,7 +665,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
else if( !nNewDefListLvl && !rHWrt.m_bCfgOutStyles && bPara &&
rULSpace.GetLower()==0 &&
((bUseParSpace && bIsNextTextNode) || rHWrt.m_nDefListLvl==1) &&
- (!pAdjItem || SVX_ADJUST_LEFT==
+ (!pAdjItem || SvxAdjust::Left==
static_cast<const SvxAdjustItem *>(pAdjItem)->GetAdjust()) )
{
// Export paragraphs without a lower spacing as DT
@@ -3110,10 +3110,10 @@ static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt )
const sal_Char* pStr = nullptr;
switch( rAdjust.GetAdjust() )
{
- case SVX_ADJUST_CENTER: pStr = OOO_STRING_SVTOOLS_HTML_AL_center; break;
- case SVX_ADJUST_LEFT: pStr = OOO_STRING_SVTOOLS_HTML_AL_left; break;
- case SVX_ADJUST_RIGHT: pStr = OOO_STRING_SVTOOLS_HTML_AL_right; break;
- case SVX_ADJUST_BLOCK: pStr = OOO_STRING_SVTOOLS_HTML_AL_justify; break;
+ case SvxAdjust::Center: pStr = OOO_STRING_SVTOOLS_HTML_AL_center; break;
+ case SvxAdjust::Left: pStr = OOO_STRING_SVTOOLS_HTML_AL_left; break;
+ case SvxAdjust::Right: pStr = OOO_STRING_SVTOOLS_HTML_AL_right; break;
+ case SvxAdjust::Block: pStr = OOO_STRING_SVTOOLS_HTML_AL_justify; break;
default:
;
}
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 522d922ef935..e3167264ed0f 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -979,7 +979,7 @@ void SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( !pNext ||
(CSS1_SELTYPE_PSEUDO==eNextType &&
pNext->GetString().equalsIgnoreAsciiCase( "first-letter" ) &&
- SVX_ADJUST_LEFT == rPropInfo.m_eFloat) )
+ SvxAdjust::Left == rPropInfo.m_eFloat) )
{
// Entweder kein zusammengesetzter Selektor oder
// ein X:first-line { float: left; ... }
@@ -1063,7 +1063,7 @@ void SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// ggf. angelegte Zeichen-Vorlage spaeter ueber den Namen
// gesucht und gesetzt.
if( aDrop.GetLines() > 1 &&
- (SVX_ADJUST_LEFT == rPropInfo.m_eFloat ||
+ (SvxAdjust::Left == rPropInfo.m_eFloat ||
Css1ScriptFlags::AllMask == nScript) )
{
pColl->SetFormatAttr( aDrop );
@@ -1446,7 +1446,7 @@ bool SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
SVX_CSS1_LTYPE_PERCENTAGE != rPropInfo.m_eTopType &&
(SVX_CSS1_LTYPE_TWIP == rPropInfo.m_eLeftType ||
SVX_CSS1_LTYPE_TWIP != rPropInfo.m_eTopType) ) ||
- ( SVX_ADJUST_END != rPropInfo.m_eFloat ) ) &&
+ ( SvxAdjust::End != rPropInfo.m_eFloat ) ) &&
( bAutoWidth ||
SVX_CSS1_LTYPE_TWIP == rPropInfo.m_eWidthType ||
SVX_CSS1_LTYPE_PERCENTAGE == rPropInfo.m_eWidthType );
@@ -2021,7 +2021,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
short nIndent = 0;
GetMarginsFromContextWithNumBul( nLeftSpace, nRightSpace, nIndent );
- if( SVX_ADJUST_RIGHT==rPropInfo.m_eFloat )
+ if( SvxAdjust::Right==rPropInfo.m_eFloat )
{
eHoriOri = text::HoriOrientation::RIGHT;
eHoriRel = nRightSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index f2de2fac4868..ac1ebbdc9920 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -468,7 +468,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
{
// Put together a DropCap attribute, if a "float:left" is before the first character
if( bCharLvl && !m_pPam->GetPoint()->nContent.GetIndex() &&
- SVX_ADJUST_LEFT == rPropInfo.m_eFloat )
+ SvxAdjust::Left == rPropInfo.m_eFloat )
{
SwFormatDrop aDrop;
aDrop.GetChars() = 1;
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index e7f46822f183..c1391339854e 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -175,7 +175,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
rCSS1PropInfo.m_nTop + nUpperSpace) );
aFrameSet.Put( SwFormatSurround(css::text::WrapTextMode_THROUGHT) );
}
- else if( SVX_ADJUST_LEFT == rCSS1PropInfo.m_eFloat ||
+ else if( SvxAdjust::Left == rCSS1PropInfo.m_eFloat ||
text::HoriOrientation::LEFT == eHoriOri )
{
aAnchor.SetType( FLY_AT_PARA );
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 3a6db55ae35c..110a67c201e6 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1094,7 +1094,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
nSurround = text::WrapTextMode_THROUGHT;
bSetSurround = true;
}
- else if( SVX_ADJUST_LEFT == rCSS1PropInfo.m_eFloat ||
+ else if( SvxAdjust::Left == rCSS1PropInfo.m_eFloat ||
text::HoriOrientation::LEFT == eHoriOri )
{
nAnchorType = text::TextContentAnchorType_AT_PARAGRAPH;
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 4b6f88d7a925..a4f98febe1a9 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -60,8 +60,8 @@ void SwHTMLParser::NewDivision( int nToken )
OUString aId, aHRef;
OUString aStyle, aLang, aDir;
OUString aClass;
- SvxAdjust eAdjust = HTML_CENTER_ON==nToken ? SVX_ADJUST_CENTER
- : SVX_ADJUST_END;
+ SvxAdjust eAdjust = HTML_CENTER_ON==nToken ? SvxAdjust::Center
+ : SvxAdjust::End;
bool bHeader=false, bFooter=false;
const HTMLOptions& rHTMLOptions = GetOptions();
@@ -366,7 +366,7 @@ void SwHTMLParser::NewDivision( int nToken )
pCntxt->SetAppendMode( AM_NOSPACE );
}
- if( SVX_ADJUST_END != eAdjust )
+ if( SvxAdjust::End != eAdjust )
{
InsertAttr( &m_aAttrTab.pAdjust, SvxAdjustItem(eAdjust, RES_PARATR_ADJUST), pCntxt );
}
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 225901c57612..b473fe361c9d 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -534,7 +534,7 @@ public:
SvxAdjust GetTableAdjust( bool bAny ) const
{
- return (m_bTableAdjustOfTag || bAny) ? m_eTableAdjust : SVX_ADJUST_END;
+ return (m_bTableAdjustOfTag || bAny) ? m_eTableAdjust : SvxAdjust::End;
}
sal_uInt16 GetHSpace() const { return m_nHSpace; }
@@ -771,7 +771,7 @@ HTMLTableRow::HTMLTableRow(sal_uInt16 const nCells)
bIsEndOfGroup(false),
nHeight(0),
nEmptyRows(0),
- eAdjust(SVX_ADJUST_END),
+ eAdjust(SvxAdjust::End),
eVertOri(text::VertOrientation::TOP),
pBGBrush(nullptr),
bBottomBorder(false)
@@ -866,7 +866,7 @@ void HTMLTableRow::Shrink( sal_uInt16 nCells )
HTMLTableColumn::HTMLTableColumn():
bIsEndOfGroup(false),
nWidth(0), bRelWidth(false),
- eAdjust(SVX_ADJUST_END), eVertOri(text::VertOrientation::TOP),
+ eAdjust(SvxAdjust::End), eVertOri(text::VertOrientation::TOP),
bLeftBorder(false)
{
for(SwFrameFormat* & rp : aFrameFormats)
@@ -1436,7 +1436,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
->IsTextFormat( nNumFormat );
SfxItemSet aItemSet( *pFrameFormat->GetAttrSet().GetPool(),
RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
- SvxAdjust eAdjust = SVX_ADJUST_END;
+ SvxAdjust eAdjust = SvxAdjust::End;
SwContentNode *pCNd = nullptr;
if( !bLock )
{
@@ -1461,7 +1461,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
pFrameFormat->SetFormatAttr( aItemSet );
if( bLock )
pFrameFormat->UnlockModify();
- else if( pCNd && SVX_ADJUST_END != eAdjust )
+ else if( pCNd && SvxAdjust::End != eAdjust )
{
SvxAdjustItem aAdjItem( eAdjust, RES_PARATR_ADJUST );
pCNd->SetAttr( aAdjItem );
@@ -1966,8 +1966,8 @@ inline HTMLTableCell *HTMLTable::GetCell( sal_uInt16 nRow,
SvxAdjust HTMLTable::GetInheritedAdjust() const
{
SvxAdjust eAdjust = (m_nCurrentColumn<m_nCols ? ((*m_pColumns)[m_nCurrentColumn])->GetAdjust()
- : SVX_ADJUST_END );
- if( SVX_ADJUST_END==eAdjust )
+ : SvxAdjust::End );
+ if( SvxAdjust::End==eAdjust )
eAdjust = (*m_pRows)[m_nCurrentRow]->GetAdjust();
return eAdjust;
@@ -2392,15 +2392,15 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
// The table either fits the page but shouldn't get a text frame,
// or it's wider than the page so it doesn't need a text frame
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
// Don't be considerate of the right margin in right-adjusted tables
eHoriOri = text::HoriOrientation::RIGHT;
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
// Centred tables are not considerate of margins
eHoriOri = text::HoriOrientation::CENTER;
break;
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
default:
// left-adjusted tables are only considerate of the left margin
eHoriOri = m_nLeftMargin ? text::HoriOrientation::LEFT_AND_WIDTH : text::HoriOrientation::LEFT;
@@ -2548,8 +2548,8 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
if( bIsInFlyFrame && !m_nWidth )
{
SvxAdjust eAdjust = GetTableAdjust(false);
- if (eAdjust != SVX_ADJUST_LEFT &&
- eAdjust != SVX_ADJUST_RIGHT)
+ if (eAdjust != SvxAdjust::Left &&
+ eAdjust != SvxAdjust::Right)
{
// If a table with a width attribute isn't flowed around left or right
// we'll stack it with a border of 100% width, so its size will
@@ -3123,7 +3123,7 @@ CellSaveStruct::CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable,
nColl = RES_POOLCOLL_TABLE;
}
HTMLAttrContext *pCntxt = new HTMLAttrContext( nToken, nColl, aEmptyOUStr, true );
- if( SVX_ADJUST_END != m_eAdjust )
+ if( SvxAdjust::End != m_eAdjust )
rParser.InsertAttr( &rParser.m_aAttrTab.pAdjust, SvxAdjustItem(m_eAdjust, RES_PARATR_ADJUST),
pCntxt );
@@ -3401,8 +3401,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
// If the table is left or right adjusted or should be in a text frame,
// it'll get one
- bForceFrame = eTableAdjust == SVX_ADJUST_LEFT ||
- eTableAdjust == SVX_ADJUST_RIGHT ||
+ bForceFrame = eTableAdjust == SvxAdjust::Left ||
+ eTableAdjust == SvxAdjust::Right ||
pCurTable->HasToFly();
// The table either shouldn't get in a text frame and isn't in one
@@ -3541,14 +3541,14 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
switch( pCurTable->GetTableAdjust(true) )
{
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
eHori = text::HoriOrientation::RIGHT;
eSurround = css::text::WrapTextMode_LEFT;
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
eHori = text::HoriOrientation::CENTER;
break;
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
eSurround = css::text::WrapTextMode_RIGHT;
SAL_FALLTHROUGH;
default:
@@ -3741,7 +3741,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
case HTML_TABLE_ON:
{
bool bHasToFly = false;
- SvxAdjust eTabAdjust = SVX_ADJUST_END;
+ SvxAdjust eTabAdjust = SvxAdjust::End;
if( !m_pPendStack )
{
// only if we create a new table, but not if we're still
@@ -3759,9 +3759,9 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
{
if( HTML_O_ALIGN==rOption.GetToken() )
{
- SvxAdjust eAdjust = rOption.GetEnum( aHTMLPAlignTable, SVX_ADJUST_END );
- bNeedsSection = SVX_ADJUST_LEFT == eAdjust ||
- SVX_ADJUST_RIGHT == eAdjust;
+ SvxAdjust eAdjust = rOption.GetEnum( aHTMLPAlignTable, SvxAdjust::End );
+ bNeedsSection = SvxAdjust::Left == eAdjust ||
+ SvxAdjust::Right == eAdjust;
break;
}
}
@@ -3782,7 +3782,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
eTabAdjust = m_aAttrTab.pAdjust
? static_cast<const SvxAdjustItem&>(m_aAttrTab.pAdjust->GetItem()).
GetAdjust()
- : SVX_ADJUST_END;
+ : SvxAdjust::End;
}
HTMLTable *pSubTable = BuildTable( eTabAdjust,
@@ -3794,8 +3794,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
// Only if the table is really complete
if( pSubTable )
{
- OSL_ENSURE( pSubTable->GetTableAdjust(false)!= SVX_ADJUST_LEFT &&
- pSubTable->GetTableAdjust(false)!= SVX_ADJUST_RIGHT,
+ OSL_ENSURE( pSubTable->GetTableAdjust(false)!= SvxAdjust::Left &&
+ pSubTable->GetTableAdjust(false)!= SvxAdjust::Right,
"links oder rechts ausgerichtete Tabellen gehoehren in Rahmen" );
HTMLTableCnts *pParentContents =
@@ -3996,7 +3996,7 @@ public:
bool bHasCells;
RowSaveStruct() :
- eAdjust( SVX_ADJUST_END ), eVertOri( text::VertOrientation::TOP ), bHasCells( false )
+ eAdjust( SvxAdjust::End ), eVertOri( text::VertOrientation::TOP ), bHasCells( false )
{}
};
@@ -4376,7 +4376,7 @@ struct TableColGrpSaveStruct : public SwPendingStackData
inline TableColGrpSaveStruct::TableColGrpSaveStruct() :
nColGrpSpan( 1 ), nColGrpWidth( 0 ),
- bRelColGrpWidth( false ), eColGrpAdjust( SVX_ADJUST_END ),
+ bRelColGrpWidth( false ), eColGrpAdjust( SvxAdjust::End ),
eColGrpVertOri( text::VertOrientation::TOP )
{}
@@ -4661,7 +4661,7 @@ void SwHTMLParser::BuildTableCaption( HTMLTable *pCurTable )
HTMLAttrContext *pCntxt = new HTMLAttrContext( HTML_CAPTION_ON );
// Table headers are always centered
- NewAttr( &m_aAttrTab.pAdjust, SvxAdjustItem(SVX_ADJUST_CENTER, RES_PARATR_ADJUST) );
+ NewAttr( &m_aAttrTab.pAdjust, SvxAdjustItem(SvxAdjust::Center, RES_PARATR_ADJUST) );
HTMLAttrs &rAttrs = pCntxt->GetAttrs();
rAttrs.push_back( m_aAttrTab.pAdjust );
@@ -4698,7 +4698,7 @@ void SwHTMLParser::BuildTableCaption( HTMLTable *pCurTable )
}
else
{
- BuildTable( SVX_ADJUST_END );
+ BuildTable( SvxAdjust::End );
}
if( SvParserState::Pending != GetStatus() )
{
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 9d2d62573991..1ba6d9e71d8e 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -150,10 +150,10 @@ static CSS1PropertyEnum const aBGVertPosTable[] =
static CSS1PropertyEnum const aTextAlignTable[] =
{
- { "left", SVX_ADJUST_LEFT },
- { "center", SVX_ADJUST_CENTER },
- { "right", SVX_ADJUST_RIGHT },
- { "justify", SVX_ADJUST_BLOCK },
+ { "left", (sal_uInt16)SvxAdjust::Left },
+ { "center", (sal_uInt16)SvxAdjust::Center },
+ { "right", (sal_uInt16)SvxAdjust::Right },
+ { "justify", (sal_uInt16)SvxAdjust::Block },
{ nullptr, 0 }
};
@@ -183,9 +183,9 @@ static CSS1PropertyEnum const aBorderStyleTable[] =
static CSS1PropertyEnum const aFloatTable[] =
{
- { "left", SVX_ADJUST_LEFT },
- { "right", SVX_ADJUST_RIGHT },
- { "none", SVX_ADJUST_END },
+ { "left", (sal_uInt16)SvxAdjust::Left },
+ { "right", (sal_uInt16)SvxAdjust::Right },
+ { "none", (sal_uInt16)SvxAdjust::End },
{ nullptr, 0 }
};
@@ -427,7 +427,7 @@ void SvxCSS1PropertyInfo::Clear()
m_bLeftMargin = m_bRightMargin = m_bTextIndent = false;
m_bNumbering = m_bBullet = false;
m_nLeftMargin = m_nRightMargin = 0;
- m_eFloat = SVX_ADJUST_END;
+ m_eFloat = SvxAdjust::End;
m_ePosition = SVX_CSS1_POS_NONE;
m_nTopBorderDistance = m_nBottomBorderDistance =
@@ -491,7 +491,7 @@ void SvxCSS1PropertyInfo::Merge( const SvxCSS1PropertyInfo& rProp )
m_nColumnCount = rProp.m_nColumnCount;
- if( rProp.m_eFloat != SVX_ADJUST_END )
+ if( rProp.m_eFloat != SvxAdjust::End )
m_eFloat = rProp.m_eFloat;
if( rProp.m_ePosition != SVX_CSS1_POS_NONE )
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index d8d3620e14b5..e4f63e2d5b52 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -128,12 +128,12 @@ using namespace ::com::sun::star;
// <P ALIGN=xxx>, <Hn ALIGN=xxx>, <TD ALIGN=xxx> usw.
HTMLOptionEnum<SvxAdjust> aHTMLPAlignTable[] =
{
- { OOO_STRING_SVTOOLS_HTML_AL_left, SVX_ADJUST_LEFT },
- { OOO_STRING_SVTOOLS_HTML_AL_center, SVX_ADJUST_CENTER },
- { OOO_STRING_SVTOOLS_HTML_AL_middle, SVX_ADJUST_CENTER }, // Netscape
- { OOO_STRING_SVTOOLS_HTML_AL_right, SVX_ADJUST_RIGHT },
- { OOO_STRING_SVTOOLS_HTML_AL_justify, SVX_ADJUST_BLOCK },
- { OOO_STRING_SVTOOLS_HTML_AL_char, SVX_ADJUST_LEFT },
+ { OOO_STRING_SVTOOLS_HTML_AL_left, SvxAdjust::Left },
+ { OOO_STRING_SVTOOLS_HTML_AL_center, SvxAdjust::Center },
+ { OOO_STRING_SVTOOLS_HTML_AL_middle, SvxAdjust::Center }, // Netscape
+ { OOO_STRING_SVTOOLS_HTML_AL_right, SvxAdjust::Right },
+ { OOO_STRING_SVTOOLS_HTML_AL_justify, SvxAdjust::Block },
+ { OOO_STRING_SVTOOLS_HTML_AL_char, SvxAdjust::Left },
{ nullptr, (SvxAdjust)0 }
};
@@ -274,7 +274,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
#ifdef DBG_UTIL
m_nContinue( 0 ),
#endif
- m_eParaAdjust( SVX_ADJUST_END ),
+ m_eParaAdjust( SvxAdjust::End ),
m_bDocInitalized( false ),
m_bSetModEnabled( false ),
m_bInFloatingFrame( false ),
@@ -1669,7 +1669,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_TABLE_ON:
if( m_pPendStack )
- BuildTable( SVX_ADJUST_END );
+ BuildTable( SvxAdjust::End );
else
{
if( m_nOpenParaToken )
@@ -1686,7 +1686,7 @@ void SwHTMLParser::NextToken( int nToken )
SvxAdjust eAdjust = m_aAttrTab.pAdjust
? static_cast<const SvxAdjustItem&>(m_aAttrTab.pAdjust->GetItem()).
GetAdjust()
- : SVX_ADJUST_END;
+ : SvxAdjust::End;
BuildTable( eAdjust );
}
else
@@ -3853,7 +3853,7 @@ void SwHTMLParser::NewPara()
else
AddParSpace();
- m_eParaAdjust = SVX_ADJUST_END;
+ m_eParaAdjust = SvxAdjust::End;
OUString aId, aStyle, aClass, aLang, aDir;
const HTMLOptions& rHTMLOptions = GetOptions();
@@ -3905,7 +3905,7 @@ void SwHTMLParser::NewPara()
}
}
- if( SVX_ADJUST_END != m_eParaAdjust )
+ if( SvxAdjust::End != m_eParaAdjust )
InsertAttr( &m_aAttrTab.pAdjust, SvxAdjustItem(m_eParaAdjust, RES_PARATR_ADJUST), pCntxt );
// und auf den Stack packen
@@ -3971,7 +3971,7 @@ void SwHTMLParser::EndPara( bool bReal )
void SwHTMLParser::NewHeading( int nToken )
{
- m_eParaAdjust = SVX_ADJUST_END;
+ m_eParaAdjust = SvxAdjust::End;
OUString aId, aStyle, aClass, aLang, aDir;
@@ -4039,7 +4039,7 @@ void SwHTMLParser::NewHeading( int nToken )
}
}
- if( SVX_ADJUST_END != m_eParaAdjust )
+ if( SvxAdjust::End != m_eParaAdjust )
InsertAttr( &m_aAttrTab.pAdjust, SvxAdjustItem(m_eParaAdjust, RES_PARATR_ADJUST), pCntxt );
// udn auf den Stack packen
@@ -5181,7 +5181,7 @@ void SwHTMLParser::InsertHorzRule()
sal_uInt16 nSize = 0;
sal_uInt16 nWidth = 0;
- SvxAdjust eAdjust = SVX_ADJUST_END;
+ SvxAdjust eAdjust = SvxAdjust::End;
bool bPrcWidth = false;
bool bNoShade = false;
@@ -5303,13 +5303,13 @@ void SwHTMLParser::InsertHorzRule()
switch( eAdjust )
{
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
aLRItem.SetTextLeft( (sal_uInt16)nDist );
break;
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
aLRItem.SetRight( (sal_uInt16)nDist );
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
default:
nDist /= 2;
aLRItem.SetTextLeft( (sal_uInt16)nDist );
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 875caf9d1a4e..ec873a5a351d 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4046,7 +4046,7 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt)
bMustWrite = static_cast< const SvxLineSpacingItem& >(rHt).GetInterLineSpaceRule() != SvxInterLineSpaceRule::Off;
break;
case RES_PARATR_ADJUST:
- bMustWrite = static_cast< const SvxAdjustItem& >(rHt).GetAdjust() != SVX_ADJUST_LEFT;
+ bMustWrite = static_cast< const SvxAdjustItem& >(rHt).GetAdjust() != SvxAdjust::Left;
break;
case RES_PARATR_SPLIT:
bMustWrite = !static_cast< const SvxFormatSplitItem& >(rHt).GetValue();
@@ -6164,8 +6164,8 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
bool ecmaDialect = ( m_rExport.GetFilter().getVersion() == oox::core::ECMA_DIALECT );
switch ( eAdjust )
{
- case SVX_ADJUST_CENTER: pJc = "center"; break;
- case SVX_ADJUST_RIGHT: pJc = !ecmaDialect ? "end" : "right"; break;
+ case SvxAdjust::Center: pJc = "center"; break;
+ case SvxAdjust::Right: pJc = !ecmaDialect ? "end" : "right"; break;
default: pJc = !ecmaDialect ? "start" : "left"; break;
}
m_pSerializer->singleElementNS( XML_w, XML_lvlJc,
@@ -7085,7 +7085,7 @@ void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
switch ( rAdjust.GetAdjust() )
{
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
if ( bEcma )
{
if ( bRtl )
@@ -7098,7 +7098,7 @@ void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
else
pAdjustString = "start";
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
if ( bEcma )
{
if ( bRtl )
@@ -7111,11 +7111,11 @@ void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
else
pAdjustString = "end";
break;
- case SVX_ADJUST_BLOCKLINE:
- case SVX_ADJUST_BLOCK:
+ case SvxAdjust::BlockLine:
+ case SvxAdjust::Block:
pAdjustString = "both";
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
pAdjustString = "center";
break;
default:
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 5bb6d50e6110..b7aa4193a351 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1483,10 +1483,10 @@ void RtfAttributeOutput::NumberingLevel(sal_uInt8 nLevel,
switch (eAdjust)
{
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
nVal = 1;
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
nVal = 2;
break;
default:
@@ -2706,17 +2706,17 @@ void RtfAttributeOutput::ParaAdjust(const SvxAdjustItem& rAdjust)
{
switch (rAdjust.GetAdjust())
{
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_QL);
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_QR);
break;
- case SVX_ADJUST_BLOCKLINE:
- case SVX_ADJUST_BLOCK:
+ case SvxAdjust::BlockLine:
+ case SvxAdjust::Block:
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_QJ);
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_QC);
break;
default:
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index d4d1843a623f..c9cc17982472 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -124,7 +124,7 @@ sal_Int16 GetWordFirstLineOffset(const SwNumFormat &rFormat)
"<GetWordFirstLineOffset> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION" );
short nFirstLineOffset;
- if (rFormat.GetNumAdjust() == SVX_ADJUST_RIGHT)
+ if (rFormat.GetNumAdjust() == SvxAdjust::Right)
nFirstLineOffset = -rFormat.GetCharTextDistance();
else
nFirstLineOffset = rFormat.GetFirstLineOffset();
@@ -257,10 +257,10 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/,
sal_uInt8 nAlign;
switch ( eAdjust )
{
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
nAlign = 1;
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
nAlign = 2;
break;
default:
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index d3941a2ef10e..5793aca424cb 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4348,19 +4348,19 @@ void WW8AttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
sal_uInt8 nAdjBiDi = 255;
switch ( rAdjust.GetAdjust() )
{
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
nAdj = 0;
nAdjBiDi = 2;
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
nAdj = 2;
nAdjBiDi = 0;
break;
- case SVX_ADJUST_BLOCKLINE:
- case SVX_ADJUST_BLOCK:
+ case SvxAdjust::BlockLine:
+ case SvxAdjust::Block:
nAdj = nAdjBiDi = 3;
break;
- case SVX_ADJUST_CENTER:
+ case SvxAdjust::Center:
nAdj = nAdjBiDi = 1;
break;
default:
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 55379a6afae6..1fb45725c4b4 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1264,9 +1264,9 @@ long GetListFirstLineIndent(const SwNumFormat &rFormat)
SvxAdjust eAdj = rFormat.GetNumAdjust();
long nReverseListIndented;
- if (eAdj == SVX_ADJUST_RIGHT)
+ if (eAdj == SvxAdjust::Right)
nReverseListIndented = -rFormat.GetCharTextDistance();
- else if (eAdj == SVX_ADJUST_CENTER)
+ else if (eAdj == SvxAdjust::Center)
nReverseListIndented = rFormat.GetFirstLineOffset()/2;
else
nReverseListIndented = rFormat.GetFirstLineOffset();
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 6257201ba308..7d50bddad22a 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -618,8 +618,8 @@ static void SetBaseAnlv(SwNumFormat &rNum, WW8_ANLV const &rAV, sal_uInt8 nSwLev
SVX_NUM_CHARS_UPPER_LETTER_N, SVX_NUM_CHARS_LOWER_LETTER_N, SVX_NUM_ARABIC,
SVX_NUM_ARABIC, SVX_NUM_ARABIC };
- static const SvxAdjust eAdjA[4] = { SVX_ADJUST_LEFT,
- SVX_ADJUST_RIGHT, SVX_ADJUST_LEFT, SVX_ADJUST_LEFT };
+ static const SvxAdjust eAdjA[4] = { SvxAdjust::Left,
+ SvxAdjust::Right, SvxAdjust::Left, SvxAdjust::Left };
if (rAV.nfc < 8) {
rNum.SetNumberingType( eNumA[ rAV.nfc ] );
} else {
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index dbe6c0c35d8b..0c7235248b9a 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -889,23 +889,23 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
switch( aLVL.nAlign )
{
case 0:
- eAdj = SVX_ADJUST_LEFT;
+ eAdj = SvxAdjust::Left;
break;
case 1:
- eAdj = SVX_ADJUST_CENTER;
+ eAdj = SvxAdjust::Center;
break;
case 2:
- eAdj = SVX_ADJUST_RIGHT;
+ eAdj = SvxAdjust::Right;
break;
case 3:
// Writer here cannot do block justification
- eAdj = SVX_ADJUST_LEFT;
+ eAdj = SvxAdjust::Left;
break;
default:
// undefined value
OSL_ENSURE( false, "Value of aLVL.nAlign is not supported" );
// take default
- eAdj = SVX_ADJUST_LEFT;
+ eAdj = SvxAdjust::Left;
break;
}
@@ -941,7 +941,7 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet,
if ( rNumFormat.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
- if (eAdj == SVX_ADJUST_RIGHT)
+ if (eAdj == SvxAdjust::Right)
{
rNumFormat.SetAbsLSpace(aLVL.nDxaLeft);
rNumFormat.SetFirstLineOffset(-aLVL.nDxaLeft);
@@ -1561,10 +1561,10 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
SwNumFormat aFormat(rLFOInfo.pNumRule->Get(nLevel));
if (rReader.IsRightToLeft() && nLastLFOPosition != nLFOPosition) {
- if ( aFormat.GetNumAdjust() == SVX_ADJUST_RIGHT)
- aFormat.SetNumAdjust(SVX_ADJUST_LEFT);
- else if ( aFormat.GetNumAdjust() == SVX_ADJUST_LEFT)
- aFormat.SetNumAdjust(SVX_ADJUST_RIGHT);
+ if ( aFormat.GetNumAdjust() == SvxAdjust::Right)
+ aFormat.SetNumAdjust(SvxAdjust::Left);
+ else if ( aFormat.GetNumAdjust() == SvxAdjust::Left)
+ aFormat.SetNumAdjust(SvxAdjust::Right);
rLFOInfo.pNumRule->Set(nLevel, aFormat);
}
nLastLFOPosition = nLFOPosition;
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 5a59b80e16af..e29362b396e5 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -4339,7 +4339,7 @@ void SwWW8ImplReader::Read_Justify( sal_uInt16, const sal_uInt8* pData, short nL
return;
}
- SvxAdjust eAdjust(SVX_ADJUST_LEFT);
+ SvxAdjust eAdjust(SvxAdjust::Left);
bool bDistributed = false;
switch (*pData)
{
@@ -4347,22 +4347,22 @@ void SwWW8ImplReader::Read_Justify( sal_uInt16, const sal_uInt8* pData, short nL
case 0:
break;
case 1:
- eAdjust = SVX_ADJUST_CENTER;
+ eAdjust = SvxAdjust::Center;
break;
case 2:
- eAdjust = SVX_ADJUST_RIGHT;
+ eAdjust = SvxAdjust::Right;
break;
case 3:
- eAdjust = SVX_ADJUST_BLOCK;
+ eAdjust = SvxAdjust::Block;
break;
case 4:
- eAdjust = SVX_ADJUST_BLOCK;
+ eAdjust = SvxAdjust::Block;
bDistributed = true;
break;
}
SvxAdjustItem aAdjust(eAdjust, RES_PARATR_ADJUST);
if (bDistributed)
- aAdjust.SetLastBlock(SVX_ADJUST_BLOCK);
+ aAdjust.SetLastBlock(SvxAdjust::Block);
NewAttr(aAdjust);
}
@@ -4398,7 +4398,7 @@ void SwWW8ImplReader::Read_RTLJustify( sal_uInt16, const sal_uInt8* pData, short
Read_Justify(0x2403 /*dummy*/, pData, nLen);
else
{
- SvxAdjust eAdjust(SVX_ADJUST_RIGHT);
+ SvxAdjust eAdjust(SvxAdjust::Right);
bool bDistributed = false;
switch (*pData)
{
@@ -4406,22 +4406,22 @@ void SwWW8ImplReader::Read_RTLJustify( sal_uInt16, const sal_uInt8* pData, short
case 0:
break;
case 1:
- eAdjust = SVX_ADJUST_CENTER;
+ eAdjust = SvxAdjust::Center;
break;
case 2:
- eAdjust = SVX_ADJUST_LEFT;
+ eAdjust = SvxAdjust::Left;
break;
case 3:
- eAdjust = SVX_ADJUST_BLOCK;
+ eAdjust = SvxAdjust::Block;
break;
case 4:
- eAdjust = SVX_ADJUST_BLOCK;
+ eAdjust = SvxAdjust::Block;
bDistributed = true;
break;
}
SvxAdjustItem aAdjust(eAdjust, RES_PARATR_ADJUST);
if (bDistributed)
- aAdjust.SetLastBlock(SVX_ADJUST_BLOCK);
+ aAdjust.SetLastBlock(SvxAdjust::Block);
NewAttr(aAdjust);
}
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 456bf1a488b7..6fda9ca1ef36 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -2191,8 +2191,8 @@ VclPtr<SfxTabPage> SwSectionIndentTabPage::Create( vcl::Window* pParent, const S
void SwSectionIndentTabPage::SetWrtShell(SwWrtShell& rSh)
{
//set sensible values at the preview
- m_pPreviewWin->SetAdjust(SVX_ADJUST_BLOCK);
- m_pPreviewWin->SetLastLine(SVX_ADJUST_BLOCK);
+ m_pPreviewWin->SetAdjust(SvxAdjust::Block);
+ m_pPreviewWin->SetLastLine(SvxAdjust::Block);
const SwRect& rPageRect = rSh.GetAnyCurRect( CurRectType::Page );
Size aPageSize(rPageRect.Width(), rPageRect.Height());
m_pPreviewWin->SetSize(aPageSize);
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 757b2d78c15b..f8e699ab0f2a 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -311,9 +311,9 @@ void SwNumPositionTabPage::InitControls()
if(bSameAdjust)
{
sal_Int32 nPos = 1; // centered
- if(aNumFormatArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
+ if(aNumFormatArr[nLvl]->GetNumAdjust() == SvxAdjust::Left)
nPos = 0;
- else if(aNumFormatArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
+ else if(aNumFormatArr[nLvl]->GetNumAdjust() == SvxAdjust::Right)
nPos = 2;
m_pAlignLB->SelectEntryPos(nPos);
m_pAlign2LB->SelectEntryPos( nPos );
@@ -600,11 +600,11 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, EditModifyHdl, ListBox&, void)
const sal_Int32 nPos = m_pAlignLB->IsVisible()
? m_pAlignLB->GetSelectEntryPos()
: m_pAlign2LB->GetSelectEntryPos();
- SvxAdjust eAdjust = SVX_ADJUST_CENTER;
+ SvxAdjust eAdjust = SvxAdjust::Center;
if(nPos == 0)
- eAdjust = SVX_ADJUST_LEFT;
+ eAdjust = SvxAdjust::Left;
else if(nPos == 2)
- eAdjust = SVX_ADJUST_RIGHT;
+ eAdjust = SvxAdjust::Right;
aNumFormat.SetNumAdjust( eAdjust );
pActNum->Set(i, aNumFormat);
}
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 190b4a372b87..c905b772f774 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -755,10 +755,10 @@ MAKENUMSTR:
const SvxAdjustItem& rAdj = aCurData.GetBoxFormat(nFormatIndex).GetAdjust();
switch (rAdj.GetAdjust())
{
- case SVX_ADJUST_LEFT:
+ case SvxAdjust::Left:
aPos.X() += FRAME_OFFSET;
break;
- case SVX_ADJUST_RIGHT:
+ case SvxAdjust::Right:
aPos.X() += nRightX;
break;
default:
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index 5f3913e52488..d2c3e85b4d7f 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -311,7 +311,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
if( !bHTMLTemplSet &&
FRMDIR_HORI_RIGHT_TOP == GetDefaultFrameDirection(GetAppLanguage()) )
{
- m_pDoc->SetDefault( SvxAdjustItem(SVX_ADJUST_RIGHT, RES_PARATR_ADJUST ) );
+ m_pDoc->SetDefault( SvxAdjustItem(SvxAdjust::Right, RES_PARATR_ADJUST ) );
}
// #i29550#
diff --git a/sw/source/uibase/ribbar/concustomshape.cxx b/sw/source/uibase/ribbar/concustomshape.cxx
index aa158975f3fa..42e31d9c0361 100644
--- a/sw/source/uibase/ribbar/concustomshape.cxx
+++ b/sw/source/uibase/ribbar/concustomshape.cxx
@@ -160,7 +160,7 @@ void ConstCustomShape::SetAttributes( SdrObject* pObj )
}
if ( !bAttributesAppliedFromGallery )
{
- pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ) );
+ pObj->SetMergedItem( SvxAdjustItem( SvxAdjust::Center, RES_PARATR_ADJUST ) );
pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 3477a7ea3621..df7ce705bf7e 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -306,16 +306,16 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
case SID_ATTR_CHAR_AUTOKERN : nEEWhich = EE_CHAR_PAIRKERNING; break;
case SID_ATTR_CHAR_ESCAPEMENT: nEEWhich = EE_CHAR_ESCAPEMENT; break;
case SID_ATTR_PARA_ADJUST_LEFT:
- aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_LEFT, EE_PARA_JUST));
+ aNewAttr.Put(SvxAdjustItem(SvxAdjust::Left, EE_PARA_JUST));
break;
case SID_ATTR_PARA_ADJUST_CENTER:
- aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST));
+ aNewAttr.Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST));
break;
case SID_ATTR_PARA_ADJUST_RIGHT:
- aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_RIGHT, EE_PARA_JUST));
+ aNewAttr.Put(SvxAdjustItem(SvxAdjust::Right, EE_PARA_JUST));
break;
case SID_ATTR_PARA_ADJUST_BLOCK:
- aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_BLOCK, EE_PARA_JUST));
+ aNewAttr.Put(SvxAdjustItem(SvxAdjust::Block, EE_PARA_JUST));
break;
case SID_ATTR_PARA_LINESPACE_10:
@@ -581,21 +581,21 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
0 );
- sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ SvxAdjust nAdjust = SvxAdjust::Left;
if( SfxItemState::SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) )
- nAdjust = static_cast<const SvxAdjustItem*>(pPoolItem)->GetEnumValue();
+ nAdjust = static_cast<const SvxAdjustItem*>(pPoolItem)->GetAdjust();
if( bLeftToRight )
{
aAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ) );
- if( nAdjust == SVX_ADJUST_RIGHT )
- aAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+ if( nAdjust == SvxAdjust::Right )
+ aAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
}
else
{
aAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
- if( nAdjust == SVX_ADJUST_LEFT )
- aAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ if( nAdjust == SvxAdjust::Left )
+ aAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
}
pOLV->SetAttribs(aAttr);
break;
@@ -744,15 +744,15 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case SID_ATTR_PARA_ADJUST_CENTER:
case SID_ATTR_PARA_ADJUST_BLOCK:
{
- int eAdjust = 0;
+ SvxAdjust eAdjust = SvxAdjust::Left;
if (nWhich==SID_ATTR_PARA_ADJUST_LEFT)
- eAdjust = SVX_ADJUST_LEFT;
+ eAdjust = SvxAdjust::Left;
else if (nWhich==SID_ATTR_PARA_ADJUST_RIGHT)
- eAdjust = SVX_ADJUST_RIGHT;
+ eAdjust = SvxAdjust::Right;
else if (nWhich==SID_ATTR_PARA_ADJUST_CENTER)
- eAdjust = SVX_ADJUST_CENTER;
+ eAdjust = SvxAdjust::Center;
else if (nWhich==SID_ATTR_PARA_ADJUST_BLOCK)
- eAdjust = SVX_ADJUST_BLOCK;
+ eAdjust = SvxAdjust::Block;
const SfxPoolItem *pAdjust = nullptr;
aEditAttr.GetItemState( EE_PARA_JUST, false, &pAdjust);
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index b520468764e5..8cdfebd4bea8 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -201,16 +201,16 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
case SID_ATTR_CHAR_AUTOKERN : nEEWhich = EE_CHAR_PAIRKERNING; break;
case SID_ATTR_CHAR_ESCAPEMENT: nEEWhich = EE_CHAR_ESCAPEMENT; break;
case SID_ATTR_PARA_ADJUST_LEFT:
- aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_LEFT, EE_PARA_JUST));
+ aNewAttr.Put(SvxAdjustItem(SvxAdjust::Left, EE_PARA_JUST));
break;
case SID_ATTR_PARA_ADJUST_CENTER:
- aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST));
+ aNewAttr.Put(SvxAdjustItem(SvxAdjust::Center, EE_PARA_JUST));
break;
case SID_ATTR_PARA_ADJUST_RIGHT:
- aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_RIGHT, EE_PARA_JUST));
+ aNewAttr.Put(SvxAdjustItem(SvxAdjust::Right, EE_PARA_JUST));
break;
case SID_ATTR_PARA_ADJUST_BLOCK:
- aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_BLOCK, EE_PARA_JUST));
+ aNewAttr.Put(SvxAdjustItem(SvxAdjust::Block, EE_PARA_JUST));
break;
case SID_ATTR_PARA_LRSPACE:
{
@@ -526,21 +526,21 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
0 );
- sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ SvxAdjust nAdjust = SvxAdjust::Left;
if( SfxItemState::SET == aEditAttr.GetItemState(EE_PARA_JUST, true, &pPoolItem ) )
- nAdjust = static_cast<const SvxAdjustItem*>(pPoolItem)->GetEnumValue();
+ nAdjust = static_cast<const SvxAdjustItem*>(pPoolItem)->GetAdjust();
if( bLeftToRight )
{
aAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ) );
- if( nAdjust == SVX_ADJUST_RIGHT )
- aAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+ if( nAdjust == SvxAdjust::Right )
+ aAttr.Put( SvxAdjustItem( SvxAdjust::Left, EE_PARA_JUST ) );
}
else
{
aAttr.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) );
- if( nAdjust == SVX_ADJUST_LEFT )
- aAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+ if( nAdjust == SvxAdjust::Left )
+ aAttr.Put( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
}
pTmpView->SetAttributes( aAttr );
rSh.GetView().BeginTextEdit( pTmpObj, pTmpPV, &rSh.GetView().GetEditWin() );
@@ -593,7 +593,8 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
SfxItemSet aEditAttr( pOLV->GetAttribs() );
const SfxPoolItem *pAdjust = nullptr, *pLSpace = nullptr, *pEscItem = nullptr;
- int eAdjust, nLSpace;
+ SvxAdjust eAdjust;
+ int nLSpace;
SvxEscapement nEsc;
while(nWhich)
@@ -626,10 +627,10 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
break;
}
- case SID_ATTR_PARA_ADJUST_LEFT: eAdjust = SVX_ADJUST_LEFT; goto ASK_ADJUST;
- case SID_ATTR_PARA_ADJUST_RIGHT: eAdjust = SVX_ADJUST_RIGHT; goto ASK_ADJUST;
- case SID_ATTR_PARA_ADJUST_CENTER: eAdjust = SVX_ADJUST_CENTER; goto ASK_ADJUST;
- case SID_ATTR_PARA_ADJUST_BLOCK: eAdjust = SVX_ADJUST_BLOCK; goto ASK_ADJUST;
+ case SID_ATTR_PARA_ADJUST_LEFT: eAdjust = SvxAdjust::Left; goto ASK_ADJUST;
+ case SID_ATTR_PARA_ADJUST_RIGHT: eAdjust = SvxAdjust::Right; goto ASK_ADJUST;
+ case SID_ATTR_PARA_ADJUST_CENTER: eAdjust = SvxAdjust::Center; goto ASK_ADJUST;
+ case SID_ATTR_PARA_ADJUST_BLOCK: eAdjust = SvxAdjust::Block; goto ASK_ADJUST;
ASK_ADJUST:
{
if( !pAdjust )
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index 0358c575001c..8ac5b0f90841 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -325,7 +325,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
{
const SvxAdjustItem& rAdj = static_cast<const SvxAdjustItem&>( pArgs->Get(RES_PARATR_ADJUST) );
SvxAdjustItem aAdj( rAdj.GetAdjust(), RES_PARATR_ADJUST );
- if ( rAdj.GetAdjust() == SVX_ADJUST_BLOCK )
+ if ( rAdj.GetAdjust() == SvxAdjust::Block )
{
aAdj.SetLastBlock( rAdj.GetLastBlock() );
aAdj.SetOneWord( rAdj.GetOneWord() );
@@ -335,10 +335,10 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
}
}
break;
- case SID_ATTR_PARA_ADJUST_LEFT: eAdjst = SVX_ADJUST_LEFT; goto SET_ADJUST;
- case SID_ATTR_PARA_ADJUST_RIGHT: eAdjst = SVX_ADJUST_RIGHT; goto SET_ADJUST;
- case SID_ATTR_PARA_ADJUST_CENTER: eAdjst = SVX_ADJUST_CENTER; goto SET_ADJUST;
- case SID_ATTR_PARA_ADJUST_BLOCK: eAdjst = SVX_ADJUST_BLOCK; goto SET_ADJUST;
+ case SID_ATTR_PARA_ADJUST_LEFT: eAdjst = SvxAdjust::Left; goto SET_ADJUST;
+ case SID_ATTR_PARA_ADJUST_RIGHT: eAdjst = SvxAdjust::Right; goto SET_ADJUST;
+ case SID_ATTR_PARA_ADJUST_CENTER: eAdjst = SvxAdjust::Center; goto SET_ADJUST;
+ case SID_ATTR_PARA_ADJUST_BLOCK: eAdjst = SvxAdjust::Block; goto SET_ADJUST;
SET_ADJUST:
{
aSet.Put(SvxAdjustItem(eAdjst,RES_PARATR_ADJUST));
@@ -381,10 +381,10 @@ SET_LINESPACE:
SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, false);
if(eAdjustState >= SfxItemState::DEFAULT)
{
- int eAdjust = (int)static_cast<const SvxAdjustItem& >(
+ SvxAdjust eAdjust = static_cast<const SvxAdjustItem& >(
aAdjustSet.Get(RES_PARATR_ADJUST)).GetAdjust();
- bChgAdjust = (SVX_ADJUST_LEFT == eAdjust && SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot) ||
- (SVX_ADJUST_RIGHT == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot);
+ bChgAdjust = (SvxAdjust::Left == eAdjust && SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot) ||
+ (SvxAdjust::Right == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot);
}
else
bChgAdjust = true;
@@ -397,7 +397,7 @@ SET_LINESPACE:
if (bChgAdjust)
{
SvxAdjust eAdjust = (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
- SVX_ADJUST_LEFT : SVX_ADJUST_RIGHT;
+ SvxAdjust::Left : SvxAdjust::Right;
SvxAdjustItem aAdjust( eAdjust, RES_PARATR_ADJUST );
aSet.Put( aAdjust );
aAdjust.SetWhich(SID_ATTR_PARA_ADJUST);
@@ -411,11 +411,11 @@ SET_LINESPACE:
for(sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++)
{
SvxNumberFormat aFormat(aRule.GetLevel(i));
- if(SVX_ADJUST_LEFT == aFormat.GetNumAdjust())
- aFormat.SetNumAdjust( SVX_ADJUST_RIGHT );
+ if(SvxAdjust::Left == aFormat.GetNumAdjust())
+ aFormat.SetNumAdjust( SvxAdjust::Right );
- else if(SVX_ADJUST_RIGHT == aFormat.GetNumAdjust())
- aFormat.SetNumAdjust( SVX_ADJUST_LEFT );
+ else if(SvxAdjust::Right == aFormat.GetNumAdjust())
+ aFormat.SetNumAdjust( SvxAdjust::Left );
aRule.SetLevel(i, aFormat, aRule.Get(i) != nullptr);
}
@@ -548,13 +548,17 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
bool bFlag = false;
SfxBoolItem aFlagItem;
const SfxPoolItem* pItem = nullptr;
- int eAdjust = -1; // Illegal value to recognize DONTCARE.
+ SvxAdjust eAdjust = SvxAdjust::Left;
+ bool bAdjustGood = false;
SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, false, &pItem);
if( SfxItemState::DEFAULT == eState )
pItem = &rPool.GetDefaultItem(RES_PARATR_ADJUST);
if( SfxItemState::DEFAULT <= eState )
- eAdjust = (int)static_cast<const SvxAdjustItem* >( pItem)->GetAdjust();
+ {
+ eAdjust = static_cast<const SvxAdjustItem* >( pItem)->GetAdjust();
+ bAdjustGood = true;
+ }
short nEsc = 0;
eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, false, &pItem);
@@ -598,42 +602,42 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
bFlag = eCaseMap == SVX_CASEMAP_KAPITAELCHEN;
break;
case SID_ATTR_PARA_ADJUST_LEFT:
- if (eAdjust == -1)
+ if (!bAdjustGood)
{
rSet.InvalidateItem( nSlot );
nSlot = 0;
}
else
- bFlag = SVX_ADJUST_LEFT == eAdjust;
+ bFlag = SvxAdjust::Left == eAdjust;
break;
case SID_ATTR_PARA_ADJUST_RIGHT:
- if (eAdjust == -1)
+ if (!bAdjustGood)
{
rSet.InvalidateItem( nSlot );
nSlot = 0;
}
else
- bFlag = SVX_ADJUST_RIGHT == eAdjust;
+ bFlag = SvxAdjust::Right == eAdjust;
break;
case SID_ATTR_PARA_ADJUST_CENTER:
- if (eAdjust == -1)
+ if (!bAdjustGood)
{
rSet.InvalidateItem( nSlot );
nSlot = 0;
}
else
- bFlag = SVX_ADJUST_CENTER == eAdjust;
+ bFlag = SvxAdjust::Center == eAdjust;
break;
case SID_ATTR_PARA_ADJUST_BLOCK:
{
- if (eAdjust == -1)
+ if (!bAdjustGood)
{
rSet.InvalidateItem( nSlot );
nSlot = 0;
}
else
{
- bFlag = SVX_ADJUST_BLOCK == eAdjust;
+ bFlag = SvxAdjust::Block == eAdjust;
sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
if((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & HTMLMODE_FULL_STYLES ))
{
@@ -707,10 +711,10 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
}
break;
case SID_ATTR_PARA_ADJUST:
- if (eAdjust == -1)
+ if (!bAdjustGood)
rSet.InvalidateItem( nSlot );
else
- rSet.Put(SvxAdjustItem((SvxAdjust)eAdjust, SID_ATTR_PARA_ADJUST ));
+ rSet.Put(SvxAdjustItem(eAdjust, SID_ATTR_PARA_ADJUST ));
nSlot = 0;
break;
case SID_ATTR_PARA_LRSPACE:
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index c8add14f68e5..2ba5ff26dfd3 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -167,7 +167,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
// numbering/bullet should be rtl in rtl paragraph:
if ( bRightToLeft )
{
- aFormat.SetNumAdjust( SVX_ADJUST_RIGHT );
+ aFormat.SetNumAdjust( SvxAdjust::Right );
}
aSvxRule.SetLevel( n, aFormat, false );
}
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 9bf3403b7ec5..93b74386aed3 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1247,7 +1247,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
// numbering/bullet should be rtl in rtl paragraph:
if ( bRightToLeft )
{
- aFormat.SetNumAdjust( SVX_ADJUST_RIGHT );
+ aFormat.SetNumAdjust( SvxAdjust::Right );
}
aNumRule.Set( nLvl, aFormat );