summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-13 08:44:21 +0200
committerNoel Grandin <noel@peralex.com>2016-01-13 08:44:46 +0200
commit8bd9eb833444810dec3debd0215bd26dffc2fb91 (patch)
tree67af5f48ff3b6a83e50ff8980d8b6fad96cc1446
parentloplugin:unusedmethods unused return value in include/sot (diff)
downloadcore-8bd9eb833444810dec3debd0215bd26dffc2fb91.tar.gz
core-8bd9eb833444810dec3debd0215bd26dffc2fb91.zip
loplugin:unusedmethods unused return value in include/svl
Change-Id: I759fe8769daccea07c2157bfb5912df8ba285534
-rw-r--r--editeng/source/items/frmitems.cxx21
-rw-r--r--editeng/source/items/textitem.cxx9
-rw-r--r--include/editeng/boxitem.hxx4
-rw-r--r--include/editeng/fhgtitem.hxx2
-rw-r--r--include/editeng/fwdtitem.hxx2
-rw-r--r--include/editeng/kernitem.hxx2
-rw-r--r--include/editeng/lineitem.hxx2
-rw-r--r--include/editeng/lrspitem.hxx2
-rw-r--r--include/editeng/shaditem.hxx2
-rw-r--r--include/editeng/sizeitem.hxx2
-rw-r--r--include/editeng/ulspitem.hxx2
-rw-r--r--include/svl/filerec.hxx25
-rw-r--r--include/svl/itemset.hxx4
-rw-r--r--include/svl/macitem.hxx4
-rw-r--r--include/svl/metitem.hxx2
-rw-r--r--include/svl/nranges.hxx2
-rw-r--r--include/svl/ondemand.hxx5
-rw-r--r--include/svl/ownlist.hxx6
-rw-r--r--include/svl/poolitem.hxx2
-rw-r--r--include/svl/style.hxx2
-rw-r--r--include/svl/zforlist.hxx3
-rw-r--r--include/svl/zformat.hxx2
-rw-r--r--include/svx/sdmetitm.hxx2
-rw-r--r--include/svx/sdtaaitm.hxx2
-rw-r--r--include/svx/xflhtit.hxx2
-rw-r--r--include/svx/xlndsit.hxx2
-rw-r--r--svl/source/items/intitem.cxx3
-rw-r--r--svl/source/items/itemset.cxx8
-rw-r--r--svl/source/items/macitem.cxx9
-rw-r--r--svl/source/items/poolitem.cxx3
-rw-r--r--svl/source/items/style.cxx3
-rw-r--r--svl/source/misc/ownlist.cxx19
-rw-r--r--svl/source/numbers/zforlist.cxx5
-rw-r--r--svl/source/numbers/zformat.cxx5
-rw-r--r--svx/source/svdraw/svdattr.cxx8
-rw-r--r--svx/source/xoutdev/xattr.cxx6
36 files changed, 57 insertions, 127 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 7968cc75d946..e84ce92afa4a 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -368,11 +368,10 @@ SvStream& SvxSizeItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) co
-bool SvxSizeItem::ScaleMetrics( long nMult, long nDiv )
+void SvxSizeItem::ScaleMetrics( long nMult, long nDiv )
{
aSize.Width() = Scale( aSize.Width(), nMult, nDiv );
aSize.Height() = Scale( aSize.Height(), nMult, nDiv );
- return true;
}
@@ -795,13 +794,12 @@ sal_uInt16 SvxLRSpaceItem::GetVersion( sal_uInt16 nFileVersion ) const
-bool SvxLRSpaceItem::ScaleMetrics( long nMult, long nDiv )
+void SvxLRSpaceItem::ScaleMetrics( long nMult, long nDiv )
{
nFirstLineOfst = (short)Scale( nFirstLineOfst, nMult, nDiv );
nTxtLeft = Scale( nTxtLeft, nMult, nDiv );
nLeftMargin = Scale( nLeftMargin, nMult, nDiv );
nRightMargin = Scale( nRightMargin, nMult, nDiv );
- return true;
}
@@ -1072,11 +1070,10 @@ sal_uInt16 SvxULSpaceItem::GetVersion( sal_uInt16 /*nFileVersion*/ ) const
-bool SvxULSpaceItem::ScaleMetrics( long nMult, long nDiv )
+void SvxULSpaceItem::ScaleMetrics( long nMult, long nDiv )
{
nUpper = (sal_uInt16)Scale( nUpper, nMult, nDiv );
nLower = (sal_uInt16)Scale( nLower, nMult, nDiv );
- return true;
}
@@ -1532,10 +1529,9 @@ SvStream& SvxShadowItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
-bool SvxShadowItem::ScaleMetrics( long nMult, long nDiv )
+void SvxShadowItem::ScaleMetrics( long nMult, long nDiv )
{
nWidth = (sal_uInt16)Scale( nWidth, nMult, nDiv );
- return true;
}
@@ -2280,7 +2276,7 @@ sal_uInt16 SvxBoxItem::GetVersion( sal_uInt16 nFFVer ) const
-bool SvxBoxItem::ScaleMetrics( long nMult, long nDiv )
+void SvxBoxItem::ScaleMetrics( long nMult, long nDiv )
{
if ( pTop ) pTop->ScaleMetrics( nMult, nDiv );
if ( pBottom ) pBottom->ScaleMetrics( nMult, nDiv );
@@ -2290,7 +2286,6 @@ bool SvxBoxItem::ScaleMetrics( long nMult, long nDiv )
nBottomDist = (sal_uInt16)Scale( nBottomDist, nMult, nDiv );
nLeftDist = (sal_uInt16)Scale( nLeftDist, nMult, nDiv );
nRightDist = (sal_uInt16)Scale( nRightDist, nMult, nDiv );
- return true;
}
@@ -2653,12 +2648,11 @@ SvStream& SvxBoxInfoItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
-bool SvxBoxInfoItem::ScaleMetrics( long nMult, long nDiv )
+void SvxBoxInfoItem::ScaleMetrics( long nMult, long nDiv )
{
if ( pHori ) pHori->ScaleMetrics( nMult, nDiv );
if ( pVert ) pVert->ScaleMetrics( nMult, nDiv );
nDefDist = (sal_uInt16)Scale( nDefDist, nMult, nDiv );
- return true;
}
@@ -3263,10 +3257,9 @@ SvStream& SvxLineItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) co
-bool SvxLineItem::ScaleMetrics( long nMult, long nDiv )
+void SvxLineItem::ScaleMetrics( long nMult, long nDiv )
{
if ( pLine ) pLine->ScaleMetrics( nMult, nDiv );
- return true;
}
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 7ca6b6a061b2..2837368be930 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1071,10 +1071,9 @@ sal_uInt16 SvxFontHeightItem::GetVersion(sal_uInt16 nFileVersion) const
-bool SvxFontHeightItem::ScaleMetrics( long nMult, long nDiv )
+void SvxFontHeightItem::ScaleMetrics( long nMult, long nDiv )
{
nHeight = (sal_uInt32)Scale( nHeight, nMult, nDiv );
- return true;
}
@@ -1156,10 +1155,9 @@ SvStream& SvxFontWidthItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/
-bool SvxFontWidthItem::ScaleMetrics( long nMult, long nDiv )
+void SvxFontWidthItem::ScaleMetrics( long nMult, long nDiv )
{
nWidth = (sal_uInt16)Scale( nWidth, nMult, nDiv );
- return true;
}
@@ -2105,10 +2103,9 @@ SvStream& SvxKerningItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ )
-bool SvxKerningItem::ScaleMetrics( long nMult, long nDiv )
+void SvxKerningItem::ScaleMetrics( long nMult, long nDiv )
{
SetValue( (sal_Int16)Scale( GetValue(), nMult, nDiv ) );
- return true;
}
diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx
index 563a1b5711bb..58ccb21ac086 100644
--- a/include/editeng/boxitem.hxx
+++ b/include/editeng/boxitem.hxx
@@ -85,7 +85,7 @@ public:
virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const override;
virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const override;
- virtual bool ScaleMetrics( long nMult, long nDiv ) override;
+ virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
const editeng::SvxBorderLine* GetTop() const { return pTop; }
@@ -198,7 +198,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override;
virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const override;
- virtual bool ScaleMetrics( long nMult, long nDiv ) override;
+ virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
const editeng::SvxBorderLine* GetHori() const { return pHori; }
diff --git a/include/editeng/fhgtitem.hxx b/include/editeng/fhgtitem.hxx
index cbd2a5fa0b09..c352e8e2bed9 100644
--- a/include/editeng/fhgtitem.hxx
+++ b/include/editeng/fhgtitem.hxx
@@ -61,7 +61,7 @@ public:
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override;
virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const override;
virtual sal_uInt16 GetVersion( sal_uInt16 nItemVersion) const override;
- virtual bool ScaleMetrics( long nMult, long nDiv ) override;
+ virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
inline SvxFontHeightItem& operator=(const SvxFontHeightItem& rSize)
diff --git a/include/editeng/fwdtitem.hxx b/include/editeng/fwdtitem.hxx
index 24525a869382..b3e10ca0947f 100644
--- a/include/editeng/fwdtitem.hxx
+++ b/include/editeng/fwdtitem.hxx
@@ -54,7 +54,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override;
virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const override;
- virtual bool ScaleMetrics( long nMult, long nDiv ) override;
+ virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
inline SvxFontWidthItem& operator=(const SvxFontWidthItem& rItem )
diff --git a/include/editeng/kernitem.hxx b/include/editeng/kernitem.hxx
index 46581c67c2d3..0398d46553f4 100644
--- a/include/editeng/kernitem.hxx
+++ b/include/editeng/kernitem.hxx
@@ -45,7 +45,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override;
virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const override;
- virtual bool ScaleMetrics( long nMult, long nDiv ) override;
+ virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
diff --git a/include/editeng/lineitem.hxx b/include/editeng/lineitem.hxx
index 70ebf75515fb..3f354dd8c8e3 100644
--- a/include/editeng/lineitem.hxx
+++ b/include/editeng/lineitem.hxx
@@ -57,7 +57,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override;
virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const override;
- virtual bool ScaleMetrics( long nMult, long nDiv ) override;
+ virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
const editeng::SvxBorderLine* GetLine () const { return pLine; }
diff --git a/include/editeng/lrspitem.hxx b/include/editeng/lrspitem.hxx
index 191aa4b88156..895aefc068e2 100644
--- a/include/editeng/lrspitem.hxx
+++ b/include/editeng/lrspitem.hxx
@@ -87,7 +87,7 @@ public:
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override;
virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const override;
virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const override;
- virtual bool ScaleMetrics( long nMult, long nDiv ) override;
+ virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
// Die "Layout-Schnittstelle":
diff --git a/include/editeng/shaditem.hxx b/include/editeng/shaditem.hxx
index a4b6ff363960..eb6dd819a062 100644
--- a/include/editeng/shaditem.hxx
+++ b/include/editeng/shaditem.hxx
@@ -60,7 +60,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override;
virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const override;
- virtual bool ScaleMetrics( long nMult, long nDiv ) override;
+ virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
const Color& GetColor() const { return aShadowColor;}
diff --git a/include/editeng/sizeitem.hxx b/include/editeng/sizeitem.hxx
index 1cd8a328660c..3615adff4dec 100644
--- a/include/editeng/sizeitem.hxx
+++ b/include/editeng/sizeitem.hxx
@@ -56,7 +56,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override;
virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const override;
- virtual bool ScaleMetrics( long nMult, long nDiv ) override;
+ virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
const Size& GetSize() const { return aSize; }
diff --git a/include/editeng/ulspitem.hxx b/include/editeng/ulspitem.hxx
index 40f5b7eeb924..bae95b19dc1d 100644
--- a/include/editeng/ulspitem.hxx
+++ b/include/editeng/ulspitem.hxx
@@ -61,7 +61,7 @@ public:
virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const override;
virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const override;
virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const override;
- virtual bool ScaleMetrics( long nMult, long nDiv ) override;
+ virtual void ScaleMetrics( long nMult, long nDiv ) override;
virtual bool HasMetrics() const override;
inline void SetUpper( const sal_uInt16 nU, const sal_uInt16 nProp = 100 );
diff --git a/include/svl/filerec.hxx b/include/svl/filerec.hxx
index 58271cc50488..b5685f33949f 100644
--- a/include/svl/filerec.hxx
+++ b/include/svl/filerec.hxx
@@ -87,8 +87,6 @@ public:
inline SfxMiniRecordWriter( SvStream *pStream, sal_uInt8 nTag );
inline ~SfxMiniRecordWriter();
- inline SvStream& operator*() const;
-
sal_uInt32 Close( bool bSeekToEndOfRec = true );
private:
@@ -257,8 +255,6 @@ public:
SfxMiniRecordReader( SvStream *pStream, sal_uInt8 nTag );
inline ~SfxMiniRecordReader();
- inline SvStream& operator*() const;
-
inline void Skip();
private:
@@ -577,16 +573,6 @@ inline SfxMiniRecordWriter::~SfxMiniRecordWriter()
Close();
}
-/** Get the record's stream
- * @return The stream containing the record
- * @note The record must not be already closed!
- */
-inline SvStream& SfxMiniRecordWriter::operator*() const
-{
- DBG_ASSERT( !_bHeaderOk, "getting Stream of closed record" );
- return *_pStream;
-}
-
/** The dtor moves the stream automatically to the position directly behind the record */
inline SfxMiniRecordReader::~SfxMiniRecordReader()
{
@@ -601,17 +587,6 @@ inline void SfxMiniRecordReader::Skip()
_bSkipped = true;
}
-/** get the owning stream
- *
- * This method returns the stream in which the record is contained.
- * The current position of the stream must be inside the record.
- */
-inline SvStream& SfxMiniRecordReader::operator*() const
-{
- DBG_ASSERT( _pStream->Tell() < _nEofRec, "read behind record" );
- return *_pStream;
-}
-
/// @see SfxMiniRecordWriter::Close()
inline sal_uInt32 SfxSingleRecordWriter::Close( bool bSeekToEndOfRec )
{
diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx
index 455be97b809f..16122cec4176 100644
--- a/include/svl/itemset.hxx
+++ b/include/svl/itemset.hxx
@@ -147,9 +147,9 @@ public:
void MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo );
const SfxItemSet* GetParent() const { return m_pParent; }
- SvStream & Load( SvStream &, bool bDirect = false,
+ void Load( SvStream &, bool bDirect = false,
const SfxItemPool *pRefPool = nullptr );
- SvStream & Store( SvStream &, bool bDirect = false ) const;
+ void Store( SvStream &, bool bDirect = false ) const;
bool operator==(const SfxItemSet &) const;
sal_Int32 getHash() const;
diff --git a/include/svl/macitem.hxx b/include/svl/macitem.hxx
index 38babec730ef..a6d78aa638c5 100644
--- a/include/svl/macitem.hxx
+++ b/include/svl/macitem.hxx
@@ -87,7 +87,7 @@ public:
SvxMacroTableDtor& operator=( const SvxMacroTableDtor &rCpy );
bool operator==( const SvxMacroTableDtor& rOther ) const;
- SvStream& Read( SvStream &, sal_uInt16 nVersion = SVX_MACROTBL_AKTVERSION );
+ void Read( SvStream &, sal_uInt16 nVersion = SVX_MACROTBL_AKTVERSION );
SvStream& Write( SvStream & ) const;
static sal_uInt16 GetVersion() { return SVX_MACROTBL_AKTVERSION; }
@@ -108,7 +108,7 @@ public:
// This stores a copy of the rMacro parameter
SvxMacro& Insert(sal_uInt16 nEvent, const SvxMacro& rMacro);
// If the entry exists, remove it from the map and release it's storage
- bool Erase(sal_uInt16 nEvent);
+ void Erase(sal_uInt16 nEvent);
};
diff --git a/include/svl/metitem.hxx b/include/svl/metitem.hxx
index 39ce85159159..7dda419f245e 100644
--- a/include/svl/metitem.hxx
+++ b/include/svl/metitem.hxx
@@ -30,7 +30,7 @@ public:
SfxMetricItem( const SfxMetricItem& );
virtual ~SfxMetricItem() {}
- virtual bool ScaleMetrics( long lMult, long lDiv ) override;
+ virtual void ScaleMetrics( long lMult, long lDiv ) override;
virtual bool HasMetrics() const override;
};
diff --git a/include/svl/nranges.hxx b/include/svl/nranges.hxx
index 4cc9fc213f89..def27ace1258 100644
--- a/include/svl/nranges.hxx
+++ b/include/svl/nranges.hxx
@@ -39,8 +39,6 @@ public:
{ delete [] _pRanges; }
bool operator == ( const SfxUShortRanges & ) const;
- bool operator != ( const SfxUShortRanges & rRanges ) const
- { return !( *this == rRanges ); }
SfxUShortRanges& operator = ( const SfxUShortRanges & );
diff --git a/include/svl/ondemand.hxx b/include/svl/ondemand.hxx
index b32dc3608663..cfc729b9b518 100644
--- a/include/svl/ondemand.hxx
+++ b/include/svl/ondemand.hxx
@@ -207,8 +207,6 @@ public:
return pPtr;
}
- CalendarWrapper* operator->() { return get(); }
- CalendarWrapper& operator*() { return *get(); }
};
/** Load a transliteration only if it's needed.
@@ -286,7 +284,6 @@ public:
}
const ::utl::TransliterationWrapper* operator->() const { return get(); }
- const ::utl::TransliterationWrapper& operator*() const { return *get(); }
};
/** Load a native number service wrapper only if it's needed.
@@ -340,8 +337,6 @@ public:
return pPtr;
}
- NativeNumberWrapper* operator->() { return get(); }
- NativeNumberWrapper& operator*() { return *get(); }
};
#endif // INCLUDED_SVL_ONDEMAND_HXX
diff --git a/include/svl/ownlist.hxx b/include/svl/ownlist.hxx
index 171d38deab44..460c4a3c0f83 100644
--- a/include/svl/ownlist.hxx
+++ b/include/svl/ownlist.hxx
@@ -62,10 +62,10 @@ private:
::std::vector< SvCommand > aCommandList;
public:
- SvCommand& Append( const OUString & rCommand, const OUString & rArg );
- bool AppendCommands( const OUString & rCmd, sal_Int32 * pEaten );
+ void Append( const OUString & rCommand, const OUString & rArg );
+ void AppendCommands( const OUString & rCmd, sal_Int32 * pEaten );
- bool FillFromSequence( const css::uno::Sequence < css::beans::PropertyValue >& );
+ void FillFromSequence( const css::uno::Sequence < css::beans::PropertyValue >& );
void FillSequence( css::uno::Sequence < css::beans::PropertyValue >& );
size_t size() const { return aCommandList.size(); }
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 0ae6bea2c512..5d7e4235d6bc 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -177,7 +177,7 @@ public:
const IntlWrapper * pIntlWrapper = nullptr ) const;
virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
- virtual bool ScaleMetrics( long lMult, long lDiv );
+ virtual void ScaleMetrics( long lMult, long lDiv );
virtual bool HasMetrics() const;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 174986e7300c..82173676de2e 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -259,7 +259,7 @@ public:
/** Add a style sheet.
* Not an actual public function. Do not call it from non-subclasses.
*/
- SfxStyleSheetBase& Add( const SfxStyleSheetBase& );
+ void Add( const SfxStyleSheetBase& );
};
class SVL_DLLPUBLIC SfxStyleSheet: public SfxStyleSheetBase,
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 0ca556598823..6178de7eb2d9 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -876,10 +876,9 @@ private:
// Adjust a sequence of format codes to contain only one (THE) default
// instead of multiple defaults for short/medium/long types.
// If there is no medium but a short and a long default the long is taken.
- // Return the default index in the sequence.
// Non-PRODUCT version may check locale data for matching defaults in one
// FormatElement group.
- SVL_DLLPRIVATE sal_Int32 ImpAdjustFormatCodeDefault( css::i18n::NumberFormatCode * pFormatArr,
+ SVL_DLLPRIVATE void ImpAdjustFormatCodeDefault( css::i18n::NumberFormatCode * pFormatArr,
sal_Int32 nCount, bool bCheckCorrectness = true );
// Obtain the format entry for a given key index.
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index c204702d168c..b66006b1f6fb 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -208,7 +208,7 @@ public:
bool GetOutputString( double fNumber, sal_uInt16 nCharCount, OUString& rOutString ) const;
bool GetOutputString( double fNumber, OUString& OutString, Color** ppColor );
- bool GetOutputString( const OUString& sString, OUString& OutString, Color** ppColor );
+ void GetOutputString( const OUString& sString, OUString& OutString, Color** ppColor );
// True if type text
bool IsTextFormat() const { return (eType & css::util::NumberFormat::TEXT) != 0; }
diff --git a/include/svx/sdmetitm.hxx b/include/svx/sdmetitm.hxx
index 2ec9ba0c33aa..d9dfc83e16c2 100644
--- a/include/svx/sdmetitm.hxx
+++ b/include/svx/sdmetitm.hxx
@@ -36,7 +36,7 @@ public:
virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override;
virtual bool HasMetrics() const override;
- virtual bool ScaleMetrics(long nMul, long nDiv) override;
+ virtual void ScaleMetrics(long nMul, long nDiv) override;
virtual bool GetPresentation(SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
diff --git a/include/svx/sdtaaitm.hxx b/include/svx/sdtaaitm.hxx
index ed4a40ad6136..3083e2f33262 100644
--- a/include/svx/sdtaaitm.hxx
+++ b/include/svx/sdtaaitm.hxx
@@ -30,7 +30,7 @@ public:
virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override;
virtual bool HasMetrics() const override;
- virtual bool ScaleMetrics(long nMul, long nDiv) override;
+ virtual void ScaleMetrics(long nMul, long nDiv) override;
virtual bool GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, OUString& rText, const IntlWrapper * = nullptr) const override;
};
diff --git a/include/svx/xflhtit.hxx b/include/svx/xflhtit.hxx
index 20cb18b399fd..b30c3f6fe229 100644
--- a/include/svx/xflhtit.hxx
+++ b/include/svx/xflhtit.hxx
@@ -53,7 +53,7 @@ public:
SfxMapUnit ePresMetric,
OUString &rText, const IntlWrapper * = nullptr ) const override;
virtual bool HasMetrics() const override;
- virtual bool ScaleMetrics(long nMul, long nDiv) override;
+ virtual void ScaleMetrics(long nMul, long nDiv) override;
const XHatch& GetHatchValue() const { return aHatch;} // GetValue -> GetHatchValue
void SetHatchValue(const XHatch& rNew) { aHatch = rNew; Detach(); } // SetValue -> SetHatchValue
diff --git a/include/svx/xlndsit.hxx b/include/svx/xlndsit.hxx
index 8868558b4835..04bfa03d0bb1 100644
--- a/include/svx/xlndsit.hxx
+++ b/include/svx/xlndsit.hxx
@@ -55,7 +55,7 @@ public:
SfxMapUnit ePresMetric,
OUString &rText, const IntlWrapper * = nullptr ) const override;
virtual bool HasMetrics() const override;
- virtual bool ScaleMetrics(long nMul, long nDiv) override;
+ virtual void ScaleMetrics(long nMul, long nDiv) override;
const XDash& GetDashValue() const { return aDash;}
void SetDashValue(const XDash& rNew) { aDash = rNew; Detach(); } // SetValue -> SetDashValue
diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx
index 2757ed0e0745..daa35b42080b 100644
--- a/svl/source/items/intitem.cxx
+++ b/svl/source/items/intitem.cxx
@@ -165,14 +165,13 @@ SfxMetricItem::SfxMetricItem(const SfxMetricItem & rItem):
}
// virtual
-bool SfxMetricItem::ScaleMetrics(long nMult, long nDiv)
+void SfxMetricItem::ScaleMetrics(long nMult, long nDiv)
{
BigInt aTheValue(GetValue());
aTheValue *= nMult;
aTheValue += nDiv / 2;
aTheValue /= nDiv;
SetValue(aTheValue);
- return true;
}
// virtual
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 2d146e0f8541..09c5004c2322 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -1286,7 +1286,7 @@ sal_uInt16 SfxItemSet::GetWhichByPos( sal_uInt16 nPos ) const
* @see SfxItemPool::StoreItem() const
* @see SfxItemSet::Load(SvStream&,bool,const SfxItemPool*)
*/
-SvStream &SfxItemSet::Store
+void SfxItemSet::Store
(
SvStream& rStream, // Target stream for normal Items
bool bDirect /* true: Save Items directly
@@ -1329,8 +1329,6 @@ SvStream &SfxItemSet::Store
rStream.Seek( nPos );
}
}
-
- return rStream;
}
/**
@@ -1341,7 +1339,7 @@ SvStream &SfxItemSet::Store
*
* @see SfxItemSet::Store(Stream&,bool) const
*/
-SvStream &SfxItemSet::Load
+void SfxItemSet::Load
(
SvStream& rStream, // Stream we're loading from
@@ -1407,8 +1405,6 @@ SvStream &SfxItemSet::Load
}
}
}
-
- return rStream;
}
bool SfxItemSet::operator==(const SfxItemSet &rCmp) const
diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index 133a1d944bac..e697add91e11 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -98,7 +98,7 @@ bool SvxMacroTableDtor::operator==( const SvxMacroTableDtor& rOther ) const
return true;
}
-SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
+void SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
{
if( SVX_MACROTBL_VERSION40 <= nVersion )
rStrm.ReadUInt16( nVersion );
@@ -108,7 +108,7 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
if (nMacro < 0)
{
SAL_WARN("editeng", "Parsing error: negative value " << nMacro);
- return rStrm;
+ return;
}
const size_t nMinStringSize = rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE ? 4 : 2;
@@ -137,7 +137,6 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
aSvxMacroTable.insert( SvxMacroTable::value_type(nCurKey, SvxMacro( aMacName, aLibName, (ScriptType)eType ) ));
}
- return rStrm;
}
@@ -195,15 +194,13 @@ SvxMacro& SvxMacroTableDtor::Insert(sal_uInt16 nEvent, const SvxMacro& rMacro)
}
// If the entry exists, remove it from the map and release it's storage
-bool SvxMacroTableDtor::Erase(sal_uInt16 nEvent)
+void SvxMacroTableDtor::Erase(sal_uInt16 nEvent)
{
SvxMacroTable::iterator it = aSvxMacroTable.find(nEvent);
if ( it != aSvxMacroTable.end())
{
aSvxMacroTable.erase(it);
- return true;
}
- return false;
}
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index 36eaac4f2f78..d09d7a8f7330 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -237,9 +237,8 @@ SfxPoolItem* SfxVoidItem::Clone(SfxItemPool *) const
return new SfxVoidItem(*this);
}
-bool SfxPoolItem::ScaleMetrics( long /*lMult*/, long /*lDiv*/ )
+void SfxPoolItem::ScaleMetrics( long /*lMult*/, long /*lDiv*/ )
{
- return false;
}
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index a10cc04a7d66..211c72d0d3bf 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -676,7 +676,7 @@ SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const OUString& rName, SfxStyleF
* Helper function: If a template with this name exists it is created
* anew. All templates that have this template as a parent are reconnected.
*/
-SfxStyleSheetBase& SfxStyleSheetBasePool::Add( const SfxStyleSheetBase& rSheet )
+void SfxStyleSheetBasePool::Add( const SfxStyleSheetBase& rSheet )
{
SfxStyleSheetIterator aIter(this, rSheet.GetFamily(), nMask);
SfxStyleSheetBase* pOld = aIter.Find( rSheet.GetName() );
@@ -686,7 +686,6 @@ SfxStyleSheetBase& SfxStyleSheetBasePool::Add( const SfxStyleSheetBase& rSheet )
rtl::Reference< SfxStyleSheetBase > xNew( Create( rSheet ) );
pImp->mxIndexedStyleSheets->AddStyleSheet(xNew);
Broadcast( SfxStyleSheetHint( SfxStyleSheetHintId::CHANGED, *xNew.get() ) );
- return *xNew.get();
}
SfxStyleSheetBasePool& SfxStyleSheetBasePool::operator=( const SfxStyleSheetBasePool& r )
diff --git a/svl/source/misc/ownlist.cxx b/svl/source/misc/ownlist.cxx
index b174c67650c5..b06cfc935fc7 100644
--- a/svl/source/misc/ownlist.cxx
+++ b/svl/source/misc/ownlist.cxx
@@ -63,12 +63,8 @@ static void eatSpace(const OUString & rCmd, sal_Int32 * pIndex)
/**
* Text is parsed and the single commands are added to the list.
*
- * @returns bool true
- * The text was correctly parsed
- false
- The text was not parsed correctly
*/
-bool SvCommandList::AppendCommands
+void SvCommandList::AppendCommands
(
const OUString & rCmd, /* This text is translated to commands */
sal_Int32 * pEaten /* Count of chars that have been read */
@@ -95,27 +91,22 @@ bool SvCommandList::AppendCommands
}
*pEaten = index;
-
- return true;
}
/**
* An object of the type SvCommand is created and the list is
* attached.
- *
- * @returns SvCommand & The created object
*/
-SvCommand & SvCommandList::Append
+void SvCommandList::Append
(
const OUString & rCommand, /* The command */
const OUString & rArg /* The command's argument */
)
{
aCommandList.push_back( SvCommand( rCommand, rArg ) );
- return aCommandList.back();
}
-bool SvCommandList::FillFromSequence( const css::uno::Sequence < css::beans::PropertyValue >& aCommandSequence )
+void SvCommandList::FillFromSequence( const css::uno::Sequence < css::beans::PropertyValue >& aCommandSequence )
{
const sal_Int32 nCount = aCommandSequence.getLength();
OUString aCommand, aArg;
@@ -124,12 +115,10 @@ bool SvCommandList::FillFromSequence( const css::uno::Sequence < css::beans::Pro
{
aCommand = aCommandSequence[nIndex].Name;
if( !( aCommandSequence[nIndex].Value >>= aApiArg ) )
- return false;
+ return;
aArg = aApiArg;
Append( aCommand, aArg );
}
-
- return true;
}
void SvCommandList::FillSequence( css::uno::Sequence < css::beans::PropertyValue >& aCommandSequence )
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 71bfb54c48b4..1326c9a9b571 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -2093,14 +2093,14 @@ sal_Int32 SvNumberFormatter::ImpGetFormatCodeIndex(
}
-sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault(
+void SvNumberFormatter::ImpAdjustFormatCodeDefault(
css::i18n::NumberFormatCode * pFormatArr,
sal_Int32 nCnt, bool bCheckCorrectness )
{
using namespace ::com::sun::star;
if ( !nCnt )
- return -1;
+ return;
if (bCheckCorrectness && LocaleDataWrapper::areChecksEnabled())
{
// check the locale data for correctness
@@ -2195,7 +2195,6 @@ sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault(
if ( nDef == -1 )
nDef = 0;
pFormatArr[nDef].Default = true;
- return nDef;
}
SvNumberformat* SvNumberFormatter::GetFormatEntry( sal_uInt32 nKey )
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 9c5bbf99bdf7..1c7f33bb2f84 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1878,7 +1878,7 @@ static bool lcl_insertStarFillChar( OUStringBuffer& rBuf, sal_Int32 nPos, const
return false;
}
-bool SvNumberformat::GetOutputString(const OUString& sString,
+void SvNumberformat::GetOutputString(const OUString& sString,
OUString& OutString,
Color** ppColor)
{
@@ -1895,7 +1895,7 @@ bool SvNumberformat::GetOutputString(const OUString& sString,
else
{
*ppColor = nullptr; // no change of color
- return false;
+ return;
}
*ppColor = NumFor[nIx].GetColor();
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
@@ -1927,7 +1927,6 @@ bool SvNumberformat::GetOutputString(const OUString& sString,
}
}
OutString = sOutBuff.makeStringAndClear();
- return bRes;
}
sal_uLong SvNumberformat::ImpGGT(sal_uLong x, sal_uLong y)
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 5f0978d4d136..e9510a6401c4 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -939,7 +939,7 @@ bool SdrMetricItem::HasMetrics() const
return true;
}
-bool SdrMetricItem::ScaleMetrics(long nMul, long nDiv)
+void SdrMetricItem::ScaleMetrics(long nMul, long nDiv)
{
if (GetValue()!=0) {
BigInt aVal(GetValue());
@@ -948,7 +948,6 @@ bool SdrMetricItem::ScaleMetrics(long nMul, long nDiv)
aVal/=nDiv;
SetValue(long(aVal));
}
- return true;
}
bool SdrMetricItem::GetPresentation(SfxItemPresentation ePres,
@@ -1312,7 +1311,7 @@ bool SdrTextAniAmountItem::HasMetrics() const
return GetValue()>0;
}
-bool SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv)
+void SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv)
{
if (GetValue()>0) {
BigInt aVal(GetValue());
@@ -1320,8 +1319,7 @@ bool SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv)
aVal+=nDiv/2; // to round accurately
aVal/=nDiv;
SetValue(short(aVal));
- return true;
- } else return false;
+ }
}
bool SdrTextAniAmountItem::GetPresentation(
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index f2adb3164765..16b93cc2b5f5 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -737,12 +737,11 @@ bool XLineDashItem::HasMetrics() const
return true;
}
-bool XLineDashItem::ScaleMetrics(long nMul, long nDiv)
+void XLineDashItem::ScaleMetrics(long nMul, long nDiv)
{
aDash.SetDotLen( ScaleMetricValue( aDash.GetDotLen(), nMul, nDiv ) );
aDash.SetDashLen( ScaleMetricValue( aDash.GetDashLen(), nMul, nDiv ) );
aDash.SetDistance( ScaleMetricValue( aDash.GetDistance(), nMul, nDiv ) );
- return true;
}
bool XLineDashItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -2975,10 +2974,9 @@ bool XFillHatchItem::HasMetrics() const
return true;
}
-bool XFillHatchItem::ScaleMetrics(long nMul, long nDiv)
+void XFillHatchItem::ScaleMetrics(long nMul, long nDiv)
{
aHatch.SetDistance( ScaleMetricValue( aHatch.GetDistance(), nMul, nDiv ) );
- return true;
}
bool XFillHatchItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) const