[Libreoffice-commits] core.git: 16 commits - scripting/java sc/source sd/source svx/source sw/source
Caolán McNamara
caolanm at redhat.com
Wed Oct 14 07:03:14 PDT 2015
sc/source/core/data/global2.cxx | 5
scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java | 14 --
scripting/java/com/sun/star/script/framework/io/XStorageHelper.java | 5
sd/source/filter/ppt/pptin.cxx | 2
sd/source/ui/func/fuinsert.cxx | 12 +
sd/source/ui/func/fupoor.cxx | 8 -
svx/source/svdraw/svdcrtv.cxx | 10 -
svx/source/svdraw/svdundo.cxx | 6
sw/source/filter/xml/xmlimpit.cxx | 68 ++++------
9 files changed, 54 insertions(+), 76 deletions(-)
New commits:
commit 360e139ea6ebb13630dac644e95f850e21cf9ba2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:34:06 2015 +0100
coverity#1326130 Logically dead code
Change-Id: I77453452183c0f3cb9b3a03c37142264d49a7d3a
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 9a0f51f..15000f2 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -541,10 +541,7 @@ Label_fallback_to_unambiguous:
case fraction:
eState = done;
break;
- case year:
- case done:
- case blank:
- case stop:
+ default:
rError = nStringNoValueError;
break;
}
commit f3b97a1e8dbe65873af3a7420b4cdd6e1a919307
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:25:09 2015 +0100
coverity#735879 Dereference after null check
Change-Id: I2a0fa04be569ae567719a8829b42796eadff28b6
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index e2e4f53..6b6e676 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -790,8 +790,7 @@ void SdrUndoInsertObj::Redo()
// which becomes a member of a group, because its cleared in method
// <InsertObject(..)>. Needed for correct Redo in Writer. (#i45952#)
Point aAnchorPos( 0, 0 );
- if ( pObjList &&
- dynamic_cast<const SdrObjGroup*>(pObjList->GetOwnerObj()) != nullptr )
+ if (dynamic_cast<const SdrObjGroup*>(pObjList->GetOwnerObj()) != nullptr)
{
aAnchorPos = pObj->GetAnchorPos();
}
commit 98cd13b114883d2bbdb07cc57e5e91b18194083e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:24:31 2015 +0100
coverity#735880 Dereference after null check
Change-Id: Id7bc74352d6808a074fe227e11f998e95a050329
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 1c45387..e2e4f53 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -729,8 +729,7 @@ void SdrUndoRemoveObj::Undo()
// position of the target object.
Point aOwnerAnchorPos(0, 0);
- if(pObjList &&
- dynamic_cast<const SdrObjGroup*>(pObjList->GetOwnerObj()) != nullptr)
+ if (dynamic_cast<const SdrObjGroup*>(pObjList->GetOwnerObj()) != nullptr)
{
aOwnerAnchorPos = pObjList->GetOwnerObj()->GetAnchorPos();
}
commit 94d3b93dd8985f64694478921c65569649094593
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:23:27 2015 +0100
coverity#7359793 Unchecked dynamic_cast
Change-Id: Ie3564a98078464b98ab4ef6f1aa87544dbcebe6c
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 83b1c36..90a17b7 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -638,8 +638,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
case RES_BACKGROUND:
{
- SvxBrushItem* pBrush = dynamic_cast<SvxBrushItem*>( &rItem );
- OSL_ENSURE( pBrush != NULL, "Wrong Which-ID" );
+ SvxBrushItem& rBrush = dynamic_cast<SvxBrushItem&>(rItem);
sal_Int32 nTempColor(0);
switch( nMemberId )
@@ -647,41 +646,41 @@ bool SvXMLImportItemMapper::PutXMLValue(
case MID_BACK_COLOR:
if( IsXMLToken( rValue, XML_TRANSPARENT ) )
{
- pBrush->GetColor().SetTransparency(0xff);
+ rBrush.GetColor().SetTransparency(0xff);
bOk = true;
}
else if (::sax::Converter::convertColor(nTempColor, rValue))
{
Color aTempColor(nTempColor);
aTempColor.SetTransparency(0);
- pBrush->SetColor( aTempColor );
+ rBrush.SetColor( aTempColor );
bOk = true;
}
break;
case MID_GRAPHIC_LINK:
{
- SvxGraphicPosition eOldGraphicPos = pBrush->GetGraphicPos();
+ SvxGraphicPosition eOldGraphicPos = rBrush.GetGraphicPos();
uno::Any aAny;
aAny <<= rValue;
- pBrush->PutValue( aAny, MID_GRAPHIC_URL );
+ rBrush.PutValue( aAny, MID_GRAPHIC_URL );
if( GPOS_NONE == eOldGraphicPos &&
- GPOS_NONE != pBrush->GetGraphicPos() )
- pBrush->SetGraphicPos( GPOS_TILED );
+ GPOS_NONE != rBrush.GetGraphicPos() )
+ rBrush.SetGraphicPos( GPOS_TILED );
bOk = true;
}
break;
case MID_GRAPHIC_REPEAT:
{
- SvxGraphicPosition eGraphicPos = pBrush->GetGraphicPos();
+ SvxGraphicPosition eGraphicPos = rBrush.GetGraphicPos();
sal_uInt16 nPos = GPOS_NONE;
if( SvXMLUnitConverter::convertEnum( nPos, rValue,
psXML_BrushRepeat ) )
{
if( GPOS_MM != nPos || GPOS_NONE == eGraphicPos ||
GPOS_AREA == eGraphicPos || GPOS_TILED == eGraphicPos )
- pBrush->SetGraphicPos( (SvxGraphicPosition)nPos );
+ rBrush.SetGraphicPos( (SvxGraphicPosition)nPos );
bOk = true;
}
}
@@ -767,12 +766,12 @@ bool SvXMLImportItemMapper::PutXMLValue(
if( GPOS_NONE == ePos ) bOk = false;
if( bOk )
- pBrush->SetGraphicPos( ePos );
+ rBrush.SetGraphicPos( ePos );
}
break;
case MID_GRAPHIC_FILTER:
- pBrush->SetGraphicFilter( rValue );
+ rBrush.SetGraphicFilter( rValue );
bOk = true;
break;
}
commit 5d370cddc61cdc46597ac523a6b842f43c30a743
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:22:31 2015 +0100
coverity#7359796 Unchecked dynamic_cast
Change-Id: Ic8ce96e0e1bcec279b15fd6bc81426bcb25b8c96
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 4285702..83b1c36 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -781,8 +781,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
case RES_PAGEDESC:
{
- SwFormatPageDesc* pPageDesc = dynamic_cast<SwFormatPageDesc*>( &rItem );
- OSL_ENSURE( pPageDesc != NULL, "Wrong Which-ID" );
+ SwFormatPageDesc& rPageDesc = dynamic_cast<SwFormatPageDesc&>(rItem);
if( MID_PAGEDESC_PAGENUMOFFSET==nMemberId )
{
@@ -790,7 +789,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
bOk = ::sax::Converter::convertNumber(
nVal, rValue, 0, USHRT_MAX);
if( bOk )
- pPageDesc->SetNumOffset( (sal_uInt16)nVal );
+ rPageDesc.SetNumOffset( (sal_uInt16)nVal );
}
}
break;
commit f5733be2365312698c7599730f78d70d68fc5f78
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:21:56 2015 +0100
coverity#7359797 Unchecked dynamic_cast
Change-Id: Ib91d29da570f81879c8afc1e0fc035f2cfe52c9b
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 053c034..4285702 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -798,19 +798,18 @@ bool SvXMLImportItemMapper::PutXMLValue(
case RES_LAYOUT_SPLIT:
case RES_ROW_SPLIT:
{
- SfxBoolItem* pSplit = dynamic_cast<SfxBoolItem*>( &rItem );
- OSL_ENSURE( pSplit != NULL, "Wrong Which-ID" );
+ SfxBoolItem& rSplit = dynamic_cast<SfxBoolItem&>(rItem);
if( IsXMLToken( rValue, XML_AUTO ) ||
IsXMLToken( rValue, XML_TRUE ) )
{
- pSplit->SetValue( true );
+ rSplit.SetValue( true );
bOk = true;
}
else if( IsXMLToken( rValue, XML_ALWAYS ) ||
IsXMLToken( rValue, XML_FALSE ) )
{
- pSplit->SetValue( false );
+ rSplit.SetValue( false );
bOk = true;
}
}
commit eac7e540d1caa6526d4e5b00c335e2c4e0839585
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:20:45 2015 +0100
coverity#7359798 Unchecked dynamic_cast
Change-Id: I6851ec09bb8ed6134fd1cfe3aa830f5557efdc8d
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 105199f..053c034 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -263,8 +263,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
{
case RES_LR_SPACE:
{
- SvxLRSpaceItem* pLRSpace = dynamic_cast<SvxLRSpaceItem*>( &rItem );
- OSL_ENSURE( pLRSpace != NULL, "Wrong Which-ID!" );
+ SvxLRSpaceItem& rLRSpace = dynamic_cast<SvxLRSpaceItem&>(rItem);
switch( nMemberId )
{
@@ -284,10 +283,10 @@ bool SvXMLImportItemMapper::PutXMLValue(
switch( nMemberId )
{
case MID_L_MARGIN:
- pLRSpace->SetTextLeft( (sal_Int32)nAbs, (sal_uInt16)nProp );
+ rLRSpace.SetTextLeft( (sal_Int32)nAbs, (sal_uInt16)nProp );
break;
case MID_R_MARGIN:
- pLRSpace->SetRight( (sal_Int32)nAbs, (sal_uInt16)nProp );
+ rLRSpace.SetRight( (sal_Int32)nAbs, (sal_uInt16)nProp );
break;
}
}
@@ -305,7 +304,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
bOk = rUnitConverter.convertMeasureToCore(nAbs, rValue,
-0x7fff, 0x7fff );
- pLRSpace->SetTextFirstLineOfst( (short)nAbs, (sal_uInt16)nProp );
+ rLRSpace.SetTextFirstLineOfst( (short)nAbs, (sal_uInt16)nProp );
}
break;
@@ -314,7 +313,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
bool bAutoFirst(false);
bOk = ::sax::Converter::convertBool( bAutoFirst, rValue );
if( bOk )
- pLRSpace->SetAutoFirst( bAutoFirst );
+ rLRSpace.SetAutoFirst( bAutoFirst );
}
break;
commit 025be45eb126c65db5eed301cd623cffcf726efd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:20:08 2015 +0100
coverity#735979 Unchecked dynamic_cast
Change-Id: Id1739bdb702b9ae7002f8ddcd06e47babad8b8c3
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index ba243fa..105199f 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -326,8 +326,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
case RES_UL_SPACE:
{
- SvxULSpaceItem* pULSpace = dynamic_cast<SvxULSpaceItem*>( &rItem );
- OSL_ENSURE( pULSpace != NULL, "Wrong Which-ID!" );
+ SvxULSpaceItem& rULSpace = dynamic_cast<SvxULSpaceItem&>(rItem);
sal_Int32 nProp = 100;
sal_Int32 nAbs = 0;
@@ -340,10 +339,10 @@ bool SvXMLImportItemMapper::PutXMLValue(
switch( nMemberId )
{
case MID_UP_MARGIN:
- pULSpace->SetUpper( (sal_uInt16)nAbs, (sal_uInt16)nProp );
+ rULSpace.SetUpper( (sal_uInt16)nAbs, (sal_uInt16)nProp );
break;
case MID_LO_MARGIN:
- pULSpace->SetLower( (sal_uInt16)nAbs, (sal_uInt16)nProp );
+ rULSpace.SetLower( (sal_uInt16)nAbs, (sal_uInt16)nProp );
break;
default:
OSL_FAIL("unknown MemberId");
commit e00d88cb397374c7891850d4a447a9c477acb022
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:19:33 2015 +0100
coverity#735980 Unchecked dynamic_cast
Change-Id: I7aa14ff4c89676b41c5d96a75dfd1bcd60eccf80
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 71cede0..ba243fa 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -850,8 +850,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
case RES_FRM_SIZE:
{
- SwFormatFrmSize* pFrmSize = dynamic_cast<SwFormatFrmSize*>( &rItem );
- OSL_ENSURE( pFrmSize != NULL, "Wrong Which-ID" );
+ SwFormatFrmSize& rFrmSize = dynamic_cast<SwFormatFrmSize&>(rItem);
bool bSetHeight = false;
bool bSetWidth = false;
@@ -872,7 +871,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
else if( nValue > 100 )
nValue = 100;
- pFrmSize->SetWidthPercent( (sal_Int8)nValue );
+ rFrmSize.SetWidthPercent( (sal_Int8)nValue );
}
}
break;
@@ -907,8 +906,8 @@ bool SvXMLImportItemMapper::PutXMLValue(
else if( nValue > USHRT_MAX )
nValue = USHRT_MAX;
- pFrmSize->SetWidth( (sal_uInt16)nValue );
- pFrmSize->SetHeightSizeType( ATT_VAR_SIZE );
+ rFrmSize.SetWidth( (sal_uInt16)nValue );
+ rFrmSize.SetHeightSizeType( ATT_VAR_SIZE );
bOk = true;
}
}
@@ -923,11 +922,11 @@ bool SvXMLImportItemMapper::PutXMLValue(
if( bOk )
{
if( bSetWidth )
- pFrmSize->SetWidth( (sal_uInt16)nValue );
+ rFrmSize.SetWidth( (sal_uInt16)nValue );
if( bSetHeight )
- pFrmSize->SetHeight( (sal_uInt16)nValue );
+ rFrmSize.SetHeight( (sal_uInt16)nValue );
if( bSetSizeType )
- pFrmSize->SetHeightSizeType( eSizeType );
+ rFrmSize.SetHeightSizeType( eSizeType );
}
}
}
commit 90992d512cf4c8c83a02c329d7ac9757c8c3cfce
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:18:26 2015 +0100
coverity#736798 Dereference before null check
Change-Id: I44402f7c644d60e2166956ca5f98955cc73e5bab
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index ecefc2d..d4d12b3 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2576,7 +2576,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( pObj )
{
// further setup placeholder objects
- if( dynamic_cast< const SdrPageObj *>( pObj ) != nullptr && pData )
+ if (dynamic_cast<const SdrPageObj*>(pObj))
{
const ProcessData* pProcessData=static_cast<const ProcessData*>(pData);
if( pProcessData->pPage.page )
commit 4920bbf768d893e0e0cbf5651f7ad30d11f817fc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:16:22 2015 +0100
coverity#736803 Dereference before null check
Change-Id: I0bdd28c1f43da999ae2bd35d45c1958061f90c07
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index da78790..ea9621a 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -224,13 +224,17 @@ void FuInsertClipboard::DoExecute( SfxRequest& )
if( nFormatId != SotClipboardFormatId::NONE && aDataHelper.GetTransferable().is() )
{
sal_Int8 nAction = DND_ACTION_COPY;
+ DrawViewShell* pDrViewSh = nullptr;
- if( !mpView->InsertData( aDataHelper,
+ if (!mpView->InsertData( aDataHelper,
mpWindow->PixelToLogic( Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ),
- nAction, false, nFormatId ) &&
- ( mpViewShell && dynamic_cast< DrawViewShell *>( mpViewShell ) != nullptr ) )
+ nAction, false, nFormatId ))
+ {
+ pDrViewSh = dynamic_cast<DrawViewShell*>(mpViewShell);
+ }
+
+ if (pDrViewSh)
{
- DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>(mpViewShell);
INetBookmark aINetBookmark( "", "" );
if( ( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) &&
commit 84ca5c4c619c4c6150dc278aa87c496cfb2e54d8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:14:51 2015 +0100
coverity#736804 Dereference before null check
Change-Id: If4b656ccea684fda64a3f93f5b6729c713be48b0
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 06e431d..76c59e1 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -802,7 +802,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
// and feed character to object
if(!bReturn && !mpDocSh->IsReadOnly())
{
- if(!mpView->IsTextEdit() && mpViewShell)
+ if (!mpView->IsTextEdit())
{
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
@@ -836,11 +836,9 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
{
// test if there is a title object there. If yes, try to
// set it to edit mode and start typing...
- if( dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr
- && EditEngine::IsSimpleCharInput(rKEvt))
+ DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell);
+ if (pDrawViewShell && EditEngine::IsSimpleCharInput(rKEvt))
{
- DrawViewShell* pDrawViewShell =
- static_cast<DrawViewShell*>(mpViewShell);
SdPage* pActualPage = pDrawViewShell->GetActualPage();
SdrTextObj* pCandidate = 0L;
commit 696b3dc65ba7033385cf50ec1b28e415be113002
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:12:48 2015 +0100
coverity#736826 Dereference before null check
Change-Id: I155f952f5eda086e3d134b387514968f67de4910
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 57a735a..ebad073 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -648,14 +648,12 @@ bool SdrCreateView::EndCreateObj(SdrCreateCmd eCmd)
// recognize creation of a new 3D object inside a 3D scene
bool bSceneIntoScene(false);
- if(pObjMerk
- && dynamic_cast<const E3dScene* >(pObjMerk) != nullptr
- && pCreatePV
- && pCreatePV->GetAktGroup()
- && dynamic_cast<const E3dScene* >(pCreatePV->GetAktGroup()) != nullptr)
+ E3dScene* pObjScene = dynamic_cast<E3dScene*>(pObjMerk);
+ E3dScene* pAktScene = pObjScene ? dynamic_cast<E3dScene*>(pCreatePV->GetAktGroup()) : nullptr;
+ if (pAktScene)
{
bool bDidInsert = static_cast<E3dView*>(this)->ImpCloneAll3DObjectsToDestScene(
- static_cast<E3dScene*>(pObjMerk), static_cast<E3dScene*>(pCreatePV->GetAktGroup()), Point(0, 0));
+ pObjScene, pAktScene, Point(0, 0));
if(bDidInsert)
{
commit d9bb7014947724b5cbda4aa8a0b824407b57b678
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:08:17 2015 +0100
coverity#1326568 Unused value
Change-Id: Idf1efef484d3a89bd56ba9a6807d4191ef95cb41
diff --git a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java
index 31c9f82..f92662e 100644
--- a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java
+++ b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java
@@ -151,18 +151,10 @@ public class ParcelDescriptor {
String language, languagename, description = "";
Map<String, String> langProps = new HashMap<String, String>();
NodeList nl;
- Element tmp;
Element scriptElement = (Element)scriptNodes.item(i);
language = scriptElement.getAttribute("language");
- nl = scriptElement.getElementsByTagName("logicalname");
-
- if (nl != null)
- {
- tmp = (Element)nl.item(0);
- }
-
// get the text of the description element
nl = scriptElement.getElementsByTagName("locale");
@@ -185,7 +177,7 @@ public class ParcelDescriptor {
if (nl == null) {
languagename = "";
} else {
- tmp = (Element)nl.item(0);
+ Element tmp = (Element)nl.item(0);
languagename = tmp.getAttribute("value");
}
@@ -197,7 +189,7 @@ public class ParcelDescriptor {
if (props != null) {
for (int j = 0; j < props.getLength(); j++) {
- tmp = (Element)props.item(j);
+ Element tmp = (Element)props.item(j);
String key = tmp.getAttribute("name");
String val = tmp.getAttribute("value");
langProps.put(key, val);
@@ -364,4 +356,4 @@ public class ParcelDescriptor {
//add to the Top Element
main.appendChild(root);
}
-}
\ No newline at end of file
+}
commit 6946b688f6a08fc13b13890891fb39cdc7c59f01
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 12:00:35 2015 +0100
coverity#1327113 UrF: Unread field
Change-Id: I4cc7faaf0ac74c4e1baa2e978d8dea9bc8d7b6d0
diff --git a/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java b/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java
index 9e2f6e4..669c7b7 100644
--- a/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java
+++ b/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java
@@ -53,8 +53,6 @@ import java.util.StringTokenizer;
public class XStorageHelper implements XEventListener {
XStorage[] xStorages;
- XInputStream xIs = null;
- XOutputStream xOs = null;
static Map<String, XModel> modelMap = new HashMap<String, XModel>();
XModel xModel = null;
private static XStorageHelper listener = new XStorageHelper();
commit d46134e55bdfb60ea2a972d7a2a6e2a2dd5db056
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 14 11:48:38 2015 +0100
coverity#1327178 UuF: Unused field
Change-Id: Ie9ed1f86a3a51d766987d631605dc561e9748f99
diff --git a/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java b/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java
index 2d05d4d..9e2f6e4 100644
--- a/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java
+++ b/scripting/java/com/sun/star/script/framework/io/XStorageHelper.java
@@ -53,7 +53,6 @@ import java.util.StringTokenizer;
public class XStorageHelper implements XEventListener {
XStorage[] xStorages;
- XStream xStream;
XInputStream xIs = null;
XOutputStream xOs = null;
static Map<String, XModel> modelMap = new HashMap<String, XModel>();
@@ -253,4 +252,4 @@ public class XStorageHelper implements XEventListener {
//TODO does not cater for untitled documents
return modelMap.get(url);
}
-}
\ No newline at end of file
+}
More information about the Libreoffice-commits
mailing list