summaryrefslogtreecommitdiff
path: root/svl
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 /svl
parentfa7c7b160136e4b08bc1e1aef9017d4596ad6184 (diff)
loplugin:unusedmethods unused return value in include/svl
Change-Id: I759fe8769daccea07c2157bfb5912df8ba285534
Diffstat (limited to 'svl')
-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
8 files changed, 16 insertions, 39 deletions
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)