[Libreoffice-commits] core.git: 2 commits - cui/source extensions/test filter/source l10ntools/source scaddins/source sfx2/source vcl/unx
Julien Nabet
serval2412 at yahoo.fr
Tue Feb 12 15:02:46 PST 2013
cui/source/tabpages/tparea.cxx | 2 +-
extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp | 6 +++---
filter/source/graphicfilter/idxf/dxfreprd.hxx | 2 +-
l10ntools/source/helpmerge.cxx | 6 ++----
scaddins/source/pricing/black_scholes.cxx | 8 ++++----
sfx2/source/control/dispatch.cxx | 4 +---
vcl/unx/generic/window/salframe.cxx | 2 +-
7 files changed, 13 insertions(+), 17 deletions(-)
New commits:
commit b3729421aead56f598b68cd2069c7b33b40e330c
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Feb 13 00:00:32 2013 +0100
Some cppcheck cleaning
Change-Id: I3d515fabc272e5c14f2e2779da1c43f92514f290
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 9cf8c17..e2e18b2 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -1001,12 +1001,12 @@ int SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet )
sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
{
- const SfxPoolItem* pOld = NULL;
sal_uInt16 _nPos;
sal_Bool bModified = sal_False;
if( nDlgType != 0 || *pbAreaTP )
{
+ const SfxPoolItem* pOld = NULL;
XFillStyle eStyle = (XFillStyle) aTypeLB.GetSelectEntryPos();
XFillStyle eSavedStyle = (XFillStyle) aTypeLB.GetSavedValue();
switch( eStyle )
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.hxx b/filter/source/graphicfilter/idxf/dxfreprd.hxx
index 32db3c2..43eb274 100644
--- a/filter/source/graphicfilter/idxf/dxfreprd.hxx
+++ b/filter/source/graphicfilter/idxf/dxfreprd.hxx
@@ -40,7 +40,7 @@ public:
double fMaxY;
double fMaxZ;
- DXFBoundingBox() { bEmpty=sal_True; }
+ DXFBoundingBox():bEmpty(sal_True), fMinX(0.0), fMinY(0.0), fMinZ(0.0), fMaxX(0.0), fMaxY(0.0), fMaxZ(0.0) {}
void Union(const DXFVector & rVector);
};
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 3173785..3612f1f 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -184,7 +184,6 @@ bool HelpParser::Merge( const rtl::OString &rSDFFile, const rtl::OString &rDesti
{
(void) rSDFFile;
- bool hasNoError = true;
SimpleXMLParser aParser;
@@ -193,7 +192,7 @@ bool HelpParser::Merge( const rtl::OString &rSDFFile, const rtl::OString &rDesti
//TODO: explicit BOM handling?
XMLFile* xmlfile = ( aParser.Execute( sXmlFile, new XMLFile( rtl::OUString('0') ) ) );
- hasNoError = MergeSingleFile( xmlfile , aMergeDataFile , rLanguage , rDestinationFile );
+ bool hasNoError = MergeSingleFile( xmlfile , aMergeDataFile , rLanguage , rDestinationFile );
delete xmlfile;
return hasNoError;
}
@@ -233,7 +232,6 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const rtl::OString& sCur ,
XMLElement* pXMLElement = NULL;
PFormEntrys *pEntrys = NULL;
- XMLData *data = NULL;
rtl::OString sLId;
rtl::OString sGId;
@@ -284,7 +282,7 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const rtl::OString& sCur ,
{
if( pXMLElement != NULL )
{
- data = new XMLData( sNewdata , NULL , true ); // Add new one
+ XMLData *data = new XMLData( sNewdata , NULL , true ); // Add new one
pXMLElement->RemoveAndDeleteAllChildren();
pXMLElement->AddChild( data );
aLangHM->erase( sCur );
diff --git a/scaddins/source/pricing/black_scholes.cxx b/scaddins/source/pricing/black_scholes.cxx
index f99906e..8086938 100644
--- a/scaddins/source/pricing/black_scholes.cxx
+++ b/scaddins/source/pricing/black_scholes.cxx
@@ -185,7 +185,7 @@ double bincash(double S, double vol, double rd, double rf,
val = -pm*dnorm(d2)*sqrt(tau)/vol;
break;
default:
- printf("bincash: greek %ui not implemented\n", greeks );
+ printf("bincash: greek %d not implemented\n", greeks );
abort();
}
}
@@ -286,7 +286,7 @@ double binasset(double S, double vol, double rd, double rf,
val = -tau*S*pnorm(pm*d1) - pm*S*dnorm(d1)*sqrt(tau)/vol;
break;
default:
- printf("binasset: greek %ui not implemented\n", greeks );
+ printf("binasset: greek %d not implemented\n", greeks );
abort();
}
}
@@ -652,7 +652,7 @@ double barrier_term(double S, double vol, double rd, double rf,
);
break;
default:
- printf("barrier_term: greek %ui not implemented\n", greek );
+ printf("barrier_term: greek %d not implemented\n", greek );
abort();
}
return val;
@@ -708,7 +708,7 @@ double barrier_double_term( double S, double vol, double rd, double rf,
barrier_term(S,vol,rd,rf,tau,K,B1,B2,sc,pc,fd,types::Value);
break;
default:
- printf("barrier_double_term: greek %ui not implemented\n", greek );
+ printf("barrier_double_term: greek %d not implemented\n", greek );
abort();
}
return val;
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 6ec85ea..6e81c0b 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -101,9 +101,7 @@ struct SfxObjectBars_Impl
String aName;
SfxInterface* pIFace;
- SfxObjectBars_Impl() :
- nResId( 0 )
- {}
+ SfxObjectBars_Impl() : nResId(0), nMode(0), pIFace(NULL) {}
};
//------------------------------------------------------------------
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index a30c32f..c35109b 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -1522,7 +1522,6 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
if (pState->mnMask & _FRAMESTATE_MASK_GEOMETRY)
{
Rectangle aPosSize;
- bool bDoAdjust = false;
/* #i44325#
* if maximized, set restore size and guess maximized size from last time
@@ -1562,6 +1561,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
}
else
{
+ bool bDoAdjust = false;
// initialize with current geometry
if ((pState->mnMask & _FRAMESTATE_MASK_GEOMETRY) != _FRAMESTATE_MASK_GEOMETRY)
GetPosSize (aPosSize);
commit 8803b1faf59ab42a9d55fd88127201e5dbf01a36
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Tue Feb 12 23:26:30 2013 +0100
Return the real result of the test
Change-Id: I05d4b62a32a44a7d174d7fa19f7814d45dab22b2
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp
index df61a04..b88fd6b 100644
--- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp
+++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp
@@ -60,14 +60,14 @@ STDMETHODIMP CSimple::get__implementedInterfaces(LPSAFEARRAY *pVal)
hr= SafeArrayPutElement( pArr, & index, name1);
index++;
- hr= SafeArrayPutElement( pArr, &index, name2);
+ hr|= SafeArrayPutElement( pArr, &index, name2);
index++;
- hr= SafeArrayPutElement( pArr, &index, name3);
+ hr|= SafeArrayPutElement( pArr, &index, name3);
*pVal= pArr;
}
*pVal= pArr;
- return S_OK;
+ return hr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list