[Libreoffice-commits] core.git: 3 commits - dbaccess/source editeng/source include/editeng include/sfx2 include/sot include/store include/svl include/svx sc/source sfx2/source sot/source svl/source svx/source sw/inc sw/source
Noel Grandin
noel at peralex.com
Tue Jan 12 22:45:18 PST 2016
dbaccess/source/core/dataaccess/ModelImpl.cxx | 3 -
dbaccess/source/core/dataaccess/ModelImpl.hxx | 2 -
editeng/source/items/frmitems.cxx | 21 +++-------
editeng/source/items/textitem.cxx | 9 +---
include/editeng/boxitem.hxx | 4 +-
include/editeng/fhgtitem.hxx | 2 -
include/editeng/fwdtitem.hxx | 2 -
include/editeng/kernitem.hxx | 2 -
include/editeng/lineitem.hxx | 2 -
include/editeng/lrspitem.hxx | 2 -
include/editeng/shaditem.hxx | 2 -
include/editeng/sizeitem.hxx | 2 -
include/editeng/ulspitem.hxx | 2 -
include/sfx2/app.hxx | 6 +--
include/sfx2/docfile.hxx | 10 ++---
include/sfx2/docmacromode.hxx | 2 -
include/sfx2/ipclient.hxx | 2 -
include/sfx2/linkmgr.hxx | 4 +-
include/sfx2/lnkbase.hxx | 2 -
include/sfx2/mnumgr.hxx | 4 +-
include/sfx2/objsh.hxx | 4 +-
include/sfx2/printer.hxx | 2 -
include/sfx2/shell.hxx | 2 -
include/sfx2/sidebar/FocusManager.hxx | 4 +-
include/sfx2/styfitem.hxx | 5 --
include/sfx2/tbxctrl.hxx | 2 -
include/sfx2/templateabstractview.hxx | 15 -------
include/sfx2/viewfrm.hxx | 4 +-
include/sfx2/viewsh.hxx | 2 -
include/sot/stg.hxx | 12 +++---
include/sot/storage.hxx | 2 -
include/store/store.hxx | 14 -------
include/svl/filerec.hxx | 25 -------------
include/svl/itemset.hxx | 4 +-
include/svl/macitem.hxx | 4 +-
include/svl/metitem.hxx | 2 -
include/svl/nranges.hxx | 2 -
include/svl/ondemand.hxx | 5 --
include/svl/ownlist.hxx | 6 +--
include/svl/poolitem.hxx | 2 -
include/svl/style.hxx | 2 -
include/svl/zforlist.hxx | 3 -
include/svl/zformat.hxx | 2 -
include/svx/sdmetitm.hxx | 2 -
include/svx/sdtaaitm.hxx | 2 -
include/svx/xflhtit.hxx | 2 -
include/svx/xlndsit.hxx | 2 -
sc/source/ui/docshell/docsh.cxx | 6 ---
sc/source/ui/inc/docsh.hxx | 2 -
sfx2/source/appl/appbas.cxx | 3 -
sfx2/source/appl/appcfg.cxx | 4 --
sfx2/source/appl/appinit.cxx | 6 +--
sfx2/source/appl/linkmgr2.cxx | 12 +++---
sfx2/source/appl/lnkbase2.cxx | 4 --
sfx2/source/control/shell.cxx | 5 +-
sfx2/source/control/templateabstractview.cxx | 7 ---
sfx2/source/dialog/styfitem.cxx | 50 ++++++++++----------------
sfx2/source/doc/docfile.cxx | 28 ++++----------
sfx2/source/doc/objmisc.cxx | 5 --
sfx2/source/doc/objstor.cxx | 3 -
sfx2/source/doc/objxtor.cxx | 3 -
sfx2/source/doc/sfxbasemodel.cxx | 2 -
sfx2/source/inc/objshimp.hxx | 2 -
sfx2/source/menu/mnumgr.cxx | 5 +-
sfx2/source/sidebar/FocusManager.cxx | 18 ++++-----
sfx2/source/toolbox/tbxitem.cxx | 4 --
sfx2/source/view/ipclient.cxx | 5 --
sfx2/source/view/printer.cxx | 4 +-
sfx2/source/view/viewfrm.cxx | 10 +----
sfx2/source/view/viewprn.cxx | 3 -
sfx2/source/view/viewsh.cxx | 2 -
sot/source/sdstor/stg.cxx | 11 ++---
sot/source/sdstor/storage.cxx | 3 -
sot/source/sdstor/ucbstorage.cxx | 14 ++-----
svl/source/items/intitem.cxx | 3 -
svl/source/items/itemset.cxx | 8 +---
svl/source/items/macitem.cxx | 9 +---
svl/source/items/poolitem.cxx | 3 -
svl/source/items/style.cxx | 3 -
svl/source/misc/ownlist.cxx | 19 ++-------
svl/source/numbers/zforlist.cxx | 5 +-
svl/source/numbers/zformat.cxx | 5 +-
svx/source/svdraw/svdattr.cxx | 8 +---
svx/source/xoutdev/xattr.cxx | 6 +--
sw/inc/docsh.hxx | 2 -
sw/source/uibase/app/docsh.cxx | 10 +----
86 files changed, 172 insertions(+), 348 deletions(-)
New commits:
commit 8bd9eb833444810dec3debd0215bd26dffc2fb91
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jan 13 08:44:21 2016 +0200
loplugin:unusedmethods unused return value in include/svl
Change-Id: I759fe8769daccea07c2157bfb5912df8ba285534
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 7968cc7..e84ce92 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 7ca6b6a..2837368 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 563a1b5..58ccb21 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 cbd2a5f..c352e8e 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 24525a8..b3e10ca 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 46581c6..0398d46 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 70ebf75..3f354dd 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 191aa4b..895aefc 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 a4b6ff3..eb6dd81 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 1cd8a32..3615adf 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 40f5b7e..bae95b1 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 58271cc..b5685f3 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 455be97..16122ce 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 38babec..a6d78aa 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 39ce851..7dda419 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 4cc9fc2..def27ac 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 b32dc36..cfc729b 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 171d38d..460c4a3 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 0ae6bea..5d7e423 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 174986e..8217367 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 0ca5565..6178de7 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 c204702..b66006b 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 2ec9ba0..d9dfc83e 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 ed4a40a..3083e2f 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 20cb18b..b30c3f6 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 8868558..04bfa03 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 2757ed0..daa35b4 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 2d146e0..09c5004 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 133a1d9..e697add 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 36eaac4f..d09d7a8 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 a10cc04..211c72d 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 b174c67..b06cfc9 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 71bfb54..1326c9a 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 9c5bbf9..1c7f33b 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 5f0978d..e9510a6 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 f2adb31..16b93cc 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
commit fa7c7b160136e4b08bc1e1aef9017d4596ad6184
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jan 12 15:40:44 2016 +0200
loplugin:unusedmethods unused return value in include/sot
Change-Id: I8da6d5f60b6c65ff0da8659045da1cd7666fb1d9
diff --git a/include/sot/stg.hxx b/include/sot/stg.hxx
index 90cf9be..a0a5eea 100644
--- a/include/sot/stg.hxx
+++ b/include/sot/stg.hxx
@@ -74,7 +74,7 @@ public:
virtual void Flush() = 0;
virtual bool SetSize( sal_uLong nNewSize ) = 0;
virtual sal_uLong GetSize() const = 0;
- virtual bool CopyTo( BaseStorageStream * pDestStm ) = 0;
+ virtual void CopyTo( BaseStorageStream * pDestStm ) = 0;
virtual bool Commit() = 0;
virtual bool Equals( const BaseStorageStream& rStream ) const = 0;
};
@@ -114,7 +114,7 @@ public:
virtual bool IsStream( const OUString& rEleName ) const = 0;
virtual bool IsStorage( const OUString& rEleName ) const = 0;
virtual bool IsContained( const OUString& rEleName ) const = 0;
- virtual bool Remove( const OUString & rEleName ) = 0;
+ virtual void Remove( const OUString & rEleName ) = 0;
virtual bool CopyTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName ) = 0;
virtual bool ValidateFAT() = 0;
virtual bool Equals( const BaseStorage& rStream ) const = 0;
@@ -147,7 +147,7 @@ public:
virtual void Flush() override;
virtual bool SetSize( sal_uLong nNewSize ) override;
virtual sal_uLong GetSize() const override;
- virtual bool CopyTo( BaseStorageStream * pDestStm ) override;
+ virtual void CopyTo( BaseStorageStream * pDestStm ) override;
virtual bool Commit() override;
virtual bool Validate( bool=false ) const override;
virtual bool ValidateMode( StreamMode ) const override;
@@ -202,7 +202,7 @@ public:
virtual bool IsStream( const OUString& rEleName ) const override;
virtual bool IsStorage( const OUString& rEleName ) const override;
virtual bool IsContained( const OUString& rEleName ) const override;
- virtual bool Remove( const OUString & rEleName ) override;
+ virtual void Remove( const OUString & rEleName ) override;
virtual bool CopyTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName ) override;
virtual bool ValidateFAT() override;
virtual bool Validate( bool=false ) const override;
@@ -231,7 +231,7 @@ public:
virtual void Flush() override;
virtual bool SetSize( sal_uLong nNewSize ) override;
virtual sal_uLong GetSize() const override;
- virtual bool CopyTo( BaseStorageStream * pDestStm ) override;
+ virtual void CopyTo( BaseStorageStream * pDestStm ) override;
virtual bool Commit() override;
virtual bool Validate( bool=false ) const override;
virtual bool ValidateMode( StreamMode ) const override;
@@ -305,7 +305,7 @@ public:
virtual bool IsStream( const OUString& rEleName ) const override;
virtual bool IsStorage( const OUString& rEleName ) const override;
virtual bool IsContained( const OUString& rEleName ) const override;
- virtual bool Remove( const OUString & rEleName ) override;
+ virtual void Remove( const OUString & rEleName ) override;
virtual bool CopyTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName ) override;
virtual bool ValidateFAT() override;
virtual bool Validate( bool=false ) const override;
diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx
index 3e431a3..326ef1e 100644
--- a/include/sot/storage.hxx
+++ b/include/sot/storage.hxx
@@ -53,7 +53,7 @@ public:
virtual void SetSize( sal_uInt64 nNewSize ) override;
sal_uInt32 GetSize() const;
- bool CopyTo( SotStorageStream * pDestStm );
+ void CopyTo( SotStorageStream * pDestStm );
bool Commit();
bool SetProperty( const OUString& rName, const css::uno::Any& rValue );
virtual sal_uInt64 remainingSize() override;
diff --git a/include/store/store.hxx b/include/store/store.hxx
index 790fd4b..050e9b7 100644
--- a/include/store/store.hxx
+++ b/include/store/store.hxx
@@ -81,13 +81,6 @@ public:
(void) store_acquireHandle (m_hImpl);
}
- /** Conversion into Stream Handle.
- */
- inline operator storeStreamHandle() const
- {
- return m_hImpl;
- }
-
/** Open the stream.
@see store_openStream()
*/
@@ -193,13 +186,6 @@ public:
(void) store_acquireHandle (m_hImpl);
}
- /** Conversion into Directory Handle.
- */
- inline operator storeDirectoryHandle() const
- {
- return m_hImpl;
- }
-
/** Open the directory.
@see store_openDirectory()
*/
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index 5245300..45c0296 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -263,15 +263,14 @@ bool StorageStream::Commit()
}
}
-bool StorageStream::CopyTo( BaseStorageStream* pDest )
+void StorageStream::CopyTo( BaseStorageStream* pDest )
{
if( !Validate() || !pDest || !pDest->Validate( true ) || Equals( *pDest ) )
- return false;
+ return;
pEntry->Copy( *pDest );
pDest->Commit();
pIo->MoveError( *this );
SetError( pDest->GetError() );
- return Good() && pDest->Good();
}
bool StorageStream::Validate( bool bValidate ) const
@@ -650,20 +649,18 @@ BaseStorageStream* Storage::OpenStream( const OUString& rName, StreamMode m, boo
// Delete a stream or substorage by setting the temp bit.
-bool Storage::Remove( const OUString& rName )
+void Storage::Remove( const OUString& rName )
{
if( !Validate( true ) )
- return false;
+ return;
StgDirEntry* p = pIo->m_pTOC->Find( *pEntry, rName );
if( p )
{
p->Invalidate( true );
- return true;
}
else
{
SetError( SVSTREAM_FILE_NOT_FOUND );
- return false;
}
}
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 9cdc66e..9abf9cc 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -195,7 +195,7 @@ sal_uInt64 SotStorageStream::remainingSize()
return SvStream::remainingSize();
}
-bool SotStorageStream::CopyTo( SotStorageStream * pDestStm )
+void SotStorageStream::CopyTo( SotStorageStream * pDestStm )
{
Flush(); // alle Daten schreiben
pDestStm->ClearBuffer();
@@ -226,7 +226,6 @@ bool SotStorageStream::CopyTo( SotStorageStream * pDestStm )
pOwnStm->CopyTo( pDestStm->pOwnStm );
SetError( pOwnStm->GetError() );
}
- return GetError() == SVSTREAM_OK;
}
bool SotStorageStream::Commit()
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index aa00eda..a8586fd 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1366,10 +1366,10 @@ bool UCBStorageStream::Commit()
return true;
}
-bool UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
+void UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
{
if( !pImp->Init() )
- return false;
+ return;
UCBStorageStream* pStg = dynamic_cast<UCBStorageStream*>( pDestStm );
if ( pStg )
@@ -1379,7 +1379,7 @@ bool UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
Seek( STREAM_SEEK_TO_END );
sal_Int32 n = Tell();
if( n < 0 )
- return false;
+ return;
if( pDestStm->SetSize( n ) && n )
{
@@ -1398,8 +1398,6 @@ bool UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
n -= nn;
}
}
-
- return true;
}
bool UCBStorageStream::SetProperty( const OUString& rName, const css::uno::Any& rValue )
@@ -2924,10 +2922,10 @@ bool UCBStorage::IsContained( const OUString & rEleName ) const
return ( pElement != nullptr );
}
-bool UCBStorage::Remove( const OUString& rEleName )
+void UCBStorage::Remove( const OUString& rEleName )
{
if( rEleName.isEmpty() )
- return false;
+ return;
UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
if ( pElement )
@@ -2936,8 +2934,6 @@ bool UCBStorage::Remove( const OUString& rEleName )
}
else
SetError( SVSTREAM_FILE_NOT_FOUND );
-
- return ( pElement != nullptr );
}
bool UCBStorage::ValidateFAT()
commit 38c23520d40749ff21b6b1ed5f5c0375d40fe1fc
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jan 12 13:41:12 2016 +0200
loplugin:unusedmethods unused return value in include/sfx2
Change-Id: Id4017bdfe18f8224d28a9f787865c7a880aeeed8
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index cd33537..c4c5c5e 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1295,10 +1295,9 @@ sal_Int16 ODatabaseModelImpl::getCurrentMacroExecMode() const
return nCurrentMode;
}
-bool ODatabaseModelImpl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
+void ODatabaseModelImpl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
{
m_aMediaDescriptor.put( "MacroExecutionMode", nMacroMode );
- return true;
}
OUString ODatabaseModelImpl::getDocumentLocation() const
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index 2a02358..9455767 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -467,7 +467,7 @@ public:
public:
// IMacroDocumentAccess overridables
virtual sal_Int16 getCurrentMacroExecMode() const override;
- virtual bool setCurrentMacroExecMode( sal_uInt16 ) override;
+ virtual void setCurrentMacroExecMode( sal_uInt16 ) override;
virtual OUString getDocumentLocation() const override;
virtual bool documentStorageHasMacros() const override;
virtual css::uno::Reference< css::document::XEmbeddedScripts > getEmbeddedDocumentScripts() const override;
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index d00aa95..ed618d9 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -175,10 +175,10 @@ public:
css::script::XLibraryContainer * GetDialogContainer();
css::script::XLibraryContainer * GetBasicContainer();
static StarBASIC* GetBasic();
- sal_uInt16 SaveBasicAndDialogContainer() const;
+ void SaveBasicAndDialogContainer() const;
// misc.
- bool GetOptions(SfxItemSet &);
+ void GetOptions(SfxItemSet &);
void SetOptions(const SfxItemSet &);
virtual void Invalidate(sal_uInt16 nId = 0) override;
void NotifyEvent(const SfxEventHint& rEvent, bool bSynchron = true );
@@ -189,7 +189,7 @@ public:
SAL_DLLPRIVATE SfxDispatcher* GetDispatcher_Impl();
SAL_DLLPRIVATE void SetOptions_Impl(const SfxItemSet &);
- SAL_DLLPRIVATE bool Initialize_Impl();
+ SAL_DLLPRIVATE void Initialize_Impl();
SAL_DLLPRIVATE SfxAppData_Impl* Get_Impl() const { return pAppData_Impl; }
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index d60596d..2dc8014 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -61,7 +61,7 @@ class SFX2_DLLPUBLIC SfxMedium : public SvRefBase
SAL_DLLPRIVATE void SetIsRemote_Impl();
SAL_DLLPRIVATE void CloseInStream_Impl();
- SAL_DLLPRIVATE bool CloseOutStream_Impl();
+ SAL_DLLPRIVATE void CloseOutStream_Impl();
SAL_DLLPRIVATE void CloseStreams_Impl();
SAL_DLLPRIVATE void SetEncryptionDataToStorage_Impl();
@@ -204,10 +204,10 @@ public:
SAL_DLLPRIVATE void SetStorage_Impl( const css::uno::Reference< css::embed::XStorage >& xNewStorage );
SAL_DLLPRIVATE void CloseAndReleaseStreams_Impl();
- SAL_DLLPRIVATE sal_uInt16 AddVersion_Impl( css::util::RevisionTag& rVersion );
+ SAL_DLLPRIVATE void AddVersion_Impl( css::util::RevisionTag& rVersion );
SAL_DLLPRIVATE bool TransferVersionList_Impl( SfxMedium& rMedium );
- SAL_DLLPRIVATE bool SaveVersionList_Impl( bool bUseXML );
- SAL_DLLPRIVATE bool RemoveVersion_Impl( const OUString& rVersion );
+ SAL_DLLPRIVATE void SaveVersionList_Impl( bool bUseXML );
+ SAL_DLLPRIVATE void RemoveVersion_Impl( const OUString& rVersion );
SAL_DLLPRIVATE void SetExpired_Impl( const DateTime& rDateTime );
SAL_DLLPRIVATE SvKeyValueIterator* GetHeaderAttributes_Impl();
@@ -243,7 +243,7 @@ public:
SAL_DLLPRIVATE bool StorageCommit_Impl();
- SAL_DLLPRIVATE bool TransactedTransferForFS_Impl( const INetURLObject& aSource,
+ SAL_DLLPRIVATE void TransactedTransferForFS_Impl( const INetURLObject& aSource,
const INetURLObject& aDest,
const css::uno::Reference< css::ucb::XCommandEnvironment >& xComEnv );
diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index 2a9efc8..7011f93 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -83,7 +83,7 @@ namespace sfx2
see getCurrentMacroExecMode
*/
- virtual bool
+ virtual void
setCurrentMacroExecMode( sal_uInt16 ) = 0;
/** returns the origin of the document
diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index b836bf4..590ec7f 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -71,7 +71,7 @@ public:
Rectangle GetObjArea() const;
Rectangle GetScaledObjArea() const;
void SetSizeScale( const Fraction & rScaleWidth, const Fraction & rScaleHeight );
- bool SetObjAreaAndScale( const Rectangle&, const Fraction&, const Fraction& );
+ void SetObjAreaAndScale( const Rectangle&, const Fraction&, const Fraction& );
const Fraction& GetScaleWidth() const;
const Fraction& GetScaleHeight() const;
void Invalidate();
diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx
index c6cbcf0..ab59ddd 100644
--- a/include/sfx2/linkmgr.hxx
+++ b/include/sfx2/linkmgr.hxx
@@ -91,13 +91,13 @@ public:
bool Insert( SvBaseLink* pLink );
// the links connect to a SvLinkSource and adds to the list
- bool InsertDDELink( SvBaseLink*,
+ void InsertDDELink( SvBaseLink*,
const OUString& rServer,
const OUString& rTopic,
const OUString& rItem );
// if everything is already set at the link!
- bool InsertDDELink( SvBaseLink* );
+ void InsertDDELink( SvBaseLink* );
// Connect the links to a pseudo-object and add to the list
bool InsertFileLink( sfx2::SvBaseLink&,
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index fe5c881..5baabf4 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -136,7 +136,7 @@ public:
void SetUpdateMode( SfxLinkUpdateMode );
SfxLinkUpdateMode GetUpdateMode() const;
SotClipboardFormatId GetContentType() const;
- bool SetContentType( SotClipboardFormatId nType );
+ void SetContentType( SotClipboardFormatId nType );
LinkManager* GetLinkManager();
const LinkManager* GetLinkManager() const;
diff --git a/include/sfx2/mnumgr.hxx b/include/sfx2/mnumgr.hxx
index 2adb619..7682fc6 100644
--- a/include/sfx2/mnumgr.hxx
+++ b/include/sfx2/mnumgr.hxx
@@ -86,10 +86,10 @@ public:
// Changing code which relies on Popup would need much more effort.
static SfxPopupMenuManager* Popup( const ResId& rResId, SfxViewFrame* pFrame,const Point& rPoint, vcl::Window* pWindow );
- sal_uInt16 Execute( const Point& rPos, vcl::Window *pWindow );
+ void Execute( const Point& rPos, vcl::Window *pWindow );
void RemoveDisabledEntries();
- Menu* GetSVMenu();
+ Menu* GetSVMenu();
};
#endif // INCLUDED_SFX2_MNUMGR_HXX
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 6fd70b2..47f8042 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -318,7 +318,7 @@ public:
*
* @return true if the initialization is successful, false otherwise.
*/
- bool DoInitUnitTest();
+ void DoInitUnitTest();
bool DoInitNew( SfxMedium* pMedium=nullptr );
bool DoLoad( SfxMedium* pMedium );
bool DoLoadExternal( SfxMedium* pMed );
@@ -624,7 +624,7 @@ public:
virtual bool IsChangeRecording() const;
virtual bool HasChangeRecordProtection() const;
virtual void SetChangeRecording( bool bActivate );
- virtual bool SetProtectionPassword( const OUString &rPassword );
+ virtual void SetProtectionPassword( const OUString &rPassword );
virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash );
SAL_DLLPRIVATE std::shared_ptr<GDIMetaFile> CreatePreviewMetaFile_Impl( bool bFullContent ) const;
diff --git a/include/sfx2/printer.hxx b/include/sfx2/printer.hxx
index f6cda40..1e9c05b 100644
--- a/include/sfx2/printer.hxx
+++ b/include/sfx2/printer.hxx
@@ -53,7 +53,7 @@ public:
VclPtr<SfxPrinter> Clone() const;
static VclPtr<SfxPrinter> Create( SvStream &rStream, SfxItemSet *pOptions );
- SvStream& Store( SvStream &rStream ) const;
+ void Store( SvStream &rStream ) const;
const SfxItemSet& GetOptions() const { return *pOptions; }
void SetOptions( const SfxItemSet &rNewOptions );
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index a976c93..488e06b 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -281,7 +281,7 @@ public:
/**
Asynchronous ExecuteSlot for the RELOAD
*/
- const SfxPoolItem* ExecuteSlot( SfxRequest &rReq, bool bAsync );
+ void ExecuteSlot( SfxRequest &rReq, bool bAsync );
inline SfxItemPool& GetPool() const;
inline void SetPool( SfxItemPool *pNewPool ) ;
diff --git a/include/sfx2/sidebar/FocusManager.hxx b/include/sfx2/sidebar/FocusManager.hxx
index a7ffd5e..71096cb 100644
--- a/include/sfx2/sidebar/FocusManager.hxx
+++ b/include/sfx2/sidebar/FocusManager.hxx
@@ -131,9 +131,9 @@ private:
void FocusPanelContent(const sal_Int32 nPanelIndex);
void FocusButton(const sal_Int32 nButtonIndex);
void ClickButton(const sal_Int32 nButtonIndex);
- bool MoveFocusInsidePanel(const FocusLocation& rLocation,
+ void MoveFocusInsidePanel(const FocusLocation& rLocation,
const sal_Int32 nDirection);
- bool MoveFocusInsideDeckTitle(const FocusLocation& rLocation,
+ void MoveFocusInsideDeckTitle(const FocusLocation& rLocation,
const sal_Int32 nDirection);
void HandleKeyEvent(const vcl::KeyCode& rKeyCode,
diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx
index c35ea6c..64d0926 100644
--- a/include/sfx2/styfitem.hxx
+++ b/include/sfx2/styfitem.hxx
@@ -80,11 +80,8 @@ public:
requested bitmap mode, incremented by 1.</p>
<p>Usually, you will use the same resource which originally constructed the object.</p>
-
- @return
- <TRUE/> if an image list for the requested mode could be found in the given resource.
*/
- bool updateImages( const ResId& _rId );
+ void updateImages( const ResId& _rId );
};
#endif
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index 241e7a4..b971be9 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -79,7 +79,7 @@ friend class SfxFrameStatusListener;
css::uno::Reference< css::lang::XComponent > m_xStatusListener;
private:
- SfxFrameStatusListener* GetOrCreateStatusListener();
+ void GetOrCreateStatusListener();
SfxPopupWindow(SfxPopupWindow &) = delete;
void operator =(SfxPopupWindow &) = delete;
diff --git a/include/sfx2/templateabstractview.hxx b/include/sfx2/templateabstractview.hxx
index bd2b590..2ff5a26 100644
--- a/include/sfx2/templateabstractview.hxx
+++ b/include/sfx2/templateabstractview.hxx
@@ -61,21 +61,6 @@ protected:
FILTER_APPLICATION mApp;
};
-class ViewFilter_Keyword
-{
-public:
-
- ViewFilter_Keyword (const OUString &rKeyword)
- : maKeyword(rKeyword)
- {}
-
- bool operator () (const ThumbnailViewItem *pItem);
-
-private:
-
- OUString maKeyword;
-};
-
class SFX2_DLLPUBLIC TemplateAbstractView : public ThumbnailView
{
public:
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 5134da2..6c4d090 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -141,8 +141,8 @@ public:
void UpdateTitle();
// interne Handler
- SAL_DLLPRIVATE bool SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder );
- SAL_DLLPRIVATE const SvBorder& GetBorderPixelImpl( const SfxViewShell *pSh ) const;
+ SAL_DLLPRIVATE void SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder );
+ SAL_DLLPRIVATE const SvBorder& GetBorderPixelImpl() const;
SAL_DLLPRIVATE void InvalidateBorderImpl( const SfxViewShell *pSh );
virtual SfxObjectShell* GetObjectShell() override;
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index f19d66a..c5e5a63 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -304,7 +304,7 @@ public:
SAL_DLLPRIVATE void ResetAllClients_Impl( SfxInPlaceClient *pIP );
SAL_DLLPRIVATE void DiscardClients_Impl();
- SAL_DLLPRIVATE SfxPrinter* SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter );
+ SAL_DLLPRIVATE void SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter );
SAL_DLLPRIVATE bool IsShowView_Impl() const;
SAL_DLLPRIVATE bool HandleNotifyEvent_Impl( NotifyEvent& rEvent );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 87f2d6a..21eb4ed 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -3137,9 +3137,8 @@ void ScDocShell::SetChangeRecording( bool bActivate )
}
}
-bool ScDocShell::SetProtectionPassword( const OUString &rNewPassword )
+void ScDocShell::SetProtectionPassword( const OUString &rNewPassword )
{
- bool bRes = false;
ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack();
if (pChangeTrack)
{
@@ -3158,7 +3157,6 @@ bool ScDocShell::SetProtectionPassword( const OUString &rNewPassword )
{
pChangeTrack->SetProtection( css::uno::Sequence< sal_Int8 >() );
}
- bRes = true;
if ( bProtected != pChangeTrack->IsProtected() )
{
@@ -3166,8 +3164,6 @@ bool ScDocShell::SetProtectionPassword( const OUString &rNewPassword )
SetDocumentModified();
}
}
-
- return bRes;
}
bool ScDocShell::GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash )
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 82b0f49..d01de86 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -419,7 +419,7 @@ public:
virtual bool IsChangeRecording() const override;
virtual bool HasChangeRecordProtection() const override;
virtual void SetChangeRecording( bool bActivate ) override;
- virtual bool SetProtectionPassword( const OUString &rPassword ) override;
+ virtual void SetProtectionPassword( const OUString &rPassword ) override;
virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash ) override;
void SnapVisArea( Rectangle& rRect ) const;
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 36f917d..028c279 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -88,11 +88,10 @@ using namespace ::com::sun::star::script;
using ::basic::BasicManagerRepository;
-sal_uInt16 SfxApplication::SaveBasicAndDialogContainer() const
+void SfxApplication::SaveBasicAndDialogContainer() const
{
if ( pAppData_Impl->pBasicManager->isValid() )
pAppData_Impl->pBasicManager->storeAllLibraries();
- return 0;
}
BasicManager* SfxApplication::GetBasicManager()
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index f88853f..50f7fad 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -149,7 +149,7 @@ IMPL_LINK_TYPED(SfxEventAsyncer_Impl, IdleHdl, Idle*, pAsyncIdle, void)
-bool SfxApplication::GetOptions( SfxItemSet& rSet )
+void SfxApplication::GetOptions( SfxItemSet& rSet )
{
bool bRet = false;
SfxItemPool &rPool = GetPool();
@@ -490,8 +490,6 @@ bool SfxApplication::GetOptions( SfxItemSet& rSet )
}
pRanges++;
}
-
- return bRet;
}
// TODO/CLEANUP: Why two SetOptions Methods?
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 2ac4525..2b9ebd1 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -200,7 +200,7 @@ OUString GetSpecialCharsForEdit(vcl::Window* pParent, const vcl::Font& rFont)
-bool SfxApplication::Initialize_Impl()
+void SfxApplication::Initialize_Impl()
{
#ifdef TLX_VALIDATE
StgIo::SetErrorLink( LINK( this, SfxStorageErrHdl, Error ) );
@@ -270,7 +270,7 @@ bool SfxApplication::Initialize_Impl()
SetPool( pAppData_Impl->pPool );
if ( pAppData_Impl->bDowning )
- return false;
+ return;
// App-Dispatcher aufbauen
pAppData_Impl->pAppDispat->Push(*this);
@@ -282,8 +282,6 @@ bool SfxApplication::Initialize_Impl()
// Set special characters callback on vcl edit control
Edit::SetGetSpecialCharsFunction(&GetSpecialCharsForEdit);
}
-
- return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 74ef914..6f1baf2 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -186,33 +186,33 @@ bool LinkManager::InsertLink( SvBaseLink * pLink,
}
-bool LinkManager::InsertDDELink( SvBaseLink * pLink,
+void LinkManager::InsertDDELink( SvBaseLink * pLink,
const OUString& rServer,
const OUString& rTopic,
const OUString& rItem )
{
if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) )
- return false;
+ return;
OUString sCmd;
::sfx2::MakeLnkName( sCmd, &rServer, rTopic, rItem );
pLink->SetObjType( OBJECT_CLIENT_DDE );
pLink->SetName( sCmd );
- return Insert( pLink );
+ Insert( pLink );
}
-bool LinkManager::InsertDDELink( SvBaseLink * pLink )
+void LinkManager::InsertDDELink( SvBaseLink * pLink )
{
DBG_ASSERT( OBJECT_CLIENT_SO & pLink->GetObjType(), "no OBJECT_CLIENT_SO" );
if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) )
- return false;
+ return;
if( pLink->GetObjType() == OBJECT_CLIENT_SO )
pLink->SetObjType( OBJECT_CLIENT_DDE );
- return Insert( pLink );
+ Insert( pLink );
}
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 930939e..d034476 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -422,14 +422,12 @@ SotClipboardFormatId SvBaseLink::GetContentType() const
}
-bool SvBaseLink::SetContentType( SotClipboardFormatId nType )
+void SvBaseLink::SetContentType( SotClipboardFormatId nType )
{
if( OBJECT_CLIENT_SO & nObjType )
{
pImplData->ClientType.nCntntType = nType;
- return true;
}
- return false;
}
LinkManager* SvBaseLink::GetLinkManager()
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index ca82105..c37c41d 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -411,17 +411,16 @@ void ShellCall_Impl( void* pObj, void* pArg )
static_cast<SfxShell*>(pObj)->ExecuteSlot( *static_cast<SfxRequest*>(pArg) );
}
-const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, bool bAsync )
+void SfxShell::ExecuteSlot( SfxRequest& rReq, bool bAsync )
{
if( !bAsync )
- return ExecuteSlot( rReq );
+ ExecuteSlot( rReq );
else
{
if( !pImp->pExecuter )
pImp->pExecuter = new svtools::AsynchronLink(
Link<void*,void>( this, ShellCall_Impl ) );
pImp->pExecuter->Call( new SfxRequest( rReq ) );
- return nullptr;
}
}
diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx
index 4a2a9138..544c3e0 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -119,13 +119,6 @@ bool ViewFilter_Application::operator () (const ThumbnailViewItem *pItem)
return true;
}
-bool ViewFilter_Keyword::operator ()(const ThumbnailViewItem *pItem)
-{
- assert(pItem);
-
- return pItem->maTitle.matchIgnoreAsciiCase(maKeyword);
-}
-
TemplateAbstractView::TemplateAbstractView (vcl::Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren)
: ThumbnailView(pParent,nWinStyle,bDisableTransientChildren),
mnCurRegionId(0),
diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx
index 0a8b748..e5e3be7 100644
--- a/sfx2/source/dialog/styfitem.cxx
+++ b/sfx2/source/dialog/styfitem.cxx
@@ -117,39 +117,31 @@ SfxStyleFamilies::~SfxStyleFamilies()
-bool SfxStyleFamilies::updateImages( const ResId& _rId )
+void SfxStyleFamilies::updateImages( const ResId& _rId )
{
- bool bSuccess = false;
+ ::svt::OLocalResourceAccess aLocalRes( _rId );
- {
- ::svt::OLocalResourceAccess aLocalRes( _rId );
-
- // check if the image list is present
- ResId aImageListId( (sal_uInt16) 1, *_rId.GetResMgr() );
- aImageListId.SetRT( RSC_IMAGELIST );
-
- if ( aLocalRes.IsAvailableRes( aImageListId ) )
- { // there is such a list
- ImageList aImages( aImageListId );
-
- // number of styles items/images
- sal_uInt16 nCount = aImages.GetImageCount( );
- DBG_ASSERT( aEntryList.size() == nCount, "SfxStyleFamilies::updateImages: found the image list, but missing some bitmaps!" );
- if ( nCount > aEntryList.size() )
- nCount = aEntryList.size();
-
- // set the images on the items
- for ( size_t i = 0; i < nCount; ++i )
- {
- SfxStyleFamilyItem* pItem = aEntryList[ i ];
- pItem->SetImage( aImages.GetImage( aImages.GetImageId( i ) ) );
- }
-
- bSuccess = true;
+ // check if the image list is present
+ ResId aImageListId( (sal_uInt16) 1, *_rId.GetResMgr() );
+ aImageListId.SetRT( RSC_IMAGELIST );
+
+ if ( aLocalRes.IsAvailableRes( aImageListId ) )
+ { // there is such a list
+ ImageList aImages( aImageListId );
+
+ // number of styles items/images
+ sal_uInt16 nCount = aImages.GetImageCount( );
+ DBG_ASSERT( aEntryList.size() == nCount, "SfxStyleFamilies::updateImages: found the image list, but missing some bitmaps!" );
+ if ( nCount > aEntryList.size() )
+ nCount = aEntryList.size();
+
+ // set the images on the items
+ for ( size_t i = 0; i < nCount; ++i )
+ {
+ SfxStyleFamilyItem* pItem = aEntryList[ i ];
+ pItem->SetImage( aImages.GetImage( aImages.GetImageId( i ) ) );
}
}
-
- return bSuccess;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 6c827dd..d30d52f 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -596,7 +596,7 @@ bool SfxMedium::CloseOutStream()
return true;
}
-bool SfxMedium::CloseOutStream_Impl()
+void SfxMedium::CloseOutStream_Impl()
{
if ( pImp->m_pOutStream )
{
@@ -622,8 +622,6 @@ bool SfxMedium::CloseOutStream_Impl()
if ( pImp->m_pSet )
pImp->m_pSet->ClearItem( SID_STREAM );
}
-
- return true;
}
@@ -1637,7 +1635,7 @@ bool SfxMedium::StorageCommit_Impl()
}
-bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
+void SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
const INetURLObject& aDest,
const Reference< css::ucb::XCommandEnvironment >& xComEnv )
{
@@ -1758,8 +1756,6 @@ bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
else
pImp->m_eError = ERRCODE_IO_CANTREAD;
}
-
- return bResult;
}
@@ -3263,7 +3259,7 @@ uno::Sequence < util::RevisionTag > SfxMedium::GetVersionList( const uno::Refere
return uno::Sequence < util::RevisionTag >();
}
-sal_uInt16 SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision )
+void SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision )
{
if ( GetStorage().is() )
{
@@ -3290,16 +3286,13 @@ sal_uInt16 SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision )
pImp->aVersions.realloc( nLength+1 );
rRevision.Identifier = aRevName;
pImp->aVersions[nLength] = rRevision;
- return nKey;
}
-
- return 0;
}
-bool SfxMedium::RemoveVersion_Impl( const OUString& rName )
+void SfxMedium::RemoveVersion_Impl( const OUString& rName )
{
if ( !pImp->aVersions.getLength() )
- return false;
+ return;
sal_Int32 nLength = pImp->aVersions.getLength();
for ( sal_Int32 n=0; n<nLength; n++ )
@@ -3309,11 +3302,9 @@ bool SfxMedium::RemoveVersion_Impl( const OUString& rName )
for ( sal_Int32 m=n; m<nLength-1; m++ )
pImp->aVersions[m] = pImp->aVersions[m+1];
pImp->aVersions.realloc(nLength-1);
- return true;
+ return;
}
}
-
- return false;
}
bool SfxMedium::TransferVersionList_Impl( SfxMedium& rMedium )
@@ -3327,26 +3318,23 @@ bool SfxMedium::TransferVersionList_Impl( SfxMedium& rMedium )
return false;
}
-bool SfxMedium::SaveVersionList_Impl( bool /*bUseXML*/ )
+void SfxMedium::SaveVersionList_Impl( bool /*bUseXML*/ )
{
if ( GetStorage().is() )
{
if ( !pImp->aVersions.getLength() )
- return true;
+ return;
uno::Reference < document::XDocumentRevisionListPersistence > xWriter =
document::DocumentRevisionListPersistence::create( comphelper::getProcessComponentContext() );
try
{
xWriter->store( GetStorage(), pImp->aVersions );
- return true;
}
catch ( const uno::Exception& )
{
}
}
-
- return false;
}
bool SfxMedium::IsReadOnly() const
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index aca0fbd..b721eaf 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1866,17 +1866,14 @@ sal_Int16 SfxObjectShell_Impl::getCurrentMacroExecMode() const
return nImposedExecMode;
}
-bool SfxObjectShell_Impl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
+void SfxObjectShell_Impl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
{
const SfxMedium* pMedium( rDocShell.GetMedium() );
OSL_PRECOND( pMedium, "SfxObjectShell_Impl::getCurrentMacroExecMode: no medium!" );
if ( pMedium )
{
pMedium->GetItemSet()->Put( SfxUInt16Item( SID_MACROEXECMODE, nMacroMode ) );
- return true;
}
-
- return false;
}
OUString SfxObjectShell_Impl::getDocumentLocation() const
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index b187933..01d7435 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -487,10 +487,9 @@ bool SfxObjectShell::Load( SfxMedium& rMedium )
return GeneralInit_Impl( rMedium.GetStorage(), true );
}
-bool SfxObjectShell::DoInitUnitTest()
+void SfxObjectShell::DoInitUnitTest()
{
pMedium = new SfxMedium;
- return true; // always a success!
}
bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 3bdb6f7..de21929 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -1166,11 +1166,10 @@ void SfxObjectShell::SetChangeRecording( bool /*bActivate*/ )
}
-bool SfxObjectShell::SetProtectionPassword( const OUString & /*rPassword*/ )
+void SfxObjectShell::SetProtectionPassword( const OUString & /*rPassword*/ )
{
// currently this function needs to be overwritten by Writer and Calc only
DBG_ASSERT( false, "function not implemented" );
- return false;
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 3442c94..9c21b98 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1015,7 +1015,7 @@ Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getArgs() throw(RuntimeE
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( m_pData->m_pObjectShell );
if ( pFrame )
{
- SvBorder aBorder = pFrame->GetBorderPixelImpl( pFrame->GetViewShell() );
+ SvBorder aBorder = pFrame->GetBorderPixelImpl();
Sequence< sal_Int32 > aBorderSeq(4);
aBorderSeq[0] = aBorder.Left();
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 36f8bdf..fb94a8e 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -152,7 +152,7 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
// IMacroDocumentAccess overridables
virtual sal_Int16 getCurrentMacroExecMode() const override;
- virtual bool setCurrentMacroExecMode( sal_uInt16 nMacroMode ) override;
+ virtual void setCurrentMacroExecMode( sal_uInt16 nMacroMode ) override;
virtual OUString getDocumentLocation() const override;
virtual bool documentStorageHasMacros() const override;
virtual css::uno::Reference< css::document::XEmbeddedScripts > getEmbeddedDocumentScripts() const override;
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index 00438ff..31a304d 100644
--- a/sfx2/source/menu/mnumgr.cxx
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -251,11 +251,10 @@ void SfxPopupMenuManager::RemoveDisabledEntries()
-sal_uInt16 SfxPopupMenuManager::Execute( const Point& rPos, vcl::Window* pWindow )
+void SfxPopupMenuManager::Execute( const Point& rPos, vcl::Window* pWindow )
{
- sal_uInt16 nVal = static_cast<PopupMenu*>( GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
+ static_cast<PopupMenu*>( GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
delete pStaticThesSubMenu; pStaticThesSubMenu = nullptr;
- return nVal;
}
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index 556fc0d..b12995b 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -301,7 +301,7 @@ void FocusManager::RemoveWindow (vcl::Window& rWindow)
}
}
-bool FocusManager::MoveFocusInsidePanel (
+void FocusManager::MoveFocusInsidePanel (
const FocusLocation& rFocusLocation,
const sal_Int32 nDirection)
{
@@ -314,21 +314,20 @@ bool FocusManager::MoveFocusInsidePanel (
maPanels[rFocusLocation.mnIndex]->GetTitleBar()->GetToolBox().GrabFocus();
else
FocusPanelContent(rFocusLocation.mnIndex);
- return true;
+ break;
case PC_PanelToolBox:
if (nDirection < 0 && bHasToolBoxItem)
maPanels[rFocusLocation.mnIndex]->GetTitleBar()->GrabFocus();
else
FocusPanelContent(rFocusLocation.mnIndex);
- return true;
+ break;
- default:
- return false;
+ default: break;
}
}
-bool FocusManager::MoveFocusInsideDeckTitle (
+void FocusManager::MoveFocusInsideDeckTitle (
const FocusLocation& rFocusLocation,
const sal_Int32 nDirection)
{
@@ -345,17 +344,16 @@ bool FocusManager::MoveFocusInsideDeckTitle (
FocusPanelContent(0);
else if (bHasToolBoxItem)
mpDeckTitleBar->GetToolBox().GrabFocus();
- return true;
+ break;
case PC_DeckToolBox:
if (nDirection>0 && ! IsPanelTitleVisible(0))
FocusPanelContent(0);
else
mpDeckTitleBar->GrabFocus();
- return true;
+ break;
- default:
- return false;
+ default: break;
}
}
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 35daecf..f49b7dd 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -983,7 +983,7 @@ void SfxPopupWindow::dispose()
-SfxFrameStatusListener* SfxPopupWindow::GetOrCreateStatusListener()
+void SfxPopupWindow::GetOrCreateStatusListener()
{
if ( !m_xStatusListener.is() )
{
@@ -993,8 +993,6 @@ SfxFrameStatusListener* SfxPopupWindow::GetOrCreateStatusListener()
this );
m_xStatusListener.set( static_cast< cppu::OWeakObject* >( m_pStatusListener ), UNO_QUERY );
}
-
- return m_pStatusListener;
}
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 09c8546..a51e23b 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -770,7 +770,7 @@ void SfxInPlaceClient::SetSizeScale( const Fraction & rScaleWidth, const Fractio
}
-bool SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const Fraction& rScaleWidth, const Fraction& rScaleHeight )
+void SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const Fraction& rScaleWidth, const Fraction& rScaleHeight )
{
if( rArea != m_pImp->m_aObjArea || m_pImp->m_aScaleWidth != rScaleWidth || m_pImp->m_aScaleHeight != rScaleHeight )
{
@@ -781,10 +781,7 @@ bool SfxInPlaceClient::SetObjAreaAndScale( const Rectangle& rArea, const Fractio
m_pImp->SizeHasChanged();
Invalidate();
- return true;
}
-
- return false;
}
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index ee07c78..ee8dfef 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -85,7 +85,7 @@ VclPtr<SfxPrinter> SfxPrinter::Create( SvStream& rStream, SfxItemSet* pOptions )
-SvStream& SfxPrinter::Store( SvStream& rStream ) const
+void SfxPrinter::Store( SvStream& rStream ) const
/* [Description]
@@ -93,7 +93,7 @@ SvStream& SfxPrinter::Store( SvStream& rStream ) const
*/
{
- return WriteJobSetup( rStream, GetJobSetup() );
+ WriteJobSetup( rStream, GetJobSetup() );
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 87f3148..321526d 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1169,7 +1169,7 @@ void SfxViewFrame::InvalidateBorderImpl( const SfxViewShell* pSh )
}
}
-bool SfxViewFrame::SetBorderPixelImpl
+void SfxViewFrame::SetBorderPixelImpl
(
const SfxViewShell* pVSh,
const SvBorder& rBorder
@@ -1207,15 +1207,9 @@ bool SfxViewFrame::SetBorderPixelImpl
aEditArea.Bottom() -= rBorder.Bottom();
pVSh->GetWindow()->SetPosSizePixel( aEditArea.TopLeft(), aEditArea.GetSize() );
}
-
- return true;
}
-const SvBorder& SfxViewFrame::GetBorderPixelImpl
-(
- const SfxViewShell* /*pSh*/
-) const
-
+const SvBorder& SfxViewFrame::GetBorderPixelImpl() const
{
return pImp->aBorder;
}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index daba229..0424489 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -466,7 +466,7 @@ IMPL_LINK_NOARG_TYPED(SfxDialogExecutor_Impl, Execute, Button*, void)
Internal method for setting the differences between 'pNewPrinter' to the
current printer. pNewPrinter is either taken over or deleted.
*/
-SfxPrinter* SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
+void SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
{
// get current Printer
SfxPrinter *pDocPrinter = GetPrinter();
@@ -561,7 +561,6 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
if ( SfxPrinterChangeFlags::NONE != nChangedFlags )
// SetPrinter will delete the old printer if it changes
SetPrinter( pDocPrinter, nChangedFlags );
- return pDocPrinter;
}
void SfxViewShell::StartPrint( const uno::Sequence < beans::PropertyValue >& rProps, bool bIsAPI, bool bIsDirect )
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index f0a09e4..8e1fa34 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1193,7 +1193,7 @@ const SvBorder& SfxViewShell::GetBorderPixel() const
{
DBG_ASSERT( GetViewFrame(), "SfxViewShell without SfxViewFrame" );
- return GetViewFrame()->GetBorderPixelImpl( this );
+ return GetViewFrame()->GetBorderPixelImpl();
}
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 84774c17..f164fcf 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -306,7 +306,7 @@ public:
virtual bool IsChangeRecording() const override;
virtual bool HasChangeRecordProtection() const override;
virtual void SetChangeRecording( bool bActivate ) override;
- virtual bool SetProtectionPassword( const OUString &rPassword ) override;
+ virtual void SetProtectionPassword( const OUString &rPassword ) override;
virtual bool GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash ) override;
virtual void libreOfficeKitCallback(int nType, const char* pPayload) const override;
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 48f8b05..19b5c91 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1285,7 +1285,7 @@ void SwDocShell::SetChangeRecording( bool bActivate )
m_pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
}
-bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
+void SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
{
const SfxAllItemSet aSet( GetPool() );
const SfxItemSet* pArgs = &aSet;
@@ -1295,9 +1295,7 @@ bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
Sequence< sal_Int8 > aPasswd = rIDRA.GetRedlinePassword();
if (pArgs && SfxItemState::SET == pArgs->GetItemState( FN_REDLINE_PROTECT, false, &pItem )
&& static_cast<const SfxBoolItem*>(pItem)->GetValue() == (aPasswd.getLength() > 0))
- return false;
-
- bool bRes = false;
+ return;
if (!rNewPassword.isEmpty())
{
@@ -1307,15 +1305,11 @@ bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword )
Sequence< sal_Int8 > aNewPasswd;
SvPasswordHelper::GetHashPassword( aNewPasswd, rNewPassword );
rIDRA.SetRedlinePassword( aNewPasswd );
- bRes = true;
}
else
{
rIDRA.SetRedlinePassword( Sequence< sal_Int8 >() );
- bRes = true;
}
-
- return bRes;
}
bool SwDocShell::GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPasswordHash )
More information about the Libreoffice-commits
mailing list