canvas/source/cairo/cairo_spritecanvas.cxx | 3 cui/source/dialogs/iconcdlg.cxx | 3 dbaccess/source/ui/querydesign/QTableWindow.cxx | 20 --- editeng/source/editeng/impedit4.cxx | 4 lotuswordpro/source/filter/xfilter/xfparastyle.cxx | 2 sc/source/ui/drawfunc/futext.cxx | 139 +++++++++------------ sd/source/ui/dlg/headerfooterdlg.cxx | 2 7 files changed, 68 insertions(+), 105 deletions(-)
New commits: commit ae71ad47e938259732a1a38bf1644774a0939ff4 Author: Caolán McNamara <caol...@redhat.com> Date: Thu May 8 16:03:39 2014 +0100 coverity#735401 Logically dead code Change-Id: I62f278dfd5df7485f809d642789951ab450ea458 diff --git a/canvas/source/cairo/cairo_spritecanvas.cxx b/canvas/source/cairo/cairo_spritecanvas.cxx index 56b852c..78f2450 100644 --- a/canvas/source/cairo/cairo_spritecanvas.cxx +++ b/canvas/source/cairo/cairo_spritecanvas.cxx @@ -93,9 +93,6 @@ namespace cairocanvas const ::basegfx::B2ISize aSize( aPixelSize.Width(), aPixelSize.Height() ); - ENSURE_ARG_OR_THROW( pParentWindow != NULL, - "CairoSpriteCanvas::initialize: invalid Window pointer" ); - // setup helper maDeviceHelper.init( *pParentWindow, *this, commit b0668acdd28777290d063e49ccc003d02a888b3d Author: Caolán McNamara <caol...@redhat.com> Date: Thu May 8 16:02:44 2014 +0100 coverity#735403 Logically dead code Change-Id: I73262dcd37e76bc299929d55e38fea25d2510609 diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 3c5f794..d8117d1 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -1075,7 +1075,6 @@ bool IconChoiceDialog::OK_Impl() if ( pSet ) { SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() ); - bool bRet = false; if ( pPage->HasExchangeSupport() ) nRet = pPage->DeactivatePage( &aTmp ); @@ -1086,8 +1085,6 @@ bool IconChoiceDialog::OK_Impl() pExampleSet->Put( aTmp ); pOutSet->Put( aTmp ); } - else if ( bRet ) - bModified |= true; } else nRet = pPage->DeactivatePage( NULL ); commit ded5c13bb5e4c345b04893ef0632336fef77a9fd Author: Caolán McNamara <caol...@redhat.com> Date: Thu May 8 16:01:50 2014 +0100 coverity#735404 Logically dead code Change-Id: I648a573bc886c790886caa45324503cd15c350cd diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx index 0c0037a..be5a91d 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.cxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx @@ -73,7 +73,7 @@ OQueryTableWindow::~OQueryTableWindow() bool OQueryTableWindow::Init() { bool bSuccess = OTableWindow::Init(); - if(!bSuccess) + if (!bSuccess) return bSuccess; OQueryTableView* pContainer = static_cast<OQueryTableView*>(getTableView()); @@ -105,24 +105,6 @@ bool OQueryTableWindow::Init() m_aTitle.SetText( pWinData->GetWinName() ); m_aTitle.Show(); - if (!bSuccess) - { // it should just open a dummy window... - OSL_ENSURE(!GetAliasName().isEmpty(), "OQueryTableWindow::Init : kein Alias- UND kein Tabellenname geht nicht !"); - // .. but that needs at least an Alias - - // create ::com::sun::star::form::ListBox - if (!m_pListBox) - m_pListBox = CreateListBox(); - - // set title - m_aTitle.SetText(GetAliasName()); - m_aTitle.Show(); - - clearListBox(); - // don't need to refill them as I don't have a table - m_pListBox->Show(); - } - getTableView()->getDesignView()->getController().InvalidateFeature(ID_BROWSER_QUERY_EXECUTE); return bSuccess; } commit eb87aecdad36638d371c8a7a297a22c90a4ad515 Author: Caolán McNamara <caol...@redhat.com> Date: Thu May 8 16:00:34 2014 +0100 coverity#735420 Logically dead code Change-Id: I290f336baac7021358139d292231620bbe272fe0 diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 99a696e..77827e4 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -2078,8 +2078,8 @@ void ImpEditEngine::AddPortionIterated( _pFieldAttr->GetStart() != _pFieldAttr->GetEnd() && _pFieldAttr->Which() == EE_FEATURE_FIELD; //on every new field move the end position - if(bIsField) - nEndField = bIsField ? _pFieldAttr->GetEnd() : USHRT_MAX; + if (bIsField) + nEndField = _pFieldAttr->GetEnd(); LanguageType eCurLanguage = GetLanguage( aCursor ); if(eCurLanguage != eStartLanguage || bIsField || bIsEndField) commit a689bbd8a4597f5946573bf02645a41118e2c3d0 Author: Caolán McNamara <caol...@redhat.com> Date: Thu May 8 15:59:24 2014 +0100 coverity#735443 Logically dead code Change-Id: I869b2efee4648b02cf1b8d5b3667004d6933c40d diff --git a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx index 4b6335e..1770346 100644 --- a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx @@ -310,8 +310,6 @@ bool XFParaStyle::Equal(IXFStyle *pStyle) return false; XFParaStyle *pOther = (XFParaStyle*)(pStyle); - if( !pOther ) - return false; if( m_nFlag != pOther->m_nFlag ) return false; commit a9324fb76cd5841cb78ff59da7cfc1e00f10889c Author: Caolán McNamara <caol...@redhat.com> Date: Thu May 8 15:57:31 2014 +0100 coverity#735474 Logically dead code Change-Id: I63ccafff98feb998e7632801ec8c7161f50c7991 diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx index c898580..c0822fa 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -257,101 +257,90 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) } else { - bool bMacro = false; - -// if (bMacro && pView->TakeMacroObject(aMDPos,pObj,pPV)) - if (bMacro && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) ) - - { - pView->BegMacroObj(aMDPos,pObj,pPV,pWindow); - } - else + if (pView->IsEditMode()) { - if (pView->IsEditMode()) - { - bool bPointMode=pView->HasMarkablePoints(); + bool bPointMode=pView->HasMarkablePoints(); - if (!rMEvt.IsShift()) + if (!rMEvt.IsShift()) + { + if (bPointMode) { - if (bPointMode) - { - pView->UnmarkAllPoints(); - } - else - { - pView->UnmarkAll(); - } - - pView->SetDragMode(SDRDRAG_MOVE); - SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings(); - rBindings.Invalidate( SID_OBJECT_ROTATE ); - rBindings.Invalidate( SID_OBJECT_MIRROR ); + pView->UnmarkAllPoints(); } - - if ( pView->MarkObj(aMDPos, -2, false, rMEvt.IsMod1()) ) + else { - aDragTimer.Start(); + pView->UnmarkAll(); + } - pHdl=pView->PickHandle(aMDPos); + pView->SetDragMode(SDRDRAG_MOVE); + SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings(); + rBindings.Invalidate( SID_OBJECT_ROTATE ); + rBindings.Invalidate( SID_OBJECT_MIRROR ); + } - if (pHdl!=NULL) - { - pView->MarkPoint(*pHdl); - pHdl=pView->GetHdl(nHdlNum); - } + if ( pView->MarkObj(aMDPos, -2, false, rMEvt.IsMod1()) ) + { + aDragTimer.Start(); - pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); - } - else + pHdl=pView->PickHandle(aMDPos); + + if (pHdl!=NULL) { - if (bPointMode) - { - pView->BegMarkPoints(aMDPos); - } - else - { - pView->BegMarkObj(aMDPos); - } + pView->MarkPoint(*pHdl); + pHdl=pView->GetHdl(nHdlNum); } - } - else if (aSfxRequest.GetSlot() == SID_DRAW_NOTEEDIT ) - { - // Notizen editieren -> keine neuen Textobjekte erzeugen, - // stattdessen Textmodus verlassen - pViewShell->GetViewData()->GetDispatcher(). - Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); + pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); } else { - if (bStraightEnter)//Hack for that silly idea that creating text fields is inside the text routine + if (bPointMode) { - /********************************************************** - * Objekt erzeugen - **********************************************************/ - // Hack to align object to nearest grid position where object - // would be anchored ( if it were cell anchored ) - // Get grid offset for current position ( note: aPnt is - // also adjusted ) - Point aGridOff = CurrentGridSyncOffsetAndPos( aMDPos ); - - bool bRet = pView->BegCreateObj(aMDPos, (OutputDevice*) NULL); - if ( bRet ) - pView->GetCreateObj()->SetGridOffset( aGridOff ); + pView->BegMarkPoints(aMDPos); } - else if (pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK)) + else { - pView->UnmarkAllObj(); - ScViewData& rViewData = *pViewShell->GetViewData(); - rViewData.GetDispatcher().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); - pView->MarkObj(pObj,pPV,false,false); - - pHdl=pView->PickHandle(aMDPos); - pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); - return true; + pView->BegMarkObj(aMDPos); } } } + else if (aSfxRequest.GetSlot() == SID_DRAW_NOTEEDIT ) + { + // Notizen editieren -> keine neuen Textobjekte erzeugen, + // stattdessen Textmodus verlassen + + pViewShell->GetViewData()->GetDispatcher(). + Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); + } + else + { + if (bStraightEnter)//Hack for that silly idea that creating text fields is inside the text routine + { + /********************************************************** + * Objekt erzeugen + **********************************************************/ + // Hack to align object to nearest grid position where object + // would be anchored ( if it were cell anchored ) + // Get grid offset for current position ( note: aPnt is + // also adjusted ) + Point aGridOff = CurrentGridSyncOffsetAndPos( aMDPos ); + + bool bRet = pView->BegCreateObj(aMDPos, (OutputDevice*) NULL); + if ( bRet ) + pView->GetCreateObj()->SetGridOffset( aGridOff ); + } + else if (pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK)) + { + pView->UnmarkAllObj(); + ScViewData& rViewData = *pViewShell->GetViewData(); + rViewData.GetDispatcher().Execute(aSfxRequest.GetSlot(), SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); + pView->MarkObj(pObj,pPV,false,false); + + pHdl=pView->PickHandle(aMDPos); + pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); + return true; + } + } } } commit 930d4b4268ef9584a77bb28425ff26c4b70bc9cd Author: Caolán McNamara <caol...@redhat.com> Date: Thu May 8 15:55:31 2014 +0100 coverity#735482 Logically dead code Change-Id: I3bab58d022ccbec095b6ee70a076d912c4ffa957 diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index 32db723..48c3c0b 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -693,7 +693,7 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo { if( bSet ) { - SfxItemSet aSet( pEdit->GetAttribs( aFieldInfo.aPosition.nPara, aFieldInfo.aPosition.nIndex, aFieldInfo.aPosition.nIndex+1, bSet ? GETATTRIBS_CHARATTRIBS : GETATTRIBS_ALL ) ); + SfxItemSet aSet( pEdit->GetAttribs( aFieldInfo.aPosition.nPara, aFieldInfo.aPosition.nIndex, aFieldInfo.aPosition.nIndex+1, GETATTRIBS_CHARATTRIBS ) ); SvxLanguageItem aItem( rLanguage, EE_CHAR_LANGUAGE ); aSet.Put( aItem );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits