[Libreoffice-commits] core.git: 9 commits - include/tools sw/source ucb/source vbahelper/source
Norbert Thiebaud
nthiebaud at gmail.com
Fri Jan 31 19:27:55 PST 2014
include/tools/config.hxx | 1
sw/source/core/doc/docfld.cxx | 9 ++-
sw/source/core/doc/htmltbl.cxx | 81 ++++++++++++++++++-----------
sw/source/core/layout/laycache.cxx | 22 +++++--
sw/source/filter/html/htmltabw.cxx | 11 ++-
ucb/source/ucp/file/filrset.cxx | 42 +++++++--------
ucb/source/ucp/webdav-neon/NeonSession.cxx | 22 +++----
vbahelper/source/msforms/vbacontrol.cxx | 5 +
8 files changed, 116 insertions(+), 77 deletions(-)
New commits:
commit aaddfccb690f4aaa263cc24cb2fd616eebc1a8c1
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jan 31 21:19:06 2014 -0600
coverity#984154 : Uninitialized scalar field
Change-Id: I6f5b0fe54708a6cb40183dd3857042acdfd84e49
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 35e3928..10b40a2 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -2542,9 +2542,14 @@ void SwDocUpdtFld::RemoveFldType( const SwFieldType& rType )
}
SwDocUpdtFld::SwDocUpdtFld(SwDoc* pDoc)
- : pFldSortLst(0), nFldLstGetMode(0), pDocument(pDoc)
+ : pFldSortLst(0)
+ , nNodes(0)
+ , nFldLstGetMode(0)
+ , pDocument(pDoc)
+ , bInUpdateFlds(false)
+ , bFldsDirty(false)
+
{
- bInUpdateFlds = bFldsDirty = false;
memset( aFldTypeTable, 0, sizeof( aFldTypeTable ) );
}
commit ece88aed8d31c8377153a50eb29665533bdbc535
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jan 31 20:58:17 2014 -0600
coverity#984155 : Uninitialized scalar field
Change-Id: I02d2ef35d6d66faf8bc0e7431116ece03e2605fd
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 9924534..d234f76 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -164,35 +164,58 @@ SwHTMLTableLayoutConstraints *SwHTMLTableLayoutConstraints::InsertNext(
typedef SwHTMLTableLayoutColumn *SwHTMLTableLayoutColumnPtr;
typedef SwHTMLTableLayoutCell *SwHTMLTableLayoutCellPtr;
-SwHTMLTableLayout::SwHTMLTableLayout(
- const SwTable * pSwTbl,
- sal_uInt16 nRws, sal_uInt16 nCls, bool bColsOpt, bool bColTgs,
- sal_uInt16 nWdth, bool bPrcWdth, sal_uInt16 nBorderOpt,
- sal_uInt16 nCellPad, sal_uInt16 nCellSp, SvxAdjust eAdjust,
- sal_uInt16 nLMargin, sal_uInt16 nRMargin,
- sal_uInt16 nBWidth, sal_uInt16 nLeftBWidth,
- sal_uInt16 nRightBWidth,
- sal_uInt16 nInhLeftBWidth, sal_uInt16 nInhRightBWidth ) :
- aColumns( new SwHTMLTableLayoutColumnPtr[nCls] ),
- aCells( new SwHTMLTableLayoutCellPtr[nRws*nCls] ),
- pSwTable( pSwTbl ), pLeftFillerBox( 0 ), pRightFillerBox( 0 ),
- nMin( 0 ), nMax( 0 ),
- nRows( nRws ), nCols( nCls ),
- nLeftMargin( nLMargin ), nRightMargin( nRMargin ),
- nInhAbsLeftSpace( 0 ), nInhAbsRightSpace( 0 ),
- nRelLeftFill( 0 ), nRelRightFill( 0 ),
- nRelTabWidth( 0 ), nWidthOption( nWdth ),
- nCellPadding( nCellPad ), nCellSpacing( nCellSp ), nBorder( nBorderOpt ),
- nLeftBorderWidth( nLeftBWidth ), nRightBorderWidth( nRightBWidth ),
- nInhLeftBorderWidth( nInhLeftBWidth ),
- nInhRightBorderWidth( nInhRightBWidth ),
- nBorderWidth( nBWidth ),
- nDelayedResizeAbsAvail( 0 ), nLastResizeAbsAvail( 0 ),
- nPass1Done( 0 ), nWidthSet( 0 ), eTableAdjust( eAdjust ),
- bColsOption( bColsOpt ), bColTags( bColTgs ),
- bPrcWidthOption( bPrcWdth ), bUseRelWidth( false ),
- bMustResize( sal_True ), bExportable( sal_True ), bBordersChanged( sal_False ),
- bMustNotResize( sal_False ), bMustNotRecalc( sal_False )
+SwHTMLTableLayout::SwHTMLTableLayout( const SwTable * pSwTbl,
+ sal_uInt16 nRws, sal_uInt16 nCls,
+ bool bColsOpt, bool bColTgs,
+ sal_uInt16 nWdth, bool bPrcWdth,
+ sal_uInt16 nBorderOpt, sal_uInt16 nCellPad,
+ sal_uInt16 nCellSp, SvxAdjust eAdjust,
+ sal_uInt16 nLMargin, sal_uInt16 nRMargin,
+ sal_uInt16 nBWidth, sal_uInt16 nLeftBWidth,
+ sal_uInt16 nRightBWidth,
+ sal_uInt16 nInhLeftBWidth,
+ sal_uInt16 nInhRightBWidth )
+ : aColumns( new SwHTMLTableLayoutColumnPtr[nCls] )
+ , aCells( new SwHTMLTableLayoutCellPtr[nRws*nCls] )
+ , pSwTable( pSwTbl )
+ , pLeftFillerBox( 0 )
+ , pRightFillerBox( 0 )
+ , nMin( 0 )
+ , nMax( 0 )
+ , nRows( nRws )
+ , nCols( nCls )
+ , nLeftMargin( nLMargin )
+ , nRightMargin( nRMargin )
+ , nInhAbsLeftSpace( 0 )
+ , nInhAbsRightSpace( 0 )
+ , nRelLeftFill( 0 )
+ , nRelRightFill( 0 )
+ , nRelTabWidth( 0 )
+ , nWidthOption( nWdth )
+ , nCellPadding( nCellPad )
+ , nCellSpacing( nCellSp )
+ , nBorder( nBorderOpt )
+ , nLeftBorderWidth( nLeftBWidth )
+ , nRightBorderWidth( nRightBWidth )
+ , nInhLeftBorderWidth( nInhLeftBWidth )
+ , nInhRightBorderWidth( nInhRightBWidth )
+ , nBorderWidth( nBWidth )
+ , nDelayedResizeAbsAvail( 0 )
+ , nLastResizeAbsAvail( 0 )
+ , nPass1Done( 0 )
+ , nWidthSet( 0 )
+ , eTableAdjust( eAdjust )
+ , bColsOption( bColsOpt )
+ , bColTags( bColTgs )
+ , bPrcWidthOption( bPrcWdth )
+ , bUseRelWidth( false )
+ , bMustResize( sal_True )
+ , bExportable( sal_True )
+ , bBordersChanged( sal_False )
+ , bMayBeInFlyFrame( sal_False )
+ , bDelayedResizeRecalc( sal_False)
+ , bMustNotResize( sal_False )
+ , bMustNotRecalc( sal_False )
{
aResizeTimer.SetTimeoutHdl( STATIC_LINK( this, SwHTMLTableLayout,
DelayedResize_Impl ) );
commit c1487cf7b6a5173525267ca5db63baa073c91881
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jan 31 20:51:33 2014 -0600
coverity#984156 : Uninitialized scalar field
Change-Id: I03829d3fe431632f3c2ab585d19f812b9c2a94be
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 0c421be..b97301e 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -490,11 +490,19 @@ SwActualSection::SwActualSection( SwActualSection *pUp,
*/
SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
- SwLayoutFrm* &rpL, SwActualSection* &rpA, sal_Bool &rB,
- sal_uLong nNodeIndex, bool bCache )
- : rpFrm( rpF ), rpPrv( rpP ), rpPage( rpPg ), rpLay( rpL ),
- rpActualSection( rpA ), rbBreakAfter(rB), pDoc(pD), nMaxParaPerPage( 25 ),
- nParagraphCnt( bCache ? 0 : USHRT_MAX ), bFirst( bCache )
+ SwLayoutFrm* &rpL, SwActualSection* &rpA, sal_Bool &rB,
+ sal_uLong nNodeIndex, bool bCache )
+ : rpFrm( rpF )
+ , rpPrv( rpP )
+ , rpPage( rpPg )
+ , rpLay( rpL )
+ , rpActualSection( rpA )
+ , rbBreakAfter(rB)
+ , pDoc(pD)
+ , nMaxParaPerPage( 25 )
+ , nParagraphCnt( bCache ? 0 : USHRT_MAX )
+ , nFlyIdx( 0 )
+ , bFirst( bCache )
{
pImpl = pDoc->GetLayoutCache() ? pDoc->GetLayoutCache()->LockImpl() : NULL;
if( pImpl )
@@ -504,9 +512,10 @@ SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
->GetIndex();
nNodeIndex -= nStartOfContent;
nIndex = 0;
- nFlyIdx = 0;
while( nIndex < pImpl->size() && (*pImpl)[ nIndex ] < nNodeIndex )
+ {
++nIndex;
+ }
if( nIndex >= pImpl->size() )
{
pDoc->GetLayoutCache()->UnlockImpl();
commit abfa6fedfa3af31cf74a44fcc3e36a4e4cc48a16
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jan 31 20:46:17 2014 -0600
coverity#984157 : Uninitialized scalar field
Change-Id: I301ab920389de23814f8e1ace6daf22a10459b9d
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 52551ce..0c421be 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -1088,6 +1088,7 @@ bool SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly )
SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, bool bWrtMd ) :
pStream( &rStrm ),
+ nFlagRecEnd ( 0 ),
nMajorVersion(SW_LAYCACHE_IO_VERSION_MAJOR),
nMinorVersion(SW_LAYCACHE_IO_VERSION_MINOR),
bWriteMode( bWrtMd ),
commit d1f88c2cbb467ad7052e11fdd79e4b74bfb415b9
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jan 31 20:36:16 2014 -0600
coverity#984164 : Uninitialized scalar field
Change-Id: I5fa6608861b7049ad3964b695b0622ab583397d1
diff --git a/include/tools/config.hxx b/include/tools/config.hxx
index 21f8b9a..751114d 100644
--- a/include/tools/config.hxx
+++ b/include/tools/config.hxx
@@ -35,7 +35,6 @@ private:
sal_uIntPtr mnDataUpdateId;
sal_uInt16 mnLockCount;
bool mbPersistence;
- bool mbDummy1;
TOOLS_DLLPRIVATE bool ImplUpdateConfig() const;
TOOLS_DLLPRIVATE ImplGroupData* ImplGetGroup() const;
commit 80435fc469b3f897afdcc84e16b73997e1208f08
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jan 31 20:27:59 2014 -0600
coverity#984165 : Uninitialized scalar field
Change-Id: I9571b7f2dfabf1774acbf6b569aa1edc8fb6fda9
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index edf959a..da370c4 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -41,27 +41,27 @@ using namespace com::sun::star;
#define THROW_WHERE ""
#endif
-XResultSet_impl::XResultSet_impl(
- shell* pMyShell,
- const OUString& aUnqPath,
- sal_Int32 OpenMode,
- const uno::Sequence< beans::Property >& seq,
- const uno::Sequence< ucb::NumberedSortingInfo >& seqSort )
- : m_pMyShell( pMyShell ),
- m_xProvider( pMyShell->m_pProvider ),
- m_nRow( -1 ),
- m_nOpenMode( OpenMode ),
- m_bRowCountFinal( false ),
- m_aBaseDirectory( aUnqPath ),
- m_aFolder( aUnqPath ),
- m_sProperty( seq ),
- m_sSortingInfo( seqSort ),
- m_pDisposeEventListeners( 0 ),
- m_pRowCountListeners( 0 ),
- m_pIsFinalListeners( 0 ),
- m_bStatic( false ),
- m_nErrorCode( TASKHANDLER_NO_ERROR ),
- m_nMinorErrorCode( TASKHANDLER_NO_ERROR )
+XResultSet_impl::XResultSet_impl( shell* pMyShell,
+ const OUString& aUnqPath,
+ sal_Int32 OpenMode,
+ const uno::Sequence< beans::Property >& seq,
+ const uno::Sequence< ucb::NumberedSortingInfo >& seqSort )
+ : m_pMyShell( pMyShell )
+ , m_xProvider( pMyShell->m_pProvider )
+ , m_nRow( -1 )
+ , m_nWasNull ( false )
+ , m_nOpenMode( OpenMode )
+ , m_bRowCountFinal( false )
+ , m_aBaseDirectory( aUnqPath )
+ , m_aFolder( aUnqPath )
+ , m_sProperty( seq )
+ , m_sSortingInfo( seqSort )
+ , m_pDisposeEventListeners( 0 )
+ , m_pRowCountListeners( 0 )
+ , m_pIsFinalListeners( 0 )
+ , m_bStatic( false )
+ , m_nErrorCode( TASKHANDLER_NO_ERROR )
+ , m_nMinorErrorCode( TASKHANDLER_NO_ERROR )
{
osl::FileBase::RC err = m_aFolder.open();
if( err != osl::FileBase::E_None )
commit 863e8cb0cfd0da5202b3f2f4cd9a72251a7b6e7a
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jan 31 20:21:57 2014 -0600
coverity#984166 : Uninitialized scalar field
Change-Id: Ibc58fb412cd171193e0a76beb1a45a38b4cb412d
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index a23a123..fcfab2a 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -585,17 +585,17 @@ bool NeonSession::m_bGlobalsInited = false;
osl::Mutex aGlobalNeonMutex;
NeonLockStore NeonSession::m_aNeonLockStore;
-NeonSession::NeonSession(
- const rtl::Reference< DAVSessionFactory > & rSessionFactory,
- const OUString& inUri,
- const uno::Sequence< beans::NamedValue >& rFlags,
- const ucbhelper::InternetProxyDecider & rProxyDecider )
+NeonSession::NeonSession( const rtl::Reference< DAVSessionFactory > & rSessionFactory,
+ const OUString& inUri,
+ const uno::Sequence< beans::NamedValue >& rFlags,
+ const ucbhelper::InternetProxyDecider & rProxyDecider )
throw ( DAVException )
-: DAVSession( rSessionFactory ),
- m_aFlags( rFlags ),
- m_pHttpSession( 0 ),
- m_pRequestData( new RequestDataMap ),
- m_rProxyDecider( rProxyDecider )
+ : DAVSession( rSessionFactory )
+ , m_nProxyPort( 0 )
+ , m_aFlags( rFlags )
+ , m_pHttpSession( 0 )
+ , m_pRequestData( new RequestDataMap )
+ , m_rProxyDecider( rProxyDecider )
{
NeonUri theUri( inUri );
m_aScheme = theUri.GetScheme();
@@ -617,7 +617,7 @@ NeonSession::~NeonSession( )
}
void NeonSession::Init( const DAVRequestEnvironment & rEnv )
- throw ( DAVException )
+ throw ( DAVException )
{
osl::Guard< osl::Mutex > theGuard( m_aMutex );
m_aEnv = rEnv;
commit 4f957dc0c734c9a9e918ab213175f0d0fac43c67
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Thu Jan 30 02:54:21 2014 -0600
coverity#735370 : signed/unsigned mixup
Change-Id: I98366335430ba5ede4e46e1e9ec6488739e2099a
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 31b4244..21825c9 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -737,9 +737,10 @@ sal_Int32 ScVbaControl::getBackColor() throw (uno::RuntimeException)
void ScVbaControl::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeException)
{
- if ( ( nBackColor >= (sal_Int32)0x80000000 ) && ( nBackColor <= (sal_Int32)0x80000018 ) )
+ if ( ( (sal_uInt32)nBackColor >= (sal_uInt32)0x80000000 ) &&
+ ( (sal_uInt32)nBackColor <= (sal_uInt32)0x80000000 + SAL_N_ELEMENTS(nSysCols) ) )
{
- nBackColor = nSysCols[ nBackColor - 0x80000000 ];
+ nBackColor = nSysCols[ nBackColor & 0x0FF];
}
m_xProps->setPropertyValue( "BackgroundColor" , uno::makeAny( XLRGBToOORGB( nBackColor ) ) );
}
commit 05a9f91d5e83d3f57410e261e12204be48c3b1ca
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Thu Jan 30 00:10:09 2014 -0600
coverity#736941 : Arguments in wrong order
Change-Id: I94f0232f9e3544d43bf89a0cf728ea48dc7db470
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 28cafb8..c8db88e 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -84,8 +84,8 @@ class SwHTMLWrtTable : public SwWriteTable
public:
SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth,
- sal_Bool bRel, sal_uInt16 nNumOfRowsToRepeat,
- sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0 );
+ sal_Bool bRel, sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0,
+ sal_uInt16 nNumOfRowsToRepeat = 0 );
SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo );
void Write( SwHTMLWriter& rWrt, sal_Int16 eAlign=text::HoriOrientation::NONE,
@@ -96,8 +96,9 @@ public:
SwHTMLWrtTable::SwHTMLWrtTable( const SwTableLines& rLines, long nWidth,
- sal_uInt32 nBWidth, sal_Bool bRel, sal_uInt16 nNumOfRowsToRepeat,
- sal_uInt16 nLSub, sal_uInt16 nRSub )
+ sal_uInt32 nBWidth, sal_Bool bRel,
+ sal_uInt16 nLSub, sal_uInt16 nRSub,
+ sal_uInt16 nNumOfRowsToRepeat )
: SwWriteTable( rLines, nWidth, nBWidth, bRel, MAX_DEPTH, nLSub, nRSub, nNumOfRowsToRepeat )
{
PixelizeBorders();
@@ -1136,7 +1137,7 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode,
else
{
SwHTMLWrtTable aTableWrt( rTbl.GetTabLines(), nWidth,
- nBaseWidth, bRelWidths, rTbl.GetRowsToRepeat() );
+ nBaseWidth, bRelWidths, 0, 0, rTbl.GetRowsToRepeat() );
aTableWrt.Write( rHTMLWrt, eTabHoriOri, rTbl.GetRowsToRepeat() > 0,
pFmt, pCaption, bTopCaption,
nFlyHSpace, nFlyVSpace );
More information about the Libreoffice-commits
mailing list