[Libreoffice-commits] .: 6 commits - binfilter/bf_sc binfilter/bf_sw lotuswordpro/source writerfilter/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Dec 16 12:23:57 PST 2010


 binfilter/bf_sc/source/core/data/sc_column.cxx    |   15 +--
 binfilter/bf_sw/source/core/layout/sw_dbg_lay.cxx |   86 ----------------------
 binfilter/bf_sw/source/core/text/redlnitr.hxx     |    1 
 binfilter/bf_sw/source/core/text/sw_porlay.cxx    |    3 
 lotuswordpro/source/filter/lwpfont.cxx            |   19 ++--
 lotuswordpro/source/filter/lwpfont.hxx            |    5 -
 writerfilter/source/ooxml/OOXMLFactory.cxx        |    2 
 7 files changed, 22 insertions(+), 109 deletions(-)

New commits:
commit 33c50090ccb8dbb551967d433a35370272a8fa8e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 16 11:59:04 2010 +0000

    cppcheck: unused methods

diff --git a/lotuswordpro/source/filter/lwpfont.cxx b/lotuswordpro/source/filter/lwpfont.cxx
index 38966cf..5677c75 100644
--- a/lotuswordpro/source/filter/lwpfont.cxx
+++ b/lotuswordpro/source/filter/lwpfont.cxx
@@ -355,15 +355,16 @@ BOOL LwpFontNameEntry::IsBackgroundColorOverridden()
     return (0 != (m_nOverrideBits & BKCOLOR));
 }
 
-BOOL LwpFontNameEntry::IsTightnessOverridden()
-{
-    return (0 != (m_nOverrideBits & TIGHTNESS));
-}
-
-BOOL LwpFontNameEntry::IsAnythingOverridden()
-{
-    return (0 != (m_nOverrideBits & ALL_BITS));
-}
+//TODO
+//BOOL LwpFontNameEntry::IsTightnessOverridden()
+//{
+//    return (0 != (m_nOverrideBits & TIGHTNESS));
+//}
+
+//BOOL LwpFontNameEntry::IsAnythingOverridden()
+//{
+//    return (0 != (m_nOverrideBits & ALL_BITS));
+//}
 
 
 LwpFontNameManager::LwpFontNameManager()
diff --git a/lotuswordpro/source/filter/lwpfont.hxx b/lotuswordpro/source/filter/lwpfont.hxx
index b790b6c..1ee71fb 100644
--- a/lotuswordpro/source/filter/lwpfont.hxx
+++ b/lotuswordpro/source/filter/lwpfont.hxx
@@ -149,8 +149,9 @@ private:
     inline BOOL IsPointSizeOverridden();
     inline BOOL IsColorOverridden();
     inline BOOL IsBackgroundColorOverridden();
-    inline BOOL IsTightnessOverridden();
-    inline BOOL IsAnythingOverridden();
+//TODO
+//    inline BOOL IsTightnessOverridden();
+//    inline BOOL IsAnythingOverridden();
 };
 
 class LwpFontNameManager
commit 37e13521eb00f1c103540c15a8456e7c430e78cb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 16 11:53:51 2010 +0000

    drop some warnings

