diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-02 16:15:51 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-02-08 06:08:14 +0000 |
commit | b14224fe97b8a44232c9c1401d3a49771f46582e (patch) | |
tree | 8f9cf31cf4b51a0edbb43022499a6acd17d0945d /sw | |
parent | c474e610e453d0f38f7cc6cb9559ad7e7b5d69ca (diff) |
loplugin:unusedmethods
using an idea from dtardon:
<dtardon> noelgrandin, hi. could you try to run the unusedmethods clang
plugin with "make build-nocheck"? that would catch functions that are
only used in tests. e.g., i just removed the whole o3tl::range class,
which has not been used in many years, but htere was a test for it...
<noelgrandin> dtardon, interesting idea! Sure, I can do that.
Change-Id: I5653953a426a2186a1e43017212d87ffce520387
Reviewed-on: https://gerrit.libreoffice.org/22041
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/dbmgr.hxx | 9 | ||||
-rw-r--r-- | sw/inc/docary.hxx | 1 | ||||
-rw-r--r-- | sw/inc/index.hxx | 20 | ||||
-rw-r--r-- | sw/inc/swrect.hxx | 16 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/bastyp/index.cxx | 24 |
6 files changed, 1 insertions, 71 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index b923c71ab17b..cf52569a6215 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -236,15 +236,6 @@ friend class SwConnectionDisposedListener_Impl; GetRowSet(css::uno::Reference< css::sdbc::XConnection>, const OUString& rTableOrQuery, SwDBSelect eTableOrQuery); - SAL_DLLPRIVATE static css::uno::Reference< css::beans::XPropertySet> - GetRowSupplier(css::uno::Reference< css::sdbc::XConnection> xConnection, - const OUString& rTableOrQuery, SwDBSelect eTableOrQuery) - { - css::uno::Reference<css::sdbc::XRowSet> xRowSet = GetRowSet(xConnection, rTableOrQuery, eTableOrQuery); - - return css::uno::Reference<css::beans::XPropertySet>( xRowSet, css::uno::UNO_QUERY ); - } - SAL_DLLPRIVATE void CreateDumpDocs(sal_Int32 &nMaxDumpDocs); SAL_DLLPRIVATE void SetSourceProp(SwDocShell* pSourceDocSh); diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index 37c5201905e4..305bcb383574 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -253,7 +253,6 @@ public: sal_uInt16 GetSize() const { return m_aExtraRedlines.size(); } SwExtraRedline* GetRedline( sal_uInt16 uIndex ) const { return m_aExtraRedlines.operator[]( uIndex ); } - bool IsEmpty() const { return m_aExtraRedlines.empty(); } SW_DLLPUBLIC bool DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rTable, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete ); bool DeleteTableRowRedline ( SwDoc* pDoc, const SwTableLine& rTableLine, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete ); diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx index a1400553c73e..fecfa983b6b9 100644 --- a/sw/inc/index.hxx +++ b/sw/inc/index.hxx @@ -63,13 +63,10 @@ public: sal_Int32 operator++(); sal_Int32 operator--(); - sal_Int32 operator++(int); sal_Int32 operator--(int); sal_Int32 operator+=( sal_Int32 const ); sal_Int32 operator-=( sal_Int32 const ); - sal_Int32 operator+=( const SwIndex& ); - sal_Int32 operator-=( const SwIndex& ); bool operator< ( const SwIndex& ) const; bool operator<=( const SwIndex& ) const; @@ -144,13 +141,6 @@ inline sal_Int32 SwIndex::operator--() return ChgValue( *this, m_nIndex-1 ).m_nIndex; } -inline sal_Int32 SwIndex::operator++(int) -{ - sal_Int32 const nOldIndex = m_nIndex; - ChgValue( *this, m_nIndex+1 ); - return nOldIndex; -} - inline sal_Int32 SwIndex::operator--(int) { sal_Int32 const nOldIndex = m_nIndex; @@ -168,16 +158,6 @@ inline sal_Int32 SwIndex::operator-=( sal_Int32 const nVal ) return ChgValue( *this, m_nIndex - nVal ).m_nIndex; } -inline sal_Int32 SwIndex::operator+=( const SwIndex& rIndex ) -{ - return ChgValue( *this, m_nIndex + rIndex.m_nIndex ).m_nIndex; -} - -inline sal_Int32 SwIndex::operator-=( const SwIndex& rIndex ) -{ - return ChgValue( *this, m_nIndex - rIndex.m_nIndex ).m_nIndex; -} - inline bool SwIndex::operator< ( const SwIndex& rIndex ) const { return m_nIndex < rIndex.m_nIndex; diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx index 4f9f317881a4..c2f245df71fa 100644 --- a/sw/inc/swrect.hxx +++ b/sw/inc/swrect.hxx @@ -94,9 +94,6 @@ public: inline SwRect &operator+=( const Point &rPt ); inline SwRect &operator-=( const Point &rPt ); - inline SwRect &operator+=( const Size &rSz ); - inline SwRect &operator-=( const Size &rSz ); - //SV-SS e.g. pWin->DrawRect( aSwRect.SVRect() ); inline Rectangle SVRect() const; @@ -274,19 +271,6 @@ inline SwRect &SwRect::operator-=( const Point &rPt ) return *this; } -inline SwRect &SwRect::operator+=( const Size &rSz ) -{ - m_Size.Width() += rSz.Width(); - m_Size.Height() += rSz.Height(); - return *this; -} -inline SwRect &SwRect::operator-=( const Size &rSz ) -{ - m_Size.Width() -= rSz.Width(); - m_Size.Height() -= rSz.Height(); - return *this; -} - // other inline Rectangle SwRect::SVRect() const { diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 42953d6ae5cc..9669946007e7 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -1300,7 +1300,7 @@ void SwUiWriterTest::testDeleteTableRedlines() IDocumentRedlineAccess& rIDRA = pDoc->getIDocumentRedlineAccess(); SwExtraRedlineTable& rExtras = rIDRA.GetExtraRedlineTable(); rExtras.DeleteAllTableRedlines(pDoc, rTable, false, sal_uInt16(USHRT_MAX)); - CPPUNIT_ASSERT(rExtras.IsEmpty()); + CPPUNIT_ASSERT(rExtras.GetSize() == 0); } void SwUiWriterTest::testXFlatParagraph() diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx index dac9ba9c2769..cd8dd4afc0a9 100644 --- a/sw/source/core/bastyp/index.cxx +++ b/sw/source/core/bastyp/index.cxx @@ -296,16 +296,6 @@ void SwIndexReg::MoveTo( SwIndexReg& rArr ) // SwIndex -sal_Int32 SwIndex::operator++(int) -{ - SAL_WARN_IF( !(m_nIndex < SAL_MAX_INT32), "sw.core", - "SwIndex::operator++(int) wraps around" ); - - const sal_Int32 nOldIndex = m_nIndex; - ChgValue( *this, m_nIndex+1 ); - return nOldIndex; -} - sal_Int32 SwIndex::operator++() { SAL_WARN_IF( !(m_nIndex < SAL_MAX_INT32), "sw.core", @@ -346,20 +336,6 @@ sal_Int32 SwIndex::operator-=( sal_Int32 const nVal ) return ChgValue( *this, m_nIndex - nVal ).m_nIndex; } -sal_Int32 SwIndex::operator+=( const SwIndex & rIndex ) -{ - SAL_WARN_IF( !(m_nIndex <= SAL_MAX_INT32 - rIndex.m_nIndex), "sw.core", - "SwIndex::operator+=(SwIndex) wraps around" ); - return ChgValue( *this, m_nIndex + rIndex.m_nIndex ).m_nIndex; -} - -sal_Int32 SwIndex::operator-=( const SwIndex & rIndex ) -{ - SAL_WARN_IF( !(m_nIndex >= rIndex.m_nIndex), "sw.core", - "SwIndex::operator-=(SwIndex) wraps around" ); - return ChgValue( *this, m_nIndex - rIndex.m_nIndex ).m_nIndex; -} - bool SwIndex::operator< ( const SwIndex & rIndex ) const { // Attempt to compare indices into different arrays |