basctl/source/basicide/baside2b.cxx | 2 - basic/source/comp/dim.cxx | 4 +-- chart2/source/controller/itemsetwrapper/ItemConverter.cxx | 2 - chart2/source/model/main/Legend.cxx | 2 - chart2/source/model/main/Legend.hxx | 2 - chart2/source/view/charttypes/GL3DBarChart.cxx | 1 chart2/source/view/main/GL3DRenderer.cxx | 2 + connectivity/source/drivers/file/FStatement.cxx | 5 +-- connectivity/source/inc/file/FStatement.hxx | 2 - cppu/source/uno/data.cxx | 2 - cppu/source/uno/lbenv.cxx | 2 - dbaccess/source/ui/browser/unodatbr.cxx | 2 - editeng/source/editeng/impedit2.cxx | 2 - extensions/source/update/check/download.cxx | 4 +-- filter/source/flash/swfwriter1.cxx | 2 - jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 7 ++--- jvmfwk/source/elements.cxx | 2 - registry/source/reflread.cxx | 2 - registry/source/regkey.cxx | 4 --- reportdesign/source/core/inc/ReportDrawPage.hxx | 2 - reportdesign/source/core/sdr/ReportDrawPage.cxx | 3 +- sal/osl/unx/module.cxx | 4 +-- sal/osl/unx/thread.c | 4 +-- sal/rtl/byteseq.cxx | 3 +- sc/source/core/data/bcaslot.cxx | 2 - sc/source/ui/undo/undotab.cxx | 2 - sc/source/ui/vba/vbarange.cxx | 3 -- sd/source/ui/func/fusnapln.cxx | 2 - sfx2/source/view/frame.cxx | 2 - sot/source/sdstor/stgavl.cxx | 3 +- svtools/source/contnr/svlbitm.cxx | 2 - svtools/source/contnr/treelist.cxx | 2 - svtools/source/svrtf/svparser.cxx | 3 -- svx/source/form/fmshimp.cxx | 2 - svx/source/svdraw/svdopath.cxx | 2 - sw/inc/unodraw.hxx | 2 - sw/source/core/layout/flowfrm.cxx | 2 - sw/source/core/text/porlay.cxx | 2 - sw/source/core/undo/undel.cxx | 4 --- sw/source/core/unocore/unodraw.cxx | 3 +- sw/source/core/unocore/unoframe.cxx | 6 ---- sw/source/filter/html/htmltab.cxx | 4 +-- sw/source/filter/ww8/ww8scan.cxx | 4 +-- sw/source/filter/xml/xmltexte.cxx | 4 +-- sw/source/uibase/inc/unomod.hxx | 7 ++++- sw/source/uibase/shells/drwtxtex.cxx | 18 +++++++------- sw/source/uibase/uno/unomod.cxx | 8 +++--- toolkit/source/awt/vclxwindow1.cxx | 2 - tools/source/stream/stream.cxx | 4 +-- unotools/source/i18n/transliterationwrapper.cxx | 4 +-- unoxml/source/rdf/librdf_repository.cxx | 3 -- vcl/source/gdi/regband.cxx | 2 - 52 files changed, 85 insertions(+), 86 deletions(-)
New commits: commit 335db94e59eab9d3dcdb9ad081e1787775898de1 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 10:44:38 2014 +0100 coverity#704986 Dereference after null check Change-Id: I27aad830a4e211601a78a15b2eb42d44275f1abe diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 45fa746..7faf745 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2795,7 +2795,7 @@ const SwStartNode *SwHTMLParser::InsertTableSection SwTxtFmtColl *pColl = pCSS1Parser->GetTxtCollFromPool( RES_POOLCOLL_TABLE ); const SwStartNode *pStNd; - if( pTable && pTable->bFirstCell ) + if (pTable->bFirstCell ) { SwNode *const pNd = & pPam->GetPoint()->nNode.GetNode(); pNd->GetTxtNode()->ChgFmtColl( pColl ); commit 542c50d6844f76d3c3ac4a68de2859494a5de15c Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 10:43:33 2014 +0100 coverity#704987 Dereference after null check Change-Id: I9c2b946ec3616a59ef06bf958ee4a81e1751e7ea diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 5f3e5bb..45fa746 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2843,7 +2843,7 @@ const SwStartNode *SwHTMLParser::InsertTableSection( sal_uInt16 nPoolId ) SwNode *const pNd = & pPam->GetPoint()->nNode.GetNode(); const SwStartNode *pStNd; - if( pTable && pTable->bFirstCell ) + if (pTable->bFirstCell) { pNd->GetTxtNode()->ChgFmtColl( pColl ); pTable->bFirstCell = false; commit 05832e110f5d67a20bea5bc0bd138c0ad7033674 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 10:37:15 2014 +0100 coverity#706020 Unintended sign extension Change-Id: I30c097ac6731b742779af5528200ff99451d04b0 diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx index 76718ea..4245ddf 100644 --- a/registry/source/reflread.cxx +++ b/registry/source/reflread.cxx @@ -743,7 +743,7 @@ public: sal_uInt16 m_numOfEntries; sal_uInt16 m_numOfReferenceEntries; - sal_uInt16 m_REFERENCE_ENTRY_SIZE; + size_t m_REFERENCE_ENTRY_SIZE; ConstantPool* m_pCP; ReferenceList(const sal_uInt8* buffer, sal_uInt16 numEntries, ConstantPool* pCP) commit cbfaf0c7945c68befac41a1e6561a49398cb6826 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 10:32:15 2014 +0100 coverity#1219805 Uninitialized scalar field Change-Id: Id6b15e8515d73cb5bdf4bc6d02d235ebc7e282da diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index f29202e..f80ea99 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -36,6 +36,7 @@ GL3DBarChart::GL3DBarChart( mnStepsTotal(0), mnMaxX(0), mnMaxY(0), + mnDistance(0.0), mnCornerId(0), mbBlockUserInput(false), mbNeedsNewRender(true), commit e5d60c4754a64cd31c30ab60a2eca242fdd5dc86 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 10:33:37 2014 +0100 coverity#1213562 Uninitialized scalar field Change-Id: I9a40cee6e807599e8e3d9f3df52186fd6226f7e1 diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index 090685b..a28b5bc 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -92,6 +92,7 @@ OpenGL3DRenderer::OpenGL3DRenderer(): , m_BoundBox(0) , m_BoundBoxNormal(0) , m_TextTexCoordBuf(0) + , m_TextTexCoordBufBatch(0) , m_RoundBarMesh() , m_RenderVertexBuf(0) , m_RenderTexCoordBuf(0) @@ -105,6 +106,7 @@ OpenGL3DRenderer::OpenGL3DRenderer(): , m_BatchColorBuf(0) , m_Batch3DUBOBuffer(0) , m_Batch3DActualSizeLight(0) + , m_iLightNum(0) { m_Polygon3DInfo.lineOnly = false; m_Polygon3DInfo.twoSidesLighting = false; commit 1271ac20d4041eb1ae72d20f0fc6a3fbee998e5e Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 10:29:39 2014 +0100 coverity#706266 Uncaught exception Change-Id: Iba3d2b8cddcd9e0f228d5b9fef1ce3290047c8b0 diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx index 3dac3c4..a0d885c 100644 --- a/chart2/source/model/main/Legend.cxx +++ b/chart2/source/model/main/Legend.cxx @@ -279,7 +279,7 @@ Sequence< OUString > Legend::getSupportedServiceNames_Static() // ____ OPropertySet ____ Any Legend::GetDefaultValue( sal_Int32 nHandle ) const - throw(beans::UnknownPropertyException) + throw (beans::UnknownPropertyException, uno::RuntimeException) { const tPropertyValueMap& rStaticDefaults = *StaticLegendDefaults::get(); tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) ); diff --git a/chart2/source/model/main/Legend.hxx b/chart2/source/model/main/Legend.hxx index 59cd907..19d4a21 100644 --- a/chart2/source/model/main/Legend.hxx +++ b/chart2/source/model/main/Legend.hxx @@ -72,7 +72,7 @@ protected: // ____ OPropertySet ____ virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const - throw(::com::sun::star::beans::UnknownPropertyException) SAL_OVERRIDE; + throw (css::beans::UnknownPropertyException, css::uno::RuntimeException) SAL_OVERRIDE; // ____ OPropertySet ____ virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE; commit 612ab9b4f7f0d9aeb43524f2cebed11b752bf061 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 10:25:29 2014 +0100 coverity#983968 Uncaught exception Change-Id: I0f5d8a72e545337525a90d86aa2fb87a180f4e63 diff --git a/sw/source/uibase/inc/unomod.hxx b/sw/source/uibase/inc/unomod.hxx index 4f8b317..839816a 100644 --- a/sw/source/uibase/inc/unomod.hxx +++ b/sw/source/uibase/inc/unomod.hxx @@ -101,7 +101,12 @@ protected: css::uno::RuntimeException) SAL_OVERRIDE; virtual void _preGetValues () - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException ) SAL_OVERRIDE; + throw (css::beans::UnknownPropertyException, + css::beans::PropertyVetoException, + css::lang::IllegalArgumentException, + css::lang::WrappedTargetException, + css::uno::RuntimeException) SAL_OVERRIDE; + virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ) SAL_OVERRIDE; virtual void _postGetValues () diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index e6e0bca..4ebd2dd 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -429,7 +429,7 @@ void SwXPrintSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, } } -void SwXPrintSettings::_postSetValues () +void SwXPrintSettings::_postSetValues() throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) @@ -437,8 +437,10 @@ void SwXPrintSettings::_postSetValues () mpPrtOpt = NULL; } -void SwXPrintSettings::_preGetValues () - throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) +void SwXPrintSettings::_preGetValues() + throw (UnknownPropertyException, PropertyVetoException, + IllegalArgumentException, WrappedTargetException, + RuntimeException) { switch (meType) { commit 95dca00a9147f986d357e127b575ac568034dee7 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 10:24:30 2014 +0100 coverity#707416 Uncaught exception Change-Id: I7c67c62622e2b46bc565ae148c1605f4954ffa39 diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx index 53ecc7d..4bb9da2 100644 --- a/toolkit/source/awt/vclxwindow1.cxx +++ b/toolkit/source/awt/vclxwindow1.cxx @@ -70,7 +70,7 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle ) } if( bThrow ) { - com::sun::star::uno::Exception aException; + com::sun::star::uno::RuntimeException aException; aException.Message = "incorrect window handle type"; throw aException; } commit 855010d9d1db33b8cb11f32d2f94014df6997682 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 10:19:45 2014 +0100 coverity#707290 Uncaught exception Change-Id: If020fd537c15c41fe33134f554b7df1f10f18570 diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index 04dceff..540448d 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -64,7 +64,7 @@ public: // The following method is called when a SvxShape-object is to be created. // Derived classes may obtain at this point a derivation or an object // that is aggregating a SvxShape. - virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw (std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; }; typedef cppu::WeakAggImplHelper4 diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index c11fc43..2717324 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -300,7 +300,8 @@ SdrObject* SwFmDrawPage::_CreateSdrObject( const uno::Reference< drawing::XShape return SvxFmDrawPage::_CreateSdrObject( xShape ); } -uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj ) const throw (std::exception) +uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj ) const + throw (uno::RuntimeException, std::exception) { uno::Reference< drawing::XShape > xRet; if(pObj->ISA(SwVirtFlyDrawObj) || pObj->GetObjInventor() == SWGInventor) commit 1b6cefaf68b89da765847093ecb542c1139935d3 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 10:18:51 2014 +0100 coverity#706608 Uncaught exception Change-Id: I26cf7c33089ddfcbb7faf81295b9a9776c6a9065 diff --git a/reportdesign/source/core/inc/ReportDrawPage.hxx b/reportdesign/source/core/inc/ReportDrawPage.hxx index 98270cf..844d00c 100644 --- a/reportdesign/source/core/inc/ReportDrawPage.hxx +++ b/reportdesign/source/core/inc/ReportDrawPage.hxx @@ -33,7 +33,7 @@ namespace reportdesign protected: virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw (std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; public: OReportDrawPage(SdrPage* pPage,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection); virtual ~OReportDrawPage() throw(){} diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx index a96d18b..0c7867f 100644 --- a/reportdesign/source/core/sdr/ReportDrawPage.cxx +++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx @@ -55,7 +55,8 @@ SdrObject* OReportDrawPage::_CreateSdrObject(const uno::Reference< drawing::XSha return SvxDrawPage::_CreateSdrObject( xDescr ); } -uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pObj ) const throw (std::exception) +uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pObj ) const + throw (uno::RuntimeException, std::exception) { OObjectBase* pBaseObj = dynamic_cast<OObjectBase*>(pObj); if ( !pBaseObj ) commit 6d45e2a4fcacf0e58b4b8d22ad452e48a996ad88 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 10:15:58 2014 +0100 coverity#1224302 Uncaught exception Change-Id: I622a7c41c9083f2deec21dc8c37572f978874127 diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index bf88543..c83fadf 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -176,8 +176,7 @@ void SAL_CALL OStatement_Base::cancel( ) throw(RuntimeException, std::exception { } - -void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException, std::exception) +void SAL_CALL OStatement_Base::close() throw (SQLException, RuntimeException, std::exception) { { ::osl::MutexGuard aGuard( m_aMutex ); @@ -186,7 +185,7 @@ void SAL_CALL OStatement_Base::close( ) throw(SQLException, RuntimeException, s dispose(); } -void OStatement_Base::closeResultSet () throw (SQLException) +void OStatement_Base::closeResultSet() throw (SQLException, RuntimeException, std::exception) { SAL_INFO( "connectivity.drivers", "file ocke.jans...@sun.com OStatement_Base::clearMyResultSet " ); ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/connectivity/source/inc/file/FStatement.hxx b/connectivity/source/inc/file/FStatement.hxx index 9b540dd..976a409 100644 --- a/connectivity/source/inc/file/FStatement.hxx +++ b/connectivity/source/inc/file/FStatement.hxx @@ -113,7 +113,7 @@ namespace connectivity // create the analyzer virtual OSQLAnalyzer* createAnalyzer(); - void closeResultSet () throw( ::com::sun::star::sdbc::SQLException); + void closeResultSet() throw (css::sdbc::SQLException, css::uno::RuntimeException, std::exception); sal_Int32 getPrecision ( sal_Int32 sqlType); void disposeResultSet(); commit 5ace3f3b4f2f916d8b2acab1b5cc0fe2a5a19dee Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 09:59:26 2014 +0100 clang scan-build: various warnings Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713 diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 78f65e6..e97d1cc 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1955,7 +1955,7 @@ void StackWindow::UpdateCalls() for ( sal_uInt16 nParam = 1; nParam < pParams->Count(); nParam++ ) { SbxVariable* pVar = pParams->Get( nParam ); - DBG_ASSERT( pVar, "Parameter?!" ); + assert(pVar && "Parameter?!"); if ( !pVar->GetName().isEmpty() ) { aEntry += pVar->GetName(); diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index 2d6dfab..58db8ff 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -1175,7 +1175,7 @@ void SbiParser::SubFunc() void SbiParser::DefProc( bool bStatic, bool bPrivate ) { - sal_uInt16 l1 = nLine, l2 = nLine; + sal_uInt16 l1 = nLine; bool bSub = ( eCurTok == SUB ); bool bProperty = ( eCurTok == PROPERTY ); PropertyMode ePropertyMode = PROPERTY_MODE_NONE; @@ -1279,7 +1279,7 @@ void SbiParser::DefProc( bool bStatic, bool bPrivate ) pProc->Define(); OpenBlock( eExit ); StmntBlock( bSub ? ENDSUB : (bProperty ? ENDPROPERTY : ENDFUNC) ); - l2 = nLine; + sal_uInt16 l2 = nLine; pProc->SetLine1( l1 ); pProc->SetLine2( l2 ); pPool = &aPublics; diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx index e8a31d5..923d5e6 100644 --- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx @@ -85,7 +85,7 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const tPropertyNameWithMemberId aProperty; SfxItemPool & rPool = GetItemPool(); - OSL_ASSERT( pRanges != NULL ); + assert(pRanges != NULL); OSL_ASSERT( m_xPropertySetInfo.is()); OSL_ASSERT( m_xPropertySet.is()); diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx index 3ef7acf..7a72287 100644 --- a/cppu/source/uno/data.cxx +++ b/cppu/source/uno/data.cxx @@ -60,7 +60,7 @@ void * binuno_queryInterface( void * pUnoI, typelib_TypeDescriptionReference * p * typelib_static_type_getByTypeClass( typelib_TypeClass_INTERFACE ); typelib_InterfaceTypeDescription * pTXInterfaceDescr = 0; TYPELIB_DANGER_GET( (typelib_TypeDescription **) &pTXInterfaceDescr, type_XInterface ); - OSL_ASSERT( pTXInterfaceDescr->ppAllMembers ); + assert(pTXInterfaceDescr->ppAllMembers); typelib_typedescriptionreference_getDescription( &g_pQITD, pTXInterfaceDescr->ppAllMembers[ 0 ] ); TYPELIB_DANGER_RELEASE( (typelib_TypeDescription *) pTXInterfaceDescr ); diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index f382c0d..b282820 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -864,7 +864,7 @@ extern "C" static void SAL_CALL unoenv_computeObjectIdentifier( uno_ExtEnvironment * pEnv, rtl_uString ** ppOId, void * pInterface ) { - OSL_ENSURE( pEnv && ppOId && pInterface, "### null ptr!" ); + assert(pEnv && ppOId && pInterface && "### null ptr!"); if (*ppOId) { ::rtl_uString_release( *ppOId ); diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index ca67085..a2d1ea4 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -2172,7 +2172,7 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent) OSL_ENSURE(pFirstParent,"SbaTableQueryBrowser::OnExpandEntry: No rootlevelparent!"); DBTreeListUserData* pData = static_cast< DBTreeListUserData* >(_pParent->GetUserData()); - OSL_ENSURE(pData,"SbaTableQueryBrowser::OnExpandEntry: No user data!"); + assert(pData && "SbaTableQueryBrowser::OnExpandEntry: No user data!"); #if OSL_DEBUG_LEVEL > 0 SvLBoxString* pString = static_cast<SvLBoxString*>(pFirstParent->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING)); OSL_ENSURE(pString,"SbaTableQueryBrowser::OnExpandEntry: No string item!"); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index ee1ae9f..91c6d1d 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1194,7 +1194,7 @@ EditPaM ImpEditEngine::CursorRight( const EditPaM& rPaM, sal_uInt16 nCharacterIt EditPaM ImpEditEngine::CursorUp( const EditPaM& rPaM, EditView* pView ) { - OSL_ENSURE( pView, "No View - No Cursor Movement!" ); + assert(pView && "No View - No Cursor Movement!"); const ParaPortion* pPPortion = FindParaPortion( rPaM.GetNode() ); OSL_ENSURE( pPPortion, "No matching portion found: CursorUp "); diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index 4df311a..4111d1d 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -152,9 +152,9 @@ progress_callback( void *clientp, double dltotal, double dlnow, double ultotal, OutData *out = reinterpret_cast < OutData * > (clientp); - OSL_ASSERT( out ); + assert(out); - if( ! out->StopCondition.check() ) + if (out && !out->StopCondition.check()) { double fPercent = 0; if ( dltotal + out->Offset ) diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index aedd9bf..a3377ee 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -806,7 +806,7 @@ sal_uInt16 Writer::defineBitmap( const BitmapEx &bmpSource, sal_Int32 nJPEGQuali // Figure out lossless size sal_uInt8 *pImageData, *pAlphaData; - sal_uInt32 width, height; + sal_uInt32 width(0), height(0); getBitmapData( bmpSource, pImageData, pAlphaData, width, height ); sal_uInt32 raw_size = width * height * 4; diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index ef91401..cffb0b3 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -40,6 +40,7 @@ #include "rtl/ustrbuf.hxx" #include "osl/module.hxx" #include "osl/mutex.hxx" +#include "osl/process.h" #include "osl/thread.hxx" #include "osl/file.hxx" #include "rtl/instance.hxx" @@ -634,13 +635,11 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( #if defined UNX && !defined MACOSX //Setting the JAVA_HOME is needed for awt - OUString javaHome("JAVA_HOME="); + OUString javaHome("JAVA_HOME"); OUString sPathLocation; osl_getSystemPathFromFileURL(pInfo->sLocation, & sPathLocation.pData); javaHome += sPathLocation; - OString osJavaHome = OUStringToOString( - javaHome, osl_getThreadTextEncoding()); - putenv(strdup(osJavaHome.getStr())); + osl_setEnvironment(javaHome.pData, javaHome.pData); #endif typedef jint JNICALL JNI_CreateVM_Type(JavaVM **, JNIEnv **, void *); diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index 0adc593..55cdfa7 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -1126,7 +1126,7 @@ void MergedSettings::getJRELocations( rtl_uString *** parLocations, sal_Int32 * size) const { osl::MutexGuard guard(FwkMutex::get()); - OSL_ASSERT(parLocations != NULL && size != NULL); + assert(parLocations != NULL && size != NULL); *parLocations = (rtl_uString **) rtl_allocateMemory(sizeof(rtl_uString*) * m_JRELocations.size()); diff --git a/registry/source/regkey.cxx b/registry/source/regkey.cxx index f2c7375..89bf17b 100644 --- a/registry/source/regkey.cxx +++ b/registry/source/regkey.cxx @@ -529,15 +529,13 @@ RegError REGISTRY_CALLTYPE getStringListValue(RegKeyHandle hKey, return pKey->getStringListValue(valueName, pValueList, pLen); } - // getUnicodeListValue - RegError REGISTRY_CALLTYPE getUnicodeListValue(RegKeyHandle hKey, rtl_uString* keyName, sal_Unicode*** pValueList, sal_uInt32* pLen) { - OSL_PRECOND((pValueList != 0) && (pLen != 0), "registry::getUnicodeListValue(): invalid parameter"); + assert((pValueList != 0) && (pLen != 0) && "registry::getUnicodeListValue(): invalid parameter"); *pValueList = 0, *pLen = 0; ORegKey* pKey = static_cast< ORegKey* >(hKey); diff --git a/sal/osl/unx/module.cxx b/sal/osl/unx/module.cxx index 1ebdfac..30fe2ab 100644 --- a/sal/osl/unx/module.cxx +++ b/sal/osl/unx/module.cxx @@ -25,7 +25,7 @@ #include <osl/thread.h> #include <osl/process.h> #include <osl/file.h> - +#include <assert.h> #include "system.h" #ifdef AIX @@ -169,7 +169,7 @@ oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 nR oslModule osl_loadModuleRelativeAscii( oslGenericFunction baseModule, char const * relativePath, sal_Int32 mode) { - SAL_WARN_IF(relativePath == 0, "sal.osl", "illegal argument"); + assert(relativePath && "illegal argument"); if (relativePath[0] == '/') { return osl_loadModuleAscii(relativePath, mode); } else { diff --git a/sal/osl/unx/thread.c b/sal/osl/unx/thread.c index 5335dd6..17b4d6c 100644 --- a/sal/osl/unx/thread.c +++ b/sal/osl/unx/thread.c @@ -16,7 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - +#include <assert.h> #include "system.h" #include <string.h> #if defined(OPENBSD) @@ -202,7 +202,7 @@ static void* osl_thread_start_Impl (void* pData) int terminate; Thread_Impl* pImpl= (Thread_Impl*)pData; - OSL_ASSERT(pImpl); + assert(pImpl); pthread_mutex_lock (&(pImpl->m_Lock)); diff --git a/sal/rtl/byteseq.cxx b/sal/rtl/byteseq.cxx index fe24179..5fd6022 100644 --- a/sal/rtl/byteseq.cxx +++ b/sal/rtl/byteseq.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <assert.h> #include <string.h> #include <osl/diagnose.h> @@ -78,7 +79,7 @@ void SAL_CALL rtl_byte_sequence_realloc( sal_Sequence * pSequence, * pNew; sal_Int32 nElements; - OSL_ENSURE( ppSequence, "### null ptr!" ); + assert(ppSequence && "### null ptr!"); pSequence = *ppSequence; nElements = pSequence->nElements; diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx index 6d6eee2..701e530 100644 --- a/sc/source/core/data/bcaslot.cxx +++ b/sc/source/core/data/bcaslot.cxx @@ -226,7 +226,7 @@ void ScBroadcastAreaSlot::EndListeningArea( const ScRange& rRange, } else { - if ( !rpArea->GetBroadcaster().HasListeners() ) + if (rpArea && !rpArea->GetBroadcaster().HasListeners()) { ScBroadcastAreas::const_iterator aIter( FindBroadcastArea( rRange)); if (aIter == aBroadcastAreaTbl.end() || isMarkedErased( aIter)) diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index b5091d59..713305c 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -1485,7 +1485,7 @@ SdrObject* ScUndoRenameObject::GetObject() for (sal_uInt16 nTab=0; nTab<nCount; nTab++) { SdrPage* pPage = pDrawLayer->GetPage(nTab); - OSL_ENSURE(pPage,"Page ?"); + assert(pPage && "Page ?"); SdrObjListIter aIter( *pPage, IM_DEEPNOGROUPS ); SdrObject* pObject = aIter.Next(); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index a14bb31..ef0839a 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -3155,7 +3155,6 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L const SvxSearchItem& globalSearchOptions = ScGlobal::GetSearchItem(); SvxSearchItem newOptions( globalSearchOptions ); - sal_Int16 nLookAt = globalSearchOptions.GetWordOnly() ? excel::XlLookAt::xlPart : excel::XlLookAt::xlWhole; sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns; uno::Reference< util::XSearchable > xSearch( mxRange, uno::UNO_QUERY ); @@ -3207,7 +3206,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L // LookAt if ( LookAt.hasValue() ) { - nLookAt = ::comphelper::getINT16( LookAt ); + sal_Int16 nLookAt = ::comphelper::getINT16( LookAt ); bool bSearchWords = false; if ( nLookAt == excel::XlLookAt::xlPart ) bSearchWords = false; diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index 7a05703..3fc967d 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -101,7 +101,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) } else { - OSL_ASSERT(pPV!=NULL); + assert(pPV!=NULL); aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos(); pPV->LogicToPagePos(aLinePos); bLineExist = true; diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index 26c6b5f..283c211 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -416,7 +416,7 @@ void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc ) // Here only the fixed properties identified "other adjustable, the // retrieved by GetViewData (saves time). - DBG_ASSERT( pDoc, "NULL-Document inserted ?!" ); + assert(pDoc && "NULL-Document inserted ?!"); GetParentFrame(); const SfxMedium *pMed = pDoc->GetMedium(); diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx index 722fb25..3cb48c2 100644 --- a/sot/source/sdstor/stgavl.cxx +++ b/sot/source/sdstor/stgavl.cxx @@ -19,6 +19,7 @@ #include <osl/diagnose.h> #include "stgavl.hxx" +#include <assert.h> StgAvlNode::StgAvlNode() { @@ -142,7 +143,7 @@ StgAvlNode* StgAvlNode::RotLL() StgAvlNode* StgAvlNode::RotLR() { - OSL_ENSURE( pLeft && pLeft->pRight, "The pointer is not allowed to be NULL!" ); + assert(pLeft && pLeft->pRight && "The pointer is not allowed to be NULL!"); StgAvlNode* pHeavy = pLeft; StgAvlNode* pNewRoot = pHeavy->pRight; diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index 62a34a9..b11ec76 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -137,7 +137,7 @@ SvButtonState SvLBoxButtonData::ConvertToButtonState( sal_uInt16 nItemFlags ) co SvTreeListEntry* SvLBoxButtonData::GetActEntry() const { - DBG_ASSERT( pImpl, "-SvLBoxButtonData::GetActEntry(): don't use me that way!" ); + assert(pImpl && "-SvLBoxButtonData::GetActEntry(): don't use me that way!"); return pImpl->pEntry; } diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index f60b1c9..362f93b 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -1051,7 +1051,7 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry ) void SvTreeList::SelectAll( SvListView* pView, bool bSelect ) { - DBG_ASSERT(pView,"SelectAll:NoView"); + assert(pView && "SelectAll:NoView"); SvTreeListEntry* pEntry = First(); while ( pEntry ) { diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index 114e377..51783a6 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -241,8 +241,7 @@ sal_Unicode SvParser::GetNextChar() } else { - DBG_ASSERT( pImplData && pImplData->hConv, - "no text converter!" ); + assert(pImplData && pImplData->hConv && "no text converter!"); sal_Unicode cUC; sal_uInt32 nInfo = 0; diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 967628e..ba76540 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -2386,7 +2386,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn // current Page/Controller FmFormPage* pCurrentPage = m_pShell->GetCurPage(); - DBG_ASSERT(pCurrentPage!=NULL, "FmXFormShell::OnSearchContextRequest : no page !"); + assert(pCurrentPage && "FmXFormShell::OnSearchContextRequest : no page !"); // Search all SdrControls of this page... OUString sControlSource, aName; diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 8c96c9f..9a2e18f 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -795,7 +795,7 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const // now check symmetric plus handles if (bControl) { // cases 5,6,7,8 - sal_uInt16 nSt=nPnt; // the associated support point + sal_uInt16 nSt; // the associated support point sal_uInt16 nFix=nPnt; // the opposing control point if (bIsNextControl) { // if the next one is a control point, the on before has to be a support point nSt=nPrevPnt; diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 233f0e6..a13ddbc 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -230,7 +230,7 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep if ( ! pSet ) pSet = pNxt->GetAttrSet(); - OSL_ENSURE( pSet, "No AttrSet to check keep attribute" ); + assert(pSet && "No AttrSet to check keep attribute"); if ( pSet->GetPageDesc().GetPageDesc() ) bKeep = false; diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 3c8f77b..dd5066a 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -601,7 +601,7 @@ SwScriptInfo::~SwScriptInfo() // Sw Script Types (SW_LATIN, SW_CJK, SW_CTL), used to identify the font sal_uInt8 SwScriptInfo::WhichFont( sal_Int32 nIdx, const OUString* pTxt, const SwScriptInfo* pSI ) { - SAL_WARN_IF( !pTxt && !pSI, "sw.core", "How should I determine the script type?" ); + assert((pSI || pTxt) && "How should I determine the script type?"); sal_uInt16 nScript; // First we try to use our SwScriptInfo diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index cb31802..470dbf4 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -359,8 +359,6 @@ bool SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd, if( pSttTxtNd ) { bool bOneNode = nSttNode == nEndNode; - sal_Int32 nLen = bOneNode ? nEndCntnt - nSttCntnt - : pSttTxtNd->GetTxt().getLength() - nSttCntnt; SwRegHistory aRHst( *pSttTxtNd, pHistory ); // always save all text atttibutes because of possibly overlapping // areas of on/off @@ -370,7 +368,7 @@ bool SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd, pHistory->CopyFmtAttr( *pSttTxtNd->GetpSwAttrSet(), nNdIdx ); // the length might have changed (!!Fields!!) - nLen = ((bOneNode) + sal_Int32 nLen = ((bOneNode) ? pEnd->nContent.GetIndex() : pSttTxtNd->GetTxt().getLength()) - pStt->nContent.GetIndex(); diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index c2d7ff4..a8bd5fe 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -1845,7 +1845,7 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF) rPLCF.advance(); - if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // No beginning? + if (!pData || (((sal_uInt8*)pData)[0] & 0x1f) != 0x13) // No beginning? goto Err; rF.nId = ((sal_uInt8*)pData)[1]; @@ -1932,7 +1932,7 @@ sal_Int32 WW8ScannerBase::WW8ReadString( SvStream& rStrm, OUString& rStr, WW8_CP nNextPieceCp = nBehindTextCp; // Initialization, important for Ver6 do { - bool bIsUnicode, bPosOk; + bool bIsUnicode(false), bPosOk(false); WW8_FC fcAct = WW8Cp2Fc(nAktStartCp,&bIsUnicode,&nNextPieceCp,&bPosOk); // Probably aimed beyond file end, doesn't matter! diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index d2e2617..09cb3f0 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -68,10 +68,10 @@ SwNoTxtNode *SwXMLTextParagraphExport::GetNoTxtNode( const Reference < XPropertySet >& rPropSet ) const { Reference<XUnoTunnel> xCrsrTunnel( rPropSet, UNO_QUERY ); - OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for embedded" ); + assert(xCrsrTunnel.is() && "missing XUnoTunnel for embedded"); SwXFrame *pFrame = reinterpret_cast< SwXFrame * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( SwXFrame::getUnoTunnelId() ))); - OSL_ENSURE( pFrame, "SwXFrame missing" ); + assert(pFrame && "SwXFrame missing"); SwFrmFmt *pFrmFmt = pFrame->GetFrmFmt(); const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt(); const SwNodeIndex *pNdIdx = rCntnt.GetCntntIdx(); diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index ed67441..bb6bfc3 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -322,10 +322,10 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) aDlgAttr.Put( SvxKerningItem(0, RES_CHRATR_KERNING) ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); + assert(pFact && "SwAbstractDialogFactory fail!"); boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg(pView->GetWindow(), *pView, aDlgAttr, DLG_CHAR_DRAW)); - OSL_ENSURE(pDlg, "Dialogdiet fail!"); + assert(pDlg && "Dialogdiet fail!"); if (nSlot == SID_CHAR_DLG_EFFECT) { pDlg->SetCurPageId("fonteffects"); @@ -346,10 +346,10 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) case FN_FORMAT_FOOTNOTE_DLG: { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); + assert(pFact && "SwAbstractDialogFactory fail!"); boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateSwFootNoteOptionDlg(GetView().GetWindow(), rView.GetWrtShell())); - OSL_ENSURE(pDlg, "Dialogdiet fail!"); + assert(pDlg && "Dialogdiet fail!"); pDlg->Execute(); break; } @@ -357,10 +357,10 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) { SfxItemSet aTmp(GetPool(), FN_PARAM_1, FN_PARAM_1); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialogdiet fail!"); + assert(pFact && "Dialogdiet fail!"); boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwTabDialog( DLG_TAB_OUTLINE, GetView().GetWindow(), &aTmp, GetView().GetWrtShell())); - OSL_ENSURE(pDlg, "Dialogdiet fail!"); + assert(pDlg && "Dialogdiet fail!"); pDlg->Execute(); pDlg.reset(); rReq.Done(); @@ -419,10 +419,10 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) aDlgAttr.Put( SvxOrphansItem( 0, RES_PARATR_ORPHANS ) ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); + assert(pFact && "SwAbstractDialogFactory fail!"); boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, 0, true )); - OSL_ENSURE(pDlg, "Dialogdiet fail!"); + assert(pDlg && "Dialogdiet fail!"); sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet) { @@ -580,7 +580,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) break; default: - OSL_ENSURE(!this, "wrong dispatcher"); + assert(!this && "wrong dispatcher"); return; } if(nEEWhich && pNewAttrs) diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index b787e4f..ecd02cc 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -295,7 +295,7 @@ ErrCode SvAsyncLockBytes::WriteAt(sal_uInt64 const nPos, const void * pBuffer, ErrCode SvAsyncLockBytes::FillAppend(const void * pBuffer, sal_Size nCount, sal_Size * pWritten) { - sal_Size nTheWritten; + sal_Size nTheWritten(0); ErrCode nError = SvOpenLockBytes::WriteAt(m_nSize, pBuffer, nCount, &nTheWritten); if (!nError) @@ -1822,7 +1822,7 @@ sal_Size SvMemoryStream::PutData( const void* pData, sal_Size nCount ) } } } - DBG_ASSERT(pBuf,"Possibly Reallocate failed"); + assert(pBuf && "Possibly Reallocate failed"); memcpy( pBuf+nPos, pData, (size_t)nCount); nPos += nCount; diff --git a/unotools/source/i18n/transliterationwrapper.cxx b/unotools/source/i18n/transliterationwrapper.cxx index ecaaf0c..40eb572 100644 --- a/unotools/source/i18n/transliterationwrapper.cxx +++ b/unotools/source/i18n/transliterationwrapper.cxx @@ -214,7 +214,7 @@ sal_Int32 TransliterationWrapper::compareString( const OUString& rStr1, const OU bool TransliterationWrapper::isEqual( const OUString& rStr1, const OUString& rStr2 ) const { - sal_Int32 nMatch1, nMatch2; + sal_Int32 nMatch1(0), nMatch2(0); bool bMatch = equals( rStr1, 0, rStr1.getLength(), nMatch1, rStr2, 0, rStr2.getLength(), nMatch2 ); @@ -223,7 +223,7 @@ bool TransliterationWrapper::isEqual( const OUString& rStr1, const OUString& rSt bool TransliterationWrapper::isMatch( const OUString& rStr1, const OUString& rStr2 ) const { - sal_Int32 nMatch1, nMatch2; + sal_Int32 nMatch1(0), nMatch2(0); equals( rStr1, 0, rStr1.getLength(), nMatch1, rStr2, 0, rStr2.getLength(), nMatch2 ); diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index cbdbae5..b7333f6 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -105,8 +105,7 @@ bool isInternalContext(librdf_node *i_pNode) throw () OSL_ENSURE(pURI, "isInternalContext: URI null"); if (pURI) { unsigned char *pContextURI(librdf_uri_as_string(pURI)); - OSL_ENSURE(pContextURI, - "isInternalContext: URI string null"); + assert(pContextURI && "isInternalContext: URI string null"); // if prefix matches reserved uri, it is RDFa context if (!strncmp(reinterpret_cast<char *>(pContextURI), s_nsOOo, sizeof(s_nsOOo)-1)) { diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx index 2cbcb57..87261cf 100644 --- a/vcl/source/gdi/regband.cxx +++ b/vcl/source/gdi/regband.cxx @@ -818,7 +818,7 @@ bool ImplRegionBand::IsInside( long nX ) long ImplRegionBand::GetXLeftBoundary() const { - DBG_ASSERT( mpFirstSep != NULL, "ImplRegionBand::XLeftBoundary -> no separation in band!" ); + assert(mpFirstSep && "ImplRegionBand::XLeftBoundary -> no separation in band!"); return mpFirstSep->mnXLeft; } commit 62cb50fd9b97358114dcc4d0c1afdcdd04341b0c Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jul 1 08:43:30 2014 +0100 fix debug=t build Change-Id: Ib50349da406ecff9979ac1ab522272694b69c2de diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index dc3e781..75f2f70 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -3276,12 +3276,6 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursorByRange(const if (pFmt && ::sw::XTextRangeToSwPaM(aPam, aTextPosition)) { SwNode& rNode = pFmt->GetCntnt().GetCntntIdx()->GetNode(); -#if OSL_DEBUG_LEVEL > 1 - const SwStartNode* p1 = aPam.GetNode()->FindFlyStartNode(); - const SwStartNode* p2 = rNode.FindFlyStartNode(); - (void)p1; - (void)p2; -#endif if(aPam.GetNode().FindFlyStartNode() == rNode.FindFlyStartNode()) { aRef = static_cast<text::XWordCursor*>(
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits