[Libreoffice-commits] core.git: 5 commits - svtools/source sw/inc sw/source
svtools/source/svhtml/parhtml.cxx |7 - sw/inc/index.hxx | 52 ++ sw/source/core/bastyp/index.cxx | 28 3 files changed, 48 insertions(+), 39 deletions(-) New commits: commit d2622ba4f3eb53296df21ec14ec91fda42eebeeb Author: Matteo Casalin matteo.casa...@yahoo.com Date: Tue Mar 4 08:58:06 2014 +0100 'explicit' makes no sense for a default constructor Change-Id: Ib70c75e43ecf020fcb39696bddea414b0de9bbf7 diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx index 9fa4e63..9f9c600 100644 --- a/sw/inc/index.hxx +++ b/sw/inc/index.hxx @@ -111,7 +111,7 @@ protected: bool HasAnyIndex() const { return 0 != m_pFirst; } public: -explicit SwIndexReg(); +SwIndexReg(); virtual ~SwIndexReg(); /// rtti, derived classes might do the same. If so, one can cast typesavely commit 574086f4cfbd8f85b47f310e5637d224acc05056 Author: Matteo Casalin matteo.casa...@yahoo.com Date: Tue Mar 4 08:51:48 2014 +0100 Remove '#define INLINE', inline in method definition is enough Change-Id: I9c7ae289492e3ec8ada111a8dddfb5426ef22d30 diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx index 568da1a..9fa4e63 100644 --- a/sw/inc/index.hxx +++ b/sw/inc/index.hxx @@ -26,12 +26,6 @@ class SwIndexReg; struct SwPosition; -#ifdef DBG_UTIL -#define INLINE -#else -#define INLINE inline -#endif - /// Marks a character position inside a document model node. class SW_DLLPUBLIC SwIndex { @@ -54,23 +48,23 @@ public: SwIndex( const SwIndex , short nDiff ); ~SwIndex() { Remove(); } -INLINE SwIndex operator=( sal_Int32 const ); +SwIndex operator=( sal_Int32 const ); SwIndex operator=( const SwIndex ); -INLINE sal_Int32 operator++(); -INLINE sal_Int32 operator--(); -INLINE sal_Int32 operator++(int); -INLINE sal_Int32 operator--(int); +sal_Int32 operator++(); +sal_Int32 operator--(); +sal_Int32 operator++(int); +sal_Int32 operator--(int); -INLINE sal_Int32 operator+=( sal_Int32 const ); -INLINE sal_Int32 operator-=( sal_Int32 const ); -INLINE sal_Int32 operator+=( const SwIndex ); -INLINE sal_Int32 operator-=( const SwIndex ); +sal_Int32 operator+=( sal_Int32 const ); +sal_Int32 operator-=( sal_Int32 const ); +sal_Int32 operator+=( const SwIndex ); +sal_Int32 operator-=( const SwIndex ); -INLINE bool operator ( const SwIndex ) const; -INLINE bool operator=( const SwIndex ) const; -INLINE bool operator ( const SwIndex ) const; -INLINE bool operator=( const SwIndex ) const; +bool operator ( const SwIndex ) const; +bool operator=( const SwIndex ) const; +bool operator ( const SwIndex ) const; +bool operator=( const SwIndex ) const; bool operator ( sal_Int32 const nVal ) const { return m_nIndex nVal; } bool operator=( sal_Int32 const nVal ) const { return m_nIndex = nVal; } @@ -100,8 +94,6 @@ public: const SwIndexReg* GetIdxReg() const { return m_pIndexReg; } }; -#undef INLINE - class SwIndexReg { friend class SwIndex; commit b49e047472e37cda9e7f7c0ee6e4606862054f57 Author: Matteo Casalin matteo.casa...@yahoo.com Date: Tue Mar 4 00:23:14 2014 +0100 Remove unused headers and forward declarations Change-Id: I8e8406dab1bca2a3349043eecaca168ff9ac00fb diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx index 2d1394e..568da1a 100644 --- a/sw/inc/index.hxx +++ b/sw/inc/index.hxx @@ -19,14 +19,10 @@ #ifndef INCLUDED_SW_INC_INDEX_HXX #define INCLUDED_SW_INC_INDEX_HXX -#include limits.h - -#include rtl/instance.hxx -#include tools/solar.h +#include sal/types.h #include tools/rtti.hxx #include swdllapi.h -class SwIndex; class SwIndexReg; struct SwPosition; @@ -139,16 +135,19 @@ inline sal_Int32 SwIndex::operator++() { return ChgValue( *this, m_nIndex+1 ).m_nIndex; } + 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; @@ -160,14 +159,17 @@ inline sal_Int32 SwIndex::operator+=( sal_Int32 const nVal ) { return ChgValue( *this, m_nIndex + nVal ).m_nIndex; } + 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; @@ -177,18 +179,22 @@ inline bool SwIndex::operator ( const SwIndex rIndex ) const { return m_nIndex rIndex.m_nIndex; } + inline bool SwIndex::operator=( const SwIndex rIndex ) const {
[Libreoffice-commits] core.git: 5 commits - svtools/source sw/inc sw/source vcl/source
svtools/source/brwbox/datwin.cxx |3 + svtools/source/contnr/templwin.cxx|3 - svtools/source/svhtml/parhtml.cxx |1 sw/inc/IDocumentContentOperations.hxx |2 sw/inc/doc.hxx|5 + sw/source/core/doc/doclay.cxx | 94 ++ sw/source/core/frmedt/fecopy.cxx |7 +- sw/source/core/frmedt/fefly1.cxx |2 sw/source/core/unocore/unodraw.cxx|2 sw/source/filter/html/htmldraw.cxx|2 sw/source/filter/ww8/ww8graf.cxx |4 - sw/source/filter/ww8/ww8graf2.cxx |2 sw/source/filter/ww8/ww8par4.cxx |2 vcl/source/filter/wmf/winmtf.hxx | 13 ++-- 14 files changed, 79 insertions(+), 63 deletions(-) New commits: commit 14a502e4988574e4c56d2653d2170e1b14576d4d Author: Caolán McNamara caol...@redhat.com Date: Wed Feb 19 12:54:17 2014 + coverity#738857 Uninitialized scalar field Change-Id: Ic82e559e9b7ca31fa6d9b5ff1d1fc5ae3fac9b88 diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 5c6c288..5d81568 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -197,7 +197,10 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent ) ,bNoScrollBack( false ) ,bNoHScroll( false ) ,bNoVScroll( false ) +,bAutoHScroll(false) +,bAutoVScroll(false) ,bUpdateMode( true ) +,bAutoSizeLastCol(false) ,bResizeOnPaint( false ) ,bUpdateOnUnlock( false ) ,bInUpdateScrollbars( false ) commit b0e1a3f962adbf4e0f127b3102b88e04f2f3d9de Author: Caolán McNamara caol...@redhat.com Date: Wed Feb 19 12:42:17 2014 + coverity#738860 Uninitialized scalar field Change-Id: I968c9f10d426b90e6883e7a0ff1387187d97dcd2 diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 41e2f51..8674c24 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -586,7 +586,8 @@ OUString SvtDocInfoTable_Impl::GetString( long nId ) const // class SvtFrameWindow_Impl - SvtFrameWindow_Impl::SvtFrameWindow_Impl( Window* pParent ) - : Window( pParent ) +: Window(pParent) +, bDocInfo(false) { // create windows and frame pEditWin = new ODocumentInfoPreview( this ,WB_LEFT | WB_VSCROLL | WB_READONLY | WB_BORDER | WB_3DLOOK); commit 2b2a3ed37358cab49933a218c8a8544be03fba22 Author: Caolán McNamara caol...@redhat.com Date: Wed Feb 19 12:41:22 2014 + coverity#738862 Uninitialized scalar field Change-Id: Ib970ef372e7754db890b5a4cd9c9b422a129ba02 diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index e094c54..c200907 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -337,18 +337,18 @@ typedef enum { struct WinMtfFillStyle { Color aFillColor; -sal_BoolbTransparent; +boolbTransparent; WinMtfFillStyleType aType; Bitmap aBmp; WinMtfFillStyle() : aFillColor(Color(COL_BLACK)) -, bTransparent(sal_False) +, bTransparent(false) , aType(FillStyleSolid) { } -WinMtfFillStyle( const Color rColor, sal_Bool bTrans = sal_False ) +WinMtfFillStyle(const Color rColor, bool bTrans = false) : aFillColor(rColor) , bTransparent(bTrans) , aType(FillStyleSolid) @@ -356,19 +356,20 @@ struct WinMtfFillStyle } WinMtfFillStyle(Bitmap rBmp) -: aType(FillStylePattern) +: bTransparent(false) +, aType(FillStylePattern) , aBmp(rBmp) { } -sal_Bool operator==( const WinMtfFillStyle rStyle ) +bool operator==( const WinMtfFillStyle rStyle ) { return ( ( aFillColor == rStyle.aFillColor ) ( bTransparent == rStyle.bTransparent ) ( aType == rStyle.aType ) ); } -sal_Bool operator==( WinMtfFillStyle* pStyle ) +bool operator==( WinMtfFillStyle* pStyle ) { return ( ( aFillColor == pStyle-aFillColor ) ( bTransparent == pStyle-bTransparent ) commit 85f48b1b47903b41ebaa4b432e756833a5e92e45 Author: Caolán McNamara caol...@redhat.com Date: Wed Feb 19 12:38:35 2014 + coverity#738865 Uninitialized scalar field Change-Id: Ie6473e4a8c4b311b6862019046fb4ae9cf05e1fb diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 942e881..6517e5c 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -296,6 +296,7 @@ HTMLParser::HTMLParser( SvStream rIn, bool bReadNewDoc ) : bPre_IgnoreNewPara(false), bReadNextChar(false), bReadComment(false), +nPre_LinePos(0), mnPendingOffToken(0) { //#i76649, default to UTF-8 for HTML unless we