Hello,

Remove call-catcher / bloat removal with sc module + some cppcheck postfix 
operator
Compiling sc was ok.

Julien
(LGPLv3+ / MPL)

commit 5111e8f3b6b177f59b061576eabd8a8481ada1eb
Author: Julien Nabet <[email protected]>
Date:   Mon Dec 20 23:05:47 2010 +0100

    Some removing of postfix operators

diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index e3c6aee..64eea08 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -236,7 +236,7 @@ ScDPSaveDimension::ScDPSaveDimension(const 
ScDPSaveDimension& r) :
             pSubTotalFuncs[nSub] = r.pSubTotalFuncs[nSub];
     }
 
-    for (MemberList::const_iterator i=r.maMemberList.begin(); i != 
r.maMemberList.end() ; i++)
+    for (MemberList::const_iterator i=r.maMemberList.begin(); i != 
r.maMemberList.end() ; ++i)
     {
         const String& rName =  (*i)->GetName();
         ScDPSaveMember* pNew = new ScDPSaveMember( **i );
@@ -271,7 +271,7 @@ ScDPSaveDimension::ScDPSaveDimension(const 
ScDPSaveDimension& r) :
 
 ScDPSaveDimension::~ScDPSaveDimension()
 {
-    for (MemberHash::const_iterator i=maMemberHash.begin(); i != 
maMemberHash.end() ; i++)
+    for (MemberHash::const_iterator i=maMemberHash.begin(); i != 
maMemberHash.end() ; ++i)
         delete i->second;
     delete pReferenceValue;
     delete pSortInfo;
@@ -687,7 +687,7 @@ void ScDPSaveDimension::WriteToSource( const 
uno::Reference<uno::XInterface>& xD
                         if ( !pSortInfo || pSortInfo->Mode == 
sheet::DataPilotFieldSortMode::MANUAL )
                             nPosition = 0;
 
-                        for (MemberList::const_iterator 
i=maMemberList.begin(); i != maMemberList.end() ; i++)
+                        for (MemberList::const_iterator 
i=maMemberList.begin(); i != maMemberList.end() ; ++i)
                         {
                             ScDPSaveMember* pMember = *i;
                             if (!pMember->GetIsVisible())
@@ -1451,7 +1451,7 @@ void ScDPSaveDimension::Refresh( const 
com::sun::star::uno::Reference<
             if ( pCache->GetIdByItemData( nSrcDim, aMemberName ) == -1 ) 
                 i = maMemberList.erase( i );
             else
-                i++;      
+                ++i;
         }
     }
 }
diff --git a/sc/source/filter/excel/xepivot.cxx 
b/sc/source/filter/excel/xepivot.cxx
index c7b3d18..84d3c15 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -1131,7 +1131,7 @@ void XclExpPTField::SetPropertiesFromDim( const 
ScDPSaveDimension& rSaveDim )
 
     // item properties
     const ScDPSaveDimension::MemberList &rMembers = rSaveDim.GetMembers();
-    for (ScDPSaveDimension::MemberList::const_iterator i=rMembers.begin(); i 
!= rMembers.end() ; i++)
+    for (ScDPSaveDimension::MemberList::const_iterator i=rMembers.begin(); i 
!= rMembers.end() ; ++i)
         if( XclExpPTItem* pItem = GetItemAcc( (*i)->GetName() ) )
             pItem->SetPropertiesFromMember( **i );
 }
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx 
b/sc/source/filter/xml/XMLExportDataPilot.cxx
index 6cb026c..f6d3d05 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -479,7 +479,7 @@ void ScXMLExportDataPilot::WriteMembers(ScDPSaveDimension* 
pDim)
     {
         SvXMLElementExport aElemDPMs(rExport, XML_NAMESPACE_TABLE, 
XML_DATA_PILOT_MEMBERS, sal_True, sal_True);
         rExport.CheckAttrList();
-        for (ScDPSaveDimension::MemberList::const_iterator i=rMembers.begin(); 
i != rMembers.end() ; i++)
+        for (ScDPSaveDimension::MemberList::const_iterator i=rMembers.begin(); 
i != rMembers.end() ; ++i)
         {
             rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, 
rtl::OUString((*i)->GetName()));
 
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 2666bcc..f66832b 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2263,7 +2263,7 @@ Window *  ScModule::Find1RefWindow( USHORT nSlotId, 
Window *pWndAncestor )
 
     while( Window *pParent = pWndAncestor->GetParent() ) pWndAncestor = 
pParent;
 
-    for( std::list<Window*>::iterator i = rlRefWindow.begin(); 
i!=rlRefWindow.end(); i++ )
+    for( std::list<Window*>::iterator i = rlRefWindow.begin(); 
i!=rlRefWindow.end(); ++i )
         if ( pWndAncestor->IsWindowOrChild( *i, (*i)->IsSystemWindow() ) )
             return *i;
 
@@ -2278,8 +2278,8 @@ Window *  ScModule::Find1RefWindow( Window *pWndAncestor )
     while( Window *pParent = pWndAncestor->GetParent() ) pWndAncestor = 
pParent;
 
     for( std::map<USHORT, std::list<Window*> >::iterator i = 
m_mapRefWindow.begin();
-        i!=m_mapRefWindow.end(); i++ )
-        for( std::list<Window*>::iterator j = i->second.begin(); 
j!=i->second.end(); j++ )
+        i!=m_mapRefWindow.end(); ++i )
+        for( std::list<Window*>::iterator j = i->second.begin(); 
j!=i->second.end(); ++j )
             if ( pWndAncestor->IsWindowOrChild( *j, (*j)->IsSystemWindow() ) )
                 return *j;
 
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index b42987c..be4cca0 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -570,7 +570,7 @@ void ScTPValidationValue::TidyListBoxes()
 
         if ( pWnd )
         {
-            for ( std::list<Window*>::iterator i = alstOrder.begin(); 
i!=alstOrder.end(); i++ )
+            for ( std::list<Window*>::iterator i = alstOrder.begin(); 
i!=alstOrder.end(); ++i )
             {
                 Window *pParent = (*i)->GetParent();
                 (*i)->SetParent( pWnd );
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx 
b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 4ac66f5..1606d8a 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -132,7 +132,7 @@ void ScConflictsListHelper::Transform_Impl( 
ScChangeActionList& rActionList, ScC
         if ( aItrMap != pMergeMap->end() )
         {
             *aItr = aItrMap->second;
-            aItr++;
+            ++aItr;
         }
         else
         {
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 0bbb068..54fc721 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1256,7 +1256,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, 
const uno::Any& aSelec
                 //  external link, use as-is
                 pPDFData->SetLinkURL( aIter->nLinkId, aBookmark );
             }
-            aIter++;
+            ++aIter;
         }
         rBookmarks.clear();
     }
commit 9cde7473cc64edd6d4b8fcbc251808dc9baaf265
Author: Maryline <maryl...@maryline.(none)>
Date:   Sun Dec 19 19:11:42 2010 +0100

    callcatcher ScGridWindow::DrawComboButton

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 4bd6ced..9c37369 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -265,19 +265,10 @@ private:
     void                       DrawMarkDropObj( SdrObject* pObj );
     SdrObject*         GetEditObject();
     BOOL                       IsMyModel(SdrEditView* pSdrView);
-    //void                     DrawStartTimer();
 
     void                       DrawRedraw( ScOutputData& rOutputData, 
ScUpdateMode eMode, ULONG nLayer );
     void            DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* 
pContentDev );
-    //BOOL                     DrawBeforeScroll();
     void                       DrawAfterScroll(/*BOOL bVal*/);
-    //void                     DrawMarks();
-    //BOOL                     NeedDrawMarks();
-    void                       DrawComboButton( const Point&   rCellPos,
-                                     long                      nCellSizeX,
-                                     long                      nCellSizeY,
-                                     BOOL           bArrowState,
-                                     BOOL                      bBtnIn  = FALSE 
);
     Rectangle          GetListValButtonRect( const ScAddress& rButtonPos );
 
     void            DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW 
nY2, OutputDevice* pContentDev );
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 0253659..2cf4dbb 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1365,41 +1365,6 @@ BOOL ScGridWindow::IsAutoFilterActive( SCCOL nCol, SCROW 
nRow, SCTAB nTab )
     return ( bSimpleQuery && bColumnFound );
 }
 
