[Libreoffice-commits] core.git: 2 commits - dbaccess/source sw/source
Caolán McNamara
caolanm at redhat.com
Mon Jul 20 06:27:27 PDT 2015
dbaccess/source/ui/browser/brwctrlr.cxx | 2 +-
dbaccess/source/ui/browser/dbloader.cxx | 2 +-
dbaccess/source/ui/browser/genericcontroller.cxx | 2 +-
dbaccess/source/ui/browser/sbagrid.cxx | 2 +-
dbaccess/source/ui/browser/unodatbr.cxx | 4 ++--
dbaccess/source/ui/control/RelationControl.cxx | 2 +-
dbaccess/source/ui/control/dbtreelistbox.cxx | 2 +-
dbaccess/source/ui/control/sqledit.cxx | 2 +-
dbaccess/source/ui/dlg/admincontrols.cxx | 4 ++--
dbaccess/source/ui/dlg/adminpages.hxx | 4 ++--
dbaccess/source/ui/dlg/dbfindex.hxx | 4 ++--
dbaccess/source/ui/dlg/finteraction.hxx | 4 ++--
dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 2 +-
dbaccess/source/ui/dlg/odbcconfig.hxx | 2 +-
dbaccess/source/ui/dlg/optionalboolitem.hxx | 2 +-
dbaccess/source/ui/dlg/sqlmessage.cxx | 8 ++++----
dbaccess/source/ui/misc/UpdateHelperImpl.hxx | 4 ++--
dbaccess/source/ui/misc/asyncmodaldialog.cxx | 2 +-
dbaccess/source/ui/misc/controllerframe.cxx | 4 ++--
dbaccess/source/ui/misc/dbaundomanager.cxx | 4 ++--
dbaccess/source/ui/misc/dsmeta.cxx | 2 +-
sw/source/core/doc/docnum.cxx | 8 ++++++--
22 files changed, 38 insertions(+), 34 deletions(-)
New commits:
commit 8a01693c79a24006cbe7d8642b97408eb23a1bd9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jul 20 13:45:52 2015 +0100
test should check that all levels are equal
regression from
commit bf586debd4d8274cff2737f02beac465525328e8
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sat Feb 21 12:38:54 2015 +0100
Simplify
Change-Id: I09f83b2bab053fcd48fe1a1a4184cc11a4f9d663
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 54822e8..fdf39db 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -654,13 +654,17 @@ static SwTextNode* lcl_FindOutlineNum( const SwOutlineNodes& rOutlNds, OUString&
const SwNodeNum & rNdNum = *(pNd->GetNum());
SwNumberTree::tNumberVector aLevelVal = rNdNum.GetNumberVector();
// now compare with the one searched for
+ bool bEqual = true;
for( int n = 0; n < nLevel; ++n )
{
- if ( aLevelVal[n] == nLevelVal[n] )
+ if ( aLevelVal[n] != nLevelVal[n] )
{
- return pNd;
+ bEqual = false;
+ break;
}
}
+ if (bEqual)
+ return pNd;
}
else
{
commit 75938aff3848edb9fc705a70d79e9221b2c05c3a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jul 20 13:06:13 2015 +0100
cppcheck: noExplicitConstructor
Change-Id: I45f2d96c7bd558405d0b5dfea3beb97ad720a82b
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 892ed35..6647b04 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -158,7 +158,7 @@ class SbaXDataBrowserController::FormControllerImpl
SbaXDataBrowserController* m_pOwner;
public:
- FormControllerImpl(SbaXDataBrowserController* pOwner);
+ explicit FormControllerImpl(SbaXDataBrowserController* pOwner);
// XFormController
virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormOperations > SAL_CALL getFormOperations() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx
index a0f36d8..88e0f7f 100644
--- a/dbaccess/source/ui/browser/dbloader.cxx
+++ b/dbaccess/source/ui/browser/dbloader.cxx
@@ -70,7 +70,7 @@ private:
Reference< XFrame > m_xFrame;
Reference< XComponentContext > m_xContext;
public:
- DBContentLoader(const Reference< XComponentContext >&);
+ explicit DBContentLoader(const Reference< XComponentContext >&);
virtual ~DBContentLoader();
// XServiceInfo
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 42bd37f..3f7d765 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -94,7 +94,7 @@ namespace dbaui
class UserDefinedFeatures
{
public:
- UserDefinedFeatures( const Reference< XController >& _rxController );
+ explicit UserDefinedFeatures( const Reference< XController >& _rxController );
static FeatureState getState( const URL& _rFeatureURL );
void execute( const URL& _rFeatureURL, const Sequence< PropertyValue>& _rArgs );
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 7f21dc6..cb0a9fd 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1250,7 +1250,7 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos)
struct SbaGridControlPrec : ::std::unary_function<DataFlavorExVector::value_type,bool>
{
bool bQueryDrop;
- SbaGridControlPrec(bool _bQueryDrop)
+ explicit SbaGridControlPrec(bool _bQueryDrop)
: bQueryDrop(_bQueryDrop)
{
}
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 6b1220f..7481d2b 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -398,7 +398,7 @@ namespace
return m_rCollection.get( i_name );
}
- SelectValueByName( ::comphelper::NamedValueCollection const& i_collection )
+ explicit SelectValueByName( ::comphelper::NamedValueCollection const& i_collection )
:m_rCollection( i_collection )
{
}
@@ -1103,7 +1103,7 @@ namespace
struct FilterByEntryDataId : public IEntryFilter
{
OUString sId;
- FilterByEntryDataId( const OUString& _rId ) : sId( _rId ) { }
+ explicit FilterByEntryDataId( const OUString& _rId ) : sId( _rId ) { }
virtual ~FilterByEntryDataId() {}
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 27fe3d7..0ba230e 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -78,7 +78,7 @@ namespace dbaui
*/
sal_uInt16 getColumnIdent( sal_uInt16 _nColId ) const;
public:
- ORelationControl(vcl::Window *pParent);
+ explicit ORelationControl(vcl::Window *pParent);
void SetController(OTableListBoxControl* pController)
{
m_pBoxControl = pController;
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index e68b22a..191984d 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -526,7 +526,7 @@ namespace
class SelectionSupplier : public SelectionSupplier_Base
{
public:
- SelectionSupplier( const Any& _rSelection )
+ explicit SelectionSupplier( const Any& _rSelection )
:m_aSelection( _rSelection )
{
}
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 6831b57..6122557 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -43,7 +43,7 @@ class OSqlEdit::ChangesListener:
public cppu::WeakImplHelper< css::beans::XPropertiesChangeListener >
{
public:
- ChangesListener(OSqlEdit & editor): editor_(editor) {}
+ explicit ChangesListener(OSqlEdit & editor): editor_(editor) {}
private:
virtual ~ChangesListener() {}
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index a869c82..da655ca 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -50,7 +50,7 @@ namespace dbaui
class TextResetOperator :public ::svt::IWindowOperator
{
public:
- TextResetOperator( const OUString& _rDisabledText )
+ explicit TextResetOperator( const OUString& _rDisabledText )
:m_sDisabledText( _rDisabledText )
{
}
@@ -98,7 +98,7 @@ namespace dbaui
class TextResetOperatorController_Base
{
protected:
- TextResetOperatorController_Base( const OUString& _rDisabledText )
+ explicit TextResetOperatorController_Base( const OUString& _rDisabledText )
:m_pEventFilter( new TextResetOperatorEventFilter )
,m_pOperator( new TextResetOperator( _rDisabledText ) )
{
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index e5b1125..072d280 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -44,7 +44,7 @@ namespace dbaui
{
T* m_pSaveValue;
public:
- OSaveValueWrapper(T* _pSaveValue) : m_pSaveValue(_pSaveValue)
+ explicit OSaveValueWrapper(T* _pSaveValue) : m_pSaveValue(_pSaveValue)
{ OSL_ENSURE(m_pSaveValue,"Illegal argument!"); }
virtual bool SaveValue() SAL_OVERRIDE { m_pSaveValue->SaveValue(); return true;} // bool return value only for stl
@@ -55,7 +55,7 @@ namespace dbaui
{
T* m_pSaveValue;
public:
- ODisableWrapper(T* _pSaveValue) : m_pSaveValue(_pSaveValue)
+ explicit ODisableWrapper(T* _pSaveValue) : m_pSaveValue(_pSaveValue)
{ OSL_ENSURE(m_pSaveValue,"Illegal argument!"); }
virtual bool SaveValue() SAL_OVERRIDE { return true;} // bool return value only for stl
diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx
index c884178..8feeff2 100644
--- a/dbaccess/source/ui/dlg/dbfindex.hxx
+++ b/dbaccess/source/ui/dlg/dbfindex.hxx
@@ -41,7 +41,7 @@ private:
public:
OTableIndex() { }
OTableIndex( const OTableIndex& _rSource) : aIndexFileName(_rSource.aIndexFileName) { }
- OTableIndex( const OUString& rFileName ) : aIndexFileName( rFileName ) { }
+ explicit OTableIndex( const OUString& rFileName ) : aIndexFileName( rFileName ) { }
void SetIndexFileName( const OUString& rFileName ) { aIndexFileName = rFileName; }
OUString GetIndexFileName() const { return aIndexFileName; }
@@ -62,7 +62,7 @@ private:
public:
OTableInfo() { }
- OTableInfo( const OUString& rName ) : aTableName(rName) { }
+ explicit OTableInfo( const OUString& rName ) : aTableName(rName) { }
void WriteInfFile( const OUString& rDSN ) const;
};
diff --git a/dbaccess/source/ui/dlg/finteraction.hxx b/dbaccess/source/ui/dlg/finteraction.hxx
index e3ae83f..56d6c2a 100644
--- a/dbaccess/source/ui/dlg/finteraction.hxx
+++ b/dbaccess/source/ui/dlg/finteraction.hxx
@@ -40,9 +40,9 @@ namespace dbaui
bool m_bDoesNotExist;
public:
- OFilePickerInteractionHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxMaster );
+ explicit OFilePickerInteractionHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxMaster );
- inline bool isDoesNotExist( ) const { return m_bDoesNotExist; }
+ bool isDoesNotExist() const { return m_bDoesNotExist; }
protected:
// XInteractionHandler
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index dd8f753..235393a 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -44,7 +44,7 @@ namespace dbaui
Link<> m_aAdditionalModifyHdl;
public:
- DbaMouseDownListBoxController(ListBoxControl* _pParent)
+ explicit DbaMouseDownListBoxController(ListBoxControl* _pParent)
:ListBoxCellController(_pParent)
{
}
diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx
index 1631b71..3da0b73 100644
--- a/dbaccess/source/ui/dlg/odbcconfig.hxx
+++ b/dbaccess/source/ui/dlg/odbcconfig.hxx
@@ -108,7 +108,7 @@ class OOdbcManagement
Link<> m_aAsyncFinishCallback;
public:
- OOdbcManagement( const Link<>& _rAsyncFinishCallback );
+ explicit OOdbcManagement( const Link<>& _rAsyncFinishCallback );
~OOdbcManagement();
bool manageDataSources_async();
diff --git a/dbaccess/source/ui/dlg/optionalboolitem.hxx b/dbaccess/source/ui/dlg/optionalboolitem.hxx
index 4902cd8..aa80fd2 100644
--- a/dbaccess/source/ui/dlg/optionalboolitem.hxx
+++ b/dbaccess/source/ui/dlg/optionalboolitem.hxx
@@ -34,7 +34,7 @@ namespace dbaui
public:
TYPEINFO_OVERRIDE();
- OptionalBoolItem( sal_Int16 nWhich );
+ explicit OptionalBoolItem( sal_Int16 nWhich );
OptionalBoolItem( const OptionalBoolItem& _rSource );
virtual bool operator==( const SfxPoolItem& _rItem ) const SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 8218b58..8fd564b 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -79,7 +79,7 @@ namespace
mutable Image m_defaultImage;
public:
- ImageProvider( sal_uInt16 _defaultImageID )
+ explicit ImageProvider( sal_uInt16 _defaultImageID )
:m_defaultImageID( _defaultImageID )
{
}
@@ -97,7 +97,7 @@ namespace
private:
OUString m_label;
public:
- LabelProvider( sal_uInt16 _labelResourceID )
+ explicit LabelProvider( sal_uInt16 _labelResourceID )
:m_label( ModuleRes( _labelResourceID ) )
{
}
@@ -191,7 +191,7 @@ namespace
OUString sErrorCode;
ExceptionDisplayInfo() : eType( SQLExceptionInfo::UNDEFINED ), bSubEntry( false ) { }
- ExceptionDisplayInfo( SQLExceptionInfo::TYPE _eType ) : eType( _eType ), bSubEntry( false ) { }
+ explicit ExceptionDisplayInfo( SQLExceptionInfo::TYPE _eType ) : eType( _eType ), bSubEntry( false ) { }
};
static bool lcl_hasDetails( const ExceptionDisplayInfo& _displayInfo )
@@ -410,7 +410,7 @@ struct SQLMessageBox_Impl
{
ExceptionDisplayChain aDisplayInfo;
- SQLMessageBox_Impl( const SQLExceptionInfo& _rExceptionInfo )
+ explicit SQLMessageBox_Impl( const SQLExceptionInfo& _rExceptionInfo )
{
// transform the exception chain to a form more suitable for displaying it here
ProviderFactory aProviderFactory;
diff --git a/dbaccess/source/ui/misc/UpdateHelperImpl.hxx b/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
index 073a280..5a6b97b 100644
--- a/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
+++ b/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
@@ -34,7 +34,7 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowUpdate > m_xRowUpdate;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > m_xResultSetUpdate;
public:
- ORowUpdateHelper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _xRowSet)
+ explicit ORowUpdateHelper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _xRowSet)
:m_xRowUpdate(_xRowSet,::com::sun::star::uno::UNO_QUERY)
,m_xResultSetUpdate(_xRowSet,::com::sun::star::uno::UNO_QUERY)
{
@@ -84,7 +84,7 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XParameters > m_xParameters;
public:
- OParameterUpdateHelper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement >& _xPrepared)
+ explicit OParameterUpdateHelper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement >& _xPrepared)
:m_xPrepared(_xPrepared)
,m_xParameters(_xPrepared,::com::sun::star::uno::UNO_QUERY)
{
diff --git a/dbaccess/source/ui/misc/asyncmodaldialog.cxx b/dbaccess/source/ui/misc/asyncmodaldialog.cxx
index 7769c11..684347a 100644
--- a/dbaccess/source/ui/misc/asyncmodaldialog.cxx
+++ b/dbaccess/source/ui/misc/asyncmodaldialog.cxx
@@ -38,7 +38,7 @@ namespace dbaui
Reference< XExecutableDialog > m_xDialog;
public:
- DialogExecutor_Impl( const Reference< XExecutableDialog >& _rxDialog )
+ explicit DialogExecutor_Impl( const Reference< XExecutableDialog >& _rxDialog )
:m_xDialog( _rxDialog )
{
}
diff --git a/dbaccess/source/ui/misc/controllerframe.cxx b/dbaccess/source/ui/misc/controllerframe.cxx
index 31452e2..7e3dae2 100644
--- a/dbaccess/source/ui/misc/controllerframe.cxx
+++ b/dbaccess/source/ui/misc/controllerframe.cxx
@@ -71,7 +71,7 @@ namespace dbaui
class FrameWindowActivationListener : public FrameWindowActivationListener_Base
{
public:
- FrameWindowActivationListener( ControllerFrame_Data& _rData );
+ explicit FrameWindowActivationListener( ControllerFrame_Data& _rData );
void dispose();
@@ -101,7 +101,7 @@ namespace dbaui
// ControllerFrame_Data
struct ControllerFrame_Data
{
- ControllerFrame_Data( IController& _rController )
+ explicit ControllerFrame_Data( IController& _rController )
:m_rController( _rController )
,m_xFrame()
,m_xDocEventBroadcaster()
diff --git a/dbaccess/source/ui/misc/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx
index 3e0d13b..35a943d 100644
--- a/dbaccess/source/ui/misc/dbaundomanager.cxx
+++ b/dbaccess/source/ui/misc/dbaundomanager.cxx
@@ -94,7 +94,7 @@ namespace dbaui
class OslMutexFacade : public ::framework::IMutex
{
public:
- OslMutexFacade( ::osl::Mutex& i_mutex )
+ explicit OslMutexFacade( ::osl::Mutex& i_mutex )
:m_rMutex( i_mutex )
{
}
@@ -124,7 +124,7 @@ namespace dbaui
class UndoManagerMethodGuard : public ::framework::IMutexGuard
{
public:
- UndoManagerMethodGuard( UndoManager_Impl& i_impl )
+ explicit UndoManagerMethodGuard( UndoManager_Impl& i_impl )
:m_aGuard( i_impl.rMutex )
,m_aMutexFacade( i_impl.rMutex )
{
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index aaf3ab9..c6837b9 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -151,7 +151,7 @@ namespace dbaui
public:
DataSourceMetaData_Impl( const OUString& _sURL );
- inline OUString getType() const { return m_sURL; }
+ OUString getType() const { return m_sURL; }
private:
const OUString m_sURL;
More information about the Libreoffice-commits
mailing list