diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-07 11:19:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-08 06:30:49 +0000 |
commit | 9cb57a50d7eeaa1dda19d18bcb3cde7e4a7984e5 (patch) | |
tree | 790282bdd3d41f9ceda28267cb72dd119ac15230 /sc/source | |
parent | bb4cf1da125344d5ef4fe51b0f1549718a11affa (diff) |
convert SvxAdjust to scoped enum
Change-Id: I0df7a5313d6d62d0c657e62ef6014a3ddbab4639
Reviewed-on: https://gerrit.libreoffice.org/34941
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/patattr.cxx | 20 | ||||
-rw-r--r-- | sc/source/core/tool/autoform.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 30 | ||||
-rw-r--r-- | sc/source/filter/rtf/eeimpars.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97rec.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessiblePageHeader.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleText.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob.cxx | 24 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob2.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fuconcustomshape.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/pagedlg/tphfedit.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/view/output2.cxx | 38 | ||||
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 14 |
18 files changed, 100 insertions, 100 deletions
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; |