-void ScGridWindow::DrawComboButton( const Point&       rCellPos,
-                                    long                       nCellSizeX,
-                                    long                       nCellSizeY,
-                                    BOOL            bArrowState,
-                                    BOOL                       bBtnIn )
-{
-    Point      aScrPos  = rCellPos;
-    Size       aBtnSize = aComboButton.GetSizePixel();
-
-    if ( nCellSizeX < aBtnSize.Width() || nCellSizeY < aBtnSize.Height() )
-    {
-        if ( nCellSizeX < aBtnSize.Width() )
-            aBtnSize.Width() = nCellSizeX;
-
-        if ( nCellSizeY < aBtnSize.Height() )
-            aBtnSize.Height() = nCellSizeY;
-
-        aComboButton.SetSizePixel( aBtnSize );
-    }
-
-    BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( 
pViewData->GetTabNo() );
-
-    if ( bLayoutRTL )
-        aScrPos.X() -= nCellSizeX - 1;
-    else
-        aScrPos.X() += nCellSizeX - aBtnSize.Width();
-    aScrPos.Y() += nCellSizeY - aBtnSize.Height();
-
-    aComboButton.SetPosPixel( aScrPos );
-
-    HideCursor();
-    aComboButton.Draw( bArrowState, bBtnIn );
-    ShowCursor();
-}
-
 void ScGridWindow::InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
                                     BOOL bTestMerge, BOOL bRepeat )
 {
commit 01d4b0036b6329384d22dbc711a077f179872ec1
Author: Maryline <maryl...@maryline.(none)>
Date:   Sun Dec 19 19:07:49 2010 +0100

    callcatchers ScFlatBoolRowSegments

diff --git a/sc/inc/segmenttree.hxx b/sc/inc/segmenttree.hxx
index 6bf0f68..88d9c1f 100644
--- a/sc/inc/segmenttree.hxx
+++ b/sc/inc/segmenttree.hxx
@@ -84,9 +84,6 @@ public:
 
     SCROW findLastNotOf(bool bValue) const;
 
-    void enableTreeSearch(bool bEnable);
-    void setInsertFromBack(bool bInsertFromBack);
-
 private:
     ::std::auto_ptr<ScFlatBoolSegmentsImpl> mpImpl;
 };
