summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-21 10:37:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-09-21 09:24:55 +0000
commit51c6e9153de507f37d1474b31f557265cb304c06 (patch)
tree6d02d302fbee51a934c9fb8235cf4b410fde5d53
parent25e4708c1f49986f3f082beb2e940aa2d7fb4d81 (diff)
convert SfxItemPresentation to scoped enum
Change-Id: Ibf605706a9f804ab509ac4f92f5f88fcf3daebc1 Reviewed-on: https://gerrit.libreoffice.org/29131 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--editeng/source/items/frmitems.cxx26
-rw-r--r--editeng/source/items/paraitem.cxx22
-rw-r--r--editeng/source/items/textitem.cxx4
-rw-r--r--include/svl/poolitem.hxx6
-rw-r--r--sc/source/core/data/attrib.cxx20
-rw-r--r--sc/source/core/data/docpool.cxx4
-rw-r--r--svl/source/items/itempool.cxx2
-rw-r--r--svl/source/items/poolitem.cxx10
-rw-r--r--svx/source/items/algitem.cxx4
-rw-r--r--svx/source/items/customshapeitem.cxx4
-rw-r--r--svx/source/items/grfitem.cxx4
-rw-r--r--svx/source/items/pageitem.cxx4
-rw-r--r--svx/source/items/postattr.cxx12
-rw-r--r--svx/source/items/rotmodit.cxx4
-rw-r--r--svx/source/svdraw/svdattr.cxx56
-rw-r--r--svx/source/svdraw/svdibrow.cxx2
-rw-r--r--svx/source/xoutdev/xattr.cxx2
-rw-r--r--svx/source/xoutdev/xattr2.cxx8
-rw-r--r--sw/source/core/layout/atrfrm.cxx4
-rw-r--r--sw/source/uibase/utlui/attrdesc.cxx18
20 files changed, 108 insertions, 108 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index ed7906d57bf5..7c259021a75a 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -191,11 +191,11 @@ bool SvxPaperBinItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText = OUString::number( GetValue() );
return true;
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
{
sal_uInt8 nValue = GetValue();
@@ -330,13 +330,13 @@ bool SvxSizeItem::GetPresentation
OUString cpDelimTmp(cpDelim);
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText = GetMetricText( aSize.Width(), eCoreUnit, ePresUnit, pIntl ) +
cpDelimTmp +
GetMetricText( aSize.Height(), eCoreUnit, ePresUnit, pIntl );
return true;
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText = EE_RESSTR(RID_SVXITEMS_SIZE_WIDTH) +
GetMetricText( aSize.Width(), eCoreUnit, ePresUnit, pIntl ) +
" " + EE_RESSTR(GetMetricId(ePresUnit)) +
@@ -603,7 +603,7 @@ bool SvxLRSpaceItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
{
if ( 100 != nPropLeftMargin )
{
@@ -633,7 +633,7 @@ bool SvxLRSpaceItem::GetPresentation
eCoreUnit, ePresUnit, pIntl );
return true;
}
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
{
rText = EE_RESSTR(RID_SVXITEMS_LRSPACE_LEFT);
if ( 100 != nPropLeftMargin )
@@ -981,7 +981,7 @@ bool SvxULSpaceItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
{
if ( 100 != nPropUpper )
{
@@ -1000,7 +1000,7 @@ bool SvxULSpaceItem::GetPresentation
rText += GetMetricText( (long)nLower, eCoreUnit, ePresUnit, pIntl );
return true;
}
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
{
rText = EE_RESSTR(RID_SVXITEMS_ULSPACE_UPPER);
if ( 100 != nPropUpper )
@@ -1464,7 +1464,7 @@ bool SvxShadowItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
{
rText = ::GetColorString( aShadowColor ) + OUString(cpDelim);
sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE;
@@ -1479,7 +1479,7 @@ bool SvxShadowItem::GetPresentation
EE_RESSTR(RID_SVXITEMS_SHADOW_BEGIN + eLocation);
return true;
}
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
{
rText = EE_RESSTR(RID_SVXITEMS_SHADOW_COMPLETE) +
::GetColorString( aShadowColor ) +
@@ -2066,7 +2066,7 @@ bool SvxBoxItem::GetPresentation
OUString cpDelimTmp = OUString(cpDelim);
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
{
rText.clear();
@@ -2106,7 +2106,7 @@ bool SvxBoxItem::GetPresentation
}
return true;
}
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
{
if( !(pTop || pBottom || pLeft || pRight) )
{
@@ -3162,7 +3162,7 @@ bool SvxLineItem::GetPresentation
if ( pLine )
rText = pLine->GetValueString( eCoreUnit, ePresUnit, pIntl,
- (SFX_ITEM_PRESENTATION_COMPLETE == ePres) );
+ (SfxItemPresentation::Complete == ePres) );
return true;
}
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 3ce42df30ac6..6a12381dc164 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -422,8 +422,8 @@ bool SvxAdjustItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Nameless:
+ case SfxItemPresentation::Complete:
rText = GetValueTextByPos( (sal_uInt16)GetAdjust() );
return true;
default: ;//prevent warning
@@ -537,13 +537,13 @@ bool SvxWidowsItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
{
rText = EE_RESSTR(RID_SVXITEMS_LINES);
break;
}
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
{
rText = EE_RESSTR(RID_SVXITEMS_WIDOWS_COMPLETE) + " " + EE_RESSTR(RID_SVXITEMS_LINES);
break;
@@ -598,13 +598,13 @@ bool SvxOrphansItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
{
rText = EE_RESSTR(RID_SVXITEMS_LINES);
break;
}
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
{
rText = EE_RESSTR(RID_SVXITEMS_ORPHANS_COMPLETE) + " " + EE_RESSTR(RID_SVXITEMS_LINES);
break;
@@ -711,7 +711,7 @@ bool SvxHyphenZoneItem::GetPresentation
OUString cpDelimTmp(cpDelim);
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
{
sal_uInt16 nId = RID_SVXITEMS_HYPHEN_FALSE;
@@ -728,7 +728,7 @@ bool SvxHyphenZoneItem::GetPresentation
OUString::number( nMaxHyphens );
return true;
}
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
{
sal_uInt16 nId = RID_SVXITEMS_HYPHEN_FALSE;
@@ -1045,7 +1045,7 @@ bool SvxTabStopItem::GetPresentation
rText += ",";
rText += GetMetricText(
((*this)[i]).GetTabPos(), eCoreUnit, ePresUnit, pIntl );
- if ( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ if ( SfxItemPresentation::Complete == ePres )
{
rText += " " + EE_RESSTR(GetMetricId(ePresUnit));
}
@@ -1256,12 +1256,12 @@ bool SvxPageModelItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
if ( bSet )
rText = GetValue();
return true;
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
if ( bSet )
{
rText = EE_RESSTR(RID_SVXITEMS_PAGEMODEL_COMPLETE) + GetValue();
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 9c1c339e323a..410b83a872c4 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -2032,11 +2032,11 @@ bool SvxKerningItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText = GetMetricText( (long)GetValue(), eCoreUnit, MAP_POINT, pIntl ) +
" " + EE_RESSTR(GetMetricId(MAP_POINT));
return true;
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
{
rText = EE_RESSTR(RID_SVXITEMS_KERNING_COMPLETE);
sal_uInt16 nId = 0;
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index e594abb7d400..b7588495a37f 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -66,10 +66,10 @@ inline bool Any2Bool( const css::uno::Any&rValue )
* representation of an item after calling the virtual
* method <SfxPoolItem::GetPresentation()const>.
*/
-enum SfxItemPresentation
+enum class SfxItemPresentation
{
- SFX_ITEM_PRESENTATION_NAMELESS,
- SFX_ITEM_PRESENTATION_COMPLETE
+ Nameless,
+ Complete
};
/**
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index add4cf23c78d..3b8a19c83020 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -295,11 +295,11 @@ bool ScProtectionAttr::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText = GetValueText();
break;
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText = ScGlobal::GetRscString(STR_PROTECTION)
+ ": "
+ (bProtection ? aStrYes : aStrNo)
@@ -401,11 +401,11 @@ bool ScRangeItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText = ScGlobal::GetRscString(STR_AREA) + ": ";
SAL_FALLTHROUGH;
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
{
/* Always use OOo:A1 format */
rText += aRange.Format();
@@ -500,7 +500,7 @@ bool ScTableListItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
{
rText = "(";
if ( nCount>0 && pTabArr )
@@ -514,7 +514,7 @@ bool ScTableListItem::GetPresentation
}
return true;
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText.clear();
return false;
@@ -834,7 +834,7 @@ bool ScViewObjectModeItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
switch( Which() )
{
case SID_SCATTR_PAGE_CHARTS:
@@ -852,7 +852,7 @@ bool ScViewObjectModeItem::GetPresentation
default: break;
}
SAL_FALLTHROUGH;
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText += ScGlobal::GetRscString(STR_VOBJ_MODE_SHOW+GetValue());
return true;
break;
@@ -1000,12 +1000,12 @@ bool ScPageScaleToItem::GetPresentation(
switch( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText = aValue;
return true;
break;
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText = aName + " (" + aValue + ")";
return true;
break;
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 6c5021551ae3..e8f07f0e7111 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -762,7 +762,7 @@ static bool lcl_HFPresentation
default:
if ( !pIntl )
pIntl = ScGlobal::GetScIntlWrapper();
- pItem->GetPresentation( SFX_ITEM_PRESENTATION_COMPLETE, eCoreMetric, ePresentationMetric, aText, pIntl );
+ pItem->GetPresentation( SfxItemPresentation::Complete, eCoreMetric, ePresentationMetric, aText, pIntl );
}
@@ -902,7 +902,7 @@ bool ScDocumentPool::GetPresentation(
default:
if ( !pIntl )
pIntl = ScGlobal::GetScIntlWrapper();
- ePresentationRet = rItem.GetPresentation( SFX_ITEM_PRESENTATION_COMPLETE, GetMetric( nW ), ePresentationMetric, rText, pIntl );
+ ePresentationRet = rItem.GetPresentation( SfxItemPresentation::Complete, GetMetric( nW ), ePresentationMetric, rText, pIntl );
break;
}
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 40fde3da9dae..330d2f77b113 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -469,7 +469,7 @@ bool SfxItemPool::GetPresentation
) const
{
return rItem.GetPresentation(
- SFX_ITEM_PRESENTATION_COMPLETE, GetMetric(rItem.Which()), eMetric, rText, pIntlWrapper );
+ SfxItemPresentation::Complete, GetMetric(rItem.Which()), eMetric, rText, pIntlWrapper );
}
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index 93fe79e416cc..f11a2904672a 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -154,12 +154,12 @@ SvStream& SfxPoolItem::Store(SvStream &rStream, sal_uInt16 ) const
* The corresponding unit of measure is passed as 'ePresentationMetric'.
*
*
- * @return SfxItemPresentation SFX_ITEM_PRESENTATION_NAMELESS
+ * @return SfxItemPresentation SfxItemPresentation::Nameless
* A textual representation (if applicable
* with a unit of measure) could be created,
* but it doesn't contain any semantic meaning
*
- * SFX_ITEM_PRESENTATION_COMPLETE
+ * SfxItemPresentation::Complete
* A complete textual representation could be
* created with semantic meaning (if applicable
* with unit of measure)
@@ -167,10 +167,10 @@ SvStream& SfxPoolItem::Store(SvStream &rStream, sal_uInt16 ) const
* Example:
*
* pSvxFontItem->GetPresentation( SFX_PRESENTATION_NAMELESS, ... )
- * "12pt" with return SFX_ITEM_PRESENTATION_NAMELESS
+ * "12pt" with return SfxItemPresentation::Nameless
*
* pSvxColorItem->GetPresentation( SFX_PRESENTATION_COMPLETE, ... )
- * "red" with return SFX_ITEM_PRESENTATION_NAMELESS
+ * "red" with return SfxItemPresentation::Nameless
* Because the SvxColorItem does not know which color it represents
* it cannot provide a name, which is communicated by the return value
*
@@ -195,7 +195,7 @@ void SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("typeName"), BAD_CAST(typeid(*this).name()));
OUString rText;
- if (GetPresentation( SFX_ITEM_PRESENTATION_COMPLETE, MAP_100TH_MM, MAP_100TH_MM, rText))
+ if (GetPresentation( SfxItemPresentation::Complete, MAP_100TH_MM, MAP_100TH_MM, rText))
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(rText.getStr()));
xmlTextWriterEndElement(pWriter);
}
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index b2d7173c4daa..1b7d2c1c97ef 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -215,7 +215,7 @@ bool SvxMarginItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
{
rText = GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit, pIntl ) +
cpDelimTmp +
@@ -226,7 +226,7 @@ bool SvxMarginItem::GetPresentation
GetMetricText( (long)nBottomMargin, eCoreUnit, ePresUnit, pIntl );
return true;
}
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
{
rText = SVX_RESSTR(RID_SVXITEMS_MARGIN_LEFT) +
GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit, pIntl ) +
diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx
index c93336a4f393..dd04f24dca75 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -264,12 +264,12 @@ bool SdrCustomShapeGeometryItem::GetPresentation(
MapUnit /*ePresentationMetric*/, OUString &rText, const IntlWrapper *) const
{
rText += " ";
- if ( ePresentation == SFX_ITEM_PRESENTATION_COMPLETE )
+ if ( ePresentation == SfxItemPresentation::Complete )
{
rText = " " + rText;
return true;
}
- else if ( ePresentation == SFX_ITEM_PRESENTATION_NAMELESS )
+ else if ( ePresentation == SfxItemPresentation::Nameless )
return true;
return false;
}
diff --git a/svx/source/items/grfitem.cxx b/svx/source/items/grfitem.cxx
index 8f13f3370f05..c76e654a447c 100644
--- a/svx/source/items/grfitem.cxx
+++ b/svx/source/items/grfitem.cxx
@@ -141,9 +141,9 @@ bool SvxGrfCrop::GetPresentation(
rText.clear();
switch( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
return true;
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText = "L: " + OUString(::GetMetricText( GetLeft(), eCoreUnit, MAP_MM, pIntl )) +
" R: " + OUString(::GetMetricText( GetRight(), eCoreUnit, MAP_MM, pIntl )) +
" T: " + OUString(::GetMetricText( GetTop(), eCoreUnit, MAP_MM, pIntl )) +
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index a26de42e755f..379b65c59a8d 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -96,7 +96,7 @@ bool SvxPageItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
{
if ( !aDescName.isEmpty() )
{
@@ -115,7 +115,7 @@ bool SvxPageItem::GetPresentation
}
return true;
}
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
{
rText += SVX_RESSTR(RID_SVXITEMS_PAGE_COMPLETE);
if ( !aDescName.isEmpty() )
diff --git a/svx/source/items/postattr.cxx b/svx/source/items/postattr.cxx
index f8e4cdd963f3..e0d68484c600 100644
--- a/svx/source/items/postattr.cxx
+++ b/svx/source/items/postattr.cxx
@@ -50,10 +50,10 @@ bool SvxPostItAuthorItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText = GetValue();
return true;
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText = SVX_RESSTR(RID_SVXITEMS_AUTHOR_COMPLETE) + GetValue();
return true;
default: ;//prevent warning
@@ -90,10 +90,10 @@ bool SvxPostItDateItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText = GetValue();
return true;
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText = SVX_RESSTR(RID_SVXITEMS_DATE_COMPLETE) + GetValue();
return true;
default: ;//prevent warning
@@ -128,10 +128,10 @@ bool SvxPostItTextItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText = GetValue();
return true;
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText = SVX_RESSTR(RID_SVXITEMS_TEXT_COMPLETE) + GetValue();
return true;
default: ;//prevent warning
diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx
index 1ea243ed946b..41262a8973d4 100644
--- a/svx/source/items/rotmodit.cxx
+++ b/svx/source/items/rotmodit.cxx
@@ -73,11 +73,11 @@ bool SvxRotateModeItem::GetPresentation(
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText += "...: ";
SAL_FALLTHROUGH; // break; // FALL THROUGH!!!
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText += OUStringLiteral1( GetValue() );
return true;
break;
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 83779ac5c2b4..1100b0e3156d 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -364,7 +364,7 @@ bool SdrItemPool::GetPresentation(
if (!IsInvalidItem(&rItem)) {
sal_uInt16 nWhich=rItem.Which();
if (nWhich>=SDRATTR_SHADOW_FIRST && nWhich<=SDRATTR_END) {
- rItem.GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS,
+ rItem.GetPresentation(SfxItemPresentation::Nameless,
GetMetric(nWhich),ePresentationMetric,rText,
pIntlWrapper);
OUString aStr;
@@ -640,7 +640,7 @@ bool SdrFractionItem::GetPresentation(
rText = "?";
}
- if(ePresentation == SFX_ITEM_PRESENTATION_COMPLETE)
+ if(ePresentation == SfxItemPresentation::Complete)
{
OUString aStr;
@@ -648,7 +648,7 @@ bool SdrFractionItem::GetPresentation(
rText = aStr + " " + rText;
return true;
}
- else if(ePresentation == SFX_ITEM_PRESENTATION_NAMELESS)
+ else if(ePresentation == SfxItemPresentation::Nameless)
return true;
return false;
@@ -690,7 +690,7 @@ bool SdrScaleItem::GetPresentation(
rText = "?";
}
- if(ePresentation == SFX_ITEM_PRESENTATION_COMPLETE)
+ if(ePresentation == SfxItemPresentation::Complete)
{
OUString aStr;
@@ -736,7 +736,7 @@ bool SdrOnOffItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByVal(GetValue());
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -767,7 +767,7 @@ bool SdrYesNoItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByVal(GetValue());
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -797,7 +797,7 @@ bool SdrPercentItem::GetPresentation(
rText = unicode::formatPercent(GetValue(),
Application::GetSettings().GetUILanguageTag());
- if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
+ if(ePres == SfxItemPresentation::Complete)
{
OUString aStr;
@@ -882,7 +882,7 @@ bool SdrAngleItem::GetPresentation(
aText.insert(aText.getLength(), sal_Unicode(DEGREE_CHAR));
- if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
+ if(ePres == SfxItemPresentation::Complete)
{
OUString aStr;
@@ -934,7 +934,7 @@ bool SdrMetricItem::GetPresentation(SfxItemPresentation ePres,
OUString aStr;
SdrFormatter::TakeUnitStr((MapUnit)ePresMetric,aStr);
rText += " " + aStr;
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr2;
SdrItemPool::TakeItemName(Which(), aStr2);
@@ -962,7 +962,7 @@ bool SdrCaptionTypeItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -987,7 +987,7 @@ bool SdrCaptionEscDirItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1019,7 +1019,7 @@ bool SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1078,7 +1078,7 @@ bool SdrTextVertAdjustItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1126,7 +1126,7 @@ bool SdrTextHorzAdjustItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1174,7 +1174,7 @@ bool SdrTextAniKindItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1221,7 +1221,7 @@ bool SdrTextAniDirectionItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1264,7 +1264,7 @@ bool SdrTextAniDelayItem::GetPresentation(
{
rText = OUString::number(GetValue()) + "ms";
- if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
+ if(ePres == SfxItemPresentation::Complete)
{
OUString aStr;
@@ -1319,7 +1319,7 @@ bool SdrTextAniAmountItem::GetPresentation(
rText += aStr;
}
- if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
+ if(ePres == SfxItemPresentation::Complete)
{
OUString aStr;
@@ -1350,7 +1350,7 @@ bool SdrTextFixedCellHeightItem::GetPresentation( SfxItemPresentation ePres,
OUString &rText, const IntlWrapper * ) const
{
rText = GetValueTextByVal( GetValue() );
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE)
+ if (ePres==SfxItemPresentation::Complete)
{
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1446,7 +1446,7 @@ bool SdrCustomShapeAdjustmentItem::GetPresentation(
{
rText = rText + " " + OUString::number( GetValue( i ).nValue );
}
- if ( ePresentation == SFX_ITEM_PRESENTATION_COMPLETE )
+ if ( ePresentation == SfxItemPresentation::Complete )
{
OUString aStr;
@@ -1555,7 +1555,7 @@ bool SdrEdgeKindItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1720,7 +1720,7 @@ bool SdrMeasureKindItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1767,7 +1767,7 @@ bool SdrMeasureTextHPosItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1814,7 +1814,7 @@ bool SdrMeasureTextVPosItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1868,7 +1868,7 @@ bool SdrMeasureUnitItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1909,7 +1909,7 @@ bool SdrCircKindItem::GetPresentation(SfxItemPresentation ePres,
MapUnit /*eCoreMetric*/, MapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
rText=GetValueTextByPos(sal::static_int_cast< sal_uInt16 >(GetValue()));
- if (ePres==SFX_ITEM_PRESENTATION_COMPLETE) {
+ if (ePres==SfxItemPresentation::Complete) {
OUString aStr;
SdrItemPool::TakeItemName(Which(), aStr);
@@ -1961,7 +1961,7 @@ bool SdrSignedPercentItem::GetPresentation(
rText = unicode::formatPercent(GetValue(),
Application::GetSettings().GetUILanguageTag());
- if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
+ if(ePres == SfxItemPresentation::Complete)
{
OUString aStr;
@@ -2129,7 +2129,7 @@ bool SdrGrafModeItem::GetPresentation( SfxItemPresentation ePres,
{
rText = GetValueTextByPos( sal::static_int_cast< sal_uInt16 >( GetValue() ) );
- if( ePres == SFX_ITEM_PRESENTATION_COMPLETE )
+ if( ePres == SfxItemPresentation::Complete )
{
OUString aStr;
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 51e6f475e32f..ec2a8a80cecd 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -1003,7 +1003,7 @@ void SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemS
} // switch
if (aEntry.bIsNum) aEntry.bCanNum = true;
- rItem.GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS,
+ rItem.GetPresentation(SfxItemPresentation::Nameless,
pPool->GetMetric(nWhich),
MAP_MM, aEntry.aValue);
if (aEntry.bCanNum)
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index b917ec23c331..119003770e5d 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -2207,7 +2207,7 @@ void XFillStyleItem::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
OUString aPresentation;
- GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, MAP_100TH_MM, MAP_100TH_MM, aPresentation);
+ GetPresentation(SfxItemPresentation::Nameless, MAP_100TH_MM, MAP_100TH_MM, aPresentation);
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr()));
xmlTextWriterEndElement(pWriter);
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index 6cba0981081f..16a503fe33b7 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -68,10 +68,10 @@ bool XLineTransparenceItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": ";
SAL_FALLTHROUGH;
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText += unicode::formatPercent(GetValue(),
Application::GetSettings().GetUILanguageTag());
return true;
@@ -428,10 +428,10 @@ bool XFillTransparenceItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SfxItemPresentation::Complete:
rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": ";
SAL_FALLTHROUGH;
- case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SfxItemPresentation::Nameless:
rText += unicode::formatPercent(GetValue(),
Application::GetSettings().GetUILanguageTag());
return true;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index a37fe0af15a7..c3d8cc09ad5f 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1277,7 +1277,7 @@ void SwFormatSurround::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
OUString aPresentation;
- GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, MAP_100TH_MM, MAP_100TH_MM, aPresentation);
+ GetPresentation(SfxItemPresentation::Nameless, MAP_100TH_MM, MAP_100TH_MM, aPresentation);
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("bAnchorOnly"), BAD_CAST(OString::boolean(bAnchorOnly).getStr()));
@@ -1730,7 +1730,7 @@ void SwFormatAnchor::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nOrder"), BAD_CAST(OString::number(mnOrder).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nOrderCounter"), BAD_CAST(OString::number(mnOrderCounter).getStr()));
OUString aPresentation;
- GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, MAP_100TH_MM, MAP_100TH_MM, aPresentation);
+ GetPresentation(SfxItemPresentation::Nameless, MAP_100TH_MM, MAP_100TH_MM, aPresentation);
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(aPresentation.toUtf8().getStr()));
xmlTextWriterEndElement(pWriter);
diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx
index 8037c8249825..965157df48b4 100644
--- a/sw/source/uibase/utlui/attrdesc.cxx
+++ b/sw/source/uibase/utlui/attrdesc.cxx
@@ -707,7 +707,7 @@ bool SwRotationGrf::GetPresentation(
SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
OUString &rText, const IntlWrapper* /*pIntl*/) const
{
- if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ if( SfxItemPresentation::Complete == ePres )
rText = SW_RESSTR( STR_ROTATION );
else if( rText.getLength() )
rText.clear();
@@ -719,7 +719,7 @@ bool SwLuminanceGrf::GetPresentation(
SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
OUString &rText, const IntlWrapper* /*pIntl*/) const
{
- if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ if( SfxItemPresentation::Complete == ePres )
rText = SW_RESSTR( STR_LUMINANCE );
else if( rText.getLength() )
rText.clear();
@@ -732,7 +732,7 @@ bool SwContrastGrf::GetPresentation(
SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
OUString &rText, const IntlWrapper* /*pIntl*/) const
{
- if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ if( SfxItemPresentation::Complete == ePres )
rText = SW_RESSTR( STR_CONTRAST );
else if( rText.getLength() )
rText.clear();
@@ -745,7 +745,7 @@ bool SwChannelGrf::GetPresentation(
SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
OUString &rText, const IntlWrapper* /*pIntl*/) const
{
- if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ if( SfxItemPresentation::Complete == ePres )
{
sal_uInt16 nId;
switch ( Which() )
@@ -772,7 +772,7 @@ bool SwGammaGrf::GetPresentation(
OUString &rText, const IntlWrapper* /*pIntl*/) const
{
OUStringBuffer aText;
- if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ if( SfxItemPresentation::Complete == ePres )
aText.append(SW_RESSTR(STR_GAMMA));
aText.append(unicode::formatPercent(GetValue(),
Application::GetSettings().GetUILanguageTag()));
@@ -785,7 +785,7 @@ bool SwInvertGrf::GetPresentation(
OUString &rText, const IntlWrapper* /*pIntl*/) const
{
rText.clear();
- if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ if( SfxItemPresentation::Complete == ePres )
{
const sal_uInt16 nId = GetValue() ? STR_INVERT : STR_INVERT_NOT;
rText = SW_RESSTR( nId );
@@ -797,7 +797,7 @@ bool SwTransparencyGrf::GetPresentation(
SfxItemPresentation ePres, MapUnit /*eCoreUnit*/, MapUnit /*ePresUnit*/,
OUString &rText, const IntlWrapper* /*pIntl*/) const
{
- if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ if( SfxItemPresentation::Complete == ePres )
rText = SW_RESSTR( STR_TRANSPARENCY );
else if( rText.getLength() )
rText.clear();
@@ -811,7 +811,7 @@ bool SwDrawModeGrf::GetPresentation(
OUString &rText, const IntlWrapper* /*pIntl*/) const
{
rText.clear();
- if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ if( SfxItemPresentation::Complete == ePres )
{
sal_uInt16 nId;
switch ( GetValue() )
@@ -834,7 +834,7 @@ bool SwFormatFollowTextFlow::GetPresentation( SfxItemPresentation ePres,
const IntlWrapper* /*pIntl*/ ) const
{
rText.clear();
- if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
+ if( SfxItemPresentation::Complete == ePres )
{
const sal_uInt16 nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
rText = SW_RESSTR( nId );