[Libreoffice-commits] core.git: 13 commits - sal/textenc sc/source sd/source starmath/source sw/source vcl/source
Caolán McNamara
caolanm at redhat.com
Fri May 9 02:44:54 PDT 2014
sal/textenc/handleundefinedunicodetotextchar.cxx | 2
sc/source/ui/app/scmod.cxx | 2
sd/source/ui/docshell/docshell.cxx | 12 -
sd/source/ui/func/fuexpand.cxx | 5
sd/source/ui/func/futext.cxx | 212 ++++++++++-------------
sd/source/ui/table/tableobjectbar.cxx | 11 -
sd/source/ui/view/drtxtob1.cxx | 24 --
sd/source/ui/view/drviews7.cxx | 5
starmath/source/cfgitem.cxx | 6
sw/source/core/uibase/uiview/viewmdi.cxx | 16 -
sw/source/core/unocore/unofield.cxx | 7
vcl/source/window/menu.cxx | 5
12 files changed, 124 insertions(+), 183 deletions(-)
New commits:
commit e754e43662523b0d2504beb0d4875e3c10ecf6a2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 10:32:20 2014 +0100
coverity#1209712 Dereference null return value
Change-Id: I9ef54e4086e1b441e1bd5ccbebcd512d3a01bb47
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 57b9121..9a7e73b 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -3646,7 +3646,10 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong
size_t nPos = 0;
pData = pItemList->GetData( pData->nId, nPos );
assert(pData);
- pData->bIsTemporary = true;
+ if (pData)
+ {
+ pData->bIsTemporary = true;
+ }
ImplCallEventListeners(VCLEVENT_MENU_SUBMENUCHANGED, nPos);
}
}
commit 3c56e2686a3556653c6c627264e7503df31032fd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 10:28:24 2014 +0100
coverity#705478 Dereference null return value
Change-Id: I3dc6ed508992bc952f1cf34e6d9e26354895bc27
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 12f03e7..5206f02 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -752,7 +752,11 @@ void SmMathConfig::SaveFontFormatList()
for (size_t i = 0; i < nCount; ++i)
{
OUString aFntFmtId( rFntFmtList.GetFontFormatId( i ) );
- const SmFontFormat aFntFmt( *rFntFmtList.GetFontFormat( aFntFmtId ) );
+ const SmFontFormat *pFntFmt = rFntFmtList.GetFontFormat( aFntFmtId );
+ assert(pFntFmt);
+ if (!pFntFmt)
+ continue;
+ const SmFontFormat aFntFmt( *pFntFmt );
OUString aNodeNameDelim( FONT_FORMAT_LIST );
aNodeNameDelim += aDelim;
commit e4cc3330d0829578086b8e6cc86590b8a9b0659d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 10:26:01 2014 +0100
coverity#705475 Dereference null return value
Change-Id: I1630c2a110fcf05d7698fc7e85eb2ca8fc4452c7
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index 8780176..95299d9 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -205,12 +205,13 @@ void FuExpandPage::DoExecute( SfxRequest& )
SfxStyleSheet* pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_TITLE);
pTextObj->NbcSetStyleSheet(pSheet, false);
+ SdrTextObj* pOutlineObj = NULL;
sal_Int32 nChildCount = pOutl->GetChildCount(pPara);
-
if (nChildCount > 0)
+ pOutlineObj = (SdrTextObj*) pPage->GetPresObj(PRESOBJ_OUTLINE);
+ if (pOutlineObj)
{
// create structuring text objects
- SdrTextObj* pOutlineObj = (SdrTextObj*) pPage->GetPresObj(PRESOBJ_OUTLINE);
pPara = pOutl->GetParagraph( ++nParaPos );
OutlinerParaObject* pOPO = pOutl->CreateParaObject( nParaPos, nChildCount);
commit 7263f4bb20727b9ea598e0aa83f0f6d13c04e403
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 10:24:27 2014 +0100
coverity#1209709 Dereference null return value
Change-Id: Ic5cf8a5f52a7219f32ec2ce9259e5aa0153da9bb
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 4a3c6c9..203b82f 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1893,7 +1893,7 @@ void ScModule::EndReference()
pRefDlg->SetActive();
}
}
- else
+ else if (pModalDlg)
pModalDlg->SetActive();
}
}
commit 1612a8e87b102e435c87240d8374962ee1dc5579
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 10:20:03 2014 +0100
coverity#1209362 coverity gold, wrong mask
Change-Id: I039563908a391103cc478e11666648cc517fc677
diff --git a/sal/textenc/handleundefinedunicodetotextchar.cxx b/sal/textenc/handleundefinedunicodetotextchar.cxx
index 7ff7bd0..164369f 100644
--- a/sal/textenc/handleundefinedunicodetotextchar.cxx
+++ b/sal/textenc/handleundefinedunicodetotextchar.cxx
@@ -58,7 +58,7 @@ bool ImplGetInvalidAsciiMultiByte(sal_uInt32 nFlags,
{
if (nMaxLen == 0)
return false;
- switch (nFlags & RTL_UNICODETOTEXT_FLAGS_UNDEFINED_MASK)
+ switch (nFlags & RTL_UNICODETOTEXT_FLAGS_INVALID_MASK)
{
case RTL_UNICODETOTEXT_FLAGS_INVALID_0:
*pBuf = 0x00;
commit fb4b9fe3d86baaaae6c6980cfa2cf723c41614be
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 10:06:43 2014 +0100
coverity#735483 Logically dead code
Change-Id: I4cb153338f1a00d9439dcfa9c43ee96235584e4a
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 5750387..75665fa 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -224,17 +224,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
break;
case SID_CLOSEDOC:
- {
- bool bDisabled = false;
- if (bDisabled)
- {
- rSet.DisableItem(SID_CLOSEDOC);
- }
- else
- {
- GetSlotState(SID_CLOSEDOC, SfxObjectShell::GetInterface(), &rSet);
- }
- }
+ GetSlotState(SID_CLOSEDOC, SfxObjectShell::GetInterface(), &rSet);
break;
case SID_SEARCH_OPTIONS:
commit 38d73f23fd519d87ce74405fe1d851ef0796f777
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 10:05:59 2014 +0100
coverity#735484 Logically dead code
Change-Id: I26a7bfc7bfa7b69ee1523437b16c02d22a8e8e72
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 0b92597..3613a7b 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -291,7 +291,6 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
if (rMEvt.IsLeft() || rMEvt.IsRight())
{
mpWindow->CaptureMouse();
- SdrObject* pObj;
SdrPageView* pPV = mpView->GetSdrPageView();
if (eHit == SDRHIT_TEXTEDIT)
@@ -300,145 +299,134 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
}
else
{
- bool bMacro = false;
-
- if (bMacro && mpView->PickObj(aMDPos,mpView->getHitTolLog(),pObj,pPV,SDRSEARCH_PICKMACRO))
+ if (eHit != SDRHIT_HANDLE)
{
- // Macro
- sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
- mpView->BegMacroObj(aMDPos,nHitLog,pObj,pPV,mpWindow);
+ // deselect selection
+ if (!rMEvt.IsShift() && eHit == SDRHIT_TEXTEDITOBJ)
+ {
+ mpView->UnmarkAll();
+ mpView->SetDragMode(SDRDRAG_MOVE);
+ }
}
- else
+
+ if ( aVEvt.eEvent == SDREVENT_EXECUTEURL ||
+ eHit == SDRHIT_HANDLE ||
+ eHit == SDRHIT_MARKEDOBJECT ||
+ eHit == SDRHIT_TEXTEDITOBJ ||
+ ( eHit == SDRHIT_UNMARKEDOBJECT && bFirstObjCreated &&
+ !bPermanent ) )
{
- if (eHit != SDRHIT_HANDLE)
+ // Handle, hit marked or umarked object
+ if (eHit == SDRHIT_TEXTEDITOBJ)
{
- // deselect selection
- if (!rMEvt.IsShift() && eHit == SDRHIT_TEXTEDITOBJ)
+ /* hit text of unmarked object:
+ select object and set to EditMode */
+ mpView->MarkObj(aVEvt.pRootObj, pPV);
+
+ if (aVEvt.pObj && aVEvt.pObj->ISA(SdrTextObj))
{
- mpView->UnmarkAll();
- mpView->SetDragMode(SDRDRAG_MOVE);
+ mxTextObj.reset( static_cast<SdrTextObj*>(aVEvt.pObj) );
}
- }
- if ( aVEvt.eEvent == SDREVENT_EXECUTEURL ||
- eHit == SDRHIT_HANDLE ||
- eHit == SDRHIT_MARKEDOBJECT ||
- eHit == SDRHIT_TEXTEDITOBJ ||
- ( eHit == SDRHIT_UNMARKEDOBJECT && bFirstObjCreated &&
- !bPermanent ) )
+ SetInEditMode(rMEvt, true);
+ }
+ else if (aVEvt.eEvent == SDREVENT_EXECUTEURL && !rMEvt.IsMod2())
{
- // Handle, hit marked or umarked object
- if (eHit == SDRHIT_TEXTEDITOBJ)
- {
- /* hit text of unmarked object:
- select object and set to EditMode */
- mpView->MarkObj(aVEvt.pRootObj, pPV);
-
- if (aVEvt.pObj && aVEvt.pObj->ISA(SdrTextObj))
- {
- mxTextObj.reset( static_cast<SdrTextObj*>(aVEvt.pObj) );
- }
-
- SetInEditMode(rMEvt, true);
- }
- else if (aVEvt.eEvent == SDREVENT_EXECUTEURL && !rMEvt.IsMod2())
+ // execute URL
+ mpWindow->ReleaseMouse();
+ SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.pURLField->GetURL());
+ SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
+ SfxBoolItem aBrowseItem( SID_BROWSE, true );
+ SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
+ mpWindow->ReleaseMouse();
+
+ if (rMEvt.IsMod1())
{
- // execute URL
- mpWindow->ReleaseMouse();
- SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.pURLField->GetURL());
- SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
- SfxBoolItem aBrowseItem( SID_BROWSE, true );
- SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
- mpWindow->ReleaseMouse();
-
- if (rMEvt.IsMod1())
- {
- // open in new frame
- pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
- &aStrItem, &aBrowseItem, &aReferer, 0L);
- }
- else
- {
- // open in current frame
- SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
- pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
- &aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L);
- }
+ // open in new frame
+ pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
+ &aStrItem, &aBrowseItem, &aReferer, 0L);
}
else
{
- // drag object or handle
+ // open in current frame
+ SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
+ pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
+ &aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L);
+ }
+ }
+ else
+ {
+ // drag object or handle
- // #i78748#
- // do the EndTextEdit first, it will delete the handles and force a
- // recreation. This will make aVEvt.pHdl to point to a deleted handle,
- // thus it is necessary to reset it and to get it again.
+ // #i78748#
+ // do the EndTextEdit first, it will delete the handles and force a
+ // recreation. This will make aVEvt.pHdl to point to a deleted handle,
+ // thus it is necessary to reset it and to get it again.
- // #i112855#
- // cl: I'm not sure why we checked here also for mxTextObj->GetOutlinerParaObjet
- // this caused SdrEndTextEdit() to be called also when not in text editing and
- // this does not make sense and caused troubles. (see issue 112855)
+ // #i112855#
+ // cl: I'm not sure why we checked here also for mxTextObj->GetOutlinerParaObjet
+ // this caused SdrEndTextEdit() to be called also when not in text editing and
+ // this does not make sense and caused troubles. (see issue 112855)
- if( mpView->IsTextEdit() )
+ if( mpView->IsTextEdit() )
+ {
+ mpView->SdrEndTextEdit();
+ bJustEndedEdit = true;
+
+ if(aVEvt.pHdl)
{
- mpView->SdrEndTextEdit();
- bJustEndedEdit = true;
-
- if(aVEvt.pHdl)
- {
- // force new handle identification, the pointer will be dead here
- // since SdrEndTextEdit has resetted (deleted) the handles.
- aVEvt.pHdl = 0;
- mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
- }
+ // force new handle identification, the pointer will be dead here
+ // since SdrEndTextEdit has resetted (deleted) the handles.
+ aVEvt.pHdl = 0;
+ mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
}
+ }
- if (!aVEvt.pHdl)
+ if (!aVEvt.pHdl)
+ {
+ if( eHit == SDRHIT_UNMARKEDOBJECT )
{
- if( eHit == SDRHIT_UNMARKEDOBJECT )
- {
- if ( !rMEvt.IsShift() )
- mpView->UnmarkAll();
-
- mpView->MarkObj(aVEvt.pRootObj, pPV);
- }
+ if ( !rMEvt.IsShift() )
+ mpView->UnmarkAll();
- // Drag object
- bFirstMouseMove = true;
- aDragTimer.Start();
+ mpView->MarkObj(aVEvt.pRootObj, pPV);
}
+ // Drag object
+ bFirstMouseMove = true;
+ aDragTimer.Start();
+ }
- if ( ! rMEvt.IsRight())
+
+ if ( ! rMEvt.IsRight())
+ {
+ // we need to pick again since SdrEndTextEdit can rebuild the handles list
+ eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
+ if( (eHit == SDRHIT_HANDLE) || (eHit == SDRHIT_MARKEDOBJECT) )
{
- // we need to pick again since SdrEndTextEdit can rebuild the handles list
- eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
- if( (eHit == SDRHIT_HANDLE) || (eHit == SDRHIT_MARKEDOBJECT) )
- {
- sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
- mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, aVEvt.pHdl, nDrgLog);
- }
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, aVEvt.pHdl, nDrgLog);
}
- bReturn = true;
}
+ bReturn = true;
}
- else if ( nSlotId != SID_TEXTEDIT &&
- (bPermanent || !bFirstObjCreated) )
- {
- // create object
- mpView->SetCurrentObj(OBJ_TEXT);
- mpView->SetEditMode(SDREDITMODE_CREATE);
- sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
- mpView->BegCreateObj(aMDPos, (OutputDevice*) NULL, nDrgLog);
- }
- else
- {
- // select
- if( !rMEvt.IsShift() )
- mpView->UnmarkAll();
+ }
+ else if ( nSlotId != SID_TEXTEDIT &&
+ (bPermanent || !bFirstObjCreated) )
+ {
+ // create object
+ mpView->SetCurrentObj(OBJ_TEXT);
+ mpView->SetEditMode(SDREDITMODE_CREATE);
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ mpView->BegCreateObj(aMDPos, (OutputDevice*) NULL, nDrgLog);
+ }
+ else
+ {
+ // select
+ if( !rMEvt.IsShift() )
+ mpView->UnmarkAll();
- mpView->BegMarkObj( aMDPos );
- }
+ mpView->BegMarkObj( aMDPos );
}
}
}
commit e90df54a0594639388c57ce52a61398acf2a9ff1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 10:05:00 2014 +0100
coverity#735486 Logically dead code
Change-Id: I8cedb071d345e111d5addf63a83d1f597698d43e
diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx
index 88f6670..1b71192 100644
--- a/sd/source/ui/table/tableobjectbar.cxx
+++ b/sd/source/ui/table/tableobjectbar.cxx
@@ -109,17 +109,8 @@ TableObjectBar::~TableObjectBar()
SetRepeatTarget( NULL );
}
-
-
void TableObjectBar::GetState( SfxItemSet& rSet )
{
- bool bReadOnly = false;
-
- if( bReadOnly )
- {
- rSet.DisableItem (SID_INSERT_TABLE );
- }
-
if( mpView )
{
rtl::Reference< sdr::SelectionController > xController( mpView->getSelectionController() );
@@ -130,8 +121,6 @@ void TableObjectBar::GetState( SfxItemSet& rSet )
}
}
-
-
void TableObjectBar::GetAttrState( SfxItemSet& rSet )
{
DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >( mpViewSh );
commit 9f71d9f696609d9f1c5863f3b118afaa21cd4d57
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 10:04:23 2014 +0100
coverity#735487 Logically dead code
Change-Id: Iaa8ef8dd533caf8d12211c4cc127f684bc86df73
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 322e756..605983c 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -503,34 +503,14 @@ void TextObjectBar::Execute( SfxRequest &rReq )
// attributes for TextObjectBar
case SID_ATTR_CHAR_FONT:
- {
- if( pArgs )
- {
- if( SFX_ITEM_SET == pArgs->GetItemState( EE_CHAR_FONTINFO, true, &pPoolItem ) )
- aNewAttr.Put( *pPoolItem );
- }
- else
- mpViewShell->GetViewFrame()->GetDispatcher()->
+ mpViewShell->GetViewFrame()->GetDispatcher()->
Execute( SID_CHAR_DLG, SFX_CALLMODE_ASYNCHRON );
- }
break;
case SID_ATTR_CHAR_FONTHEIGHT:
- {
- if( pArgs )
- {
- if( SFX_ITEM_SET == pArgs->GetItemState( EE_CHAR_FONTHEIGHT, true, &pPoolItem ) )
- aNewAttr.Put( *pPoolItem );
- }
- else
- mpViewShell->GetViewFrame()->GetDispatcher()->
+ mpViewShell->GetViewFrame()->GetDispatcher()->
Execute( SID_CHAR_DLG, SFX_CALLMODE_ASYNCHRON );
- }
break;
case SID_ATTR_CHAR_COLOR:
- {
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( EE_CHAR_COLOR, true, &pPoolItem ) )
- aNewAttr.Put( *pPoolItem );
- }
break;
// #i35937# removed need for FN_NUM_BULLET_ON handling
}
commit e8d1110d07bf3c1a4ba92a2940e52e69f7092fcb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 10:02:23 2014 +0100
coverity#1209186 Logically dead code
since 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70
Change-Id: Ia7b6451acdeaaef57e9f4b1fe285d1b1b57595f6
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 749a0cb..b0bec1d 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1395,7 +1395,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
bool bFoundBitmap = false;
bool bFoundMetafile = false;
- bool bFoundObjNoLine = false;
bool bFoundObjNoArea = false;
bool bFoundNoGraphicObj = false;
bool bFoundAny = false;
@@ -1472,10 +1471,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if( bFoundObjNoArea ) // #i25616#
rSet.DisableItem( SID_ATTRIBUTES_AREA );
- // Disable menuitem for line-dialog
- if( bFoundObjNoLine )
- rSet.DisableItem( SID_ATTRIBUTES_LINE );
-
if( bFoundBitmap && !bFoundMetafile && !bFoundNoGraphicObj ) // only Bitmaps marked
rSet.DisableItem( SID_CONVERT_TO_BITMAP );
else if( !bFoundBitmap && bFoundMetafile && !bFoundNoGraphicObj ) // only Metafiles marked
commit be756e2ca3e23c9ee60b7418a2339700966f14f4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 09:56:11 2014 +0100
coverity#735545 Logically dead code
Change-Id: Ifa1bc627da203575b36e7e944c66b945f813016d
diff --git a/sw/source/core/uibase/uiview/viewmdi.cxx b/sw/source/core/uibase/uiview/viewmdi.cxx
index 6181c5d..c681a8f 100644
--- a/sw/source/core/uibase/uiview/viewmdi.cxx
+++ b/sw/source/core/uibase/uiview/viewmdi.cxx
@@ -222,11 +222,9 @@ void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, bool bViewOnly
if ( nColumns != pUsrPref->GetViewLayoutColumns() ||
bBookMode != pUsrPref->IsViewLayoutBookMode() )
{
- pUsrPref->SetViewLayoutColumns( nColumns );
- pUsrPref->SetViewLayoutBookMode( bBookMode );
- SW_MOD()->ApplyUsrPref( *pUsrPref,
- bViewOnly ? this: 0,
- bViewOnly ? VIEWOPT_DEST_VIEW_ONLY : 0 );
+ pUsrPref->SetViewLayoutColumns(nColumns);
+ pUsrPref->SetViewLayoutBookMode(bBookMode);
+ SW_MOD()->ApplyUsrPref(*pUsrPref, 0, 0);
pUsrPref->SetModified();
}
}
commit 6384ca9e4908635d805189ee15e4abe0b602fcfa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 09:55:19 2014 +0100
coverity#735546 Logically dead code
Change-Id: Ibe25db9809ffc9a91e938fd5e02811492b03afc5
diff --git a/sw/source/core/uibase/uiview/viewmdi.cxx b/sw/source/core/uibase/uiview/viewmdi.cxx
index 216d9dc..6181c5d 100644
--- a/sw/source/core/uibase/uiview/viewmdi.cxx
+++ b/sw/source/core/uibase/uiview/viewmdi.cxx
@@ -149,11 +149,9 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
(sal_uInt16(nFac) != pUsrPref->GetZoom() ||
sal_uInt8 (eZoomType) != pUsrPref->GetZoomType()) )
{
- pUsrPref->SetZoom ( sal_uInt16(nFac) );
- pUsrPref->SetZoomType( eZoomType );
- SW_MOD()->ApplyUsrPref( *pUsrPref,
- bViewOnly ? this: 0,
- bViewOnly ? VIEWOPT_DEST_VIEW_ONLY : 0 );
+ pUsrPref->SetZoom(sal_uInt16(nFac));
+ pUsrPref->SetZoomType(eZoomType);
+ SW_MOD()->ApplyUsrPref(*pUsrPref, 0, 0);
pUsrPref->SetModified();
}
if ( pOpt->GetZoom() != (sal_uInt16) nFac )
commit 9882f773e621aa61cba0aa6638d2a63a96cd452b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 9 09:53:13 2014 +0100
coverity#735523 Logically dead code
Change-Id: I3a8ee3de5862d4d3862f3511e1716f0e4f786150
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index b26fa1d..325d0e1 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -837,7 +837,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
aRet <<= aRetSeq;
}
- else if(pType)
+ else
{
//TODO: Properties fuer die uebrigen Feldtypen einbauen
sal_uInt16 nMId = GetFieldTypeMId( rPropertyName, *pType );
@@ -870,11 +870,6 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
aRet <<= *pStr;
}
}
- else
- {
- if(rPropertyName == UNO_NAME_DATA_COMMAND_TYPE)
- aRet <<= m_pImpl->m_nParam2;
- }
}
else
{
More information about the Libreoffice-commits
mailing list