diff options
author | Noel Grandin <noel@peralex.com> | 2014-07-24 11:31:39 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-07-29 11:04:01 +0200 |
commit | 7e018afaf74ab118fe21d92edc9fb95ddea5d61b (patch) | |
tree | 740eb08b1a2841f35f68e8f6257d7abd46d09219 /svl | |
parent | fdo#55292 paragr. start. autocorr. with a single character (eg. ---A) (diff) | |
download | core-7e018afaf74ab118fe21d92edc9fb95ddea5d61b.tar.gz core-7e018afaf74ab118fe21d92edc9fb95ddea5d61b.zip |
simplify return argument of SfxPoolItem::GetPresentation
since all two of the actual call-sites only care about whether
it is a valid presentation or not, not what kind of presentation it is.
Change-Id: I75717c88878d37b2897741b0c833ff283b3fee59
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/cenumitm.cxx | 9 | ||||
-rw-r--r-- | svl/source/items/cintitem.cxx | 16 | ||||
-rw-r--r-- | svl/source/items/ctypeitm.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/custritm.cxx | 5 | ||||
-rw-r--r-- | svl/source/items/flagitem.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/int64item.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/intitem.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/itempool.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/macitem.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/poolitem.cxx | 8 | ||||
-rw-r--r-- | svl/source/items/ptitem.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/rectitem.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/rngitem.cxx | 8 | ||||
-rw-r--r-- | svl/source/items/sitem.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/slstitm.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/srchitem.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/szitem.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/visitem.cxx | 4 |
18 files changed, 47 insertions, 49 deletions
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx index 49250a70ac5c..536d2d717220 100644 --- a/svl/source/items/cenumitm.cxx +++ b/svl/source/items/cenumitm.cxx @@ -37,13 +37,12 @@ bool SfxEnumItemInterface::operator ==(const SfxPoolItem & rItem) const } // virtual -SfxItemPresentation -SfxEnumItemInterface::GetPresentation(SfxItemPresentation, SfxMapUnit, +bool SfxEnumItemInterface::GetPresentation(SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString & rText, const IntlWrapper *) const { rText = OUString::number( GetEnumValue() ); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } // virtual @@ -173,13 +172,13 @@ int SfxBoolItem::Compare(const SfxPoolItem & rWith) const } // virtual -SfxItemPresentation SfxBoolItem::GetPresentation(SfxItemPresentation, +bool SfxBoolItem::GetPresentation(SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString & rText, const IntlWrapper *) const { rText = GetValueTextByVal(m_bValue); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } // virtual diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx index f90acae6d388..e1291e26480b 100644 --- a/svl/source/items/cintitem.cxx +++ b/svl/source/items/cintitem.cxx @@ -43,13 +43,13 @@ int CntByteItem::Compare(const SfxPoolItem & rWith) const } // virtual -SfxItemPresentation CntByteItem::GetPresentation(SfxItemPresentation, +bool CntByteItem::GetPresentation(SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString & rText, const IntlWrapper *) const { rText = OUString::number( m_nValue ); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } // virtual @@ -146,14 +146,14 @@ int CntUInt16Item::Compare(const SfxPoolItem & rWith) const } // virtual -SfxItemPresentation CntUInt16Item::GetPresentation(SfxItemPresentation, +bool CntUInt16Item::GetPresentation(SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString & rText, const IntlWrapper *) const { rText = OUString::number( m_nValue ); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } // virtual @@ -248,13 +248,13 @@ int CntInt32Item::Compare(const SfxPoolItem & rWith) const } // virtual -SfxItemPresentation CntInt32Item::GetPresentation(SfxItemPresentation, +bool CntInt32Item::GetPresentation(SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString & rText, const IntlWrapper *) const { rText = OUString::number( m_nValue ); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } // virtual @@ -350,14 +350,14 @@ int CntUInt32Item::Compare(const SfxPoolItem & rWith) const } // virtual -SfxItemPresentation CntUInt32Item::GetPresentation(SfxItemPresentation, +bool CntUInt32Item::GetPresentation(SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString & rText, const IntlWrapper *) const { rText = OUString::number(m_nValue); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } // virtual diff --git a/svl/source/items/ctypeitm.cxx b/svl/source/items/ctypeitm.cxx index d0a2734d3204..cbc8d28bf038 100644 --- a/svl/source/items/ctypeitm.cxx +++ b/svl/source/items/ctypeitm.cxx @@ -130,7 +130,7 @@ int CntContentTypeItem::Compare( const SfxPoolItem &rWith, const IntlWrapper& rI return rIntlWrapper.getCollator()->compareString( aOwnText, aWithText ); } -SfxItemPresentation CntContentTypeItem::GetPresentation( +bool CntContentTypeItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, @@ -149,7 +149,7 @@ SfxItemPresentation CntContentTypeItem::GetPresentation( if (!_aPresentation.isEmpty()) { rText = _aPresentation; - return SFX_ITEM_PRESENTATION_COMPLETE; + return true; } else return CntUnencodedStringItem::GetPresentation(ePres, eCoreMetric, diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx index a2ff0f6b4431..e03504175ff3 100644 --- a/svl/source/items/custritm.cxx +++ b/svl/source/items/custritm.cxx @@ -58,13 +58,12 @@ int CntUnencodedStringItem::Compare(SfxPoolItem const & rWith, } // virtual -SfxItemPresentation -CntUnencodedStringItem::GetPresentation(SfxItemPresentation, SfxMapUnit, +bool CntUnencodedStringItem::GetPresentation(SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString & rText, const IntlWrapper *) const { rText = m_aValue; - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } // virtual diff --git a/svl/source/items/flagitem.cxx b/svl/source/items/flagitem.cxx index c0c85af1772f..b7ac57498db2 100644 --- a/svl/source/items/flagitem.cxx +++ b/svl/source/items/flagitem.cxx @@ -50,7 +50,7 @@ SvStream& SfxFlagItem::Store(SvStream &rStream, sal_uInt16) const -SfxItemPresentation SfxFlagItem::GetPresentation +bool SfxFlagItem::GetPresentation ( SfxItemPresentation /*ePresentation*/, SfxMapUnit /*eCoreMetric*/, @@ -62,7 +62,7 @@ SfxItemPresentation SfxFlagItem::GetPresentation rText = OUString(); for ( sal_uInt8 nFlag = 0; nFlag < GetFlagCount(); ++nFlag ) rText += GetFlag(nFlag) ? OUString("true") : OUString("false"); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } diff --git a/svl/source/items/int64item.cxx b/svl/source/items/int64item.cxx index c407fbeb763a..dca26fab9860 100644 --- a/svl/source/items/int64item.cxx +++ b/svl/source/items/int64item.cxx @@ -51,12 +51,12 @@ int SfxInt64Item::Compare( const SfxPoolItem& r, const IntlWrapper& /*rIntlWrapp return Compare(r); } -SfxItemPresentation SfxInt64Item::GetPresentation( +bool SfxInt64Item::GetPresentation( SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString& rText, const IntlWrapper* /*pIntlWrapper*/ ) const { rText = OUString::number(mnValue); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } bool SfxInt64Item::QueryValue( diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx index 3fa147c6a890..681a32373a0b 100644 --- a/svl/source/items/intitem.cxx +++ b/svl/source/items/intitem.cxx @@ -69,13 +69,13 @@ int SfxInt16Item::Compare(const SfxPoolItem & rWith) const } // virtual -SfxItemPresentation SfxInt16Item::GetPresentation(SfxItemPresentation, +bool SfxInt16Item::GetPresentation(SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString & rText, const IntlWrapper *) const { rText = OUString::number(m_nValue); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 473652bae51e..92cfb622efea 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -474,7 +474,7 @@ const OUString& SfxItemPool::GetName() const -SfxItemPresentation SfxItemPool::GetPresentation +bool SfxItemPool::GetPresentation ( const SfxPoolItem& rItem, SfxMapUnit eMetric, diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx index ecdfa9fa5159..3c0ff239275d 100644 --- a/svl/source/items/macitem.cxx +++ b/svl/source/items/macitem.cxx @@ -205,7 +205,7 @@ SfxPoolItem* SvxMacroItem::Clone( SfxItemPool* ) const } -SfxItemPresentation SvxMacroItem::GetPresentation +bool SvxMacroItem::GetPresentation ( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreUnit*/, @@ -229,7 +229,7 @@ SfxItemPresentation SvxMacroItem::GetPresentation } */ rText = OUString(); - return SFX_ITEM_PRESENTATION_NONE; + return false; } diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index 6445721cd141..f9d76e184ca6 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -199,7 +199,7 @@ SvStream& SfxPoolItem::Store(SvStream &rStream, sal_uInt16 ) const * pSvxBorderItem->GetPresentation( SFX_PRESENTATION_COMPLETE, ... ) * "1cm top border, 2cm left border, 0.2cm bottom border, ..." */ -SfxItemPresentation SfxPoolItem::GetPresentation +bool SfxPoolItem::GetPresentation ( SfxItemPresentation /*ePresentation*/, // IN: how we should format SfxMapUnit /*eCoreMetric*/, // IN: current metric of the SfxPoolItems @@ -208,7 +208,7 @@ SfxItemPresentation SfxPoolItem::GetPresentation const IntlWrapper * ) const { - return SFX_ITEM_PRESENTATION_NONE; + return false; } // SfxVoidItem ------------------------------------------------------------ @@ -235,7 +235,7 @@ rCmp } -SfxItemPresentation SfxVoidItem::GetPresentation +bool SfxVoidItem::GetPresentation ( SfxItemPresentation /*ePresentation*/, SfxMapUnit /*eCoreMetric*/, @@ -245,7 +245,7 @@ SfxItemPresentation SfxVoidItem::GetPresentation ) const { rText = "Void"; - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } diff --git a/svl/source/items/ptitem.cxx b/svl/source/items/ptitem.cxx index c9c36e26a51e..87940444d863 100644 --- a/svl/source/items/ptitem.cxx +++ b/svl/source/items/ptitem.cxx @@ -55,7 +55,7 @@ SfxPointItem::SfxPointItem( const SfxPointItem& rItem ) : -SfxItemPresentation SfxPointItem::GetPresentation +bool SfxPointItem::GetPresentation ( SfxItemPresentation /*ePresentation*/, SfxMapUnit /*eCoreMetric*/, @@ -65,7 +65,7 @@ SfxItemPresentation SfxPointItem::GetPresentation ) const { rText = OUString::number(aVal.X()) + ", " + OUString::number(aVal.Y()) + ", "; - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } diff --git a/svl/source/items/rectitem.cxx b/svl/source/items/rectitem.cxx index 2b43a61738d3..0441fd907608 100644 --- a/svl/source/items/rectitem.cxx +++ b/svl/source/items/rectitem.cxx @@ -52,7 +52,7 @@ SfxRectangleItem::SfxRectangleItem( const SfxRectangleItem& rItem ) : -SfxItemPresentation SfxRectangleItem::GetPresentation +bool SfxRectangleItem::GetPresentation ( SfxItemPresentation /*ePresentation*/, SfxMapUnit /*eCoreMetric*/, @@ -65,7 +65,7 @@ SfxItemPresentation SfxRectangleItem::GetPresentation OUString::number(aVal.Left()) + ", " + OUString::number(aVal.Bottom()) + ", " + OUString::number(aVal.Right()); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } diff --git a/svl/source/items/rngitem.cxx b/svl/source/items/rngitem.cxx index a3d9a680e859..cfea5b9f9349 100644 --- a/svl/source/items/rngitem.cxx +++ b/svl/source/items/rngitem.cxx @@ -58,7 +58,7 @@ SfxRangeItem::SfxRangeItem( const SfxRangeItem& rItem ) : -SfxItemPresentation SfxRangeItem::GetPresentation +bool SfxRangeItem::GetPresentation ( SfxItemPresentation /*ePresentation*/, SfxMapUnit /*eCoreMetric*/, @@ -68,7 +68,7 @@ SfxItemPresentation SfxRangeItem::GetPresentation ) const { rText = OUString::number(nFrom) + ":" + OUString::number(nTo); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } @@ -159,14 +159,14 @@ bool SfxUShortRangesItem::operator==( const SfxPoolItem &rItem ) const } -SfxItemPresentation SfxUShortRangesItem::GetPresentation( SfxItemPresentation /*ePres*/, +bool SfxUShortRangesItem::GetPresentation( SfxItemPresentation /*ePres*/, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString & /*rText*/, const IntlWrapper * ) const { // not implemented - return SFX_ITEM_PRESENTATION_NONE; + return false; } diff --git a/svl/source/items/sitem.cxx b/svl/source/items/sitem.cxx index b91b42808df8..206a2e6ce426 100644 --- a/svl/source/items/sitem.cxx +++ b/svl/source/items/sitem.cxx @@ -62,7 +62,7 @@ bool SfxSetItem::operator==( const SfxPoolItem& rCmp) const -SfxItemPresentation SfxSetItem::GetPresentation +bool SfxSetItem::GetPresentation ( SfxItemPresentation /*ePresentation*/, SfxMapUnit /*eCoreMetric*/, @@ -71,7 +71,7 @@ SfxItemPresentation SfxSetItem::GetPresentation const IntlWrapper * ) const { - return SFX_ITEM_PRESENTATION_NONE; + return false; } diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx index 8fc3c5d10e34..e15106367511 100644 --- a/svl/source/items/slstitm.cxx +++ b/svl/source/items/slstitm.cxx @@ -138,7 +138,7 @@ bool SfxStringListItem::operator==( const SfxPoolItem& rItem ) const } -SfxItemPresentation SfxStringListItem::GetPresentation +bool SfxStringListItem::GetPresentation ( SfxItemPresentation /*ePresentation*/, SfxMapUnit /*eCoreMetric*/, @@ -148,7 +148,7 @@ SfxItemPresentation SfxStringListItem::GetPresentation ) const { rText = "(List)"; - return SFX_ITEM_PRESENTATION_NONE; + return false; } diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx index dbaf87fcb5af..bcd8266fcf79 100644 --- a/svl/source/items/srchitem.cxx +++ b/svl/source/items/srchitem.cxx @@ -262,7 +262,7 @@ bool SvxSearchItem::operator==( const SfxPoolItem& rItem ) const -SfxItemPresentation SvxSearchItem::GetPresentation +bool SvxSearchItem::GetPresentation ( SfxItemPresentation , SfxMapUnit , @@ -271,7 +271,7 @@ SfxItemPresentation SvxSearchItem::GetPresentation const IntlWrapper * ) const { - return SFX_ITEM_PRESENTATION_NONE; + return false; } void SvxSearchItem::Notify( const Sequence< OUString > & ) diff --git a/svl/source/items/szitem.cxx b/svl/source/items/szitem.cxx index 1b0203cf02d6..fa25151339e4 100644 --- a/svl/source/items/szitem.cxx +++ b/svl/source/items/szitem.cxx @@ -52,7 +52,7 @@ SfxSizeItem::SfxSizeItem( const SfxSizeItem& rItem ) : -SfxItemPresentation SfxSizeItem::GetPresentation +bool SfxSizeItem::GetPresentation ( SfxItemPresentation /*ePresentation*/, SfxMapUnit /*eCoreMetric*/, @@ -62,7 +62,7 @@ SfxItemPresentation SfxSizeItem::GetPresentation ) const { rText = OUString::number(aVal.Width()) + ", " + OUString::number(aVal.Height()) + ", "; - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } diff --git a/svl/source/items/visitem.cxx b/svl/source/items/visitem.cxx index f1723ab86698..322c178ffa83 100644 --- a/svl/source/items/visitem.cxx +++ b/svl/source/items/visitem.cxx @@ -48,13 +48,13 @@ int SfxVisibilityItem::Compare(const SfxPoolItem & rWith) const } // virtual -SfxItemPresentation SfxVisibilityItem::GetPresentation(SfxItemPresentation, +bool SfxVisibilityItem::GetPresentation(SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString & rText, const IntlWrapper *) const { rText = GetValueTextByVal(m_nValue.bVisible); - return SFX_ITEM_PRESENTATION_NAMELESS; + return true; } |