filter/source/msfilter/util.cxx | 2 idl/source/prj/database.cxx | 69 +++++++++---------- include/tools/errinf.hxx | 10 -- include/vcl/combobox.hxx | 1 include/vcl/lstbox.hxx | 1 sal/qa/osl/file/osl_File.cxx | 12 ++- sc/source/core/opencl/formulagroupcl.cxx | 5 - sc/source/core/tool/platforminfo.cxx | 8 +- sc/source/ui/optdlg/calcoptionsdlg.cxx | 6 + sfx2/source/appl/appinit.cxx | 6 - sfx2/source/appl/appquit.cxx | 3 sfx2/source/inc/appdata.hxx | 3 svl/unx/source/svdde/ddedummy.cxx | 20 +++++ svtools/source/config/accessibilityoptions.cxx | 85 ------------------------ svx/source/items/numfmtsh.cxx | 13 +-- sw/inc/unocrsrhelper.hxx | 7 + sw/source/core/edit/autofmt.cxx | 2 sw/source/core/frmedt/fefly1.cxx | 9 +- sw/source/core/uibase/app/docstyle.cxx | 2 sw/source/core/unocore/unocrsrhelper.cxx | 8 +- sw/source/filter/html/swhtml.cxx | 1 sw/source/filter/ww8/wrtw8nds.cxx | 8 -- tools/source/ref/errinf.cxx | 32 --------- unusedcode.easy | 8 -- vcl/source/control/combobox.cxx | 5 - vcl/source/control/lstbox.cxx | 6 - writerfilter/source/dmapper/StyleSheetTable.cxx | 2 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 8 +- xmloff/source/draw/shapeimport.cxx | 6 + 29 files changed, 109 insertions(+), 239 deletions(-)
New commits: commit f8c8d6131334e4723a50147348a6e7d049be2f89 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 10:32:13 2014 +0000 coverity#736008 Dereference after null check Change-Id: I87977322458b6f22816bdfefb44795609c8159a4 diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index acca562..3a20ad8 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -466,13 +466,15 @@ SvXMLShapeContext* XMLShapeImportHelper::Create3DSceneChildContext( void XMLShapeImportHelper::SetStylesContext(SvXMLStylesContext* pNew) { mpStylesContext = pNew; - mpStylesContext->AddRef(); + if (mpStylesContext) + mpStylesContext->AddRef(); } void XMLShapeImportHelper::SetAutoStylesContext(SvXMLStylesContext* pNew) { mpAutoStylesContext = pNew; - mpAutoStylesContext->AddRef(); + if (mpAutoStylesContext) + mpAutoStylesContext->AddRef(); } SvXMLShapeContext* XMLShapeImportHelper::CreateGroupChildContext( commit 997b3c5f7b6cc303bb2802afe5bd777b8f0a6056 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 10:26:10 2014 +0000 coverity#708871 Unused pointer value Change-Id: I10aa4e053f5f709144ef516c6c4a00df8d3a1f08 diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index b986b0c..b10ece7 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2270,11 +2270,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) } } - bool bParaRTL = false; - const SvxFrameDirectionItem* pItem = (const SvxFrameDirectionItem*) - rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR); - if ( aAttrIter.IsParaRTL()) - bParaRTL = true; + bool bParaRTL = aAttrIter.IsParaRTL(); int nNumberLevel = -1; if (rNode.IsNumbered()) @@ -2355,7 +2351,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) cannot export that, its its ltr then that's ok as thats word's default. Otherwise we must add a RTL attribute to our export list */ - pItem = (const SvxFrameDirectionItem*) + const SvxFrameDirectionItem* pItem = (const SvxFrameDirectionItem*) rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR); if ( (!pItem || pItem->GetValue() == FRMDIR_ENVIRONMENT) && commit 7e6054c7d41e459490fbccd77794d110b437329d Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 10:19:43 2014 +0000 coverity#1157794 Unchecked dynamic_cast Change-Id: Idda6698a0fc53c1b59b2a7d2e88e24dac55a0fbd diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 71331e1..60ac009 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -656,7 +656,7 @@ void OOXMLDocumentImpl::resolveGlossaryStream(Stream & /*rStream*/) void OOXMLDocumentImpl::resolveEmbeddingsStream(Stream & /*rStream*/) { uno::Reference<embed::XRelationshipAccess> mxRelationshipAccess; - mxRelationshipAccess.set((*dynamic_cast<OOXMLStreamImpl *>(mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW); + mxRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW); if (mxRelationshipAccess.is()) { OUString sChartType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"); commit 84b0b95ff9cd72ed8d768558db2efa398fb83b16 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 10:19:08 2014 +0000 coverity#1157793 Unchecked dynamic_cast Change-Id: I78089c4a10faf23e71f37d415a514557d7353619 diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 23a8ce9..71331e1 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -567,7 +567,7 @@ void OOXMLDocumentImpl::resolveGlossaryStream(Stream & /*rStream*/) return; } uno::Reference<embed::XRelationshipAccess> mxRelationshipAccess; - mxRelationshipAccess.set((*dynamic_cast<OOXMLStreamImpl *>(pStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW); + mxRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*pStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW); if (mxRelationshipAccess.is()) { commit 7ce20a1e4f5032a8ef2aca1ce8f4e5aec7ca6aea Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 10:18:28 2014 +0000 coverity#1157792 Unchecked dynamic_cast Change-Id: Id338f606690a1bbe97df66079920e0e564bff9cf diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index b126b4f..23a8ce9 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -710,7 +710,7 @@ void OOXMLDocumentImpl::resolveActiveXStream(Stream & rStream) { // Resolving all ActiveX[n].xml files from ActiveX folder. uno::Reference<embed::XRelationshipAccess> mxRelationshipAccess; - mxRelationshipAccess.set((*dynamic_cast<OOXMLStreamImpl *>(mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW); + mxRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW); if (mxRelationshipAccess.is()) { static const OUString sCustomType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/control"); commit a7b766def2ba508a256e6360a4df9da39d375b6f Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 10:10:00 2014 +0000 coverity#1130356 Unchecked dynamic_cast Change-Id: I1481729063c20b75841372363ab936154c989b3f diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index a149de8..cbcdbcf 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -794,7 +794,10 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, StartAllAction(); SwShellCrsr *pStartCursor = dynamic_cast<SwShellCrsr*>(this->GetSwCrsr()); SwShellCrsr *pCursor = pStartCursor; - do { + do + { + if (!pCursor) + break; // Has the anchor not been set or been set incompletely? if( pFlyAttrSet ) @@ -839,8 +842,8 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, pGrfAttrSet, pFrmFmt ); OSL_ENSURE( pFmt, "Doc->Insert(notxt) failed." ); - } while( (pCursor = dynamic_cast<SwShellCrsr*>(pCursor->GetNext())) - != pStartCursor ); + pCursor = dynamic_cast<SwShellCrsr*>(pCursor->GetNext()); + } while( pCursor != pStartCursor ); EndAllAction(); commit 7413ada041357dcdd529da67203339e8427ca694 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 10:06:00 2014 +0000 coverity#1130351 Unchecked dynamic_cast Change-Id: Ib0ae5dcd616c4a579f73fbd26675f8b2f60f0666 diff --git a/sw/source/core/uibase/app/docstyle.cxx b/sw/source/core/uibase/app/docstyle.cxx index b52bcd9..7681b32 100644 --- a/sw/source/core/uibase/app/docstyle.cxx +++ b/sw/source/core/uibase/app/docstyle.cxx @@ -464,7 +464,7 @@ void SwDocStyleSheet::SetGrabBagItem(const uno::Any& rVal) if (bChg) { - dynamic_cast<SwDocStyleSheetPool*>(pPool)->InvalidateIterator(); + dynamic_cast<SwDocStyleSheetPool&>(*pPool).InvalidateIterator(); pPool->Broadcast(SfxStyleSheetHint(SFX_STYLESHEET_MODIFIED, *this)); SwEditShell* pSh = rDoc.GetEditShell(); if (pSh) commit b022021ad3c53abd88dbc37431a54f1f0ac96cc4 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 10:04:24 2014 +0000 coverity#1130194 Unchecked dynamic_cast Change-Id: I313d278dedcd7d51466a09ad6a85bfb5c78023d4 diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 09dbbb1..b126b4f 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -491,7 +491,7 @@ void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream) { // Resolving all item[n].xml files from CustomXml folder. uno::Reference<embed::XRelationshipAccess> mxRelationshipAccess; - mxRelationshipAccess.set((*dynamic_cast<OOXMLStreamImpl *>(mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW); + mxRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW); if (mxRelationshipAccess.is()) { static const OUString sCustomType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml"); commit 32fdb77fe918f2b409c0f35ef761d871a42ade70 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 10:01:46 2014 +0000 coverity#1130174 Logically dead code Change-Id: I80b4f3db9d5f0eda1a05aa796633aefd434c38f4 diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index dab6110..d329f5d 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -1964,10 +1964,7 @@ public: { if (i) ss << ", "; - if (!nested) - mvSubArguments[i]->GenDeclRef(ss); - else - ss << mvSubArguments[i]->GenSlidingWindowDeclRef(true); + mvSubArguments[i]->GenDeclRef(ss); } ss << ")"; } else { commit 43cefc3b2805021c44c762de0e51dc49300a5d57 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 10:00:09 2014 +0000 coverity#1130173 Dead default in switch Change-Id: Iff12f82355269faec920c57464bc6b019f03ddb6 diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index ba9c9f3..d3a6953 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -609,8 +609,6 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm) case NS_ooxml::LN_CT_Style_locked: aValue.Name = "locked"; break; - default: - break; } pEntry->AppendInteropGrabBag(aValue); } commit 423b2ef9ae745a12669667f6f54eadab52a2027d Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:57:52 2014 +0000 coverity#1103769 Uninitialized pointer field Change-Id: Ibd3394f9ad3a60115b22a40057a53f8fe75d7f5e diff --git a/sc/source/core/tool/platforminfo.cxx b/sc/source/core/tool/platforminfo.cxx index 1679668..719fda9 100644 --- a/sc/source/core/tool/platforminfo.cxx +++ b/sc/source/core/tool/platforminfo.cxx @@ -12,7 +12,13 @@ namespace sc { -OpenclDeviceInfo::OpenclDeviceInfo() {} +OpenclDeviceInfo::OpenclDeviceInfo() + : device(0) + , mnMemory(0) + , mnComputeUnits(0) + , mnFrequency(0) +{ +} OpenclPlatformInfo::OpenclPlatformInfo() : platform(NULL) commit 15d4fec9206b77e68afde90d84652731ba646b21 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:54:47 2014 +0000 coverity#1103733 Uncaught exception Change-Id: Ia6070a4a6d87929ba97df758e4e8972934bee128 diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx index ff9a825..86f0b51 100644 --- a/sw/inc/unocrsrhelper.hxx +++ b/sw/inc/unocrsrhelper.hxx @@ -97,8 +97,11 @@ namespace SwUnoCursorHelper void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam); void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rOptions - ) throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::io::IOException, com::sun::star::uno::RuntimeException ); + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rOptions) + throw (com::sun::star::lang::IllegalArgumentException, + com::sun::star::io::IOException, + com::sun::star::uno::RuntimeException, + std::exception); void getNumberingProperty( SwPaM& rPam, diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 2e2fe64..8de5937 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -956,10 +956,10 @@ void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPa } } -void InsertFile(SwUnoCrsr* pUnoCrsr, - const OUString& rURL, - const uno::Sequence< beans::PropertyValue >& rOptions - ) throw( lang::IllegalArgumentException, io::IOException, uno::RuntimeException ) +void InsertFile(SwUnoCrsr* pUnoCrsr, const OUString& rURL, + const uno::Sequence< beans::PropertyValue >& rOptions) + throw (lang::IllegalArgumentException, io::IOException, + uno::RuntimeException, std::exception) { SfxMedium* pMed = 0; SwDoc* pDoc = pUnoCrsr->GetDoc(); commit 48b987fed3dbe30b1cb7a95a60d8413918d68dbf Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:52:24 2014 +0000 coverity#1103682 Missing break in switch Change-Id: I8006c1dbbc195dd68b7f537468418f69742f43a4 diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 8948542..0f702fa 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -4148,6 +4148,7 @@ void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl ) // Fuer dem Fall, dass ein CLASS angegeben ist, loeschen wir // es damit wir nicht die CLASS der PRE-Vorlage bekommen. aClass = aEmptyOUStr; + // fall-through case HTML_BLOCKQUOTE_ON: case HTML_BLOCKQUOTE30_ON: case HTML_PREFORMTXT_ON: commit 0d33512eccdf90afedcb454ad17e7280e55807fc Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:51:31 2014 +0000 coverity#1103674 Unchecked dynamic_cast Change-Id: I917ace83496f0ed4412ad07eb4fb267416942b96 diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 61f5279..fd48e76 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -404,7 +404,11 @@ void ScCalcOptionsDialog::SelectedDeviceChanged() mpFtMemory->SetText(OUString()); } - OUString aDevice = dynamic_cast<SvLBoxString*>(pEntry->GetItem(1))->GetText(); + SvLBoxString* pBoxEntry = dynamic_cast<SvLBoxString*>(pEntry->GetItem(1)); + if (!pBoxEntry) + return; + + OUString aDevice = pBoxEntry->GetText(); // use english string for configuration if(aDevice == maSoftware) aDevice = OPENCL_SOFTWARE_DEVICE_CONFIG_NAME; commit fc19d6af97cbbe6fa69fbb66da32a1972647ebfc Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:47:51 2014 +0000 coverity#1103656 Logically dead code Change-Id: I9e55dbfea39abfbe335036af910c3a8bc916d6b9 diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index 6e7e7f0..5c4b0af 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -389,16 +389,11 @@ void SvxNumberFormatShell::GetOptions( const OUString& rFormat, if(nFmtKey != NUMBERFORMAT_ENTRY_NOT_FOUND) { - if ( nFmtKey != NUMBERFORMAT_ENTRY_NOT_FOUND ) - { - pFormatter->GetFormatSpecialInfo( nFmtKey, - rThousand, rNegRed, - rPrecision, rLeadingZeroes ); + pFormatter->GetFormatSpecialInfo( nFmtKey, + rThousand, rNegRed, + rPrecision, rLeadingZeroes ); - CategoryToPos_Impl( pFormatter->GetType( nFmtKey ), rCatLbPos ); - } - else - rCatLbPos = CAT_USERDEFINED; + CategoryToPos_Impl( pFormatter->GetType( nFmtKey ), rCatLbPos ); } else { commit bba56d9ec704c08099f73adb661e5d7d40721795 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:45:57 2014 +0000 coverity#1103652 Unchecked return value Change-Id: Ia05313ad580d09d1e2832a81829518f4692e18fd diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx index 8035c86..dfdff3a 100644 --- a/filter/source/msfilter/util.cxx +++ b/filter/source/msfilter/util.cxx @@ -599,7 +599,7 @@ EquationResult Read_SubF_Combined(WW8ReadFieldParams& rReadParam) { break; } - rReadParam.SkipToNextToken(); + (void)rReadParam.SkipToNextToken(); // intentional fall-through case -2: { commit 2be3417bf6dba2a0897b21e15d22ef2f8aac99e3 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:45:06 2014 +0000 coverity#1103651 Unchecked return value Change-Id: Iee2bbba1e581364f72a73421ba8e799fa05a94e4 diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index 935a730..3ac165d 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -624,9 +624,9 @@ sal_Bool SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, sal_Bool bImported if( pTok->Is( SvHash_import() ) ) { rInStm.GetToken_Next(); - rInStm.Read( '(' ); // optional - pTok = rInStm.GetToken_Next(); - if( pTok->IsString() ) + bOk = rInStm.Read( '(' ); // optional + pTok = bOk ? rInStm.GetToken_Next() : NULL; + if( pTok && pTok->IsString() ) { OUString aFullName; if( osl::FileBase::E_None == osl::File::searchFileURL( commit 525c539ac95d9cd88fc72c35bf365b2f5917030d Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:43:46 2014 +0000 fix indent Change-Id: I0f09c42928d354bd26fa5137a2faa768560b1223 diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index a903329..935a730 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -618,52 +618,51 @@ SvIdlWorkingBase::SvIdlWorkingBase(const SvCommand& rCmd) : SvIdlDataBase(rCmd) sal_Bool SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, sal_Bool bImported, const OUString & rPath ) { aPath = rPath; // only valid for this iteration - SvToken * pTok; sal_Bool bOk = sal_True; - pTok = rInStm.GetToken(); - // only one import at the very beginning - if( pTok->Is( SvHash_import() ) ) + SvToken * pTok = rInStm.GetToken(); + // only one import at the very beginning + if( pTok->Is( SvHash_import() ) ) + { + rInStm.GetToken_Next(); + rInStm.Read( '(' ); // optional + pTok = rInStm.GetToken_Next(); + if( pTok->IsString() ) { - rInStm.GetToken_Next(); - rInStm.Read( '(' ); // optional - pTok = rInStm.GetToken_Next(); - if( pTok->IsString() ) + OUString aFullName; + if( osl::FileBase::E_None == osl::File::searchFileURL( + OStringToOUString(pTok->GetString(), RTL_TEXTENCODING_ASCII_US), + rPath, + aFullName) ) { - OUString aFullName; - if( osl::FileBase::E_None == osl::File::searchFileURL( - OStringToOUString(pTok->GetString(), RTL_TEXTENCODING_ASCII_US), - rPath, - aFullName) ) + osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName ); + this->AddDepFile(aFullName); + SvFileStream aStm( aFullName, STREAM_STD_READ | STREAM_NOCREATE ); + Load( aStm ); + if( aStm.GetError() != SVSTREAM_OK ) { - osl::FileBase::getSystemPathFromFileURL( aFullName, aFullName ); - this->AddDepFile(aFullName); - SvFileStream aStm( aFullName, STREAM_STD_READ | STREAM_NOCREATE ); - Load( aStm ); - if( aStm.GetError() != SVSTREAM_OK ) + if( aStm.GetError() == SVSTREAM_WRONGVERSION ) { - if( aStm.GetError() == SVSTREAM_WRONGVERSION ) - { - OStringBuffer aStr("wrong version, file "); - aStr.append(OUStringToOString( aFullName, RTL_TEXTENCODING_UTF8)); - SetError(aStr.makeStringAndClear(), pTok); - WriteError( rInStm ); - bOk = sal_False; - } - else - { - aStm.Seek( 0 ); - aStm.ResetError(); - SvTokenStream aTokStm( aStm, aFullName ); - bOk = ReadSvIdl( aTokStm, sal_True, rPath ); - } + OStringBuffer aStr("wrong version, file "); + aStr.append(OUStringToOString( aFullName, RTL_TEXTENCODING_UTF8)); + SetError(aStr.makeStringAndClear(), pTok); + WriteError( rInStm ); + bOk = sal_False; + } + else + { + aStm.Seek( 0 ); + aStm.ResetError(); + SvTokenStream aTokStm( aStm, aFullName ); + bOk = ReadSvIdl( aTokStm, sal_True, rPath ); } } - else - bOk = sal_False; } else bOk = sal_False; } + else + bOk = sal_False; + } sal_uInt32 nBeginPos = 0xFFFFFFFF; // can not happen with Tell commit 3ae74fb26d1b7d5af88aa90ac78551c7d48b7935 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:41:23 2014 +0000 coverity#1103650 Unchecked return value Change-Id: I8c674269174a9e17d2195d1014f67aa7a81ba138 diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 1043dcf..3fa6430 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1760,7 +1760,7 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl ) DelPrevPara(); DeleteCurrentParagraph( true, false ); - DeleteCurNxtPara( OUString() ); + (void)DeleteCurNxtPara( OUString() ); m_aDelPam.DeleteMark(); m_aDelPam.GetPoint()->nNode = m_aNdIdx.GetIndex() + 1; commit 04c2063a507c9dbefe195ee27671261b9de40c2b Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:39:15 2014 +0000 coverity#1079295 Uninitialized pointer field Change-Id: Iddae1fca0664e2d0106f7cc13dc2d9b89d57b1e4 diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx index acb6380..b848b8f 100644 --- a/svl/unx/source/svdde/ddedummy.cxx +++ b/svl/unx/source/svdde/ddedummy.cxx @@ -25,6 +25,7 @@ DdeData::DdeData() } DdeData::DdeData( const OUString& ) + : pImp(NULL) { } commit 29842e7080b201b729fa3d24b0ade24e95d49cf9 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:38:37 2014 +0000 coverity#1079294 Uninitialized pointer field Change-Id: I3605699642a1fb5e42a8ea7347bc0009e8f9141a diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx index 8e3d30d..acb6380 100644 --- a/svl/unx/source/svdde/ddedummy.cxx +++ b/svl/unx/source/svdde/ddedummy.cxx @@ -286,6 +286,10 @@ DdeServices& DdeService::GetServices() } DdeItem::DdeItem( const OUString& ) + : pName(NULL) + , pMyTopic(NULL) + , pImpData(NULL) + , nType(0) { } commit 55b30b150b06c5e584dbb0d77bffa780f8a54995 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:37:05 2014 +0000 coverity#1079293 Uninitialized pointer field Change-Id: I20f844b98e922ccd351a28d9b47554c796876d14 diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx index cecb617..8e3d30d 100644 --- a/svl/unx/source/svdde/ddedummy.cxx +++ b/svl/unx/source/svdde/ddedummy.cxx @@ -70,6 +70,9 @@ long DdeConnection::GetError() } DdeConnection::DdeConnection( const OUString&, const OUString& ) + : pService(NULL) + , pTopic(NULL) + , pImp(NULL) { } commit 59b01ca79a9bc730714736ed32ac7f3780ec1cae Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:35:45 2014 +0000 coverity#1079292 Uninitialized pointer field Change-Id: Ic78aa75bccda1f63d97eb8489d5d64c936c37b16 diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx index 87cd7f0..cecb617 100644 --- a/svl/unx/source/svdde/ddedummy.cxx +++ b/svl/unx/source/svdde/ddedummy.cxx @@ -88,7 +88,12 @@ const OUString DdeConnection::GetTopicName() } DdeTransaction::DdeTransaction( DdeConnection& rConnection, const OUString&, long ) - : rDde( rConnection ) + : rDde(rConnection) + , pName(NULL) + , nType(0) + , nId(0) + , nTime(0) + , bBusy(false) { } commit 71286a6aec08481cf18bfaae0c60efa386557eaf Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:34:04 2014 +0000 coverity#1079291 Uninitialized pointer field Change-Id: I75ce5ab5583ed3e4009582bae531db24b66be9f8 diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx index 2e03c08..87cd7f0 100644 --- a/svl/unx/source/svdde/ddedummy.cxx +++ b/svl/unx/source/svdde/ddedummy.cxx @@ -194,8 +194,11 @@ const OUString DdeTopic::GetName() const } DdeService::DdeService( const OUString& ) + : pSysTopic(NULL) + , pName(NULL) + , pConv(NULL) + , nStatus(0) { - nStatus = 0; } OUString DdeService::Topics() commit 42c2dd5ec06a2b2a52ca5d2e9e40d075c747f6d9 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:32:29 2014 +0000 coverity#1079286 Uninitialized pointer field Change-Id: Iaaab025a97d01b248f4478989d6cdfdc8664ba79 diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index dabfabe..17607a6 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -1354,8 +1354,16 @@ namespace osl_FileBase ::rtl::OUString *pUStr_DirURL; ::rtl::OUString *pUStr_FileURL; - public: - createTempFile() :nError1(FileBase::E_None),nError2(FileBase::E_None) {} + public: + createTempFile() + : nError1(FileBase::E_None) + , nError2(FileBase::E_None) + , bOK(false) + , pHandle(NULL) + , pUStr_DirURL(NULL) + , pUStr_FileURL(NULL) + { + } // initialization void setUp() commit 1e7891c103f01f68924817bc02bda892311806fa Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:24:02 2014 +0000 drop the SimpleErrorHandler Change-Id: I968300664c386e6cf33461c5858833832e452e28 diff --git a/include/tools/errinf.hxx b/include/tools/errinf.hxx index 54dc0ac..3b0ec00 100644 --- a/include/tools/errinf.hxx +++ b/include/tools/errinf.hxx @@ -165,16 +165,6 @@ public: static void RegisterDisplay( WindowDisplayErrorFunc* ); }; -class TOOLS_DLLPUBLIC SimpleErrorHandler : private ErrorHandler -{ -protected: - virtual bool CreateString( const ErrorInfo*, OUString &, - sal_uInt16 &nMask ) const; - -public: - SimpleErrorHandler(); -}; - #endif #endif diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index 5cbf85c..610a1e1 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -226,12 +226,6 @@ bool SfxApplication::Initialize_Impl() Application::EnableAutoMnemonic ( aLocalisation.IsAutoMnemonic() ); Application::SetDialogScaleX ( (short)(aLocalisation.GetDialogScale()) ); - -#ifdef DBG_UTIL - // The SimplerErrorHandler is for debugging. In the Product errors - // not processed are given to SFX as Errorcode 1. - pAppData_Impl->m_pSimpleErrorHdl = new SimpleErrorHandler; -#endif pAppData_Impl->m_pToolsErrorHdl = new SfxErrorHandler( RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1); diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index 696e39d..6f586f1 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -155,9 +155,6 @@ void SfxApplication::Deinitialize() #endif delete pAppData_Impl->m_pSoErrorHdl; delete pAppData_Impl->m_pToolsErrorHdl; -#ifdef DBG_UTIL - delete pAppData_Impl->m_pSimpleErrorHdl; -#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx index b9e287b..29b82b2 100644 --- a/sfx2/source/inc/appdata.hxx +++ b/sfx2/source/inc/appdata.hxx @@ -91,9 +91,6 @@ public: ResMgr* pBasicResMgr; #endif ResMgr* pSvtResMgr; -#ifdef DBG_UTIL - SimpleErrorHandler *m_pSimpleErrorHdl; -#endif SfxErrorHandler *m_pToolsErrorHdl; SfxErrorHandler *m_pSoErrorHdl; #ifndef DISABLE_SCRIPTING diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx index be016b3..c73539d 100644 --- a/tools/source/ref/errinf.cxx +++ b/tools/source/ref/errinf.cxx @@ -372,36 +372,4 @@ bool ErrHdl_Impl::CreateString( const ErrorHandler *pStart, return false; } -bool SimpleErrorHandler::CreateString( - const ErrorInfo *pInfo, OUString &rStr, sal_uInt16 &) const -{ - sal_uIntPtr nId = pInfo->GetErrorCode(); - OStringBuffer aStr("Id "); - aStr.append(static_cast<sal_Int32>(nId)); - aStr.append(" only handled by SimpleErrorHandler"); - aStr.append("\nErrorCode: "); - aStr.append(static_cast<sal_Int32>( - nId & ((1L << ERRCODE_CLASS_SHIFT) - 1 ))); - aStr.append("\nErrorClass: "); - aStr.append(static_cast<sal_Int32>( - (nId & ERRCODE_CLASS_MASK) >> ERRCODE_CLASS_SHIFT)); - aStr.append("\nErrorArea: "); - aStr.append(static_cast<sal_Int32>((nId & ERRCODE_ERROR_MASK & - ~((1 << ERRCODE_AREA_SHIFT ) -1 ) ) >> ERRCODE_AREA_SHIFT)); - DynamicErrorInfo *pDyn=PTR_CAST(DynamicErrorInfo,pInfo); - if(pDyn) - { - aStr.append("\nDId "); - aStr.append(static_cast<sal_Int32>(*pDyn)); - } - rStr = OStringToOUString(aStr.makeStringAndClear(), - RTL_TEXTENCODING_ASCII_US); - return true; -} - -SimpleErrorHandler::SimpleErrorHandler() - : ErrorHandler() -{ -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unusedcode.easy b/unusedcode.easy index b69758a..98a819e 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -35,7 +35,6 @@ SdrItemBrowser::ForceParent() SdrItemBrowser::SdrItemBrowser(SdrView&) SfxAppMenuControl_Impl::RegisterControl(unsigned short, SfxModule*) SfxInt64Item::SetValue(long) -SimpleErrorHandler::SimpleErrorHandler() StyleSettings::SetActiveColor2(Color const&) StyleSettings::SetCursorSize(long) StyleSettings::SetDeactiveColor2(Color const&) commit 6f57b77c358571cb880df696fbd3db4c5038212a Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 10 09:22:00 2014 +0000 callcatcher: update unused code Change-Id: I0d7f204473bd5fcddf2342850a16194fdb385c13 diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx index b9bde8c..2fa396c 100644 --- a/include/vcl/combobox.hxx +++ b/include/vcl/combobox.hxx @@ -179,7 +179,6 @@ public: OUString GetMRUEntries( sal_Unicode cSep = ';' ) const; void SetMaxMRUCount( sal_Int32 n ); sal_Int32 GetMaxMRUCount() const; - sal_Int32 GetMRUCount() const; void SetEntryData( sal_Int32 nPos, void* pNewData ); void* GetEntryData( sal_Int32 nPos ) const; diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index c81b52a..a6564f9 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -199,7 +199,6 @@ public: Size CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const; void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const; - sal_Int32 GetMRUCount() const; sal_uInt16 GetDisplayLineCount() const; void EnableMirroring(); diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx index 6831623..8904a0a 100644 --- a/svtools/source/config/accessibilityoptions.cxx +++ b/svtools/source/config/accessibilityoptions.cxx @@ -98,10 +98,6 @@ public: void SetIsSystemFont(sal_Bool bSet); void SetHelpTipSeconds(sal_Int16 nSet); void SetSelectionInReadonly(sal_Bool bSet); - void SetEdgeBlending(sal_Int16 nSet); - void SetListBoxMaximumLineCount(sal_Int16 nSet); - void SetColorValueSetColumnCount(sal_Int16 nSet); - void SetPreviewUsesCheckeredBackground(sal_Bool bSet); sal_Bool IsModified() const { return bIsModified; }; }; @@ -621,87 +617,6 @@ void SvtAccessibilityOptions_Impl::SetVCLSettings() Application::SetSettings(aAllSettings); } -void SvtAccessibilityOptions_Impl::SetEdgeBlending(sal_Int16 nSet) -{ - css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - - try - { - if(xNode.is() && xNode->getPropertyValue(s_sEdgeBlending)!=nSet) - { - xNode->setPropertyValue(s_sEdgeBlending, css::uno::makeAny(nSet)); - ::comphelper::ConfigurationHelper::flush(m_xCfg); - - bIsModified = sal_True; - } - } - catch(const css::uno::Exception& ex) - { - SAL_WARN("svtools", "Caught unexpected: " << ex.Message); - } -} - -void SvtAccessibilityOptions_Impl::SetListBoxMaximumLineCount(sal_Int16 nSet) -{ - css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - - try - { - if(xNode.is() && xNode->getPropertyValue(s_sListBoxMaximumLineCount)!=nSet) - { - xNode->setPropertyValue(s_sListBoxMaximumLineCount, css::uno::makeAny(nSet)); - ::comphelper::ConfigurationHelper::flush(m_xCfg); - - bIsModified = sal_True; - } - } - catch(const css::uno::Exception& ex) - { - SAL_WARN("svtools", "Caught unexpected: " << ex.Message); - } -} - -void SvtAccessibilityOptions_Impl::SetColorValueSetColumnCount(sal_Int16 nSet) -{ - css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - - try - { - if(xNode.is() && xNode->getPropertyValue(s_sColorValueSetColumnCount)!=nSet) - { - xNode->setPropertyValue(s_sColorValueSetColumnCount, css::uno::makeAny(nSet)); - ::comphelper::ConfigurationHelper::flush(m_xCfg); - - bIsModified = sal_True; - } - } - catch(const css::uno::Exception& ex) - { - SAL_WARN("svtools", "Caught unexpected: " << ex.Message); - } -} - -void SvtAccessibilityOptions_Impl::SetPreviewUsesCheckeredBackground(sal_Bool bSet) -{ - css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); - - try - { - if(xNode.is() && xNode->getPropertyValue(s_sPreviewUsesCheckeredBackground)!=bSet) - { - xNode->setPropertyValue(s_sPreviewUsesCheckeredBackground, css::uno::makeAny(bSet)); - ::comphelper::ConfigurationHelper::flush(m_xCfg); - - bIsModified = sal_True; - } - } - catch(const css::uno::Exception& ex) - { - SAL_WARN("svtools", "Caught unexpected: " << ex.Message); - } -} - - // class SvtAccessibilityOptions -------------------------------------------------- SvtAccessibilityOptions::SvtAccessibilityOptions() diff --git a/unusedcode.easy b/unusedcode.easy index 2e3550e..b69758a 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -2,7 +2,6 @@ AstDeclaration::setName(rtl::OString const&) BigInt::BigInt(unsigned int) CalcUnoApiTest::CalcUnoApiTest(rtl::OUString const&) Chart2ExportTest::testFdo74115WallGradientFill() -ComboBox::GetMRUCount() const ConfigurationAccess::getPath(rtl::OUString const&) DocxSdrExport::getFlyFrameGraphic() DocxSdrExport::setFlyFrameGraphic(bool) @@ -15,7 +14,6 @@ GDriveSession::GDriveSession() Json::Json(std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Json, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Json> > > const&) Json::Json(std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::shared_ptr<libcmis::Property>, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<libcmis::Property> > > > const&) Json::swap(Json&) -ListBox::GetMRUCount() const MenuBar::AddMenuBarButton(Image const&, Link const&, rtl::OUString const&, unsigned short) MenuBar::GetMenuBarButtonRectPixel(unsigned short) MenuBar::RemoveMenuBarButton(unsigned short) @@ -48,10 +46,6 @@ StyleSettings::SetTitleHeight(long) StyleSettings::SetUseFlatBorders(bool) StyleSettings::SetUseFlatMenus(bool) SvpSalInstance::PostedEventsInQueue() -SvtAccessibilityOptions_Impl::SetColorValueSetColumnCount(short) -SvtAccessibilityOptions_Impl::SetEdgeBlending(short) -SvtAccessibilityOptions_Impl::SetListBoxMaximumLineCount(short) -SvtAccessibilityOptions_Impl::SetPreviewUsesCheckeredBackground(unsigned char) SvtListener::IsListening(SvtBroadcaster&) const SvxNumberFormatShell::IsAdded_Impl(unsigned long) SwAccessibleField::SwAccessibleField(SwField*, SwAccessibleParagraph*, short) @@ -199,4 +193,5 @@ std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace std::auto_ptr<formula::FormulaTokenArray>::auto_ptr(std::auto_ptr<formula::FormulaTokenArray>&) std::auto_ptr<formula::FormulaTokenArray>::auto_ptr(std::auto_ptr_ref<formula::FormulaTokenArray>) std::vector<rtl::Reference<oox::xls::(anonymous namespace)::WorkerThread>, std::allocator<rtl::Reference<oox::xls::(anonymous namespace)::WorkerThread> > >::reserve(unsigned long) +utl::extractTime(com::sun::star::util::DateTime const&, com::sun::star::util::Time&) vcl::MapChar(vcl::_TrueTypeFont*, unsigned short, bool) diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index adb9988..8dd8022 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1273,11 +1273,6 @@ sal_Int32 ComboBox::GetMaxMRUCount() const return mpImplLB->GetMaxMRUCount(); } -sal_Int32 ComboBox::GetMRUCount() const -{ - return mpImplLB->GetEntryList()->GetMRUCount(); -} - sal_uInt16 ComboBox::GetDisplayLineCount() const { return mpImplLB->GetDisplayLineCount(); diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index bf6c15b..6db3350 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -1499,12 +1499,6 @@ void ListBox::SetEdgeBlending(bool bNew) } } -sal_Int32 ListBox::GetMRUCount() const -{ - return mpImplLB->GetEntryList()->GetMRUCount(); -} - - MultiListBox::MultiListBox( Window* pParent, WinBits nStyle ) : ListBox( WINDOW_MULTILISTBOX ) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits