[Libreoffice-commits] core.git: 3 commits - store/source svl/source svtools/inc svtools/source svx/inc svx/source
Noel Grandin
noel at peralex.com
Wed Jan 13 22:51:17 PST 2016
store/source/storbase.hxx | 28 ----------
svl/source/misc/strmadpt.cxx | 18 ++----
svl/source/numbers/zforlist.cxx | 5 -
svtools/inc/table/tablecontrol.hxx | 8 --
svtools/inc/table/tablecontrolinterface.hxx | 2
svtools/source/config/colorcfg.cxx | 12 +---
svtools/source/config/extcolorcfg.cxx | 12 +---
svtools/source/filter/exportdialog.cxx | 10 ---
svtools/source/filter/exportdialog.hxx | 2
svtools/source/table/tablecontrol.cxx | 4 -
svtools/source/table/tablecontrol_impl.cxx | 4 -
svtools/source/table/tablecontrol_impl.hxx | 4 -
svtools/source/uno/treecontrolpeer.cxx | 4 -
svtools/source/uno/treecontrolpeer.hxx | 2
svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx | 4 -
svx/inc/svdibrow.hxx | 2
svx/source/accessibility/ChildrenManagerImpl.hxx | 9 ---
svx/source/dialog/imapwnd.cxx | 7 --
svx/source/dialog/imapwnd.hxx | 2
svx/source/form/fmshimp.cxx | 6 +-
svx/source/form/fmtextcontrolshell.cxx | 8 --
svx/source/form/formcontrolfactory.cxx | 4 -
svx/source/inc/fmshimp.hxx | 2
svx/source/inc/fmtextcontrolshell.hxx | 4 -
svx/source/inc/formcontrolfactory.hxx | 2
svx/source/inc/formcontrolling.hxx | 2
svx/source/inc/sdbdatacolumn.hxx | 3 -
svx/source/sdr/contact/viewobjectcontactofgraphic.cxx | 14 -----
svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 11 ++-
svx/source/svdraw/svdibrow.cxx | 5 -
svx/source/svdraw/svdograf.cxx | 2
svx/source/svdraw/svdopath.cxx | 24 +++-----
svx/source/table/accessiblecell.cxx | 6 --
svx/source/table/accessiblecell.hxx | 2
svx/source/table/svdotable.cxx | 11 +--
svx/source/table/tablertfexporter.cxx | 5 -
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 7 --
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx | 5 -
38 files changed, 73 insertions(+), 189 deletions(-)
New commits:
commit d6318214908b088f8820033f62c47fbc4821c3a1
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jan 13 15:06:54 2016 +0200
loplugin:unusedmethods unused return value in svx
Change-Id: I15a87da20487ce031c6aab2f3df0b18fd3e4c249
diff --git a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx
index 4735ce4..89c03e4 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofgraphic.hxx
@@ -44,8 +44,8 @@ namespace sdr
// async graphics loading helpers. Only to be used internally or from the
// event helper class (in .cxx file)
- bool impPrepareGraphicWithAsynchroniousLoading();
- bool impPrepareGraphicWithSynchroniousLoading();
+ void impPrepareGraphicWithAsynchroniousLoading();
+ void impPrepareGraphicWithSynchroniousLoading();
void doAsynchGraphicLoading();
void forgetAsynchGraphicLoadingEvent(sdr::event::AsynchGraphicLoadingEvent* pEvent);
diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index e6a5fc2..41fad87 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -75,7 +75,7 @@ public:
void Clear();
void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=nullptr);
sal_uInt16 GetCurrentWhich() const;
- bool EndChangeEntry();
+ void EndChangeEntry();
void BreakChangeEntry();
/** GetCellText returns the text at the given position
diff --git a/svx/source/accessibility/ChildrenManagerImpl.hxx b/svx/source/accessibility/ChildrenManagerImpl.hxx
index c6a94c6..a5feea3 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.hxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.hxx
@@ -519,15 +519,6 @@ public:
);
}
- /** The ordering defined by this operator is only used in order to be able
- to put child descriptors in some STL containers. The ordering itself is
- not so important, its 'features' are not used.
- */
- inline bool operator < (const ChildDescriptor& aDescriptor) const
- {
- return (mxShape.get() < aDescriptor.mxShape.get());
- }
-
};
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index a174415..397c708 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -129,11 +129,10 @@ void IMapWindow::ReplaceImageMap( const ImageMap& rImageMap, bool /*bScaleToGrap
}
}
-bool IMapWindow::ReplaceActualIMapInfo( const NotifyInfo& rNewInfo )
+void IMapWindow::ReplaceActualIMapInfo( const NotifyInfo& rNewInfo )
{
const SdrObject* pSdrObj = GetSelectedSdrObject();
IMapObject* pIMapObj;
- bool bRet = false;
if ( pSdrObj && ( ( pIMapObj = GetIMapObj( pSdrObj ) ) != nullptr ) )
{
@@ -142,11 +141,7 @@ bool IMapWindow::ReplaceActualIMapInfo( const NotifyInfo& rNewInfo )
pIMapObj->SetTarget( rNewInfo.aMarkTarget );
pModel->SetChanged();
UpdateInfo( false );
-
- bRet = true;
}
-
- return bRet;
}
const ImageMap& IMapWindow::GetImageMap()
diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx
index 7b85f1a..727eda8 100644
--- a/svx/source/dialog/imapwnd.hxx
+++ b/svx/source/dialog/imapwnd.hxx
@@ -123,7 +123,7 @@ public:
virtual ~IMapWindow();
virtual void dispose() override;
- bool ReplaceActualIMapInfo( const NotifyInfo& rNewInfo );
+ void ReplaceActualIMapInfo( const NotifyInfo& rNewInfo );
void SetImageMap( const ImageMap& rImageMap );
const ImageMap& GetImageMap();
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 3c56f85..264e83a 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1067,14 +1067,14 @@ bool FmXFormShell::isControlConversionSlot( sal_uInt16 nSlotId )
}
-bool FmXFormShell::executeControlConversionSlot( sal_uInt16 _nSlotId )
+void FmXFormShell::executeControlConversionSlot( sal_uInt16 _nSlotId )
{
OSL_PRECOND( canConvertCurrentSelectionToControl( _nSlotId ), "FmXFormShell::executeControlConversionSlot: illegal call!" );
InterfaceBag::const_iterator aSelectedElement = m_aCurrentSelection.begin();
if ( aSelectedElement == m_aCurrentSelection.end() )
- return false;
+ return;
- return executeControlConversionSlot( Reference< XFormComponent >( *aSelectedElement, UNO_QUERY ), _nSlotId );
+ executeControlConversionSlot( Reference< XFormComponent >( *aSelectedElement, UNO_QUERY ), _nSlotId );
}
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 9b787da..c3dbf76 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -750,7 +750,7 @@ namespace svx
}
- bool FmTextControlShell::executeSelectAll( )
+ void FmTextControlShell::executeSelectAll( )
{
try
{
@@ -758,18 +758,16 @@ namespace svx
{
sal_Int32 nTextLen = m_xActiveTextComponent->getText().getLength();
m_xActiveTextComponent->setSelection( css::awt::Selection( 0, nTextLen ) );
- return true;
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
- return false; // not handled
}
- bool FmTextControlShell::executeClipboardSlot( SfxSlotId _nSlot )
+ void FmTextControlShell::executeClipboardSlot( SfxSlotId _nSlot )
{
try
{
@@ -800,14 +798,12 @@ namespace svx
default:
OSL_FAIL( "FmTextControlShell::executeClipboardSlot: invalid slot!" );
}
- return true;
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
- return false; // not handled
}
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index 853aed3..85258b8 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -131,9 +131,9 @@ namespace svxform
}
- sal_Int16 FormControlFactory::initializeControlModel( const DocumentType _eDocType, const Reference< XPropertySet >& _rxControlModel )
+ void FormControlFactory::initializeControlModel( const DocumentType _eDocType, const Reference< XPropertySet >& _rxControlModel )
{
- return initializeControlModel(
+ initializeControlModel(
_eDocType, _rxControlModel, Rectangle()
);
}
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index d5138b3..81057e8 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -431,7 +431,7 @@ public:
/** executes a control conversion slot for the current selection
@precond canConvertCurrentSelectionToControl( <arg>_nSlotId</arg> ) must return <TRUE/>
*/
- SAL_DLLPRIVATE bool executeControlConversionSlot( sal_uInt16 _nSlotId );
+ SAL_DLLPRIVATE void executeControlConversionSlot( sal_uInt16 _nSlotId );
/// checks whether the given slot id denotes a control conversion slot
SAL_DLLPRIVATE static bool isControlConversionSlot( sal_uInt16 _nSlotId );
diff --git a/svx/source/inc/fmtextcontrolshell.hxx b/svx/source/inc/fmtextcontrolshell.hxx
index 0d3b9b2..148c88b 100644
--- a/svx/source/inc/fmtextcontrolshell.hxx
+++ b/svx/source/inc/fmtextcontrolshell.hxx
@@ -150,8 +150,8 @@ namespace svx
protected:
enum AttributeSet { eCharAttribs, eParaAttribs };
void executeAttributeDialog( AttributeSet _eSet, SfxRequest& _rReq );
- bool executeSelectAll( );
- bool executeClipboardSlot( SfxSlotId _nSlot );
+ void executeSelectAll( );
+ void executeClipboardSlot( SfxSlotId _nSlot );
private:
inline bool isControllerListening() const { return !m_aControlObservers.empty(); }
diff --git a/svx/source/inc/formcontrolfactory.hxx b/svx/source/inc/formcontrolfactory.hxx
index aceb739..020a457 100644
--- a/svx/source/inc/formcontrolfactory.hxx
+++ b/svx/source/inc/formcontrolfactory.hxx
@@ -70,7 +70,7 @@ namespace svxform
);
sal_Int16 initializeControlModel( const DocumentType _eDocType, const SdrUnoObj& _rObject );
- sal_Int16 initializeControlModel( const DocumentType _eDocType, const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel );
+ void initializeControlModel( const DocumentType _eDocType, const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel );
void initializeTextFieldLineEnds(
const css::uno::Reference< css::beans::XPropertySet >& _rxModel
diff --git a/svx/source/inc/formcontrolling.hxx b/svx/source/inc/formcontrolling.hxx
index ffbed7f..74cc598 100644
--- a/svx/source/inc/formcontrolling.hxx
+++ b/svx/source/inc/formcontrolling.hxx
@@ -118,8 +118,6 @@ namespace svx
// access to the instance which implements the functionality. Not to be used when not assigned
inline const FormControllerHelper* operator->() const { return m_pImpl; }
inline FormControllerHelper* operator->() { return m_pImpl; }
- inline const FormControllerHelper& operator*() const { return *m_pImpl; }
- inline FormControllerHelper& operator*() { return *m_pImpl; }
};
diff --git a/svx/source/inc/sdbdatacolumn.hxx b/svx/source/inc/sdbdatacolumn.hxx
index 3ab1663..db7c8a5 100644
--- a/svx/source/inc/sdbdatacolumn.hxx
+++ b/svx/source/inc/sdbdatacolumn.hxx
@@ -48,9 +48,6 @@ namespace svxform
// (which is checked via the supported interfaces) _all_ members will be set to
// void !, even if the object has some of the needed interfaces.
- DataColumn* operator ->() { return this; }
- operator css::uno::Reference< css::uno::XInterface> () const{ return m_xColumn.get(); }
-
// 'conversions'
inline const css::uno::Reference< css::sdb::XColumn>& getColumn() const
{
diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
index 02f59f1..c7822b9 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
@@ -73,9 +73,8 @@ namespace sdr
{
// Test graphics state and eventually trigger a SwapIn event or an Asynchronous
// load event. Return value gives info if SwapIn was triggered or not
- bool ViewObjectContactOfGraphic::impPrepareGraphicWithAsynchroniousLoading()
+ void ViewObjectContactOfGraphic::impPrepareGraphicWithAsynchroniousLoading()
{
- bool bRetval(false);
SdrGrafObj& rGrafObj = getSdrGrafObj();
if(rGrafObj.IsSwappedOut())
@@ -133,8 +132,6 @@ namespace sdr
rGrafObj.ForceSwapIn();
rGrafObj.mbInsidePaint = false;
}
-
- bRetval = true;
}
}
}
@@ -160,15 +157,12 @@ namespace sdr
GetViewContact().ActionChanged();
}
}
-
- return bRetval;
}
// Test graphics state and eventually trigger a SwapIn event. Return value
// gives info if SwapIn was triggered or not
- bool ViewObjectContactOfGraphic::impPrepareGraphicWithSynchroniousLoading()
+ void ViewObjectContactOfGraphic::impPrepareGraphicWithSynchroniousLoading()
{
- bool bRetval(false);
SdrGrafObj& rGrafObj = getSdrGrafObj();
if(rGrafObj.IsSwappedOut())
@@ -196,12 +190,8 @@ namespace sdr
rGrafObj.ForceSwapIn();
rGrafObj.mbInsidePaint = false;
}
-
- bRetval = true;
}
}
-
- return bRetval;
}
// This is the call from the asynch graphic loading. This may only be called from
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index dc85187..5500bdf 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -569,7 +569,7 @@ namespace sdr { namespace contact {
Failure of this method will be reported via an assertion in a non-product version.
*/
- bool ensureControl( const basegfx::B2DHomMatrix* _pInitialViewTransformationOrNULL );
+ void ensureControl( const basegfx::B2DHomMatrix* _pInitialViewTransformationOrNULL );
/** returns our XControl, if it already has been created
@@ -964,27 +964,28 @@ namespace sdr { namespace contact {
}
- bool ViewObjectContactOfUnoControl_Impl::ensureControl( const basegfx::B2DHomMatrix* _pInitialViewTransformationOrNULL )
+ void ViewObjectContactOfUnoControl_Impl::ensureControl( const basegfx::B2DHomMatrix* _pInitialViewTransformationOrNULL )
{
OSL_PRECOND( !impl_isDisposed_nofail(), "ViewObjectContactOfUnoControl_Impl::ensureControl: already disposed()" );
if ( impl_isDisposed_nofail() )
- return false;
+ return;
ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() );
if ( pPageViewContact )
{
SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() );
const OutputDevice& rDevice( m_pAntiImpl->getPageViewOutputDevice().get() );
- return impl_ensureControl_nothrow(
+ impl_ensureControl_nothrow(
aPVAccess,
rDevice,
_pInitialViewTransformationOrNULL ? *_pInitialViewTransformationOrNULL : rDevice.GetViewTransformation()
);
+ return;
}
DummyPageViewAccess aNoPageView;
const OutputDevice& rDevice( impl_getOutputDevice_throw() );
- return impl_ensureControl_nothrow(
+ impl_ensureControl_nothrow(
aNoPageView,
rDevice,
_pInitialViewTransformationOrNULL ? *_pInitialViewTransformationOrNULL : rDevice.GetViewTransformation()
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index b1bd674..2da9c09 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -530,14 +530,13 @@ bool _SdrItemBrowserControl::BeginChangeEntry(std::size_t nPos)
return bRet;
}
-bool _SdrItemBrowserControl::EndChangeEntry()
+void _SdrItemBrowserControl::EndChangeEntry()
{
if (!pEditControl)
- return false;
+ return;
aEntryChangedHdl.Call(*this);
BreakChangeEntry();
- return true;
}
void _SdrItemBrowserControl::BreakChangeEntry()
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index e54cb52..9ffba23 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -120,7 +120,7 @@ public:
const OUString& rMimeType, const css::uno::Any & rValue ) override;
void DataChanged( const Graphic& rGraphic );
- bool Connect() { return nullptr != GetRealObject(); }
+ void Connect() { GetRealObject(); }
void UpdateAsynchron();
void RemoveGraphicUpdater();
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 88e8eed..63aaa6c 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -267,15 +267,15 @@ public:
void ResetFormFlags() { bBezier=false; bCurve=false; bCircle=false; bLine=false; bRect=false; }
bool IsFormFlag() const { return bBezier || bCurve || bCircle || bLine || bRect; }
XPolygon GetFormPoly() const;
- bool CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, bool bMouseDown);
+ void CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, bool bMouseDown);
XPolygon GetBezierPoly() const;
static XPolygon GetCurvePoly() { return XPolygon(); }
- bool CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView);
+ void CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView);
XPolygon GetCirclePoly() const;
- bool CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView);
+ void CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView);
static Point CalcLine(const Point& rCsr, long nDirX, long nDirY, SdrView* pView);
XPolygon GetLinePoly() const;
- bool CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView);
+ void CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView);
XPolygon GetRectPoly() const;
};
@@ -289,7 +289,7 @@ XPolygon ImpPathCreateUser::GetFormPoly() const
return XPolygon();
}
-bool ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, bool bMouseDown)
+void ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, bool bMouseDown)
{
bool bRet = true;
aBezStart=rP1;
@@ -301,7 +301,6 @@ bool ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Poi
if (!bMouseDown || (0L == aBezEnd.X() && 0L == aBezEnd.Y())) aBezEnd=rP2;
bBezier=bRet;
- return bRet;
}
XPolygon ImpPathCreateUser::GetBezierPoly() const
@@ -314,7 +313,7 @@ XPolygon ImpPathCreateUser::GetBezierPoly() const
return aXP;
}
-bool ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView)
+void ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView)
{
long nTangAngle=GetAngle(rDir);
aCircStart=rP1;
@@ -359,7 +358,6 @@ bool ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Poi
nCircRadius=nRad;
if (nRad==0 || std::abs(nCircRelAngle)<5) bRet=false;
bCircle=bRet;
- return bRet;
}
XPolygon ImpPathCreateUser::GetCirclePoly() const
@@ -411,12 +409,12 @@ Point ImpPathCreateUser::CalcLine(const Point& aCsr, long nDirX, long nDirY, Sdr
return Point(x,y);
}
-bool ImpPathCreateUser::CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView)
+void ImpPathCreateUser::CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView)
{
aLineStart=rP1;
aLineEnd=rP2;
bLine90=false;
- if (rP1==rP2 || (rDir.X()==0 && rDir.Y()==0)) { bLine=false; return false; }
+ if (rP1==rP2 || (rDir.X()==0 && rDir.Y()==0)) { bLine=false; return; }
Point aTmpPt(rP2-rP1);
long nDirX=rDir.X();
long nDirY=rDir.Y();
@@ -430,7 +428,6 @@ bool ImpPathCreateUser::CalcLine(const Point& rP1, const Point& rP2, const Point
aLineEnd+=aP2;
}
bLine=true;
- return true;
}
XPolygon ImpPathCreateUser::GetLinePoly() const
@@ -441,12 +438,12 @@ XPolygon ImpPathCreateUser::GetLinePoly() const
return aXP;
}
-bool ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView)
+void ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView)
{
aRectP1=rP1;
aRectP2=rP1;
aRectP3=rP2;
- if (rP1==rP2 || (rDir.X()==0 && rDir.Y()==0)) { bRect=false; return false; }
+ if (rP1==rP2 || (rDir.X()==0 && rDir.Y()==0)) { bRect=false; return; }
Point aTmpPt(rP2-rP1);
long nDirX=rDir.X();
long nDirY=rDir.Y();
@@ -491,7 +488,6 @@ bool ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point
}
}
bRect=true;
- return true;
}
XPolygon ImpPathCreateUser::GetRectPoly() const
diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx
index 0aec0e7..af68170 100644
--- a/svx/source/table/accessiblecell.cxx
+++ b/svx/source/table/accessiblecell.cxx
@@ -135,12 +135,6 @@ bool AccessibleCell::ResetState (sal_Int16 aState)
-bool AccessibleCell::operator== (const AccessibleCell& rAccessibleCell)
-{
- return this == &rAccessibleCell;
-}
-
-
// XInterface
diff --git a/svx/source/table/accessiblecell.hxx b/svx/source/table/accessiblecell.hxx
index 12e61c3..edc8e8f 100644
--- a/svx/source/table/accessiblecell.hxx
+++ b/svx/source/table/accessiblecell.hxx
@@ -56,8 +56,6 @@ public:
void Init();
- bool operator== (const AccessibleCell& rAccessibleCell);
-
virtual bool SetState (sal_Int16 aState) override;
virtual bool ResetState (sal_Int16 aState) override;
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 4f575d7..b54e415 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -211,7 +211,7 @@ public:
CellRef getCell( const CellPos& rPos ) const;
void LayoutTable( Rectangle& rArea, bool bFitWidth, bool bFitHeight );
- bool ApplyCellStyles();
+ void ApplyCellStyles();
void UpdateCells( Rectangle& rArea );
SdrTableObjImpl();
@@ -366,12 +366,10 @@ void SdrTableObjImpl::SetModel(SdrModel* /*pOldModel*/, SdrModel* pNewModel)
-bool SdrTableObjImpl::ApplyCellStyles()
+void SdrTableObjImpl::ApplyCellStyles()
{
if( !mxTable.is() || !mxTableStyle.is() )
- return false;
-
- bool bChanges = false;
+ return;
const sal_Int32 nColCount = getColumnCount();
const sal_Int32 nRowCount = getRowCount();
@@ -451,15 +449,12 @@ bool SdrTableObjImpl::ApplyCellStyles()
CellRef xCell( getCell( aPos ) );
if( xCell.is() && ( xCell->GetStyleSheet() != pStyle ) )
{
- bChanges = true;
xCell->SetStyleSheet( pStyle, true );
}
}
}
}
}
-
- return bChanges;
}
diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx
index 616aa6c..854d0bf 100644
--- a/svx/source/table/tablertfexporter.cxx
+++ b/svx/source/table/tablertfexporter.cxx
@@ -52,7 +52,7 @@ class SdrTableRtfExporter
{
public:
SdrTableRtfExporter( SvStream& rStrmP, SdrTableObj& rObj );
- sal_uLong Write();
+ void Write();
void WriteRow( const Reference< XPropertySet >& xRowSet, sal_Int32 nRow, const std::vector< sal_Int32 >& aColumnStart );
void WriteCell( sal_Int32 nCol, sal_Int32 nRow );
@@ -83,7 +83,7 @@ long HundMMToTwips( long nIn )
return nRet;
}
-sal_uLong SdrTableRtfExporter::Write()
+void SdrTableRtfExporter::Write()
{
mrStrm.WriteChar( '{' ).WriteCharPtr( OOO_STRING_SVTOOLS_RTF_RTF );
mrStrm.WriteCharPtr( OOO_STRING_SVTOOLS_RTF_ANSI ).WriteCharPtr( SAL_NEWLINE_STRING );
@@ -126,7 +126,6 @@ sal_uLong SdrTableRtfExporter::Write()
}
mrStrm.WriteChar( '}' ).WriteCharPtr( SAL_NEWLINE_STRING );
- return mrStrm.GetError();
}
void SdrTableRtfExporter::WriteRow( const Reference< XPropertySet >& xRowSet, sal_Int32 nRow, const std::vector< sal_Int32 >& aColumnStart )
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index 054e5fd..b1db568 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -359,13 +359,6 @@ DictionaryEntry::~DictionaryEntry()
{
}
-bool DictionaryEntry::operator==( const DictionaryEntry& rE ) const
-{
- return m_aTerm == rE.m_aTerm
- && m_aMapping == rE.m_aMapping
- && m_nConversionPropertyType == rE.m_nConversionPropertyType;
-}
-
void DictionaryList::setColSizes()
{
HeaderBar &rBar = GetTheHeaderBar();
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
index 4c048f8..a0e2e15 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
@@ -37,9 +37,6 @@ namespace textconversiondlgs
-/**
-*/
-
struct DictionaryEntry
{
DictionaryEntry( const OUString& rTerm, const OUString& rMapping
@@ -48,8 +45,6 @@ struct DictionaryEntry
virtual ~DictionaryEntry();
- bool operator==( const DictionaryEntry& rE ) const;
-
OUString m_aTerm;
OUString m_aMapping;
sal_Int16 m_nConversionPropertyType; //linguistic2::ConversionPropertyType
commit 5adcc4f6da434af9b6baeba06699321ceaa15478
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jan 13 15:06:42 2016 +0200
loplugin:unusedmethods unused return value in svtools
Change-Id: Iee0fc65d6ae97296e3093c843d856fa13d875bf7
diff --git a/svtools/inc/table/tablecontrol.hxx b/svtools/inc/table/tablecontrol.hxx
index 1038ac7..c09cacb 100644
--- a/svtools/inc/table/tablecontrol.hxx
+++ b/svtools/inc/table/tablecontrol.hxx
@@ -97,14 +97,8 @@ namespace svt { namespace table
sal_Int32 GetCurrentColumn() const override;
/** activates the cell at the given position
-
- @return
- <sal_True/> if the move was successful, <FALSE/> otherwise. Usual
- failure conditions include some other instance vetoing the move,
- or impossibility to execute the move at all (for instance because
- of invalid coordinates).
*/
- bool GoTo( ColPos _nColumnPos, RowPos _nRow);
+ void GoTo( ColPos _nColumnPos, RowPos _nRow);
SVT_DLLPRIVATE virtual void Resize() override;
void Select();
diff --git a/svtools/inc/table/tablecontrolinterface.hxx b/svtools/inc/table/tablecontrolinterface.hxx
index f2af714..95b6d49 100644
--- a/svtools/inc/table/tablecontrolinterface.hxx
+++ b/svtools/inc/table/tablecontrolinterface.hxx
@@ -210,7 +210,7 @@ namespace svt { namespace table
virtual RowPos getCurrentRow() const = 0;
/// activates the given cell
- virtual bool activateCell( ColPos const i_col, RowPos const i_row ) = 0;
+ virtual void activateCell( ColPos const i_col, RowPos const i_row ) = 0;
/// retrieves the size of the table window, in pixels
virtual ::Size getTableSizePixel() const = 0;
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index 568fbcf..1abdc6c 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -92,8 +92,8 @@ public:
uno::Sequence< OUString> GetSchemeNames();
- bool AddScheme(const OUString& rNode);
- bool RemoveScheme(const OUString& rNode);
+ void AddScheme(const OUString& rNode);
+ void RemoveScheme(const OUString& rNode);
void SetModified(){ConfigItem::SetModified();}
void ClearModified(){ConfigItem::ClearModified();}
void SettingsChanged();
@@ -319,21 +319,19 @@ uno::Sequence< OUString> ColorConfig_Impl::GetSchemeNames()
return GetNodeNames("ColorSchemes");
}
-bool ColorConfig_Impl::AddScheme(const OUString& rScheme)
+void ColorConfig_Impl::AddScheme(const OUString& rScheme)
{
if(ConfigItem::AddNode("ColorSchemes", rScheme))
{
m_sLoadedScheme = rScheme;
Commit();
- return true;
}
- return false;
}
-bool ColorConfig_Impl::RemoveScheme(const OUString& rScheme)
+void ColorConfig_Impl::RemoveScheme(const OUString& rScheme)
{
uno::Sequence< OUString > aElements { rScheme };
- return ClearNodeElements("ColorSchemes", aElements);
+ ClearNodeElements("ColorSchemes", aElements);
}
void ColorConfig_Impl::SettingsChanged()
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index 37eb861..3363ad9 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -118,8 +118,8 @@ public:
void SetColorConfigValue(const OUString& _sName,
const ExtendedColorConfigValue& rValue );
- bool AddScheme(const OUString& rNode);
- bool RemoveScheme(const OUString& rNode);
+ void AddScheme(const OUString& rNode);
+ void RemoveScheme(const OUString& rNode);
void SetModified(){ConfigItem::SetModified();}
void ClearModified(){ConfigItem::ClearModified();}
void SettingsChanged();
@@ -490,21 +490,19 @@ void ExtendedColorConfig_Impl::SetColorConfigValue(const OUString& _sName, const
}
}
-bool ExtendedColorConfig_Impl::AddScheme(const OUString& rScheme)
+void ExtendedColorConfig_Impl::AddScheme(const OUString& rScheme)
{
if(ConfigItem::AddNode("ExtendedColorScheme/ColorSchemes", rScheme))
{
m_sLoadedScheme = rScheme;
Commit();
- return true;
}
- return false;
}
-bool ExtendedColorConfig_Impl::RemoveScheme(const OUString& rScheme)
+void ExtendedColorConfig_Impl::RemoveScheme(const OUString& rScheme)
{
uno::Sequence< OUString > aElements { rScheme };
- return ClearNodeElements("ExtendedColorScheme/ColorSchemes", aElements);
+ ClearNodeElements("ExtendedColorScheme/ColorSchemes", aElements);
}
void ExtendedColorConfig_Impl::SettingsChanged()
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index a8654e6..4f46e0c 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -387,15 +387,13 @@ void ExportDialog::GetGraphicSource()
}
}
-bool ExportDialog::GetGraphicStream()
+void ExportDialog::GetGraphicStream()
{
- bool bRet = false;
-
if ( !IsTempExportAvailable() )
{
delete mpTempStream, mpTempStream = new SvMemoryStream();
maBitmap = Bitmap();
- return bRet;
+ return;
}
bool bRecreateOutputStream = mpTempStream->Tell() == 0;
@@ -440,7 +438,6 @@ bool ExportDialog::GetGraphicStream()
{
xGraphicExporter->setSourceDocument( xSourceDoc );
xGraphicExporter->filter( aDescriptor );
- bRet = true;
if ( mnFormat == FORMAT_JPG )
{
@@ -450,8 +447,6 @@ bool ExportDialog::GetGraphicStream()
}
}
}
- else
- bRet = true;
}
catch( uno::Exception& )
{
@@ -459,7 +454,6 @@ bool ExportDialog::GetGraphicStream()
// ups
}
- return bRet;
}
Bitmap ExportDialog::GetGraphicBitmap( SvStream& rInputStream )
diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx
index bf1c9649..a3e55f4 100644
--- a/svtools/source/filter/exportdialog.hxx
+++ b/svtools/source/filter/exportdialog.hxx
@@ -155,7 +155,7 @@ private:
void updateControls();
void GetGraphicSource();
- bool GetGraphicStream();
+ void GetGraphicStream();
static Bitmap GetGraphicBitmap( SvStream& rStream );
css::uno::Sequence< css::beans::PropertyValue >
GetFilterData( bool bUpdateConfig );
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 5975b67..3ac1cc7 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -188,9 +188,9 @@ namespace svt { namespace table
}
- bool TableControl::GoTo( ColPos _nColumn, RowPos _nRow )
+ void TableControl::GoTo( ColPos _nColumn, RowPos _nRow )
{
- return m_pImpl->goTo( _nColumn, _nRow );
+ m_pImpl->goTo( _nColumn, _nRow );
}
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 6538e03..740e0c7 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -1832,9 +1832,9 @@ namespace svt { namespace table
}
- bool TableControl_Impl::activateCell( ColPos const i_col, RowPos const i_row )
+ void TableControl_Impl::activateCell( ColPos const i_col, RowPos const i_row )
{
- return goTo( i_col, i_row );
+ goTo( i_col, i_row );
}
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index 0a71f8e..169fda7 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -52,8 +52,6 @@ namespace svt { namespace table
void move( long const i_offset ) { nStartPixel += i_offset; nEndPixel += i_offset; }
long getWidth() const { return nEndPixel - nStartPixel; }
-
- ColumnMetrics const & operator()() { return *this; }
};
struct ColumnInfoPositionLess
@@ -254,7 +252,7 @@ namespace svt { namespace table
virtual PTableModel getModel() const override;
virtual ColPos getCurrentColumn() const override;
virtual RowPos getCurrentRow() const override;
- virtual bool activateCell( ColPos const i_col, RowPos const i_row ) override;
+ virtual void activateCell( ColPos const i_col, RowPos const i_row ) override;
virtual ::Size getTableSizePixel() const override;
virtual void setPointer( Pointer const & i_pointer ) override;
virtual void captureMouse() override;
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index e2699e9..7cfe29d 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -271,7 +271,7 @@ UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xN
-bool TreeControlPeer::updateEntry( UnoTreeListEntry* pEntry )
+void TreeControlPeer::updateEntry( UnoTreeListEntry* pEntry )
{
bool bChanged = false;
if( pEntry && pEntry->mxNode.is() && mpTreeImpl )
@@ -333,8 +333,6 @@ bool TreeControlPeer::updateEntry( UnoTreeListEntry* pEntry )
if( bChanged )
mpTreeImpl->GetModel()->InvalidateEntry( pEntry );
}
-
- return bChanged;
}
diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx
index db19928..b06daf4 100644
--- a/svtools/source/uno/treecontrolpeer.hxx
+++ b/svtools/source/uno/treecontrolpeer.hxx
@@ -127,7 +127,7 @@ private:
void addNode( UnoTreeListBoxImpl& rTree, const css::uno::Reference< css::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParentEntry );
UnoTreeListEntry* createEntry( const css::uno::Reference< css::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos = TREELIST_APPEND );
- bool updateEntry( UnoTreeListEntry* pEntry );
+ void updateEntry( UnoTreeListEntry* pEntry );
void updateTree( const css::awt::tree::TreeDataModelEvent& rEvent, bool bRecursive );
void updateNode( UnoTreeListBoxImpl& rTree, const css::uno::Reference< css::awt::tree::XTreeNode >& xNode, bool bRecursive );
commit de70170ace52c0266bde7b5d6cb9b6958db53c43
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jan 13 15:06:29 2016 +0200
loplugin:unusedmethods unused return value in store,svl
Change-Id: I369b3ae84af046242430977cec7d5c5e69fc27e7
diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx
index 05bc66e..db98c3e 100644
--- a/store/source/storbase.hxx
+++ b/store/source/storbase.hxx
@@ -261,19 +261,7 @@ struct OStorePageDescriptor
(m_nSize == rhs.m_nSize) );
}
- bool operator<= (const OStorePageDescriptor & rhs) const
- {
- return ((m_nAddr == rhs.m_nAddr ) &&
- (store::ntohs(m_nSize) <= store::ntohs(rhs.m_nSize)) );
- }
- bool operator< (const OStorePageDescriptor & rhs) const
- {
- if (m_nAddr == rhs.m_nAddr)
- return (store::ntohs(m_nSize) < store::ntohs(rhs.m_nSize));
- else
- return (store::ntohl(m_nAddr) < store::ntohl(rhs.m_nAddr));
- }
};
/*========================================================================
@@ -368,11 +356,6 @@ struct OStorePageLink
return (m_nAddr == rhs.m_nAddr);
}
- bool operator< (const OStorePageLink& rhs) const
- {
- return (store::ntohl(m_nAddr) < store::ntohl(rhs.m_nAddr));
- }
-
/** Operation.
*/
sal_uInt32 location() const
@@ -599,17 +582,6 @@ public:
OSL_PRECOND(m_pagedata != nullptr, "store::PageHolder::operator->(): Null pointer");
return m_pagedata;
}
-
- PageData & operator*()
- {
- OSL_PRECOND(m_pagedata != nullptr, "store::PageHolder::operator*(): Null pointer");
- return *m_pagedata;
- }
- PageData const & operator*() const
- {
- OSL_PRECOND(m_pagedata != nullptr, "store::PageHolder::operator*(): Null pointer");
- return *m_pagedata;
- }
};
/*========================================================================
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index e0157a1..c4290e2 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -68,7 +68,7 @@ private:
sal_uInt32 m_nPages;
bool m_bEOF;
- bool remove(Page * pPage);
+ void remove(Page * pPage);
public:
inline SvDataPipe_Impl(sal_uInt32 nThePageSize = 1000,
@@ -84,7 +84,7 @@ public:
void clearReadBuffer() { m_pReadBuffer = nullptr; }
- sal_uInt32 write(sal_Int8 const * pBuffer, sal_uInt32 nSize);
+ void write(sal_Int8 const * pBuffer, sal_uInt32 nSize);
void setEOF() { m_bEOF = true; }
@@ -533,7 +533,7 @@ SvOutputStream::~SvOutputStream()
// SvDataPipe_Impl
-bool SvDataPipe_Impl::remove(Page * pPage)
+void SvDataPipe_Impl::remove(Page * pPage)
{
if (
pPage != m_pFirstPage ||
@@ -544,20 +544,18 @@ bool SvDataPipe_Impl::remove(Page * pPage)
)
)
{
- return false;
+ return;
}
m_pFirstPage = m_pFirstPage->m_pNext;
if (m_nPages <= m_nMinPages)
- return true;
+ return;
pPage->m_pPrev->m_pNext = pPage->m_pNext;
pPage->m_pNext->m_pPrev = pPage->m_pPrev;
rtl_freeMemory(pPage);
--m_nPages;
-
- return true;
}
SvDataPipe_Impl::~SvDataPipe_Impl()
@@ -611,10 +609,10 @@ sal_uInt32 SvDataPipe_Impl::read()
return nSize - nRemain;
}
-sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize)
+void SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize)
{
if (nSize == 0)
- return 0;
+ return;
if (m_pWritePage == nullptr)
{
@@ -705,8 +703,6 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize)
m_pWritePage->m_pRead = m_pWritePage->m_aBuffer;
m_pWritePage->m_pEnd = m_pWritePage->m_aBuffer;
}
-
- return nSize - nRemain;
}
SvDataPipe_Impl::SeekResult SvDataPipe_Impl::setReadPosition(sal_uInt32
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 1326c9a..4b2646e 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -166,7 +166,7 @@ public:
void Insert( SvNumberFormatter* pThis )
{ aFormatters.push_back( pThis ); }
- SvNumberFormatter* Remove( SvNumberFormatter* pThis );
+ void Remove( SvNumberFormatter* pThis );
size_t Count()
{ return aFormatters.size(); }
@@ -187,7 +187,7 @@ SvNumberFormatterRegistry_Impl::~SvNumberFormatterRegistry_Impl()
}
-SvNumberFormatter* SvNumberFormatterRegistry_Impl::Remove( SvNumberFormatter* pThis )
+void SvNumberFormatterRegistry_Impl::Remove( SvNumberFormatter* pThis )
{
for (SvNumberFormatterList_impl::iterator it = aFormatters.begin();
it != aFormatters.end(); ++it)
@@ -198,7 +198,6 @@ SvNumberFormatter* SvNumberFormatterRegistry_Impl::Remove( SvNumberFormatter* pT
break;
}
}
- return pThis;
}
void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster*,
More information about the Libreoffice-commits
mailing list