summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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>
Diffstat (limited to 'svx')
-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
10 files changed, 50 insertions, 50 deletions
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;