cui/source/options/dbregister.cxx | 4 - idlc/inc/idlc/astdeclaration.hxx | 1 idlc/source/astdeclaration.cxx | 33 ---------- include/vcl/outdev.hxx | 6 - lotuswordpro/source/filter/lwpparaproperty.cxx | 6 - lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx | 5 - lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx | 7 -- lotuswordpro/source/filter/lwpstory.cxx | 16 +++-- lotuswordpro/source/filter/lwptablelayout.cxx | 9 ++ lotuswordpro/source/filter/lwptoc.cxx | 9 ++ lotuswordpro/source/filter/xfilter/xfrow.cxx | 5 - sc/source/filter/lotus/lotimpop.cxx | 14 ++-- sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 13 +++- sd/source/ui/accessibility/AccessibleOutlineView.cxx | 2 sd/source/ui/animations/SlideTransitionPane.cxx | 34 ++++++----- sfx2/source/sidebar/Deck.cxx | 16 ----- sfx2/source/sidebar/Deck.hxx | 5 - sfx2/source/sidebar/Panel.cxx | 23 ------- sfx2/source/sidebar/Panel.hxx | 4 - svtools/source/control/calendar.cxx | 7 -- svx/source/dialog/fontlb.cxx | 5 - svx/source/form/filtnav.cxx | 3 svx/source/form/fmshimp.cxx | 2 svx/source/form/fmvwimp.cxx | 2 sw/source/core/attr/swatrset.cxx | 2 sw/source/core/uibase/shells/annotsh.cxx | 2 sw/source/core/uibase/shells/tabsh.cxx | 2 sw/source/core/uibase/uiview/viewdraw.cxx | 5 + sw/source/core/uibase/uno/unoatxt.cxx | 4 - sw/source/core/unocore/unoflatpara.cxx | 2 sw/source/core/unocore/unoidx.cxx | 2 sw/source/core/unocore/unoobj2.cxx | 2 sw/source/filter/html/htmlfly.cxx | 1 ucb/source/ucp/file/bc.cxx | 6 - unusedcode.easy | 12 ++- vcl/quartz/ctlayout.cxx | 11 +++ vcl/source/gdi/outdev2.cxx | 8 -- 37 files changed, 120 insertions(+), 170 deletions(-)
New commits: commit 530ffd6e6e93b3f6c39288975f01dd8c5447b85d Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:45:38 2014 +0000 coverity#708347 Uninitialized scalar field Change-Id: I1b47cb17c816334d6c9a3793669aa78a565629f1 diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx index 9c4c74c..fbd455c 100644 --- a/svx/source/dialog/fontlb.cxx +++ b/svx/source/dialog/fontlb.cxx @@ -27,8 +27,9 @@ -SvLBoxFontString::SvLBoxFontString() : - SvLBoxString() +SvLBoxFontString::SvLBoxFontString() + : SvLBoxString() + , mbUseColor(false) { } commit b15b4cbb35021d64794d199907b71bc77fbd4045 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:44:13 2014 +0000 coverity#708084 Uninitialized scalar field Change-Id: I979790b472c2a42107db34ebad675ed8447fa4e7 diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 087a5e6..962082c 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -76,7 +76,12 @@ struct ScAccNote sal_Int32 mnParaCount; sal_Bool mbMarkNote; - ScAccNote() : mpTextHelper(NULL), mnParaCount(0) {} + ScAccNote() + : mpTextHelper(NULL) + , mnParaCount(0) + , mbMarkNote(false) + { + } }; class ScNotesChildren commit 6f97d7615c377348642be7abb9ea6668a4b0a473 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:43:10 2014 +0000 coverity#708082 Uninitialized scalar field Change-Id: Ie3d3d87040124c4e2416ca64ad2babe5fa38a880 diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 80f4587..087a5e6 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -618,7 +618,11 @@ Size ScIAccessibleViewForwarder::PixelToLogic (const Size& rSize) const struct ScShapeChild { - ScShapeChild() : mpAccShape(NULL) {} + ScShapeChild() + : mpAccShape(NULL) + , mnRangeId(0) + { + } ScShapeChild(const ScShapeChild& rOld); ~ScShapeChild(); mutable ::accessibility::AccessibleShape* mpAccShape; commit 3e11392257b71342ad21d01ed1bdf6d29656d822 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:41:51 2014 +0000 coverity#708051 Uninitialized scalar field Change-Id: I2612f09060b95f18dbf6cea476a8292a55a9d503 diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx index 5ff79d6..7b1ab08 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -64,19 +64,19 @@ LOTUS_ROOT::~LOTUS_ROOT() static osl::Mutex aLotImpSemaphore; - -ImportLotus::ImportLotus( SvStream& aStream, ScDocument* pDoc, rtl_TextEncoding eQ ) : - ImportTyp( pDoc, eQ ), - pIn( &aStream ), - aConv( *pIn, eQ, false ) +ImportLotus::ImportLotus( SvStream& aStream, ScDocument* pDoc, rtl_TextEncoding eQ ) + : ImportTyp(pDoc, eQ) + , pIn(&aStream) + , aConv(*pIn, eQ, false) + , nTab(0) + , nExtTab(0) { // good point to start locking of import lotus aLotImpSemaphore.acquire(); - pLotusRoot = new LOTUS_ROOT( pDoc, eQ); + pLotusRoot = new LOTUS_ROOT(pDoc, eQ); } - ImportLotus::~ImportLotus() { delete pLotusRoot; commit 6e31fe9ac23b47b92171b984f7f6a3afb5173fd8 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:39:36 2014 +0000 coverity#738772 Uninitialized pointer field Change-Id: Ie8e62096b150ab1fa6342bd14605b30b58358d7e diff --git a/lotuswordpro/source/filter/xfilter/xfrow.cxx b/lotuswordpro/source/filter/xfilter/xfrow.cxx index 3d77167..56cb82c 100644 --- a/lotuswordpro/source/filter/xfilter/xfrow.cxx +++ b/lotuswordpro/source/filter/xfilter/xfrow.cxx @@ -62,9 +62,10 @@ #include "xftable.hxx" XFRow::XFRow() + : m_pOwnerTable(NULL) + , m_nRepeat(0) + , m_nRow(0) { - m_nRepeat = 0; - m_nRow = 0; } XFRow::XFRow(const XFRow& other):XFContent(other) commit fa8f562bdf7e6c4a7f38078616336e42f4b9c0a5 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:37:40 2014 +0000 coverity#738759 Uninitialized pointer field Change-Id: Ic6f85dd76208ce31a3aecd6a638798440a6b7b82 diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx index 9196432..f956096 100644 --- a/lotuswordpro/source/filter/lwptoc.cxx +++ b/lotuswordpro/source/filter/lwptoc.cxx @@ -82,10 +82,15 @@ LwpTocSuperLayout::LwpTocSuperLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm) : LwpSuperTableLayout(objHdr, pStrm) -{} + , m_nFrom(0) + , m_pCont(NULL) +{ +} LwpTocSuperLayout::~LwpTocSuperLayout() -{} +{ +} + /** * @short Read TOCSUPERTABLELAYOUT object * @return none commit a363986f9426d36a4f145a077d6a92a7abf29ff6 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:36:34 2014 +0000 coverity#738750 Uninitialized pointer field Change-Id: I619f130184eae670ba921843075ab199e952765c diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index cb22273..eab1969 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -417,10 +417,14 @@ void LwpSuperTableLayout::RegisterFrameStyle() } LwpTableLayout::LwpTableLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm) - : LwpLayout(objHdr, pStrm), m_nRows(0), m_nCols(0), m_pXFTable(NULL) + : LwpLayout(objHdr, pStrm) + , m_nRows(0) + , m_nCols(0) + , m_pDefaultCellLayout(NULL) + , m_pColumns(NULL) + , m_pXFTable(NULL) { m_CellsMap.clear(); - m_pColumns = NULL; } LwpTableLayout::~LwpTableLayout() @@ -433,6 +437,7 @@ LwpTableLayout::~LwpTableLayout() m_pColumns = NULL; } } + /** * @short Get neighbour cell by specifying ROW+COL * @param nRow commit 623a3455879dc39db9380f3310962c22eb8b6978 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:33:36 2014 +0000 coverity#738748 Uninitialized pointer field Change-Id: I4fe453482a73ebee1618cbd2813ae5d8f12ee472 diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx index d8983b9..8d16d71 100644 --- a/lotuswordpro/source/filter/lwpstory.cxx +++ b/lotuswordpro/source/filter/lwpstory.cxx @@ -68,15 +68,21 @@ #include "xfilter/xfstylemanager.hxx" LwpStory::LwpStory(LwpObjectHeader &objHdr, LwpSvStream* pStrm) - : LwpContent(objHdr, pStrm),m_bPMModified(sal_False),m_pCurrentLayout(NULL), - m_pTabLayout(NULL),m_bDropcap(sal_False), m_pHyperlinkMgr(new LwpHyperlinkMgr) -{} + : LwpContent(objHdr, pStrm) + , m_bPMModified(sal_False) + , m_pCurrentLayout(NULL) + , m_pTabLayout(NULL) + , m_bDropcap(sal_False) + , m_pHyperlinkMgr(new LwpHyperlinkMgr) + , m_pXFContainer(NULL) +{ +} LwpStory::~LwpStory() { - if (m_pHyperlinkMgr) - delete m_pHyperlinkMgr; + delete m_pHyperlinkMgr; } + void LwpStory::Read() { LwpContent::Read(); commit 49a0b94bf549d47e5429f7f95d00f9dc46d25435 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:31:57 2014 +0000 coverity#738744 Uninitialized pointer field Change-Id: I0adf92be3a206a02c578915a46d03d1162d3d83e diff --git a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx index e105293..8345902 100644 --- a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx +++ b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx @@ -80,13 +80,14 @@ LwpSdwGroupLoaderV0102::LwpSdwGroupLoaderV0102(SvStream* pStream, LwpGraphicObject* pGraphicObj) : m_pStream(pStream) , m_pGraphicObj(pGraphicObj) + , m_pDrawObjVector(NULL) { } -LwpSdwGroupLoaderV0102::~LwpSdwGroupLoaderV0102(void) + +LwpSdwGroupLoaderV0102::~LwpSdwGroupLoaderV0102() { } -// add by , 03/25/2005 /** * @descr entry of lwp-drawing objects. the functin begins to parse the sdw-drawing bento stream and create * the corresponding drawing objects. diff --git a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx index d343f5e..e810aab 100644 --- a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx +++ b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx @@ -77,14 +77,9 @@ private: public: LwpSdwGroupLoaderV0102(SvStream* pStream, LwpGraphicObject* pGraphicObj); - ~LwpSdwGroupLoaderV0102(void); + ~LwpSdwGroupLoaderV0102(); public: -// void LoadDrawGroupObject(void); -// void LoadDrawObject(void); -// void RegisterGroupStyle(void); -// void RegisterStyle(void); - // add by ,03/25/2005 void BeginDrawObjects(std::vector <XFFrame*>* pDrawObjVector); XFDrawGroup* CreateDrawGroupObject(void); XFFrame* CreateDrawObject(void); commit 1b6364d9aaf6413d80e6c562fbd1007e752c0988 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:30:31 2014 +0000 coverity#738742 Uninitialized pointer field Change-Id: I850654984fec3d51f9b4292334c0180fb0f363b0 diff --git a/lotuswordpro/source/filter/lwpparaproperty.cxx b/lotuswordpro/source/filter/lwpparaproperty.cxx index e572441..7a8469c 100644 --- a/lotuswordpro/source/filter/lwpparaproperty.cxx +++ b/lotuswordpro/source/filter/lwpparaproperty.cxx @@ -230,13 +230,11 @@ m_pBullet(new LwpBulletOverride) LwpParaBulletProperty::~LwpParaBulletProperty() { - if (m_pBullet) - { - delete m_pBullet; - } + delete m_pBullet; } LwpParaNumberingProperty::LwpParaNumberingProperty(LwpObjectStream * pStrm) + : m_pNumberingOverride(NULL) { LwpObjectID aNumberingPiece; aNumberingPiece.ReadIndexed(pStrm); commit 1e46d2f6077ec1c46e71c6d26f861cf912a63677 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:23:11 2014 +0000 coverity#735504 Logically dead code Change-Id: Idb3b2e4fe3ab67c65324de9625807808e1355cee diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index fcb6f9c..076bf4d 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -742,10 +742,6 @@ void Calendar::ImplDrawDate( long nX, long nY, if ( bFocus ) HideFocus(); - // get font - Font aOldFont = GetFont(); - bool bBoldFont = false; - // display background const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if ( bSel || bBack ) @@ -794,9 +790,6 @@ void Calendar::ImplDrawDate( long nX, long nY, if( mbDropPos && maDropDate == Date( nDay, nMonth, nYear ) ) ImplInvertDropPos(); - - if ( bBoldFont ) - SetFont( aOldFont ); } commit e05e38cbeaf77531227f77100ee1e1f0c8434cc0 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:21:36 2014 +0000 coverity#705483 Dereference null return value Change-Id: I0236edf351bd760dfbc6a4742f8b8c85c35d155f diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx index 3180ad5..c7ea1d0 100644 --- a/sw/source/core/attr/swatrset.cxx +++ b/sw/source/core/attr/swatrset.cxx @@ -278,7 +278,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const // default list id in the source document, the same // should be hold in the destination document. // Thus, create new list id item. - if ( sListId == pSrcDocNumRule->GetDefaultListId() ) + if (pSrcDocNumRule && sListId == pSrcDocNumRule->GetDefaultListId()) { pNewListIdItem = new SfxStringItem ( RES_PARATR_LIST_ID, commit a1196fc0acc5aecf51c5a89bef127b2ad69d7719 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:20:22 2014 +0000 coverity#705857 Dereference before null check Change-Id: Ifb4dfec6a70e0324bd291f1555706b88e1b4d5be diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 4f9228d..42877a3 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -253,25 +253,29 @@ void lcl_CreateUndoForPages( ::sd::ViewShellBase& rBase ) { ::sd::DrawDocShell* pDocSh = rBase.GetDocShell(); + if (!pDocSh) + return; ::svl::IUndoManager* pManager = pDocSh->GetUndoManager(); + if (!pManager) + return; SdDrawDocument* pDoc = pDocSh->GetDoc(); - if( pManager && pDocSh && pDoc ) - { - OUString aComment( SdResId(STR_UNDO_SLIDE_PARAMS) ); - pManager->EnterListAction(aComment, aComment); - SdUndoGroup* pUndoGroup = new SdUndoGroup( pDoc ); - pUndoGroup->SetComment( aComment ); - - ::std::vector< SdPage * >::const_iterator aIt( rpPages->begin()); - const ::std::vector< SdPage * >::const_iterator aEndIt( rpPages->end()); - for( ; aIt != aEndIt; ++aIt ) - { - pUndoGroup->AddAction( new sd::UndoTransition( pDoc, (*aIt) ) ); - } + if (!pDoc) + return; - pManager->AddUndoAction( pUndoGroup ); - pManager->LeaveListAction(); + OUString aComment( SdResId(STR_UNDO_SLIDE_PARAMS) ); + pManager->EnterListAction(aComment, aComment); + SdUndoGroup* pUndoGroup = new SdUndoGroup( pDoc ); + pUndoGroup->SetComment( aComment ); + + ::std::vector< SdPage * >::const_iterator aIt( rpPages->begin()); + const ::std::vector< SdPage * >::const_iterator aEndIt( rpPages->end()); + for( ; aIt != aEndIt; ++aIt ) + { + pUndoGroup->AddAction( new sd::UndoTransition( pDoc, (*aIt) ) ); } + + pManager->AddUndoAction( pUndoGroup ); + pManager->LeaveListAction(); } sal_Int32 lcl_getTransitionEffectIndex( commit 4106c6541ecb7a682766ec4d4fde6c52f24198b4 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:18:48 2014 +0000 coverity#705856 Dereference before null check Change-Id: Ib3d977d92dae1e621e3eecae2e6e89c16c0acbdf diff --git a/sd/source/ui/accessibility/AccessibleOutlineView.cxx b/sd/source/ui/accessibility/AccessibleOutlineView.cxx index 0f1cecb..63c547f 100644 --- a/sd/source/ui/accessibility/AccessibleOutlineView.cxx +++ b/sd/source/ui/accessibility/AccessibleOutlineView.cxx @@ -71,7 +71,7 @@ AccessibleOutlineView::AccessibleOutlineView ( // Beware! Here we leave the paths of the UNO API and descend into the // depths of the core. Necessary for making the edit engine accessible. - if( pViewShell && pSdWindow ) + if (pSdWindow) { ::sd::View* pView = pViewShell->GetView(); commit 9792dea1c0d21861999291f207a5a99a4eea9472 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:16:11 2014 +0000 coverity#982452 Dereference after null check Change-Id: Icd22b797b5860a007b08f860ae5a728664b9c175 diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index f11a219..4ea6481 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -346,7 +346,7 @@ IMPL_LINK( DbRegistrationOptionsPage, HeaderEndDrag_Impl, HeaderBar*, pBar ) { assert(pBar); - if ( pBar && !pBar->GetCurItemId() ) + if (!pBar || !pBar->GetCurItemId()) return 0; if ( !pBar->IsItemMode() ) commit b399e67ee271c83b424db3bf9c328bed27214ea5 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:15:40 2014 +0000 coverity#982451 Dereference after null check Change-Id: Ia36c745f460004475e2e630114a81545d7b8776d diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index aefa589..f11a219 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -315,7 +315,7 @@ IMPL_LINK( DbRegistrationOptionsPage, HeaderSelect_Impl, HeaderBar*, pBar ) { assert(pBar); - if ( pBar && pBar->GetCurItemId() != ITEMID_TYPE ) + if (!pBar || pBar->GetCurItemId() != ITEMID_TYPE) return 0; HeaderBarItemBits nBits = pBar->GetItemBits(ITEMID_TYPE); commit 8f1beb17ea8065897f4c7f219865c99c1ff07a1c Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:12:02 2014 +0000 coverity#705052 help coverity out here Change-Id: I5f63cd25b539bcb7a424a25bb559d3281473c42f diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index b52d729..130c8bd 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -1344,10 +1344,10 @@ BaseContent::cPCL( void ) { osl::MutexGuard aGuard( m_aMutex ); - Sequence< OUString > seqNames; + if (!m_pPropertyListener) + return NULL; - if( m_pPropertyListener ) - seqNames = m_pPropertyListener->getContainedTypes(); + Sequence< OUString > seqNames = m_pPropertyListener->getContainedTypes(); PropertyChangeNotifier* p = 0; commit a848a497e014e4569f58cc77eab2388ab2311bda Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:09:57 2014 +0000 coverity#705034 Dereference after null check Change-Id: Id13502352881e25ba35b6a4cc69fba8da1c3c7f7 diff --git a/sw/source/core/uibase/uno/unoatxt.cxx b/sw/source/core/uibase/uno/unoatxt.cxx index 3b38115..5d5ebbd 100644 --- a/sw/source/core/uibase/uno/unoatxt.cxx +++ b/sw/source/core/uibase/uno/unoatxt.cxx @@ -428,7 +428,9 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const pGlossaries->PutGroupDoc( pGlosGroup ); } - uno::Reference< text::XAutoTextEntry > xEntry = pGlossaries->GetAutoTextEntry( m_sGroupName, sName, sShortName, true ); + uno::Reference< text::XAutoTextEntry > xEntry = pGlossaries ? + pGlossaries->GetAutoTextEntry( m_sGroupName, sName, sShortName, true ) : + uno::Reference< text::XAutoTextEntry >(); OSL_ENSURE( xEntry.is(), "SwXAutoTextGroup::insertNewByName: no UNO object created? How this?" ); // we just inserted the entry into the group, so why doesn't it exist? commit ed980b470d41c62aeeb428dfa58ed274928529c4 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:08:32 2014 +0000 coverity#705030 Dereference after null check Change-Id: Ib84bac04050ddcf7e84499d845a7d901b214b83f diff --git a/sw/source/core/uibase/uiview/viewdraw.cxx b/sw/source/core/uibase/uiview/viewdraw.cxx index bcd7704..98ba727 100644 --- a/sw/source/core/uibase/uiview/viewdraw.cxx +++ b/sw/source/core/uibase/uiview/viewdraw.cxx @@ -578,7 +578,10 @@ sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin, ESelection aNewSelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND); if (bSetSelectionToStart) aNewSelection = ESelection(); - pView->SetSelection(aNewSelection); + if (pView) + { + pView->SetSelection(aNewSelection); + } } return bRet; commit 97f828bd6ba0fffd2b615cc7dad3ef40b03f8ef1 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:07:29 2014 +0000 coverity#705027 Dereference after null check Change-Id: I6c0b44c128da65136a73abd904f071e37ac5d87f diff --git a/sw/source/core/uibase/shells/tabsh.cxx b/sw/source/core/uibase/shells/tabsh.cxx index 7f47c80..319f75f 100644 --- a/sw/source/core/uibase/shells/tabsh.cxx +++ b/sw/source/core/uibase/shells/tabsh.cxx @@ -578,7 +578,7 @@ void SwTableShell::Execute(SfxRequest &rReq) else aCoreSet.InvalidateItem( RES_BACKGROUND ); - if ( (!pDlg && rReq.GetArgs()) || pDlg->Execute() == RET_OK ) + if ( (!pDlg && rReq.GetArgs()) || (pDlg && pDlg->Execute() == RET_OK) ) { const SfxItemSet* pOutSet = pDlg ? pDlg->GetOutputItemSet() : rReq.GetArgs(); if ( pDlg ) commit dc5205f6684f77b319204628ed8bffcffdc9802d Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:06:19 2014 +0000 coverity#705022 Dereference after null check Change-Id: I1c0ecf51395bcd462ecf572b77eebcdfc0b2928c diff --git a/sw/source/core/uibase/shells/annotsh.cxx b/sw/source/core/uibase/shells/annotsh.cxx index beddafa..8b96156 100644 --- a/sw/source/core/uibase/shells/annotsh.cxx +++ b/sw/source/core/uibase/shells/annotsh.cxx @@ -1151,7 +1151,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) break; } - if (pPostItMgr->HasActiveSidebarWin()) + if (pPostItMgr && pPostItMgr->HasActiveSidebarWin()) { if ( (pPostItMgr->GetActiveSidebarWin()->IsProtected()) && ( (nSlotId==FN_DELETE_COMMENT) || (nSlotId==FN_REPLY) ) ) commit b82958d30e6985f08e60dcf036afd13e344fa498 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:04:37 2014 +0000 coverity#704985 Dereference after null check Change-Id: I9e7404ef15fe7c62aa51d1f5f4157f9f24ac7de5 diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index 8c7bfb9..55a705a 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -1249,6 +1249,7 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt ) if( pTxtNd ) aCaption = pTxtNd->GetTxt(); + if( pTblNd ) { HTMLSaveData aSaveData( rHTMLWrt, pTblNd->GetIndex()+1, pTblNd->EndOfSectionIndex(), commit 40a52f5f6e893d38ce6db0680efa79fe4c51eab1 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:03:07 2014 +0000 coverity#704959 Dereference after null check Change-Id: Ia3c1f06d2bcb6bbb0a9fefc062cbaec46bfb3777 diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 44bec03..0da724e 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1173,7 +1173,7 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos) { pSttNode = pSttNode->StartOfSectionNode(); } - SwStartNodeType eType = pSttNode->GetStartNodeType(); + SwStartNodeType eType = pSttNode ? pSttNode->GetStartNodeType() : SwNormalStartNode; switch(eType) { case SwTableBoxStartNode: commit 757da44c04fc1a75d8e304cb945f02a02c19b7af Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 10:00:48 2014 +0000 coverity#704958 Dereference after null check Change-Id: I08138c5d7124e6212708aa74f605c3997ca442f1 diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 94b785a..b299e0a0e 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -921,7 +921,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, SwXTextSection::CreateXTextSection( pSectionFmt ); aRet <<= xContentSect; } - else + else if (pSectionFmt) { SwSections aSectArr; pSectionFmt->GetChildSections(aSectArr, commit d83f3d4a228e98be19906d0a82f9d79f6a92e80d Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 09:59:25 2014 +0000 coverity#704954 Dereference after null check Change-Id: I4e4456fcde69219abfb5dcd8ad091e7bf519f437 diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index 0304d7c..822b16d 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -346,7 +346,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara() SwPageFrm* pStartPage = pCurrentPage; SwPageFrm* pStopPage = 0; - while ( pCurrentPage != pStopPage ) + while ( pCurrentPage && pCurrentPage != pStopPage ) { if (mnType != text::TextMarkupType::SPELLCHECK || pCurrentPage->IsInvalidSpelling() ) { commit ff86fab8413c0a77afa7dde40dc1d335f65ba9f4 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 09:50:16 2014 +0000 coverity#704823 Dereference after null check also coverity#735867 Change-Id: I5a682739c70971ccaa681daa233a8d0a6e009c91 diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 57f3eed..c6ae2aa 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -943,7 +943,7 @@ IMPL_LINK(FmXFormView, OnAutoFocus, void*, /*EMPTYTAG*/) if ( aControls.getLength() == 0 ) { Reference< XElementAccess > xFormElementAccess( xForm, UNO_QUERY_THROW ); - if ( xFormElementAccess->hasElements() ) + if (xFormElementAccess->hasElements() && pPage && m_pView) { // there are control models in the form, but no controls, yet. // Well, since some time controls are created on demand only. In particular, commit 4f0c8964429d10b9a1ffdfa7d288ceddf2431078 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 09:47:51 2014 +0000 coverity#704821 Dereference after null check Change-Id: Ia4e204799fd6ce473ade87d9110041956408de83 diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 0f64fd9..8ec0324 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -2289,7 +2289,7 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere) sal_Int32 nGridColumn = m_arrRelativeGridColumn[pfriWhere->nFieldPos]; if (nGridColumn != -1) { // dummer weise muss ich mir das Control erst wieder besorgen - Reference< XControl> xControl( impl_getControl( xControlModel, *pFormObject ) ); + Reference<XControl> xControl( pFormObject ? impl_getControl( xControlModel, *pFormObject ) : Reference< XControl>() ); Reference< XGrid> xGrid(xControl, UNO_QUERY); DBG_ASSERT(xGrid.is(), "FmXFormShell::OnFoundData : ungueltiges Control !"); // wenn eine der Asserts anschlaegt, habe ich beim Aufbauen von m_arrSearchedControls wohl was falsch gemacht commit 43babef4fb98e7e867fe6fc2394e5aa81b2aaabd Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 09:46:01 2014 +0000 coverity#704820 Dereference after null check Change-Id: I70478f2473d766bc166de642cb70c3f9cc29be69 diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 0341e54..9867bf7 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1919,6 +1919,9 @@ FmFilterNavigatorWin::~FmFilterNavigatorWin() void FmFilterNavigatorWin::UpdateContent(FmFormShell* pFormShell) { + if (!m_pNavigator) + return; + if (!pFormShell) m_pNavigator->UpdateContent( NULL, NULL ); else commit 8214c1d6156c90cbf259b15cf1c8e15ea1c70daf Author: Herbert Dürr <[email protected]> Date: Mon Mar 24 07:48:44 2014 +0000 Resolves: #i124375# force soft-hyphen visibility for CoreText... to meet Writer+EEng expectations (cherry picked from commit c7243848547b19a3b237f18629b809d93ee821c4) Conflicts: vcl/aqua/source/gdi/ctlayout.cxx Change-Id: If580bcb517695ae1c94657ac9348ad36eda37e9d diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx index b8b1b98..e479d31 100644 --- a/vcl/quartz/ctlayout.cxx +++ b/vcl/quartz/ctlayout.cxx @@ -108,11 +108,20 @@ bool CTLayout::LayoutText( ImplLayoutArgs& rArgs ) if( mnCharCount <= 0 ) return false; - // create the CoreText line layout + // prepare the string to be layouted by CoreText CFStringRef aCFText = CFStringCreateWithCharactersNoCopy( NULL, rArgs.mpStr + mnMinCharPos, mnCharCount, kCFAllocatorNull ); + + // #i124375# force soft-hyphen visibility to meet the expectations of Writer+EditEngine + if( CFStringFind( aCFText, (CFStringRef)@"\u00AD", 0).length > 0 ) + { + NSString* pDashStr = [(NSString*)aCFText stringByReplacingOccurrencesOfString: @"\u00AD" withString: @"-"]; + aCFText = CFStringCreateCopy( NULL, (CFStringRef)pDashStr ); + } + + // create the CoreText line layout using the requested text style // CFAttributedStringCreate copies the attribues parameter mpAttrString = CFAttributedStringCreate( NULL, aCFText, mpTextStyle->GetStyleDict() ); mpCTLine = CTLineCreateWithAttributedString( mpAttrString ); commit 9afdc72df60811435587b85ef333ee29d1d3ce15 Author: Caolán McNamara <[email protected]> Date: Mon Mar 24 09:29:06 2014 +0000 callcatcher: update unused code Change-Id: I48990c044e4583e835f3e995527ba423e8c459fb diff --git a/idlc/inc/idlc/astdeclaration.hxx b/idlc/inc/idlc/astdeclaration.hxx index 3f77662..0906a5b 100644 --- a/idlc/inc/idlc/astdeclaration.hxx +++ b/idlc/inc/idlc/astdeclaration.hxx @@ -65,7 +65,6 @@ public: virtual ~AstDeclaration(); // Data access - void setName(const OString& name); const OString& getLocalName() const { return m_localName; } const OString& getScopedName() const diff --git a/idlc/source/astdeclaration.cxx b/idlc/source/astdeclaration.cxx index 822a26b..4840eca 100644 --- a/idlc/source/astdeclaration.cxx +++ b/idlc/source/astdeclaration.cxx @@ -98,39 +98,6 @@ void AstDeclaration::setPredefined(bool bPredefined) } } -void AstDeclaration::setName(const OString& name) -{ - m_scopedName = name; - sal_Int32 nIndex = name.lastIndexOf( ':' ); - m_localName = name.copy( nIndex+1 ); - -// Huh ? There is always at least one token - -// sal_Int32 count = name.getTokenCount(':'); - -// if ( count > 0 ) -// { -// m_localName = name.getToken(count-1, ':'); -// m_scopedName = name; -// } else if ( m_pScope ) -// { -// m_localName = name; -// AstDeclaration* pDecl = scopeAsDecl(m_pScope); -// if (pDecl) -// { -// m_scopedName = pDecl->getScopedName(); -// if (m_scopedName.getLength() > 0) -// m_scopedName += sGlobal; -// m_scopedName += m_localName; -// } -// } else -// { -// m_localName = name; -// m_scopedName = name; -// } - m_fullName = convertName(m_scopedName); -} - bool AstDeclaration::isType() const { switch (m_nodeType) { case NT_interface: diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 8873150..cbdf725 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -845,6 +845,9 @@ private: SAL_DLLPRIVATE static void ImplUpdateFontDataForAllFrames( FontUpdateHandler_t pHdl, bool bNewFontLists ); SAL_DLLPRIVATE long ImplGetGradientSteps( const Gradient& rGradient, const Rectangle& rRect, bool bMtf ); + //not implemented; to detect misuses of DrawOutDev(...OutputDevice&); + void DrawOutDev( const Point&, const Size&, const Point&, const Size&, const Printer&); + public: virtual ~OutputDevice(); @@ -1036,9 +1039,6 @@ public: virtual void DrawOutDev( const Point& rDestPt, const Size& rDestSize, const Point& rSrcPt, const Size& rSrcSize, const OutputDevice& rOutDev ); - void DrawOutDev( const Point& rDestPt, const Size& rDestSize, - const Point& rSrcPt, const Size& rSrcSize, - const Printer& rOutDev ); virtual void CopyArea( const Point& rDestPt, const Point& rSrcPt, const Size& rSrcSize, sal_uInt16 nFlags = 0 ); diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 8eaf470..8cb6e83 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -364,27 +364,11 @@ void Deck::PrintWindowSubTree (Window* pRoot, int nIndentation) PrintWindowSubTree(pRoot->GetChild(nIndex), nIndentation+1); } - - - void Deck::PrintWindowTree (void) { PrintWindowSubTree(this, 0); } - - -#ifdef DEBUG -void Deck::PrintWindowTree (const ::std::vector<Panel*>& rPanels) -{ - (void)rPanels; - - PrintWindowTree(); -} -#endif - - - IMPL_LINK(Deck, HandleVerticalScrollBarChange,void*, EMPTYARG) { const sal_Int32 nYOffset (-mpVerticalScrollBar->GetThumbPos()); diff --git a/sfx2/source/sidebar/Deck.hxx b/sfx2/source/sidebar/Deck.hxx index 63c014f..5a0850c 100644 --- a/sfx2/source/sidebar/Deck.hxx +++ b/sfx2/source/sidebar/Deck.hxx @@ -69,10 +69,7 @@ public: virtual void DataChanged (const DataChangedEvent& rEvent); virtual bool Notify (NotifyEvent& rEvent); - void PrintWindowTree (void); -#ifdef DEBUG - void PrintWindowTree (const ::std::vector<Panel*>& rPanels); -#endif + void PrintWindowTree(); static void PrintWindowSubTree (Window* pRoot, int nIndentation); sal_Int32 GetMinimalWidth() const { return mnMinimalWidth; } diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx index 9a9fd85..53c805f 100644 --- a/sfx2/source/sidebar/Panel.cxx +++ b/sfx2/source/sidebar/Panel.cxx @@ -223,34 +223,11 @@ void Panel::DataChanged (const DataChangedEvent& rEvent) SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper()); } - - - Reference<ui::XSidebarPanel> Panel::GetPanelComponent (void) const { return mxPanelComponent; } - - - -#ifdef DEBUG -void Panel::PrintWindowTree (void) -{ - Window* pElementWindow = VCLUnoHelper::GetWindow(GetElementWindow()); - if (pElementWindow != NULL) - { - OSL_TRACE("panel parent is %x", pElementWindow->GetParent()); - Deck::PrintWindowSubTree(pElementWindow, 2); - } - else - OSL_TRACE(" panel is empty"); -} -#endif - - - - Reference<awt::XWindow> Panel::GetElementWindow (void) { if (mxElement.is()) diff --git a/sfx2/source/sidebar/Panel.hxx b/sfx2/source/sidebar/Panel.hxx index cd3e635..fb902c8 100644 --- a/sfx2/source/sidebar/Panel.hxx +++ b/sfx2/source/sidebar/Panel.hxx @@ -68,10 +68,6 @@ public: virtual void DataChanged (const DataChangedEvent& rEvent); virtual void Activate (void); -#ifdef DEBUG - void PrintWindowTree (void); -#endif - private: const ::rtl::OUString msPanelId; ::boost::scoped_ptr<PanelTitleBar> mpTitleBar; diff --git a/unusedcode.easy b/unusedcode.easy index 8634a81..de96f91 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1,4 +1,3 @@ -AstDeclaration::setName(rtl::OString const&) BigInt::BigInt(unsigned int) CalcUnoApiTest::CalcUnoApiTest(rtl::OUString const&) Chart2ExportTest::testFdo74115WallGradientFill() @@ -30,12 +29,15 @@ SalGraphics::drawTransformedBitmap(basegfx::B2DPoint const&, basegfx::B2DPoint c ScDocument::CreateFormatTable() const ScExtIButton::GetSelected() const ScFormulaCellGroup::scheduleCompilation() -ScTableProtection::getEnhancedProtection() const -ScTableProtection::updateReference(UpdateRefMode, ScDocument*, ScRange const&, short, int, short) ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent() ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::star::uno::Any const&) SdrItemBrowser::ForceParent() SdrItemBrowser::SdrItemBrowser(SdrView&) +SdrTextObj::NbcSetAutoGrowHeight(bool) +SdrTextObj::NbcSetAutoGrowWidth(bool) +SdrTextObj::NbcSetFitToSize(SdrFitToSizeType) +SdrTextObj::NbcSetMaxTextFrameHeight(long) +SdrTextObj::NbcSetMaxTextFrameWidth(long) SfxAppMenuControl_Impl::RegisterControl(unsigned short, SfxModule*) SfxInt64Item::SetValue(long) StyleSettings::SetActiveColor2(Color const&) @@ -196,11 +198,11 @@ sc::CLBuildKernelThread::finish() sc::CLBuildKernelThread::produce() sd::LeftDrawPaneShell::RegisterInterface(SfxModule*) sd::LeftImpressPaneShell::RegisterInterface(SfxModule*) -sfx2::sidebar::Deck::PrintWindowTree(std::vector<sfx2::sidebar::Panel*, std::allocator<sfx2::sidebar::Panel*> > const&) -sfx2::sidebar::Panel::PrintWindowTree() +sdr::contact::ViewObjectContactOfOpenGLObj::getWindow() const std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >::_Rb_tree(std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >&&) 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) +writerfilter::dmapper::SdtHelper::appendToInteropGrabBag(rtl::OUString const&, com::sun::star::uno::Any const&) diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index b088d6a..c5d18c9 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -328,14 +328,6 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, } } -void OutputDevice::DrawOutDev( const Point& /*rDestPt*/, const Size& /*rDestSize*/, - const Point& /*rSrcPt*/, const Size& /*rSrcSize*/, - const Printer& /*rOutDev*/ ) -{ - // This should never occur! You can't call this function on a Printer instance - DBG_ASSERT( false, "Don't use OutputDevice::DrawOutDev(...) with printer devices!" ); -} - void OutputDevice::CopyArea( const Point& rDestPt, const Point& rSrcPt, const Size& rSrcSize, sal_uInt16 nFlags )
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