diff --git a/sc/source/core/data/segmenttree.cxx 
b/sc/source/core/data/segmenttree.cxx
index ac7b28d..678363c 100644
--- a/sc/source/core/data/segmenttree.cxx
+++ b/sc/source/core/data/segmenttree.cxx
@@ -404,16 +404,6 @@ SCROW ScFlatBoolRowSegments::findLastNotOf(bool bValue) 
const
     return static_cast<SCROW>(mpImpl->findLastNotOf(bValue));
 }
 
-void ScFlatBoolRowSegments::enableTreeSearch(bool bEnable)
-{
-    mpImpl->enableTreeSearch(bEnable);
-}
-
-void ScFlatBoolRowSegments::setInsertFromBack(bool bInsertFromBack)
-{
-    mpImpl->setInsertFromBack(bInsertFromBack);
-}
-
 // ============================================================================
 
 ScFlatBoolColSegments::ScFlatBoolColSegments() :
commit edb6e363e20ae06060c9d7dd7076adf200e0a8df
Author: Maryline <maryl...@maryline.(none)>
Date:   Sun Dec 19 18:38:23 2010 +0100

    2 callcatchers

diff --git a/sc/inc/segmenttree.hxx b/sc/inc/segmenttree.hxx
index f3f202a..6bf0f68 100644
--- a/sc/inc/segmenttree.hxx
+++ b/sc/inc/segmenttree.hxx
@@ -108,12 +108,10 @@ public:
 
     void setTrue(SCCOL nCol1, SCCOL nCol2);
     void setFalse(SCCOL nCol1, SCCOL nCol2);
-    bool getValue(SCCOL nCol);
     bool getRangeData(SCCOL nCol, RangeData& rData);
     void removeSegment(SCCOL nCol1, SCCOL nCol2);
     void insertSegment(SCCOL nCol, SCCOL nSize, bool bSkipStartBoundary);
 
-    void enableTreeSearch(bool bEnable);
     void setInsertFromBack(bool bInsertFromBack);
 
 private:
diff --git a/sc/source/core/data/segmenttree.cxx 
b/sc/source/core/data/segmenttree.cxx
index b24ba26..ac7b28d 100644
--- a/sc/source/core/data/segmenttree.cxx
+++ b/sc/source/core/data/segmenttree.cxx
@@ -440,11 +440,6 @@ void ScFlatBoolColSegments::setFalse(SCCOL nCol1, SCCOL 
nCol2)
     mpImpl->setFalse(static_cast<SCCOLROW>(nCol1), 
static_cast<SCCOLROW>(nCol2));
 }
 
-bool ScFlatBoolColSegments::getValue(SCCOL nCol)
-{
-    return mpImpl->getValue(static_cast<SCCOLROW>(nCol));
-}
-
 bool ScFlatBoolColSegments::getRangeData(SCCOL nCol, RangeData& rData)
 {
     ScFlatBoolSegmentsImpl::RangeData aData;
@@ -467,11 +462,6 @@ void ScFlatBoolColSegments::insertSegment(SCCOL nCol, 
SCCOL nSize, bool bSkipSta
     mpImpl->insertSegment(static_cast<SCCOLROW>(nCol), 
static_cast<SCCOLROW>(nSize), bSkipStartBoundary);
 }
 
-void ScFlatBoolColSegments::enableTreeSearch(bool bEnable)
-{
-    mpImpl->enableTreeSearch(bEnable);
-}
-
 void ScFlatBoolColSegments::setInsertFromBack(bool bInsertFromBack)
 {
     mpImpl->setInsertFromBack(bInsertFromBack);
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to