[Libreoffice-commits] core.git: 2 commits - basic/source cui/source sfx2/source svx/source unodevtools/source vcl/win
Julien Nabet
serval2412 at yahoo.fr
Tue Feb 12 05:50:05 PST 2013
basic/source/comp/dim.cxx | 3 +--
cui/source/tabpages/border.cxx | 8 +++-----
sfx2/source/control/templateremoteview.cxx | 4 ----
svx/source/gallery2/galbrws2.cxx | 7 ++++---
unodevtools/source/skeletonmaker/javatypemaker.cxx | 2 +-
vcl/win/source/window/salobj.cxx | 3 +--
6 files changed, 10 insertions(+), 17 deletions(-)
New commits:
commit 2ce2fafa1b19f3eaad89ec57ac312ce2f33fbf20
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Tue Feb 12 14:47:52 2013 +0100
Some cppcheck cleaning
Change-Id: Idb380dbb7470dbdb371778ba0c486392cc55380e
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index 3a6c5c9..3f79a28 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -615,10 +615,9 @@ void SbiParser::DefType( bool bPrivate )
for ( short i=0; i<pDim->GetSize();++i )
{
- sal_Int32 ub = -1;
sal_Int32 lb = nBase;
SbiExprNode* pNode = pDim->Get(i)->GetExprNode();
- ub = pNode->GetNumber();
+ sal_Int32 ub = pNode->GetNumber();
if ( !pDim->Get( i )->IsBased() ) // each dim is low/up
{
if ( ++i >= pDim->GetSize() ) // trouble
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 3eb3c00..0772e5d 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -246,14 +246,13 @@ SvxBorderTabPage::SvxBorderTabPage(Window* pParent, const SfxItemSet& rCoreAttrs
// fill ColorBox out of the XColorList
SfxObjectShell* pDocSh = SfxObjectShell::Current();
- const SfxPoolItem* pItem = NULL;
XColorListRef pColorTable;
DBG_ASSERT( pDocSh, "DocShell not found!" );
if ( pDocSh )
{
- pItem = pDocSh->GetItem( SID_COLOR_TABLE );
+ const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
if ( pItem != NULL )
pColorTable = ( (SvxColorListItem*)pItem )->GetColorList();
}
@@ -562,7 +561,6 @@ sal_Bool SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs )
SvxBoxItem* pOldBoxItem = (SvxBoxItem*)GetOldItem( rCoreAttrs, SID_ATTR_BORDER_OUTER );
SfxMapUnit eCoreUnit = rOldSet.GetPool()->GetMetric( nBoxWhich );
- const SfxPoolItem* pOld = 0;
//------------------
// outer border:
@@ -684,7 +682,7 @@ sal_Bool SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs )
rCoreAttrs.Put( aBoxItem );
bAttrsChanged |= sal_True;
}
- pOld = GetOldItem( rCoreAttrs, SID_ATTR_BORDER_INNER, sal_False );
+ const SfxPoolItem* pOld = GetOldItem( rCoreAttrs, SID_ATTR_BORDER_INNER, sal_False );
if ( !pOld || !( *(const SvxBoxInfoItem*)pOld == aBoxInfoItem ) )
{
@@ -796,7 +794,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, SelSdwHdl_Impl)
IMPL_LINK( SvxBorderTabPage, SelColHdl_Impl, ListBox *, pLb )
{
- ColorListBox* pColLb = (ColorListBox*)pLb;
+ ColorListBox* pColLb = (ColorListBox*)(pLb);
if (pLb == m_pLbLineColor)
{
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 6b8ed1c..2111eed 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -107,18 +107,19 @@ void GalleryBackgroundPopup::StateChanged( sal_uInt16 nSID, SfxItemState eState,
if ( ( nSID == SID_GALLERY_BG_BRUSH ) && pItem && ( eState != SFX_ITEM_DISABLED ) )
{
SfxStringListItem* pStrLstItem;
- SfxStringItem* pStrItem;
PopupMenu::Clear();
- if( ( pStrLstItem = PTR_CAST( SfxStringListItem, pItem ) ) != NULL )
+ if ( ( pStrLstItem = PTR_CAST( SfxStringListItem, pItem ) ) != NULL )
{
const std::vector<String> &aList = pStrLstItem->GetList();
for ( sal_uIntPtr i = 0, nCount = aList.size(); i < nCount; i++ )
InsertItem( (sal_uInt16) i + 1, aList[i]);
+ return;
}
- else if( ( pStrItem = PTR_CAST( SfxStringItem, pItem ) ) != NULL )
+ SfxStringItem* pStrItem = PTR_CAST( SfxStringItem, pItem );
+ if (pStrItem)
InsertItem( 1, pStrItem->GetValue() );
else
{
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index 96870f5..88e961d 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -460,8 +460,8 @@ void printMethods(std::ostream & o,
// REMOVE next line
OUString tmp = reader.getFieldName(i);
- bool setAttrMethod = false;
if ( (reader.getFieldFlags(i) & RT_ACCESS_READONLY) == 0 ) {
+ bool setAttrMethod = false;
o << indentation << "public void set"
<< (codemaker::convertString(reader.getFieldName(i)).
getStr())
diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx
index 0324a35..e2c1b24 100644
--- a/vcl/win/source/window/salobj.cxx
+++ b/vcl/win/source/window/salobj.cxx
@@ -243,7 +243,6 @@ void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT /* nDispatchResult */ )
{
// Used for Unicode and none Unicode
SalData* pSalData = GetSalData();
- WinSalFrame* pFrame;
if ( (pMsg->message == WM_KEYDOWN) || (pMsg->message == WM_KEYUP) )
{
@@ -253,7 +252,7 @@ void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT /* nDispatchResult */ )
if ( pMsg->hwnd == ::GetFocus() )
{
ImplSalYieldMutexAcquireWithWait();
- pFrame = ImplFindSalObjectFrame( pMsg->hwnd );
+ WinSalFrame* pFrame = ImplFindSalObjectFrame( pMsg->hwnd );
if ( pFrame )
ImplHandleSalObjKeyMsg( pFrame->mhWnd, pMsg->message, pMsg->wParam, pMsg->lParam );
ImplSalYieldMutexRelease();
commit 2bfccd148958ff8b3af49854b611649839028c97
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Tue Feb 12 14:47:35 2013 +0100
Remove commented lines
Change-Id: Iaf07d9f4bc0a133c1127d93bf635b6653fe1479a
diff --git a/sfx2/source/control/templateremoteview.cxx b/sfx2/source/control/templateremoteview.cxx
index f89bbab..8b76094 100644
--- a/sfx2/source/control/templateremoteview.cxx
+++ b/sfx2/source/control/templateremoteview.cxx
@@ -142,10 +142,7 @@ bool TemplateRemoteView::loadRepository (TemplateRepository* pItem, bool bRefres
aTemplateItem.aThumbnail = TemplateAbstractView::fetchThumbnail(sRealURL,
TEMPLATE_THUMBNAIL_MAX_WIDTH,
TEMPLATE_THUMBNAIL_MAX_HEIGHT);
-// pData->mbIsRemote = xRow->getBoolean( ROW_IS_REMOTE ) && !xRow->wasNull();
-// pData->mbIsRemoveable = xRow->getBoolean( ROW_IS_REMOVEABLE ) && !xRow->wasNull();
aTemplateItem.aName = xRow->getString( ROW_TITLE );
-// pData->maSize = xRow->getLong( ROW_SIZE );
if ( bHasTargetURL &&
INetURLObject( aContentURL ).GetProtocol() == INET_PROT_VND_SUN_STAR_HIER )
@@ -154,7 +151,6 @@ bool TemplateRemoteView::loadRepository (TemplateRepository* pItem, bool bRefres
try
{
-// aCnt.getPropertyValue("Size") >>= pData->maSize;
aCnt.getPropertyValue("DateModified") >>= aDT;
}
catch (...)
More information about the Libreoffice-commits
mailing list