[Libreoffice-commits] core.git: 3 commits - sfx2/source store/source sw/qa sw/source
Caolán McNamara
caolanm at redhat.com
Mon Sep 21 05:57:41 PDT 2015
sfx2/source/appl/appcfg.cxx | 2 +-
sfx2/source/appl/appdata.cxx | 5 ++++-
sfx2/source/appl/appdde.cxx | 4 ++--
sfx2/source/appl/appserv.cxx | 2 +-
sfx2/source/appl/appuno.cxx | 4 ++--
sfx2/source/appl/helpinterceptor.hxx | 2 +-
sfx2/source/appl/imestatuswindow.cxx | 2 +-
sfx2/source/appl/imestatuswindow.hxx | 2 +-
sfx2/source/appl/linksrc.cxx | 6 +++---
sfx2/source/appl/newhelp.hxx | 6 +++---
sfx2/source/appl/sfxhelp.cxx | 2 +-
sfx2/source/appl/shutdownicon.hxx | 2 +-
sfx2/source/bastyp/fltfnc.cxx | 14 +++++++-------
sfx2/source/bastyp/fltlst.cxx | 2 +-
sfx2/source/bastyp/progress.cxx | 2 +-
sfx2/source/control/itemdel.cxx | 2 +-
sfx2/source/control/request.cxx | 30 +++++++++++++++---------------
store/source/store.cxx | 2 +-
sw/qa/core/data/ww8/pass/hang-9.doc |binary
sw/source/filter/ww8/ww8scan.cxx | 12 ++++++++----
20 files changed, 55 insertions(+), 48 deletions(-)
New commits:
commit a2b90cd04733c2ec3b9cb3bb56d95f3298571ecc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 21 12:14:19 2015 +0100
don't hang on busted subdocument offsets
Change-Id: I5d1d18f864496ec98894703f0a22e211a9dd14a5
diff --git a/sw/qa/core/data/ww8/pass/hang-9.doc b/sw/qa/core/data/ww8/pass/hang-9.doc
new file mode 100644
index 0000000..4e9e412
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/hang-9.doc differ
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 683b296..35848d8 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4409,11 +4409,15 @@ void WW8PLCFxDesc::ReduceByOffset()
else
nStartPos -= nCpOfs;
}
- if( nEndPos != WW8_CP_MAX )
+ if (nEndPos != WW8_CP_MAX)
{
- OSL_ENSURE(nCpOfs <= nEndPos,
- "oh oh, so much for the subdocument piece theory");
- nEndPos -= nCpOfs;
+ if (nCpOfs > nEndPos)
+ {
+ SAL_WARN("sw.ww8", "broken subdocument piece entry");
+ nEndPos = WW8_CP_MAX;
+ }
+ else
+ nEndPos -= nCpOfs;
}
}
commit 951dbdd13100f92fb3ded20fd8d14ca645c4af37
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 21 11:44:39 2015 +0100
cppcheck: noExplicitConstructor
Change-Id: I53f9965609c04fd2f0b955fd04de8fc953917344
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 54cd152..0b8818e 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -89,7 +89,7 @@ class SfxEventAsyncer_Impl : public SfxListener
public:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
- SfxEventAsyncer_Impl( const SfxEventHint& rHint );
+ explicit SfxEventAsyncer_Impl(const SfxEventHint& rHint);
virtual ~SfxEventAsyncer_Impl();
DECL_LINK_TYPED( IdleHdl, Idle*, void );
};
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index 4e98840..ec09c13 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -62,7 +62,10 @@ private:
SfxAppData_Impl& m_rAppData;
public:
- SfxBasicManagerCreationListener( SfxAppData_Impl& _rAppData ) :m_rAppData( _rAppData ) { }
+ explicit SfxBasicManagerCreationListener(SfxAppData_Impl& _rAppData)
+ : m_rAppData(_rAppData)
+ {
+ }
virtual ~SfxBasicManagerCreationListener();
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 233a2a0..0013924 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -64,7 +64,7 @@ OUString SfxDdeServiceName_Impl( const OUString& sIn )
class ImplDdeService : public DdeService
{
public:
- ImplDdeService( const OUString& rNm )
+ explicit ImplDdeService( const OUString& rNm )
: DdeService( rNm )
{}
virtual bool MakeTopic( const OUString& );
@@ -217,7 +217,7 @@ public:
DdeData aData;
::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
- SfxDdeDocTopic_Impl( SfxObjectShell* pShell )
+ explicit SfxDdeDocTopic_Impl( SfxObjectShell* pShell )
: DdeTopic( pShell->GetTitle(SFX_TITLE_FULLNAME) ), pSh( pShell )
{}
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 1d6798d..69073f9 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -244,7 +244,7 @@ namespace
private:
DECL_LINK_TYPED(ShowHdl, Button*, void);
public:
- LicenseDialog(vcl::Window *pParent=NULL);
+ explicit LicenseDialog(vcl::Window *pParent=NULL);
};
LicenseDialog::LicenseDialog(vcl::Window *pParent)
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 28f7f0a..c856fed 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1716,7 +1716,7 @@ class RequestPackageReparation_Impl : public ::cppu::WeakImplHelper< task::XInte
comphelper::OInteractionDisapprove* m_pDisapprove;
public:
- RequestPackageReparation_Impl( const OUString& aName );
+ explicit RequestPackageReparation_Impl( const OUString& aName );
bool isApproved();
virtual uno::Any SAL_CALL getRequest() throw( uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual uno::Sequence< uno::Reference< task::XInteractionContinuation > > SAL_CALL getContinuations()
@@ -1785,7 +1785,7 @@ class NotifyBrokenPackage_Impl : public ::cppu::WeakImplHelper< task::XInteracti
comphelper::OInteractionAbort* m_pAbort;
public:
- NotifyBrokenPackage_Impl( const OUString& aName );
+ explicit NotifyBrokenPackage_Impl(const OUString& rName);
virtual uno::Any SAL_CALL getRequest() throw( uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual uno::Sequence< uno::Reference< task::XInteractionContinuation > > SAL_CALL getContinuations()
throw( uno::RuntimeException, std::exception ) SAL_OVERRIDE;
diff --git a/sfx2/source/appl/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx
index 8a03f37..2c39307 100644
--- a/sfx2/source/appl/helpinterceptor.hxx
+++ b/sfx2/source/appl/helpinterceptor.hxx
@@ -123,7 +123,7 @@ private:
OUString aFactory;
public:
- HelpListener_Impl( HelpInterceptor_Impl* pInter );
+ explicit HelpListener_Impl( HelpInterceptor_Impl* pInter );
virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event )
throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
diff --git a/sfx2/source/appl/imestatuswindow.cxx b/sfx2/source/appl/imestatuswindow.cxx
index 84ee426..bf031ef 100644
--- a/sfx2/source/appl/imestatuswindow.cxx
+++ b/sfx2/source/appl/imestatuswindow.cxx
@@ -50,7 +50,7 @@ class WeakPropertyChangeListener : public ::cppu::WeakImplHelper<com::sun::star:
com::sun::star::uno::WeakReference<com::sun::star::beans::XPropertyChangeListener> mxOwner;
public:
- WeakPropertyChangeListener(com::sun::star::uno::Reference<com::sun::star::beans::XPropertyChangeListener> xOwner)
+ explicit WeakPropertyChangeListener(com::sun::star::uno::Reference<com::sun::star::beans::XPropertyChangeListener> xOwner)
: mxOwner(xOwner)
{
}
diff --git a/sfx2/source/appl/imestatuswindow.hxx b/sfx2/source/appl/imestatuswindow.hxx
index 99bd176..6b7a882 100644
--- a/sfx2/source/appl/imestatuswindow.hxx
+++ b/sfx2/source/appl/imestatuswindow.hxx
@@ -48,7 +48,7 @@ ImeStatusWindow_Impl;
class ImeStatusWindow: private ImeStatusWindow_Impl
{
public:
- ImeStatusWindow( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const& rxContext );
+ explicit ImeStatusWindow( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const& rxContext );
/** Set up VCL according to the configuration.
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index f0c9ff4..4847fcb 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -40,7 +40,7 @@ class SvLinkSourceTimer : public Timer
SvLinkSource * pOwner;
virtual void Invoke() SAL_OVERRIDE;
public:
- SvLinkSourceTimer( SvLinkSource * pOwn );
+ explicit SvLinkSourceTimer( SvLinkSource * pOwn );
};
SvLinkSourceTimer::SvLinkSourceTimer( SvLinkSource * pOwn )
@@ -80,7 +80,7 @@ struct SvLinkSource_Entry_Impl
nAdviseModes( nAdvMode ), bIsDataSink( true )
{}
- SvLinkSource_Entry_Impl( SvBaseLink* pLink )
+ explicit SvLinkSource_Entry_Impl( SvBaseLink* pLink )
: xSink( pLink ), nAdviseModes( 0 ), bIsDataSink( false )
{}
@@ -129,7 +129,7 @@ class SvLinkSource_EntryIter_Impl
const SvLinkSource_Array_Impl& rOrigArr;
sal_uInt16 nPos;
public:
- SvLinkSource_EntryIter_Impl( const SvLinkSource_Array_Impl& rArr );
+ explicit SvLinkSource_EntryIter_Impl( const SvLinkSource_Array_Impl& rArr );
~SvLinkSource_EntryIter_Impl();
SvLinkSource_Entry_Impl* Curr()
{ return nPos < aArr.size() ? aArr[ nPos ] : 0; }
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index fcbf5ed..72217a1 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -321,7 +321,7 @@ private:
DECL_LINK_TYPED(TabPageDoubleClickHdl, ListBox&, void);
public:
- SfxHelpIndexWindow_Impl( SfxHelpWindow_Impl* pParent );
+ explicit SfxHelpIndexWindow_Impl( SfxHelpWindow_Impl* pParent );
virtual ~SfxHelpIndexWindow_Impl();
virtual void dispose() SAL_OVERRIDE;
@@ -402,7 +402,7 @@ bool SfxHelpIndexWindow_Impl::WasCursorLeftOrRight()
class TextWin_Impl : public DockingWindow
{
public:
- TextWin_Impl( vcl::Window* pParent );
+ explicit TextWin_Impl( vcl::Window* pParent );
virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
};
@@ -460,7 +460,7 @@ private:
void FindHdl(sfx2::SearchDialog*);
public:
- SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent );
+ explicit SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent );
virtual ~SfxHelpTextWindow_Impl();
virtual void dispose() SAL_OVERRIDE;
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 3e5258d..c30886b 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -78,7 +78,7 @@ using namespace ::com::sun::star::system;
class NoHelpErrorBox : public MessageDialog
{
public:
- NoHelpErrorBox( vcl::Window* _pParent );
+ explicit NoHelpErrorBox( vcl::Window* _pParent );
virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
};
diff --git a/sfx2/source/appl/shutdownicon.hxx b/sfx2/source/appl/shutdownicon.hxx
index 0950d18..83e5667 100644
--- a/sfx2/source/appl/shutdownicon.hxx
+++ b/sfx2/source/appl/shutdownicon.hxx
@@ -80,7 +80,7 @@ class SFX2_DLLPUBLIC ShutdownIcon : public ShutdownIconServiceBase
friend class SfxNotificationListener_Impl;
public:
- ShutdownIcon( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rxContext );
+ explicit ShutdownIcon( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rxContext );
virtual ~ShutdownIcon();
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 96aaef3..8da50c8 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -153,11 +153,11 @@ public:
OUString aName;
OUString aServiceName;
- SfxFilterContainer_Impl( const OUString& rName )
- : aName( rName )
- {
- aServiceName = SfxObjectShell::GetServiceNameFromFactory( rName );
- }
+ explicit SfxFilterContainer_Impl( const OUString& rName )
+ : aName( rName )
+ {
+ aServiceName = SfxObjectShell::GetServiceNameFromFactory( rName );
+ }
};
#define IMPL_FORWARD_LOOP( aMethod, ArgType, aArg ) \
@@ -263,7 +263,7 @@ public:
void InitForIterating() const;
void Update() const;
- SfxFilterMatcher_Impl(const OUString &rName)
+ explicit SfxFilterMatcher_Impl(const OUString &rName)
: aName(rName)
, pList(0)
{
@@ -290,7 +290,7 @@ namespace
private:
const OUString& mrName;
public:
- hasName(const OUString &rName) : mrName(rName) {}
+ explicit hasName(const OUString &rName) : mrName(rName) {}
bool operator() (const SfxFilterMatcher_Impl& rImpl) const
{
return rImpl.aName == mrName;
diff --git a/sfx2/source/bastyp/fltlst.cxx b/sfx2/source/bastyp/fltlst.cxx
index c6ae1f9..a51863e 100644
--- a/sfx2/source/bastyp/fltlst.cxx
+++ b/sfx2/source/bastyp/fltlst.cxx
@@ -44,7 +44,7 @@ class SfxRefreshListener : public ::cppu::WeakImplHelper<com::sun::star::util::X
SfxFilterListener *m_pOwner;
public:
- SfxRefreshListener(SfxFilterListener *pOwner)
+ explicit SfxRefreshListener(SfxFilterListener *pOwner)
: m_pOwner(pOwner)
{
}
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 6735a0c..c3aacf3 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -66,7 +66,7 @@ struct SfxProgress_Impl
SfxWorkWindow* pWorkWin;
SfxViewFrame* pView;
- SfxProgress_Impl( const OUString& );
+ explicit SfxProgress_Impl( const OUString& );
void Enable_Impl( bool );
};
diff --git a/sfx2/source/control/itemdel.cxx b/sfx2/source/control/itemdel.cxx
index 4808a37..8c92433 100644
--- a/sfx2/source/control/itemdel.cxx
+++ b/sfx2/source/control/itemdel.cxx
@@ -37,7 +37,7 @@ private:
DECL_LINK_TYPED( Delete, Application*, void );
public:
- SfxItemDisruptor_Impl( SfxPoolItem *pItemToDesrupt );
+ explicit SfxItemDisruptor_Impl(SfxPoolItem *pItemToDesrupt);
void LaunchDeleteOnIdle();
~SfxItemDisruptor_Impl();
};
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index 140db1b..d50ff50 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -70,21 +70,21 @@ struct SfxRequest_Impl: public SfxListener
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder;
- SfxRequest_Impl( SfxRequest *pOwner )
- : pAnti( pOwner)
- , pPool(0)
- , pRetVal(0)
- , pShell(0)
- , pSlot(0)
- , nModifier(0)
- , bDone(false)
- , bIgnored(false)
- , bCancelled(false)
- , nCallMode( SfxCallMode::SYNCHRON )
- , bAllowRecording( false )
- , pInternalArgs( 0 )
- , pViewFrame(0)
- {}
+ explicit SfxRequest_Impl( SfxRequest *pOwner )
+ : pAnti( pOwner)
+ , pPool(0)
+ , pRetVal(0)
+ , pShell(0)
+ , pSlot(0)
+ , nModifier(0)
+ , bDone(false)
+ , bIgnored(false)
+ , bCancelled(false)
+ , nCallMode( SfxCallMode::SYNCHRON )
+ , bAllowRecording( false )
+ , pInternalArgs( 0 )
+ , pViewFrame(0)
+ {}
virtual ~SfxRequest_Impl() { delete pInternalArgs; }
commit 4d22eff3c1afc1294785842be163abfa263ef43b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 21 11:00:42 2015 +0100
cppcheck: redundantPointerOp
Change-Id: I19f02169a113b8c9bae634691e28cf9f9d6977b5
diff --git a/store/source/store.cxx b/store/source/store.cxx
index f3ec7c0..c6e79a8 100644
--- a/store/source/store.cxx
+++ b/store/source/store.cxx
@@ -422,7 +422,7 @@ storeError SAL_CALL store_openStream (
xLockBytes->acquire();
- *phStream = static_cast<storeStreamHandle>(&(*xLockBytes));
+ *phStream = xLockBytes.get();
return store_E_None;
}
More information about the Libreoffice-commits
mailing list