[Libreoffice-commits] core.git: editeng/source include/svl sc/source svl/source svx/source sw/source
Noel Grandin
noel at peralex.com
Tue Jul 29 03:27:07 PDT 2014
editeng/source/items/bulitem.cxx | 20
editeng/source/items/charhiddenitem.cxx | 27
editeng/source/items/frmitems.cxx | 232 +-----
editeng/source/items/justifyitem.cxx | 48 -
editeng/source/items/optitems.cxx | 44 -
editeng/source/items/paraitem.cxx | 200 +----
editeng/source/items/textitem.cxx | 505 +++-----------
editeng/source/items/writingmodeitem.cxx | 20
include/svl/poolitem.hxx | 1
sc/source/core/data/attrib.cxx | 21
svl/source/items/poolitem.cxx | 6
svx/source/dialog/optgrid.cxx | 16
svx/source/items/algitem.cxx | 19
svx/source/items/pageitem.cxx | 2
svx/source/items/postattr.cxx | 9
svx/source/svdraw/svdattr.cxx | 50 -
svx/source/xoutdev/xattr.cxx | 321 ++-------
svx/source/xoutdev/xattr2.cxx | 279 +-------
svx/source/xoutdev/xattrbmp.cxx | 16
sw/source/uibase/utlui/attrdesc.cxx | 1071 +++++++++----------------------
sw/source/uibase/utlui/uiitems.cxx | 26
21 files changed, 793 insertions(+), 2140 deletions(-)
New commits:
commit 9d140ccdb3b029b3d87ee23e87789f8a67ce8d5b
Author: Noel Grandin <noel at peralex.com>
Date: Thu Jul 24 15:43:00 2014 +0200
drop use of SFX_ITEM_PRESENTATION_NONE
since none of the call sites specify it
Change-Id: I9c15f0e042e21f6f78560c1962a533112d588c90
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index 285cfc2..28f4dfd 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -380,28 +380,14 @@ OUString SvxBulletItem::GetFullText() const
bool SvxBulletItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- bool eRet = false;
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- eRet = false;
- break;
-
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetFullText();
- eRet = true;
- break;
- default: ; //prevent warning
- }
- return eRet;
+ rText = GetFullText();
+ return true;
}
diff --git a/editeng/source/items/charhiddenitem.cxx b/editeng/source/items/charhiddenitem.cxx
index b32d41a..32bc856 100644
--- a/editeng/source/items/charhiddenitem.cxx
+++ b/editeng/source/items/charhiddenitem.cxx
@@ -35,30 +35,19 @@ SfxPoolItem* SvxCharHiddenItem::Clone( SfxItemPool * ) const
bool SvxCharHiddenItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
- OUString& rText, const IntlWrapper * /*pIntl*/
+ OUString& rText,
+ const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = RID_SVXITEMS_CHARHIDDEN_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_CHARHIDDEN_FALSE;
- if ( GetValue() )
- nId = RID_SVXITEMS_CHARHIDDEN_TRUE;
- rText = EE_RESSTR(nId);
- return true;
- }
- default: ; //prevent warning
- }
- return false;
+ if ( GetValue() )
+ nId = RID_SVXITEMS_CHARHIDDEN_TRUE;
+ rText = EE_RESSTR(nId);
+ return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index f4297b7..481e393 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -189,10 +189,6 @@ bool SvxPaperBinItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
-
case SFX_ITEM_PRESENTATION_NAMELESS:
rText = OUString::number( GetValue() );
return true;
@@ -336,10 +332,6 @@ bool SvxSizeItem::GetPresentation
OUString cpDelimTmp(cpDelim);
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
-
case SFX_ITEM_PRESENTATION_NAMELESS:
rText = GetMetricText( aSize.Width(), eCoreUnit, ePresUnit, pIntl ) +
cpDelimTmp +
@@ -597,9 +589,6 @@ bool SvxLRSpaceItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
case SFX_ITEM_PRESENTATION_NAMELESS:
{
if ( 100 != nPropLeftMargin )
@@ -967,9 +956,6 @@ bool SvxULSpaceItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
case SFX_ITEM_PRESENTATION_NAMELESS:
{
if ( 100 != nPropUpper )
@@ -1108,31 +1094,18 @@ SfxPoolItem* SvxPrintItem::Create( SvStream& rStrm, sal_uInt16 ) const
bool SvxPrintItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
-
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = RID_SVXITEMS_PRINT_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_PRINT_FALSE;
- if ( GetValue() )
- nId = RID_SVXITEMS_PRINT_TRUE;
- rText = EE_RESSTR(nId);
- return true;
- }
- default: ;//prevent warning
- }
- return false;
+ if ( GetValue() )
+ nId = RID_SVXITEMS_PRINT_TRUE;
+ rText = EE_RESSTR(nId);
+ return true;
}
// class SvxOpaqueItem ---------------------------------------------------
@@ -1163,31 +1136,18 @@ SfxPoolItem* SvxOpaqueItem::Create( SvStream& rStrm, sal_uInt16 ) const
bool SvxOpaqueItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
-
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = RID_SVXITEMS_OPAQUE_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_OPAQUE_FALSE;
- if ( GetValue() )
- nId = RID_SVXITEMS_OPAQUE_TRUE;
- rText = EE_RESSTR(nId);
- return true;
- }
- default: ;//prevent warning
- }
- return false;
+ if ( GetValue() )
+ nId = RID_SVXITEMS_OPAQUE_TRUE;
+ rText = EE_RESSTR(nId);
+ return true;
}
// class SvxProtectItem --------------------------------------------------
@@ -1246,41 +1206,28 @@ SfxPoolItem* SvxProtectItem::Clone( SfxItemPool* ) const
bool SvxProtectItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
+ sal_uInt16 nId = RID_SVXITEMS_PROT_CONTENT_FALSE;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = RID_SVXITEMS_PROT_CONTENT_FALSE;
-
- if ( bCntnt )
- nId = RID_SVXITEMS_PROT_CONTENT_TRUE;
- rText = EE_RESSTR(nId) + OUString(cpDelim);
- nId = RID_SVXITEMS_PROT_SIZE_FALSE;
+ if ( bCntnt )
+ nId = RID_SVXITEMS_PROT_CONTENT_TRUE;
+ rText = EE_RESSTR(nId) + OUString(cpDelim);
+ nId = RID_SVXITEMS_PROT_SIZE_FALSE;
- if ( bSize )
- nId = RID_SVXITEMS_PROT_SIZE_TRUE;
- rText = rText + EE_RESSTR(nId) + OUString(cpDelim);
- nId = RID_SVXITEMS_PROT_POS_FALSE;
+ if ( bSize )
+ nId = RID_SVXITEMS_PROT_SIZE_TRUE;
+ rText = rText + EE_RESSTR(nId) + OUString(cpDelim);
+ nId = RID_SVXITEMS_PROT_POS_FALSE;
- if ( bPos )
- nId = RID_SVXITEMS_PROT_POS_TRUE;
- rText += EE_RESSTR(nId);
- return true;
- }
- default: ;//prevent warning
- }
- return false;
+ if ( bPos )
+ nId = RID_SVXITEMS_PROT_POS_TRUE;
+ rText += EE_RESSTR(nId);
+ return true;
}
@@ -1488,10 +1435,6 @@ bool SvxShadowItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
-
case SFX_ITEM_PRESENTATION_NAMELESS:
{
rText = ::GetColorString( aShadowColor ) + OUString(cpDelim);
@@ -2095,10 +2038,6 @@ bool SvxBoxItem::GetPresentation
OUString cpDelimTmp = OUString(cpDelim);
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
-
case SFX_ITEM_PRESENTATION_NAMELESS:
{
rText = OUString();
@@ -2954,25 +2893,14 @@ bool SvxFmtBreakItem::operator==( const SfxPoolItem& rAttr ) const
bool SvxFmtBreakItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
-
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetValueTextByPos( GetValue() );
- return ePres;
- default: ;//prevent warning
- }
- return false;
+ rText = GetValueTextByPos( GetValue() );
+ return true;
}
@@ -3105,31 +3033,18 @@ SfxPoolItem* SvxFmtKeepItem::Create( SvStream& rStrm, sal_uInt16 ) const
bool SvxFmtKeepItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
+ sal_uInt16 nId = RID_SVXITEMS_FMTKEEP_FALSE;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = RID_SVXITEMS_FMTKEEP_FALSE;
-
- if ( GetValue() )
- nId = RID_SVXITEMS_FMTKEEP_TRUE;
- rText = EE_RESSTR(nId);
- return true;
- }
- default: ;//prevent warning
- }
- return false;
+ if ( GetValue() )
+ nId = RID_SVXITEMS_FMTKEEP_TRUE;
+ rText = EE_RESSTR(nId);
+ return true;
}
// class SvxLineItem ------------------------------------------------------
@@ -3263,21 +3178,10 @@ bool SvxLineItem::GetPresentation
{
rText = OUString();
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- if ( pLine )
- rText = pLine->GetValueString( eCoreUnit, ePresUnit, pIntl,
- (SFX_ITEM_PRESENTATION_COMPLETE == ePres) );
- return true;
- }
- default: ;//prevent warning
- }
- return false;
+ if ( pLine )
+ rText = pLine->GetValueString( eCoreUnit, ePresUnit, pIntl,
+ (SFX_ITEM_PRESENTATION_COMPLETE == ePres) );
+ return true;
}
@@ -3805,41 +3709,27 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
bool SvxBrushItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
+ if ( GPOS_NONE == eGraphicPos )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
-
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- if ( GPOS_NONE == eGraphicPos )
- {
- rText = ::GetColorString( aColor ) + OUString(cpDelim);
- sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE;
+ rText = ::GetColorString( aColor ) + OUString(cpDelim);
+ sal_uInt16 nId = RID_SVXITEMS_TRANSPARENT_FALSE;
- if ( aColor.GetTransparency() )
- nId = RID_SVXITEMS_TRANSPARENT_TRUE;
- rText += EE_RESSTR(nId);
- }
- else
- {
- rText = EE_RESSTR(RID_SVXITEMS_GRAPHIC);
- }
-
- return true;
- }
- default: ;//prevent warning
+ if ( aColor.GetTransparency() )
+ nId = RID_SVXITEMS_TRANSPARENT_TRUE;
+ rText += EE_RESSTR(nId);
+ }
+ else
+ {
+ rText = EE_RESSTR(RID_SVXITEMS_GRAPHIC);
}
- return false;
+ return true;
}
@@ -4247,27 +4137,13 @@ sal_uInt16 SvxFrameDirectionItem::GetVersion( sal_uInt16 nFVer ) const
}
bool SvxFrameDirectionItem::GetPresentation(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *) const
{
- switch( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- break;
-
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = EE_RESSTR( RID_SVXITEMS_FRMDIR_BEGIN + GetValue() );
- return true;
- break;
-
- default:
- return false;
- }
+ rText = EE_RESSTR( RID_SVXITEMS_FRMDIR_BEGIN + GetValue() );
+ return true;
}
bool SvxFrameDirectionItem::PutValue( const com::sun::star::uno::Any& rVal,
diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx
index 289d549..7871c87 100644
--- a/editeng/source/items/justifyitem.cxx
+++ b/editeng/source/items/justifyitem.cxx
@@ -52,23 +52,13 @@ SvxHorJustifyItem::SvxHorJustifyItem( const SvxCellHorJustify eJustify,
bool SvxHorJustifyItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetValueText( GetValue() );
- return true;
- default: ; //prevent warning
- }
- return false;
+ rText = GetValueText( GetValue() );
+ return true;
}
@@ -209,24 +199,14 @@ SvxVerJustifyItem::SvxVerJustifyItem( const SvxCellVerJustify eJustify,
bool SvxVerJustifyItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText,
const IntlWrapper * ) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetValueText( GetValue() );
- return true;
- default: ; //prevent warning
- }
- return false;
+ rText = GetValueText( GetValue() );
+ return true;
}
@@ -350,24 +330,14 @@ SvxJustifyMethodItem::SvxJustifyMethodItem( const SvxCellJustifyMethod eJustify,
bool SvxJustifyMethodItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText,
const IntlWrapper * ) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetValueText( GetValue() );
- return true;
- default: ; //prevent warning
- }
- return false;
+ rText = GetValueText( GetValue() );
+ return true;
}
diff --git a/editeng/source/items/optitems.cxx b/editeng/source/items/optitems.cxx
index 839430b..cebe639 100644
--- a/editeng/source/items/optitems.cxx
+++ b/editeng/source/items/optitems.cxx
@@ -60,27 +60,14 @@ SfxSpellCheckItem::SfxSpellCheckItem( const SfxSpellCheckItem& rItem ) :
bool SfxSpellCheckItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation ,
SfxMapUnit ,
SfxMapUnit ,
- OUString& rText,
+ OUString& ,
const IntlWrapper*
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
-
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- return true;
- }
- default:
- return false;
- }
+ return true;
}
@@ -139,31 +126,18 @@ SfxPoolItem* SfxHyphenRegionItem::Clone( SfxItemPool* ) const
bool SfxHyphenRegionItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit ,
SfxMapUnit ,
OUString& rText,
const IntlWrapper*
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
-
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- rText = rText +
- EE_RESSTR(RID_SVXITEMS_HYPHEN_MINLEAD).replaceAll("%1", OUString::number(nMinLead)) +
- "," +
- EE_RESSTR(RID_SVXITEMS_HYPHEN_MINTRAIL).replaceAll("%1", OUString::number(nMinTrail));
- return true;
- }
- default:
- return false;
- }
+ rText = rText +
+ EE_RESSTR(RID_SVXITEMS_HYPHEN_MINLEAD).replaceAll("%1", OUString::number(nMinLead)) +
+ "," +
+ EE_RESSTR(RID_SVXITEMS_HYPHEN_MINTRAIL).replaceAll("%1", OUString::number(nMinTrail));
+ return true;
}
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 9775a27..9791c80 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -426,9 +426,6 @@ bool SvxAdjustItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
rText = GetValueTextByPos( (sal_uInt16)GetAdjust() );
@@ -555,12 +552,6 @@ bool SvxWidowsItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- {
- rText = OUString();
- break;
- }
-
case SFX_ITEM_PRESENTATION_NAMELESS:
{
rText = EE_RESSTR(RID_SVXITEMS_LINES);
@@ -580,7 +571,7 @@ bool SvxWidowsItem::GetPresentation
}
rText = rText.replaceFirst( "%1", OUString::number( GetValue() ) );
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
// class SvxOrphansItem --------------------------------------------------
@@ -626,12 +617,6 @@ bool SvxOrphansItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- {
- rText = OUString();
- break;
- }
-
case SFX_ITEM_PRESENTATION_NAMELESS:
{
rText = EE_RESSTR(RID_SVXITEMS_LINES);
@@ -651,7 +636,7 @@ bool SvxOrphansItem::GetPresentation
}
rText = rText.replaceFirst( "%1", OUString::number( GetValue() ) );
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
// class SvxHyphenZoneItem -----------------------------------------------
@@ -747,9 +732,6 @@ bool SvxHyphenZoneItem::GetPresentation
OUString cpDelimTmp(cpDelim);
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
case SFX_ITEM_PRESENTATION_NAMELESS:
{
sal_uInt16 nId = RID_SVXITEMS_HYPHEN_FALSE;
@@ -1101,27 +1083,24 @@ bool SvxTabStopItem::GetPresentation
{
rText = OUString();
- if ( ePres > SFX_ITEM_PRESENTATION_NONE )
- {
- bool bComma = false;
+ bool bComma = false;
- for ( sal_uInt16 i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
+ {
+ if ( SVX_TAB_ADJUST_DEFAULT != ((*this)[i]).GetAdjustment() )
{
- if ( SVX_TAB_ADJUST_DEFAULT != ((*this)[i]).GetAdjustment() )
+ if ( bComma )
+ rText += ",";
+ rText += GetMetricText(
+ ((*this)[i]).GetTabPos(), eCoreUnit, ePresUnit, pIntl );
+ if ( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- if ( bComma )
- rText += ",";
- rText += GetMetricText(
- ((*this)[i]).GetTabPos(), eCoreUnit, ePresUnit, pIntl );
- if ( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
- {
- rText += " " + EE_RESSTR(GetMetricId(ePresUnit));
- }
- bComma = true;
+ rText += " " + EE_RESSTR(GetMetricId(ePresUnit));
}
+ bComma = true;
}
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
@@ -1261,30 +1240,18 @@ SfxPoolItem* SvxFmtSplitItem::Create( SvStream& rStrm, sal_uInt16 ) const
bool SvxFmtSplitItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = RID_SVXITEMS_FMTSPLIT_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_FMTSPLIT_FALSE;
- if ( GetValue() )
- nId = RID_SVXITEMS_FMTSPLIT_TRUE;
- rText = EE_RESSTR(nId);
- return ePres;
- }
- default: ;//prevent warning
- }
- return false;
+ if ( GetValue() )
+ nId = RID_SVXITEMS_FMTSPLIT_TRUE;
+ rText = EE_RESSTR(nId);
+ return true;
}
@@ -1338,9 +1305,6 @@ bool SvxPageModelItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
-
case SFX_ITEM_PRESENTATION_NAMELESS:
if ( bSet )
rText = GetValue();
@@ -1387,26 +1351,14 @@ sal_uInt16 SvxScriptSpaceItem::GetVersion( sal_uInt16 nFFVer ) const
}
bool SvxScriptSpaceItem::GetPresentation(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* /*pIntl*/ ) const
{
- switch( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- break;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- rText = EE_RESSTR( !GetValue()
- ? RID_SVXITEMS_SCRPTSPC_OFF
- : RID_SVXITEMS_SCRPTSPC_ON );
- return true;
- }
- default: ;//prevent warning
- }
- return false;
+ rText = EE_RESSTR( !GetValue()
+ ? RID_SVXITEMS_SCRPTSPC_OFF
+ : RID_SVXITEMS_SCRPTSPC_ON );
+ return true;
}
@@ -1440,27 +1392,14 @@ sal_uInt16 SvxHangingPunctuationItem::GetVersion( sal_uInt16 nFFVer ) const
}
bool SvxHangingPunctuationItem::GetPresentation(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* /*pIntl*/ ) const
{
- switch( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- break;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- rText = EE_RESSTR( !GetValue()
- ? RID_SVXITEMS_HNGPNCT_OFF
- : RID_SVXITEMS_HNGPNCT_ON );
- return true;
- }
- default: ;//prevent warning
- break;
- }
- return false;
+ rText = EE_RESSTR( !GetValue()
+ ? RID_SVXITEMS_HNGPNCT_OFF
+ : RID_SVXITEMS_HNGPNCT_ON );
+ return true;
}
@@ -1493,27 +1432,14 @@ sal_uInt16 SvxForbiddenRuleItem::GetVersion( sal_uInt16 nFFVer ) const
}
bool SvxForbiddenRuleItem::GetPresentation(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* /*pIntl*/ ) const
{
- switch( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- break;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- rText = EE_RESSTR( !GetValue()
- ? RID_SVXITEMS_FORBIDDEN_RULE_OFF
- : RID_SVXITEMS_FORBIDDEN_RULE_ON );
- return true;
- }
- default: ;//prevent warning
- break;
- }
- return false;
+ rText = EE_RESSTR( !GetValue()
+ ? RID_SVXITEMS_FORBIDDEN_RULE_OFF
+ : RID_SVXITEMS_FORBIDDEN_RULE_ON );
+ return true;
}
/*************************************************************************
@@ -1550,34 +1476,21 @@ sal_uInt16 SvxParaVertAlignItem::GetVersion( sal_uInt16 nFFVer ) const
}
bool SvxParaVertAlignItem::GetPresentation(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* ) const
{
- switch( ePres )
+ sal_uInt16 nTmp;
+ switch( GetValue() )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- break;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nTmp;
- switch( GetValue() )
- {
- case AUTOMATIC: nTmp = RID_SVXITEMS_PARAVERTALIGN_AUTO; break;
- case TOP: nTmp = RID_SVXITEMS_PARAVERTALIGN_TOP; break;
- case CENTER: nTmp = RID_SVXITEMS_PARAVERTALIGN_CENTER; break;
- case BOTTOM: nTmp = RID_SVXITEMS_PARAVERTALIGN_BOTTOM; break;
- default: nTmp = RID_SVXITEMS_PARAVERTALIGN_BASELINE; break;
- }
- rText = EE_RESSTR( nTmp );
- return true;
- }
- default: ;//prevent warning
- break;
+ case AUTOMATIC: nTmp = RID_SVXITEMS_PARAVERTALIGN_AUTO; break;
+ case TOP: nTmp = RID_SVXITEMS_PARAVERTALIGN_TOP; break;
+ case CENTER: nTmp = RID_SVXITEMS_PARAVERTALIGN_CENTER; break;
+ case BOTTOM: nTmp = RID_SVXITEMS_PARAVERTALIGN_BOTTOM; break;
+ default: nTmp = RID_SVXITEMS_PARAVERTALIGN_BASELINE; break;
}
- return false;
+ rText = EE_RESSTR( nTmp );
+ return true;
}
bool SvxParaVertAlignItem::QueryValue( com::sun::star::uno::Any& rVal,
@@ -1635,28 +1548,15 @@ sal_uInt16 SvxParaGridItem::GetVersion( sal_uInt16 nFFVer ) const
}
bool SvxParaGridItem::GetPresentation(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* /*pIntl*/ ) const
{
- switch( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- break;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- rText = GetValue() ?
- EE_RESSTR( RID_SVXITEMS_PARASNAPTOGRID_ON ) :
- EE_RESSTR( RID_SVXITEMS_PARASNAPTOGRID_OFF );
+ rText = GetValue() ?
+ EE_RESSTR( RID_SVXITEMS_PARASNAPTOGRID_ON ) :
+ EE_RESSTR( RID_SVXITEMS_PARASNAPTOGRID_OFF );
- return true;
- }
- default: ;//prevent warning
- break;
- }
- return false;
+ return true;
}
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 2a8dea5..3d9a744 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -440,24 +440,14 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxFontItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = aFamilyName;
- return true;
- default: ; //prevent warning
- }
- return false;
+ rText = aFamilyName;
+ return true;
}
@@ -509,24 +499,14 @@ SfxPoolItem* SvxPostureItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxPostureItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetValueTextByPos( GetValue() );
- return true;
- default: ;//prevent warning
- }
- return false;
+ rText = GetValueTextByPos( GetValue() );
+ return true;
}
@@ -674,24 +654,14 @@ SfxPoolItem* SvxWeightItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxWeightItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetValueTextByPos( GetValue() );
- return true;
- default: ;//prevent warning
- }
- return false;
+ rText = GetValueTextByPos( GetValue() );
+ return true;
}
@@ -1036,40 +1006,28 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
bool SvxFontHeightItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit eCoreUnit,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *pIntl
) const
{
- switch ( ePres )
+ if( SFX_MAPUNIT_RELATIVE != ePropUnit )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- if( SFX_MAPUNIT_RELATIVE != ePropUnit )
- {
- rText = OUString::number( (short)nProp ) +
- " " + EE_RESSTR( GetMetricId( ePropUnit ) );
- if( 0 <= (short)nProp )
- rText = "+" + rText;
- }
- else if( 100 == nProp )
- {
- rText = GetMetricText( (long)nHeight,
- eCoreUnit, SFX_MAPUNIT_POINT, pIntl ) +
- " " + EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT));
- }
- else
- rText = OUString::number( nProp ) + "%";
- return true;
- }
- default: ; //prevent warning
+ rText = OUString::number( (short)nProp ) +
+ " " + EE_RESSTR( GetMetricId( ePropUnit ) );
+ if( 0 <= (short)nProp )
+ rText = "+" + rText;
}
- return false;
+ else if( 100 == nProp )
+ {
+ rText = GetMetricText( (long)nHeight,
+ eCoreUnit, SFX_MAPUNIT_POINT, pIntl ) +
+ " " + EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT));
+ }
+ else
+ rText = OUString::number( nProp ) + "%";
+ return true;
}
@@ -1235,33 +1193,21 @@ bool SvxFontWidthItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
bool SvxFontWidthItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit eCoreUnit,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *pIntl
) const
{
- switch ( ePres )
+ if ( 100 == nProp )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- if ( 100 == nProp )
- {
- rText = GetMetricText( (long)nWidth,
- eCoreUnit, SFX_MAPUNIT_POINT, pIntl ) +
- " " + EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT));
- }
- else
- rText = OUString::number( nProp ) + "%";
- return true;
- }
- default: ; //prevent warning
+ rText = GetMetricText( (long)nWidth,
+ eCoreUnit, SFX_MAPUNIT_POINT, pIntl ) +
+ " " + EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT));
}
- return false;
+ else
+ rText = OUString::number( nProp ) + "%";
+ return true;
}
// class SvxTextLineItem ------------------------------------------------
@@ -1329,26 +1275,16 @@ SfxPoolItem* SvxTextLineItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxTextLineItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetValueTextByPos( GetValue() );
- if( !mColor.GetTransparency() )
- rText = rText + OUString(cpDelim) + ::GetColorString( mColor );
- return true;
- default: ; //prevent warning
- }
- return false;
+ rText = GetValueTextByPos( GetValue() );
+ if( !mColor.GetTransparency() )
+ rText = rText + OUString(cpDelim) + ::GetColorString( mColor );
+ return true;
}
@@ -1557,24 +1493,14 @@ SfxPoolItem* SvxCrossedOutItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxCrossedOutItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetValueTextByPos( GetValue() );
- return true;
- default: ;//prevent warning
- }
- return false;
+ rText = GetValueTextByPos( GetValue() );
+ return true;
}
@@ -1654,30 +1580,18 @@ SfxPoolItem* SvxShadowedItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxShadowedItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = RID_SVXITEMS_SHADOWED_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_SHADOWED_FALSE;
- if ( GetValue() )
- nId = RID_SVXITEMS_SHADOWED_TRUE;
- rText = EE_RESSTR(nId);
- return true;
- }
- default: ; //prevent warning
- }
- return false;
+ if ( GetValue() )
+ nId = RID_SVXITEMS_SHADOWED_TRUE;
+ rText = EE_RESSTR(nId);
+ return true;
}
// class SvxAutoKernItem -------------------------------------------------
@@ -1715,30 +1629,18 @@ SfxPoolItem* SvxAutoKernItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxAutoKernItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = RID_SVXITEMS_AUTOKERN_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_AUTOKERN_FALSE;
- if ( GetValue() )
- nId = RID_SVXITEMS_AUTOKERN_TRUE;
- rText = EE_RESSTR(nId);
- return true;
- }
- default: ; //prevent warning
- }
- return false;
+ if ( GetValue() )
+ nId = RID_SVXITEMS_AUTOKERN_TRUE;
+ rText = EE_RESSTR(nId);
+ return true;
}
// class SvxWordLineModeItem ---------------------------------------------
@@ -1777,30 +1679,18 @@ SfxPoolItem* SvxWordLineModeItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxWordLineModeItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = RID_SVXITEMS_WORDLINE_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_WORDLINE_FALSE;
- if ( GetValue() )
- nId = RID_SVXITEMS_WORDLINE_TRUE;
- rText = EE_RESSTR(nId);
- return true;
- }
- default: ; //prevent warning
- }
- return false;
+ if ( GetValue() )
+ nId = RID_SVXITEMS_WORDLINE_TRUE;
+ rText = EE_RESSTR(nId);
+ return true;
}
// class SvxContourItem --------------------------------------------------
@@ -1838,30 +1728,18 @@ SfxPoolItem* SvxContourItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxContourItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = RID_SVXITEMS_CONTOUR_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_CONTOUR_FALSE;
- if ( GetValue() )
- nId = RID_SVXITEMS_CONTOUR_TRUE;
- rText = EE_RESSTR(nId);
- return true;
- }
- default: ; //prevent warning
- }
- return false;
+ if ( GetValue() )
+ nId = RID_SVXITEMS_CONTOUR_TRUE;
+ rText = EE_RESSTR(nId);
+ return true;
}
// class SvxPropSizeItem -------------------------------------------------
@@ -2055,24 +1933,14 @@ SfxPoolItem* SvxColorItem::Create(SvStream& rStrm, sal_uInt16 /*nVer*/ ) const
bool SvxColorItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = ::GetColorString( mColor );
- return true;
- default: ; //prevent warning
- }
- return false;
+ rText = ::GetColorString( mColor );
+ return true;
}
@@ -2202,9 +2070,6 @@ bool SvxKerningItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
case SFX_ITEM_PRESENTATION_NAMELESS:
rText = GetMetricText( (long)GetValue(), eCoreUnit, SFX_MAPUNIT_POINT, pIntl ) +
" " + EE_RESSTR(GetMetricId(SFX_MAPUNIT_POINT));
@@ -2293,24 +2158,14 @@ SfxPoolItem* SvxCaseMapItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxCaseMapItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetValueTextByPos( GetValue() );
- return true;
- default: ; //prevent warning
- }
- return false;
+ rText = GetValueTextByPos( GetValue() );
+ return true;
}
@@ -2441,34 +2296,22 @@ sal_uInt16 SvxEscapementItem::GetValueCount() const
bool SvxEscapementItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- rText = GetValueTextByPos( GetEnumValue() );
+ rText = GetValueTextByPos( GetEnumValue() );
- if ( nEsc != 0 )
- {
- if( DFLT_ESC_AUTO_SUPER == nEsc || DFLT_ESC_AUTO_SUB == nEsc )
- rText += EE_RESSTR(RID_SVXITEMS_ESCAPEMENT_AUTO);
- else
- rText = rText + OUString::number( nEsc ) + "%";
- }
- return true;
- }
- default: ; //prevent warning
+ if ( nEsc != 0 )
+ {
+ if( DFLT_ESC_AUTO_SUPER == nEsc || DFLT_ESC_AUTO_SUB == nEsc )
+ rText += EE_RESSTR(RID_SVXITEMS_ESCAPEMENT_AUTO);
+ else
+ rText = rText + OUString::number( nEsc ) + "%";
}
- return false;
+ return true;
}
@@ -2606,26 +2449,14 @@ SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxLanguageItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- rText = SvtLanguageTable::GetLanguageString( (LanguageType)GetValue() );
- return true;
- }
- default: ; //prevent warning
- }
- return false;
+ rText = SvtLanguageTable::GetLanguageString( (LanguageType)GetValue() );
+ return true;
}
bool SvxLanguageItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -2838,30 +2669,18 @@ SfxPoolItem* SvxBlinkItem::Create(SvStream& rStrm, sal_uInt16) const
bool SvxBlinkItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = RID_SVXITEMS_BLINK_FALSE;
+ sal_uInt16 nId = RID_SVXITEMS_BLINK_FALSE;
- if ( GetValue() )
- nId = RID_SVXITEMS_BLINK_TRUE;
- rText = EE_RESSTR(nId);
- return true;
- }
- default: ; //prevent warning
- }
- return false;
+ if ( GetValue() )
+ nId = RID_SVXITEMS_BLINK_TRUE;
+ rText = EE_RESSTR(nId);
+ return true;
}
// class SvxEmphaisMarkItem ---------------------------------------------------
@@ -2901,36 +2720,24 @@ SfxPoolItem* SvxEmphasisMarkItem::Create( SvStream& rStrm, sal_uInt16 ) const
bool SvxEmphasisMarkItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText,
const IntlWrapper * /*pIntl*/
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nVal = GetValue();
- rText = EE_RESSTR( RID_SVXITEMS_EMPHASIS_BEGIN_STYLE +
- ( EMPHASISMARK_STYLE & nVal ));
- sal_uInt16 nId = ( EMPHASISMARK_POS_ABOVE & nVal )
- ? RID_SVXITEMS_EMPHASIS_ABOVE_POS
- : ( EMPHASISMARK_POS_BELOW & nVal )
- ? RID_SVXITEMS_EMPHASIS_BELOW_POS
- : 0;
- if( nId )
- rText += EE_RESSTR( nId );
- return true;
- }
- default: ; //prevent warning
- }
- return false;
+ sal_uInt16 nVal = GetValue();
+ rText = EE_RESSTR( RID_SVXITEMS_EMPHASIS_BEGIN_STYLE +
+ ( EMPHASISMARK_STYLE & nVal ));
+ sal_uInt16 nId = ( EMPHASISMARK_POS_ABOVE & nVal )
+ ? RID_SVXITEMS_EMPHASIS_ABOVE_POS
+ : ( EMPHASISMARK_POS_BELOW & nVal )
+ ? RID_SVXITEMS_EMPHASIS_BELOW_POS
+ : 0;
+ if( nId )
+ rText += EE_RESSTR( nId );
+ return true;
}
@@ -3101,33 +2908,21 @@ bool SvxTwoLinesItem::PutValue( const com::sun::star::uno::Any& rVal,
return bRet;
}
-bool SvxTwoLinesItem::GetPresentation( SfxItemPresentation ePres,
+bool SvxTwoLinesItem::GetPresentation( SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* /*pIntl*/ ) const
{
- switch( ePres )
+ if( !GetValue() )
+ rText = EE_RESSTR( RID_SVXITEMS_TWOLINES_OFF );
+ else
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- break;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- if( !GetValue() )
- rText = EE_RESSTR( RID_SVXITEMS_TWOLINES_OFF );
- else
- {
- rText = EE_RESSTR( RID_SVXITEMS_TWOLINES );
- if( GetStartBracket() )
- rText = OUString(GetStartBracket()) + rText;
- if( GetEndBracket() )
- rText += OUString(GetEndBracket());
- }
- return true;
- }
- default: ; //prevent warning
+ rText = EE_RESSTR( RID_SVXITEMS_TWOLINES );
+ if( GetStartBracket() )
+ rText = OUString(GetStartBracket()) + rText;
+ if( GetEndBracket() )
+ rText += OUString(GetEndBracket());
}
- return false;
+ return true;
}
@@ -3193,33 +2988,21 @@ sal_uInt16 SvxCharRotateItem::GetVersion( sal_uInt16 nFFVer ) const
}
bool SvxCharRotateItem::GetPresentation(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* ) const
{
- switch( ePres )
+ if( !GetValue() )
+ rText = EE_RESSTR( RID_SVXITEMS_CHARROTATE_OFF );
+ else
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- break;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- if( !GetValue() )
- rText = EE_RESSTR( RID_SVXITEMS_CHARROTATE_OFF );
- else
- {
- rText = EE_RESSTR( RID_SVXITEMS_CHARROTATE );
- rText = rText.replaceFirst( "$(ARG1)",
- OUString::number( GetValue() / 10 ));
- if( IsFitToLine() )
- rText += EE_RESSTR( RID_SVXITEMS_CHARROTATE_FITLINE );
- }
- return true;
- }
- default: ; //prevent warning
+ rText = EE_RESSTR( RID_SVXITEMS_CHARROTATE );
+ rText = rText.replaceFirst( "$(ARG1)",
+ OUString::number( GetValue() / 10 ));
+ if( IsFitToLine() )
+ rText += EE_RESSTR( RID_SVXITEMS_CHARROTATE_FITLINE );
}
- return false;
+ return true;
}
bool SvxCharRotateItem::QueryValue( com::sun::star::uno::Any& rVal,
@@ -3336,31 +3119,19 @@ sal_uInt16 SvxCharScaleWidthItem::GetVersion( sal_uInt16 nFFVer ) const
}
bool SvxCharScaleWidthItem::GetPresentation(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
OUString &rText, const IntlWrapper* ) const
{
- switch( ePres )
+ if( !GetValue() )
+ rText = EE_RESSTR( RID_SVXITEMS_CHARSCALE_OFF );
+ else
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- break;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- if( !GetValue() )
- rText = EE_RESSTR( RID_SVXITEMS_CHARSCALE_OFF );
- else
- {
- rText = EE_RESSTR( RID_SVXITEMS_CHARSCALE );
- rText = rText.replaceFirst( "$(ARG1)",
- OUString::number( GetValue() ));
- }
- return true;
- }
- default: ; //prevent warning
+ rText = EE_RESSTR( RID_SVXITEMS_CHARSCALE );
+ rText = rText.replaceFirst( "$(ARG1)",
+ OUString::number( GetValue() ));
}
- return false;
+ return true;
}
bool SvxCharScaleWidthItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
@@ -3434,28 +3205,14 @@ sal_uInt16 SvxCharReliefItem::GetValueCount() const
bool SvxCharReliefItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- SfxItemPresentation eRet = ePres;
- switch( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- break;
-
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetValueTextByPos( GetValue() );
- break;
-
- default:
- eRet = SFX_ITEM_PRESENTATION_NONE;
- }
- return eRet != SFX_ITEM_PRESENTATION_NONE;
+ rText = GetValueTextByPos( GetValue() );
+ return true;
}
bool SvxCharReliefItem::PutValue( const com::sun::star::uno::Any& rVal,
diff --git a/editeng/source/items/writingmodeitem.cxx b/editeng/source/items/writingmodeitem.cxx
index 9000ecb..bebc0e6 100644
--- a/editeng/source/items/writingmodeitem.cxx
+++ b/editeng/source/items/writingmodeitem.cxx
@@ -65,28 +65,14 @@ sal_uInt16 SvxWritingModeItem::GetVersion( sal_uInt16 /*nFVer*/ ) const
return USHRT_MAX;
}
-bool SvxWritingModeItem::GetPresentation( SfxItemPresentation ePres,
+bool SvxWritingModeItem::GetPresentation( SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreMetric*/,
SfxMapUnit /*ePresMetric*/,
OUString &rText,
const IntlWrapper * ) const
{
- switch( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- break;
-
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = EE_RESSTR(RID_SVXITEMS_FRMDIR_BEGIN + GetValue());
- return true;
- break;
-
- default:
- return false;
- }
+ rText = EE_RESSTR(RID_SVXITEMS_FRMDIR_BEGIN + GetValue());
+ return true;
}
bool SvxWritingModeItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 0aaf16d..d32de32 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -119,7 +119,6 @@ enum SfxItemPresentation
*/
{
- SFX_ITEM_PRESENTATION_NONE,
SFX_ITEM_PRESENTATION_NAMELESS,
SFX_ITEM_PRESENTATION_COMPLETE
};
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index f0edf65..d7affc2 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -302,10 +302,6 @@ bool ScProtectionAttr::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- break;
-
case SFX_ITEM_PRESENTATION_NAMELESS:
rText = GetValueText();
break;
@@ -328,11 +324,10 @@ bool ScProtectionAttr::GetPresentation
+ (!bHidePrint ? aStrYes : aStrNo);
break;
- default:
- ePres = SFX_ITEM_PRESENTATION_NONE;
+ default: break;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool ScProtectionAttr::operator==( const SfxPoolItem& rItem ) const
@@ -433,7 +428,7 @@ bool ScRangeItem::GetPresentation
}
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
// ScTableListItem - List from Tables (-numbers)
@@ -514,10 +509,6 @@ bool ScTableListItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return ePres;
-
case SFX_ITEM_PRESENTATION_NAMELESS:
{
rText = "(";
@@ -1025,7 +1016,7 @@ bool ScPageScaleToItem::GetPresentation(
SfxItemPresentation ePres, SfxMapUnit, SfxMapUnit, OUString& rText, const IntlWrapper* ) const
{
rText = OUString();
- if( !IsValid() || (ePres == SFX_ITEM_PRESENTATION_NONE) )
+ if( !IsValid())
return false;
OUString aName( ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALETO ) );
@@ -1036,10 +1027,6 @@ bool ScPageScaleToItem::GetPresentation(
switch( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- break;
-
case SFX_ITEM_PRESENTATION_NAMELESS:
rText = aValue;
return true;
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index f9d76e1..4b1fc9d 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -172,11 +172,7 @@ SvStream& SfxPoolItem::Store(SvStream &rStream, sal_uInt16 ) const
* The corresponding unit of measure is passed as 'ePresentationMetric'.
*
*
- * @return SfxItemPresentation SFX_ITEM_PRESENTATION_NONE
- * A textual representation could not be
- * created
- *
- * SFX_ITEM_PRESENTATION_NAMELESS
+ * @return SfxItemPresentation SFX_ITEM_PRESENTATION_NAMELESS
* A textual representation (if applicable
* with a unit of measure) could be created,
* but it doesn't contain any semantic meaning
diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index 7b8d804..f1df7ae 100644
--- a/svx/source/dialog/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
@@ -105,24 +105,14 @@ bool SvxGridItem::operator==( const SfxPoolItem& rAttr ) const
bool SvxGridItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = "SvxGridItem";
- return ePres;
- default:
- return false;
- }
+ rText = "SvxGridItem";
+ return true;
}
// TabPage Screen Settings
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index 5f534a3..7615aa8 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -62,23 +62,13 @@ SvxOrientationItem::SvxOrientationItem( sal_Int32 nRotation, bool bStacked, cons
bool SvxOrientationItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper * ) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetValueText( GetValue() );
- return true;
- default: ; //prevent warning
- }
- return false;
+ rText = GetValueText( GetValue() );
+ return true;
}
@@ -240,9 +230,6 @@ bool SvxMarginItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
case SFX_ITEM_PRESENTATION_NAMELESS:
{
rText = GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit, pIntl ) +
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index b7dee44..9968429 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -109,8 +109,6 @@ bool SvxPageItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
case SFX_ITEM_PRESENTATION_NAMELESS:
{
if ( !aDescName.isEmpty() )
diff --git a/svx/source/items/postattr.cxx b/svx/source/items/postattr.cxx
index 36e4ff3..6a6b68a 100644
--- a/svx/source/items/postattr.cxx
+++ b/svx/source/items/postattr.cxx
@@ -55,9 +55,6 @@ bool SvxPostItAuthorItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
case SFX_ITEM_PRESENTATION_NAMELESS:
rText = GetValue();
return true;
@@ -103,9 +100,6 @@ bool SvxPostItDateItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
case SFX_ITEM_PRESENTATION_NAMELESS:
rText = GetValue();
return true;
@@ -151,9 +145,6 @@ bool SvxPostItTextItem::GetPresentation
{
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
case SFX_ITEM_PRESENTATION_NAMELESS:
rText = GetValue();
return true;
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 61016ed..0d6ade2 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -741,7 +741,7 @@ bool SdrScaleItem::GetPresentation(
rText = aStr + " " + rText;
}
- return ePresentation != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
SfxPoolItem* SdrScaleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
@@ -787,7 +787,7 @@ bool SdrOnOffItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
TYPEINIT1_AUTOFACTORY(SdrYesNoItem,SfxBoolItem);
@@ -819,7 +819,7 @@ bool SdrYesNoItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
@@ -853,7 +853,7 @@ bool SdrPercentItem::GetPresentation(
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
@@ -942,7 +942,7 @@ bool SdrAngleItem::GetPresentation(
}
rText = aText.makeStringAndClear();
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
@@ -993,7 +993,7 @@ bool SdrMetricItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr2);
rText = aStr2 + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
@@ -1023,7 +1023,7 @@ bool SdrCaptionTypeItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
TYPEINIT1_AUTOFACTORY(SdrCaptionEscDirItem,SfxEnumItem);
@@ -1049,7 +1049,7 @@ bool SdrCaptionEscDirItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
@@ -1080,7 +1080,7 @@ bool SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool SdrTextFitToSizeTypeItem::HasBoolValue() const { return true; }
@@ -1140,7 +1140,7 @@ bool SdrTextVertAdjustItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool SdrTextVertAdjustItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -1189,7 +1189,7 @@ bool SdrTextHorzAdjustItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool SdrTextHorzAdjustItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -1238,7 +1238,7 @@ bool SdrTextAniKindItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool SdrTextAniKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -1286,7 +1286,7 @@ bool SdrTextAniDirectionItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool SdrTextAniDirectionItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -1332,7 +1332,7 @@ bool SdrTextAniDelayItem::GetPresentation(
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
TYPEINIT1_AUTOFACTORY(SdrTextAniAmountItem,SfxInt16Item);
@@ -1389,7 +1389,7 @@ bool SdrTextAniAmountItem::GetPresentation(
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
TYPEINIT1_AUTOFACTORY( SdrTextFixedCellHeightItem, SfxBoolItem );
@@ -1418,7 +1418,7 @@ bool SdrTextFixedCellHeightItem::GetPresentation( SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
SfxPoolItem* SdrTextFixedCellHeightItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const
{
@@ -1516,7 +1516,7 @@ bool SdrCustomShapeAdjustmentItem::GetPresentation(
SdrItemPool::TakeItemName( Which(), aStr );
rText = aStr + " " + rText;
}
- return ePresentation != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
SfxPoolItem* SdrCustomShapeAdjustmentItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const
@@ -1633,7 +1633,7 @@ bool SdrEdgeKindItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool SdrEdgeKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -1822,7 +1822,7 @@ bool SdrMeasureKindItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool SdrMeasureKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -1870,7 +1870,7 @@ bool SdrMeasureTextHPosItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool SdrMeasureTextHPosItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -1918,7 +1918,7 @@ bool SdrMeasureTextVPosItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool SdrMeasureTextVPosItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -1973,7 +1973,7 @@ bool SdrMeasureUnitItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool SdrMeasureUnitItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -2019,7 +2019,7 @@ bool SdrCircKindItem::GetPresentation(SfxItemPresentation ePres,
SdrItemPool::TakeItemName(Which(), aStr);
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
bool SdrCircKindItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -2076,7 +2076,7 @@ bool SdrSignedPercentItem::GetPresentation(
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -2289,7 +2289,7 @@ bool SdrGrafModeItem::GetPresentation( SfxItemPresentation ePres,
rText = aStr + " " + rText;
}
- return ePres != SFX_ITEM_PRESENTATION_NONE;
+ return true;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 37d610a..109ae97 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -377,7 +377,7 @@ SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XLineStyleItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
@@ -385,32 +385,21 @@ bool XLineStyleItem::GetPresentation
{
rText = OUString();
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- {
- sal_uInt16 nId = 0;
+ sal_uInt16 nId = 0;
- switch( (sal_uInt16)GetValue() )
- {
- case XLINE_NONE:
- nId = RID_SVXSTR_INVISIBLE;
- break;
- case XLINE_SOLID:
- nId = RID_SVXSTR_SOLID;
- break;
- }
-
- if ( nId )
- rText = SVX_RESSTR( nId );
- return true;
- }
- default:
- return false;
+ switch( (sal_uInt16)GetValue() )
+ {
+ case XLINE_NONE:
+ nId = RID_SVXSTR_INVISIBLE;
+ break;
+ case XLINE_SOLID:
+ nId = RID_SVXSTR_SOLID;
+ break;
}
+
+ if ( nId )
+ rText = SVX_RESSTR( nId );
+ return true;
}
bool XLineStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -733,24 +722,14 @@ SvStream& XLineDashItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
bool XLineDashItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetName();
- return true;
- default:
- return false;
- }
+ rText = GetName();
+ return true;
}
bool XLineDashItem::HasMetrics() const
@@ -1061,26 +1040,16 @@ SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XLineWidthItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit eCoreUnit,
SfxMapUnit ePresUnit,
OUString& rText, const IntlWrapper * pIntl
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetMetricText( (long) GetValue(),
- eCoreUnit, ePresUnit, pIntl) +
- " " + EE_RESSTR( GetMetricId( ePresUnit) );
- return true;
- default:
- return false;
- }
+ rText = GetMetricText( (long) GetValue(),
+ eCoreUnit, ePresUnit, pIntl) +
+ " " + EE_RESSTR( GetMetricId( ePresUnit) );
+ return true;
}
bool XLineWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -1135,24 +1104,14 @@ SfxPoolItem* XLineColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XLineColorItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetName();
- return true;
- default:
- return false;
- }
+ rText = GetName();
+ return true;
}
bool XLineColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -1333,24 +1292,14 @@ SvStream& XLineStartItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
bool XLineStartItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetName();
- return true;
- default:
- return false;
- }
+ rText = GetName();
+ return true;
}
bool XLineStartItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -1908,24 +1857,14 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
bool XLineEndItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetName();
- return true;
- default:
- return false;
- }
+ rText = GetName();
+ return true;
}
bool XLineEndItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -2000,26 +1939,16 @@ SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) con
bool XLineStartWidthItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit eCoreUnit,
SfxMapUnit ePresUnit,
OUString& rText, const IntlWrapper * pIntl
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetMetricText( (long) GetValue(),
- eCoreUnit, ePresUnit, pIntl) +
- " " + EE_RESSTR( GetMetricId( ePresUnit) );
- return true;
- default:
- return false;
- }
+ rText = GetMetricText( (long) GetValue(),
+ eCoreUnit, ePresUnit, pIntl) +
+ " " + EE_RESSTR( GetMetricId( ePresUnit) );
+ return true;
}
bool XLineStartWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -2062,26 +1991,16 @@ SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XLineEndWidthItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit eCoreUnit,
SfxMapUnit ePresUnit,
OUString& rText, const IntlWrapper *pIntl
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetMetricText( (long) GetValue(),
- eCoreUnit, ePresUnit, pIntl) +
- " " + EE_RESSTR( GetMetricId( ePresUnit) );
- return true;
- default:
- return false;
- }
+ rText = GetMetricText( (long) GetValue(),
+ eCoreUnit, ePresUnit, pIntl) +
+ " " + EE_RESSTR( GetMetricId( ePresUnit) );
+ return true;
}
bool XLineEndWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -2124,25 +2043,15 @@ SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) co
bool XLineStartCenterItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = OUString( ResId( GetValue() ? RID_SVXSTR_CENTERED :
- RID_SVXSTR_NOTCENTERED, DIALOG_MGR() ) );
- return true;
- default:
- return false;
- }
+ rText = OUString( ResId( GetValue() ? RID_SVXSTR_CENTERED :
+ RID_SVXSTR_NOTCENTERED, DIALOG_MGR() ) );
+ return true;
}
bool XLineStartCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -2187,25 +2096,15 @@ SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) cons
bool XLineEndCenterItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = OUString( ResId( GetValue() ? RID_SVXSTR_CENTERED :
- RID_SVXSTR_NOTCENTERED, DIALOG_MGR() ) );
- return true;
- default:
- return false;
- }
+ rText = OUString( ResId( GetValue() ? RID_SVXSTR_CENTERED :
+ RID_SVXSTR_NOTCENTERED, DIALOG_MGR() ) );
+ return true;
}
bool XLineEndCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -2252,7 +2151,7 @@ SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XFillStyleItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
@@ -2260,42 +2159,30 @@ bool XFillStyleItem::GetPresentation
{
rText = OUString();
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
-
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- {
- sal_uInt16 nId = 0;
-
- switch( (sal_uInt16)GetValue() )
- {
- case drawing::FillStyle_NONE:
- nId = RID_SVXSTR_INVISIBLE;
- break;
- case drawing::FillStyle_SOLID:
- nId = RID_SVXSTR_SOLID;
- break;
- case drawing::FillStyle_GRADIENT:
- nId = RID_SVXSTR_GRADIENT;
- break;
- case drawing::FillStyle_HATCH:
- nId = RID_SVXSTR_HATCH;
- break;
- case drawing::FillStyle_BITMAP:
- nId = RID_SVXSTR_BITMAP;
- break;
- }
+ sal_uInt16 nId = 0;
- if ( nId )
- rText = SVX_RESSTR( nId );
- return true;
- }
- default:
- return false;
+ switch( (sal_uInt16)GetValue() )
+ {
+ case drawing::FillStyle_NONE:
+ nId = RID_SVXSTR_INVISIBLE;
+ break;
+ case drawing::FillStyle_SOLID:
+ nId = RID_SVXSTR_SOLID;
+ break;
+ case drawing::FillStyle_GRADIENT:
+ nId = RID_SVXSTR_GRADIENT;
+ break;
+ case drawing::FillStyle_HATCH:
+ nId = RID_SVXSTR_HATCH;
+ break;
+ case drawing::FillStyle_BITMAP:
+ nId = RID_SVXSTR_BITMAP;
+ break;
}
+
+ if ( nId )
+ rText = SVX_RESSTR( nId );
+ return true;
}
sal_uInt16 XFillStyleItem::GetValueCount() const
@@ -2360,24 +2247,14 @@ SfxPoolItem* XFillColorItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XFillColorItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetName();
- return true;
- default:
- return false;
- }
+ rText = GetName();
+ return true;
}
bool XFillColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -2431,24 +2308,14 @@ sal_uInt16 XSecondaryFillColorItem::GetVersion( sal_uInt16 /*nFileFormatVersion*
bool XSecondaryFillColorItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetName();
- return true;
- default:
- return false;
- }
+ rText = GetName();
+ return true;
}
// class XGradient
@@ -2634,24 +2501,14 @@ sal_uInt16 XFillGradientItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) con
bool XFillGradientItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetName();
- return true;
- default:
- return false;
- }
+ rText = GetName();
+ return true;
}
bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -3110,24 +2967,14 @@ SvStream& XFillHatchItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
bool XFillHatchItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- rText = OUString();
- return false;
- case SFX_ITEM_PRESENTATION_NAMELESS:
- case SFX_ITEM_PRESENTATION_COMPLETE:
- rText = GetName();
- return true;
- default:
- return false;
- }
+ rText = GetName();
+ return true;
}
bool XFillHatchItem::HasMetrics() const
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index 4e283d5..cd03b2b 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -68,8 +68,6 @@ bool XLineTransparenceItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
case SFX_ITEM_PRESENTATION_COMPLETE:
rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": ";
case SFX_ITEM_PRESENTATION_NAMELESS:
@@ -115,55 +113,44 @@ SfxPoolItem* XLineJointItem::Clone(SfxItemPool* /*pPool*/) const
return new XLineJointItem( *this );
}
-bool XLineJointItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/,
+bool XLineJointItem::GetPresentation( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const
{
rText = OUString();
- switch( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE: return false;
-
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- {
- sal_uInt16 nId = 0;
+ sal_uInt16 nId = 0;
- switch( GetValue() )
- {
- case( com::sun::star::drawing::LineJoint_MAKE_FIXED_SIZE ):
- case( com::sun::star::drawing::LineJoint_NONE ):
- nId = RID_SVXSTR_LINEJOINT_NONE;
- break;
+ switch( GetValue() )
+ {
+ case( com::sun::star::drawing::LineJoint_MAKE_FIXED_SIZE ):
+ case( com::sun::star::drawing::LineJoint_NONE ):
+ nId = RID_SVXSTR_LINEJOINT_NONE;
+ break;
- case( com::sun::star::drawing::LineJoint_MIDDLE ):
- nId = RID_SVXSTR_LINEJOINT_MIDDLE;
- break;
+ case( com::sun::star::drawing::LineJoint_MIDDLE ):
+ nId = RID_SVXSTR_LINEJOINT_MIDDLE;
+ break;
- case( com::sun::star::drawing::LineJoint_BEVEL ):
- nId = RID_SVXSTR_LINEJOINT_BEVEL;
- break;
+ case( com::sun::star::drawing::LineJoint_BEVEL ):
+ nId = RID_SVXSTR_LINEJOINT_BEVEL;
+ break;
- case( com::sun::star::drawing::LineJoint_MITER ):
- nId = RID_SVXSTR_LINEJOINT_MITER;
- break;
+ case( com::sun::star::drawing::LineJoint_MITER ):
+ nId = RID_SVXSTR_LINEJOINT_MITER;
+ break;
- case( com::sun::star::drawing::LineJoint_ROUND ):
- nId = RID_SVXSTR_LINEJOINT_ROUND;
- break;
- }
+ case( com::sun::star::drawing::LineJoint_ROUND ):
+ nId = RID_SVXSTR_LINEJOINT_ROUND;
+ break;
+ }
- if( nId )
- rText = SVX_RESSTR( nId );
+ if( nId )
+ rText = SVX_RESSTR( nId );
- return true;
- }
- default:
- return false;
- }
+ return true;
}
bool XLineJointItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -334,43 +321,32 @@ SfxPoolItem* XLineCapItem::Clone(SfxItemPool* /*pPool*/) const
return new XLineCapItem( *this );
}
-bool XLineCapItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/,
+bool XLineCapItem::GetPresentation( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const
{
rText = OUString();
- switch( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE: return false;
+ sal_uInt16 nId = 0;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- {
- sal_uInt16 nId = 0;
-
- switch( GetValue() )
- {
- default: /*com::sun::star::drawing::LineCap_BUTT*/
- nId = RID_SVXSTR_LINECAP_BUTT;
- break;
+ switch( GetValue() )
+ {
+ default: /*com::sun::star::drawing::LineCap_BUTT*/
+ nId = RID_SVXSTR_LINECAP_BUTT;
+ break;
- case(com::sun::star::drawing::LineCap_ROUND):
- nId = RID_SVXSTR_LINECAP_ROUND;
- break;
+ case(com::sun::star::drawing::LineCap_ROUND):
+ nId = RID_SVXSTR_LINECAP_ROUND;
+ break;
- case(com::sun::star::drawing::LineCap_SQUARE):
- nId = RID_SVXSTR_LINECAP_SQUARE;
- break;
- }
+ case(com::sun::star::drawing::LineCap_SQUARE):
+ nId = RID_SVXSTR_LINECAP_SQUARE;
+ break;
+ }
- if( nId )
- rText = SVX_RESSTR( nId );
+ if( nId )
+ rText = SVX_RESSTR( nId );
- return true;
- }
- default:
- return false;
- }
+ return true;
}
bool XLineCapItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
@@ -458,8 +434,6 @@ bool XFillTransparenceItem::GetPresentation
switch ( ePres )
{
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
case SFX_ITEM_PRESENTATION_COMPLETE:
rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": ";
case SFX_ITEM_PRESENTATION_NAMELESS:
@@ -521,7 +495,7 @@ SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/)
bool XGradientStepCountItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
@@ -529,18 +503,8 @@ bool XGradientStepCountItem::GetPresentation
{
rText = OUString();
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
-// rText = OUString( ResId( RID_SVXSTR_GRADIENTSTEPCOUNT, DIALOG_MGR() ) ) + ": ";
- case SFX_ITEM_PRESENTATION_NAMELESS:
- rText += OUString::number(GetValue());
- return true;
- default:
- return false;
- }
+ rText += OUString::number(GetValue());
+ return true;
}
// class XFillBmpTileItem
@@ -569,24 +533,14 @@ SfxPoolItem* XFillBmpTileItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XFillBmpTileItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
rText = OUString();
-
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- return true;
- default:
- return false;
- }
+ return true;
}
// class XFillBmpTilePosItem
@@ -615,24 +569,14 @@ SfxPoolItem* XFillBmpPosItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) const
bool XFillBmpPosItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
rText = OUString();
-
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- return true;
- default:
- return false;
- }
+ return true;
}
sal_uInt16 XFillBmpPosItem::GetValueCount() const
@@ -666,24 +610,14 @@ SfxPoolItem* XFillBmpSizeXItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) cons
bool XFillBmpSizeXItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
rText = OUString();
-
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- return true;
- default:
- return false;
- }
+ return true;
}
bool XFillBmpSizeXItem::HasMetrics() const
@@ -717,24 +651,14 @@ SfxPoolItem* XFillBmpSizeYItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) cons
bool XFillBmpSizeYItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
rText = OUString();
-
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- return true;
- default:
- return false;
- }
+ return true;
}
bool XFillBmpSizeYItem::HasMetrics() const
@@ -768,24 +692,14 @@ SfxPoolItem* XFillBmpSizeLogItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) co
bool XFillBmpSizeLogItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
rText = OUString();
-
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- return true;
- default:
- return false;
- }
+ return true;
}
// class XFillBmpTileOffXItem
@@ -814,24 +728,14 @@ SfxPoolItem* XFillBmpTileOffsetXItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/
bool XFillBmpTileOffsetXItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
rText = OUString();
-
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- return true;
- default:
- return false;
- }
+ return true;
}
// class XFillBmpTileOffYItem
@@ -860,24 +764,14 @@ SfxPoolItem* XFillBmpTileOffsetYItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/
bool XFillBmpTileOffsetYItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
rText = OUString();
-
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- return true;
- default:
- return false;
- }
+ return true;
}
// class XFillBmpStretchItem
@@ -906,24 +800,14 @@ SfxPoolItem* XFillBmpStretchItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/) co
bool XFillBmpStretchItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
rText = OUString();
-
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- return true;
- default:
- return false;
- }
+ return true;
}
// class XFillBmpTileOffPosXItem
@@ -952,24 +836,14 @@ SfxPoolItem* XFillBmpPosOffsetXItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/)
bool XFillBmpPosOffsetXItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
rText = OUString();
-
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- return true;
- default:
- return false;
- }
+ return true;
}
// class XFillBmpTileOffPosYItem
@@ -998,24 +872,14 @@ SfxPoolItem* XFillBmpPosOffsetYItem::Create( SvStream& rIn, sal_uInt16 /*nVer*/)
bool XFillBmpPosOffsetYItem::GetPresentation
(
- SfxItemPresentation ePres,
+ SfxItemPresentation /*ePres*/,
SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/,
OUString& rText, const IntlWrapper *
) const
{
rText = OUString();
-
- switch ( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- return true;
- default:
- return false;
- }
+ return true;
}
// class XFillBackgroundItem
@@ -1042,22 +906,11 @@ SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, sal_uInt16 /*nVer*/) con
return new XFillBackgroundItem( rIn );
}
-bool XFillBackgroundItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/,
+bool XFillBackgroundItem::GetPresentation( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/,
SfxMapUnit /*ePresUnit*/, OUString& rText, const IntlWrapper*) const
{
rText = OUString();
-
- switch( ePres )
- {
- case SFX_ITEM_PRESENTATION_NONE:
- return false;
-
- case SFX_ITEM_PRESENTATION_COMPLETE:
- case SFX_ITEM_PRESENTATION_NAMELESS:
- return true;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list