diff --git a/binfilter/bf_sc/source/core/data/sc_column.cxx b/binfilter/bf_sc/source/core/data/sc_column.cxx
index c692165..63e4ed3 100644
--- a/binfilter/bf_sc/source/core/data/sc_column.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_column.cxx
@@ -73,8 +73,8 @@ namespace binfilter {
 /*N*/ 	nCount( 0 ),
 /*N*/ 	nLimit( 0 ),
 /*N*/ 	pItems( NULL ),
-/*N*/ 	pDocument( NULL ),
-/*N*/ 	pAttrArray( NULL )
+/*N*/ 	pAttrArray( NULL ),
+/*N*/ 	pDocument( NULL )
 /*N*/ {
 /*N*/ }
 
@@ -813,7 +813,7 @@ namespace binfilter {
 /*N*/ 	{
 /*N*/ 		USHORT i;
 /*N*/ 		USHORT nBlockCount = 0;
-/*N*/ 		USHORT nStartIndex, nEndIndex;
+/*N*/ 		USHORT nStartIndex(0), nEndIndex(0);
 /*N*/ 		for (i = 0; i < nCount; i++)
 /*N*/ 			if ((pItems[i].nRow >= nRow1) && (pItems[i].nRow <= nRow2))
 /*N*/ 			{
@@ -930,7 +930,7 @@ namespace binfilter {
 /*N*/ 
 /*N*/ 	if (pItems)
 /*N*/ 	{
-/*N*/ 		USHORT nStartPos;
+/*N*/ 		USHORT nStartPos(0);
 /*N*/ 		USHORT nMoveCount=0;
 /*N*/ 		USHORT i;
 /*N*/ 		for (i=0; i < nCount; i++)
@@ -973,8 +973,8 @@ namespace binfilter {
 
 
 /*N*/ void ScColumn::UpdateReference( UpdateRefMode eUpdateRefMode, USHORT nCol1, USHORT nRow1, USHORT nTab1,
-/*N*/ 			 USHORT nCol2, USHORT nRow2, USHORT nTab2, short nDx, short nDy, short nDz,
-/*N*/ 			 ScDocument* pUndoDoc )
+/*N*/ 			 USHORT nCol2, USHORT nRow2, USHORT nTab2, short /*nDx*/, short /*nDy*/, short /*nDz*/,
+/*N*/ 			 ScDocument* /*pUndoDoc*/ )
 /*N*/ {
 /*N*/ 	if (pItems)
 /*N*/ 	{
@@ -1002,7 +1002,7 @@ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ 			USHORT nIndex;
 /*?*/                     ScBaseCell* pCell = pItems[i].pCell;
 /*?*/                     if( pCell->GetCellType() == CELLTYPE_FORMULA)
 /*?*/                     {
-/*?*/                         DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ((ScFormulaCell*)pCell)->UpdateReference( eUpdateRefMode, aRange, nDx, nDy, nDz, pUndoDoc );
+/*?*/                         DBG_BF_ASSERT(0, "STRIP");
 /*?*/                     }
 /*?*/                 }
 /*?*/             }
commit 156cc7849bb0724718ddd83a4cdd10001e4b6883
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 16 11:50:09 2010 +0000

    cppcheck: unused variable

diff --git a/binfilter/bf_sc/source/core/data/sc_column.cxx b/binfilter/bf_sc/source/core/data/sc_column.cxx
index b60a2a9..c692165 100644
--- a/binfilter/bf_sc/source/core/data/sc_column.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_column.cxx
@@ -829,7 +829,6 @@ namespace binfilter {
 /*N*/ 			ScAddress aAdr( rColumn.nCol, 0, rColumn.nTab );
 /*N*/ 			for (i = nStartIndex; i <= nEndIndex; i++)
 /*N*/ 			{
-/*N*/ 				ScBaseCell* pOld = pItems[i].pCell;
 /*N*/ 				aAdr.SetRow( pItems[i].nRow );
 /*N*/ 				ScBaseCell* pNew = NULL;
 /*N*/ 				if (bAsLink)
commit b93538aa9b860c1594da0513245f6acf66b5979d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 16 11:49:09 2010 +0000

    cppcheck: prefer prefix variant

diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index aa7a816..cfbe649 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -146,7 +146,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
         AttributeToResourceMap::const_iterator aIt;
         AttributeToResourceMap::const_iterator aEndIt = pMap->end();
         
-        for (aIt = pMap->begin(); aIt != aEndIt; aIt++)
+        for (aIt = pMap->begin(); aIt != aEndIt; ++aIt)
         {
             Id nId = (*pTokenToIdMap)[aIt->first];
 #ifdef DEBUG_ATTRIBUTES
commit ea193ce17cc862d7eab8e08353d3e0e53e06f7ca
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 16 11:33:39 2010 +0000

    collapse conditional

diff --git a/binfilter/bf_sw/source/core/text/sw_porlay.cxx b/binfilter/bf_sw/source/core/text/sw_porlay.cxx
index d58f98a..b0e8d3b 100644
--- a/binfilter/bf_sw/source/core/text/sw_porlay.cxx
+++ b/binfilter/bf_sw/source/core/text/sw_porlay.cxx
@@ -402,7 +402,7 @@ SwLinePortion *SwLineLayout::Insert( SwLinePortion *pIns )
 /*N*/ 		Width( nLineWidth );
 /*N*/ 	ASSERT( nLineWidth >= Width(), "SwLineLayout::CalcLine: line is bursting" );
 /*N*/ 	SetDummy( bTmpDummy );
-/*N*/ 	SetRedline( rLine.GetRedln() && FALSE );
+/*N*/ 	SetRedline( sal_False );
 /*N*/ }
 
 /*************************************************************************
commit 74aabcda9ef772795a5f9e40f3605163c46cb76c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Dec 16 11:31:35 2010 +0000

    CheckLine is always FALSE

diff --git a/binfilter/bf_sw/source/core/layout/sw_dbg_lay.cxx b/binfilter/bf_sw/source/core/layout/sw_dbg_lay.cxx
index 0dc6153..4fcaa0c 100644
--- a/binfilter/bf_sw/source/core/layout/sw_dbg_lay.cxx
+++ b/binfilter/bf_sw/source/core/layout/sw_dbg_lay.cxx
@@ -188,92 +188,6 @@ namespace binfilter {
 /*N*/ 	 nRecord = 0;
 /*N*/ }
 
-// Creates a more or less detailed snapshot of the layout structur
-
-
-
-
-
-
-/* -----------------11.01.99 11:03-------------------
- * SwImplProtocol::CheckLine analysiert eine Zeile der INI-Datei
- * --------------------------------------------------*/
-
-
-/* -----------------11.01.99 11:17-------------------
- * SwImplProtocol::FileInit() liest die Datei "dbg_lay.ini"
- * im aktuellen Verzeichnis und wertet sie aus.
- * --------------------------------------------------*/
-
-/* -----------------11.01.99 11:20-------------------
- * lcl_Start sorgt fuer Einrueckung um zwei Blanks bei ACT_START
- * und nimmt diese bei ACT_END wieder zurueck.
- * --------------------------------------------------*/
-
-/* -----------------11.01.99 11:21-------------------
- * lcl_Flags gibt das ValidSize-, ValidPos- und ValidPrtArea-Flag ("Sz","Ps","PA")
- * des Frames aus, "+" fuer valid, "-" fuer invalid.
- * --------------------------------------------------*/
-
-
-/* -----------------11.01.99 11:23-------------------
- * lcl_FrameType gibt den Typ des Frames in Klartext aus.
- * --------------------------------------------------*/
-
-
-/* -----------------11.01.99 11:25-------------------
- * SwImplProtocol::Record(..) wird nur gerufen, wenn das PROTOCOL-Makro
- * feststellt, dass die Funktion aufgezeichnet werden soll ( SwProtocol::nRecord ).
- * In dieser Methode werden noch die beiden weiteren Einschraenkungen ueberprueft,
- * ob die FrmId und der FrameType zu den aufzuzeichnenden gehoeren.
- * --------------------------------------------------*/
-
-
-/* -----------------13.01.99 11:39-------------------
- * SwImplProtocol::SectFunc(...) wird von SwImplProtocol::_Record(..) gerufen,
- * hier werden die Ausgaben rund um SectionFrms abgehandelt.
- * --------------------------------------------------*/
-
-
-/* -----------------11.01.99 11:31-------------------
- * SwImplProtocol::InsertFrm(..) nimmt eine neue FrmId zum Aufzeichnen auf,
- * wenn pFrmIds==NULL, werden alle aufgezeichnet, sobald durch InsertFrm(..)
- * pFrmIds angelegt wird, werden nur noch die enthaltenen FrmIds aufgezeichnet.
- * --------------------------------------------------*/
-
-
-/* -----------------11.01.99 11:52-------------------
- * SwImplProtocol::DeleteFrm(..) entfernt eine FrmId aus dem pFrmIds-Array,
- * so dass diese Frame nicht mehr aufgezeichnet wird.
- * --------------------------------------------------*/
-
-/*-----------------20.9.2001 10:29------------------
- * SwProtocol::SnapShot(..)
- * creates a snapshot of the given frame and its content.
- * --------------------------------------------------*/
-
-/* -----------------11.01.99 11:53-------------------
- * SwEnterLeave::Ctor(..) wird vom eigentlichen (inline-)Kontruktor gerufen,
- * wenn die Funktion aufgezeichnet werden soll.
- * Die Aufgabe ist es abhaengig von der Funktion das richtige SwImplEnterLeave-Objekt
- * zu erzeugen, alles weitere geschieht dann in dessen Ctor/Dtor.
- * --------------------------------------------------*/
-
-/* -----------------11.01.99 11:56-------------------
- * SwEnterLeave::Dtor() ruft lediglich den Destruktor des SwImplEnterLeave-Objekts,
- * ist nur deshalb nicht inline, damit die SwImplEnterLeave-Definition nicht
- * im dbg_lay.hxx zu stehen braucht.
- * --------------------------------------------------*/
-
-
-
-
-
-
-
-
-
-
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sw/source/core/text/redlnitr.hxx b/binfilter/bf_sw/source/core/text/redlnitr.hxx
index e9848c8..4a96bc5 100644
--- a/binfilter/bf_sw/source/core/text/redlnitr.hxx
+++ b/binfilter/bf_sw/source/core/text/redlnitr.hxx
@@ -77,7 +77,6 @@ SwRedlineItr( const SwTxtNode& rTxtNd, SwFont& rFnt, SwAttrHandler& rAH,//STRIP0
 xub_StrLen nRedlPos, sal_Bool bShw, const SvUShorts *pArr = 0,//STRIP001         xub_StrLen nRedlPos, sal_Bool bShw, const SvUShorts *pArr = 0,
 xub_StrLen nStart = STRING_LEN ){DBG_BF_ASSERT(0, "STRIP");} ;//STRIP001        xub_StrLen nStart = STRING_LEN );
     inline sal_Bool IsOn() const { return bOn || ( pExt && pExt->IsOn() ); }
-            sal_Bool CheckLine( xub_StrLen nChkStart, xub_StrLen nChkEnd ){DBG_BF_ASSERT(0, "STRIP"); return FALSE;} //STRIP001 	sal_Bool CheckLine( xub_StrLen nChkStart, xub_StrLen nChkEnd );
     inline sal_Bool ExtOn() { if( pExt ) return pExt->IsOn(); return sal_False; }
 };
 
diff --git a/binfilter/bf_sw/source/core/text/sw_porlay.cxx b/binfilter/bf_sw/source/core/text/sw_porlay.cxx
index 5306c31..d58f98a 100644
--- a/binfilter/bf_sw/source/core/text/sw_porlay.cxx
+++ b/binfilter/bf_sw/source/core/text/sw_porlay.cxx
@@ -402,8 +402,7 @@ SwLinePortion *SwLineLayout::Insert( SwLinePortion *pIns )
 /*N*/ 		Width( nLineWidth );
 /*N*/ 	ASSERT( nLineWidth >= Width(), "SwLineLayout::CalcLine: line is bursting" );
 /*N*/ 	SetDummy( bTmpDummy );
-/*N*/ 	SetRedline( rLine.GetRedln() &&
-/*N*/ 		rLine.GetRedln()->CheckLine( rLine.GetStart(), rLine.GetEnd() ) );
+/*N*/ 	SetRedline( rLine.GetRedln() && FALSE );
 /*N*/ }
 
 /*************************************************************************


More information about the Libreoffice-commits mailing list