[Libreoffice] [PATCH] partial easy hack - removal of non-compiled / dead code

Topround topround at gmail.com
Thu Jan 13 19:44:39 PST 2011


Greetings all,

This is my first attempt to contribute code to LibreOffice, so hope I
did it right!  :)  If I did something wrong please help me out!

This is a first pass attempt at cleaning up non-compiled/commented out
code in sc.  I basically covered sc/inc/* and sc/source/core/data/*

There is much more to cover still, but I wanted to get this out there
before the diff file got too big.  If this is well received I will
continue with the other directories in sc.  I did compile the code and
do some sanity testing with calc just to make sure I didn't break
anything obvious, but I couldn't figure out how to run any kind of
built in test either (asked around in #libreoffice but I think most
people were away.)

Once again, any tips would be appreciated.

BTW, I'm using the handle Zathuras in #libreoffice when I'm in there.

patch follows (hope there isnt a msg size limit):
---------------------------------------------------

diff --git a/sc/inc/addincfg.hxx b/sc/inc/addincfg.hxx
old mode 100644
new mode 100755
index 30bc58e..4f5c8e0
--- a/sc/inc/addincfg.hxx
+++ b/sc/inc/addincfg.hxx
@@ -46,9 +46,6 @@ public:
                             { return ConfigItem::GetProperties( rNames ); }

     using ConfigItem::GetNodeNames;
-
-//	com::sun::star::uno::Sequence< rtl::OUString >
GetNodeNames(rtl::OUString& rNode)
-//							{ return ConfigItem::GetNodeNames( rNode ); }
 };


diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
old mode 100644
new mode 100755
index 311a6ac..2e160c6
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -85,7 +85,6 @@ const SCSIZE   SCSIZE_MAX   =
::std::numeric_limits<SCSIZE>::max();

 // The maximum values. Defines are needed for preprocessor checks, for example
 // in bcaslot.cxx, otherwise type safe constants are preferred.
-//#define MAXROWCOUNT_DEFINE 65536
 #define MAXROWCOUNT_DEFINE 1048576
 #define MAXCOLCOUNT_DEFINE 1024

diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
old mode 100644
new mode 100755
index 9dbfd72..69ba185
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -656,9 +656,6 @@ public:
                                     const formula::FormulaGrammar::Grammar )
                                 throw(::com::sun::star::uno::RuntimeException);

-    // XCellRange is base class of XSheetCellRange and XSheetOperation
-//	operator XCellRangeRef() const	{ return (XSheetCellRange*)this; }
-
                             // XCellRangeAddressable
     virtual ::com::sun::star::table::CellRangeAddress SAL_CALL
getRangeAddress()
                                 throw(::com::sun::star::uno::RuntimeException);
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
old mode 100644
new mode 100755
index 8455d9c..cf09f9c
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -110,9 +110,6 @@ public:
     virtual ::com::sun::star::uno::Reference<
::com::sun::star::sheet::XRangeSelection > SAL_CALL
getRangeSelection()
         throw (::com::sun::star::uno::RuntimeException);

-/*    virtual ::com::sun::star::uno::Reference<
::com::sun::star::util::XNumberFormatsSupplier > SAL_CALL
getNumberFormatsSupplier()
-        throw (::com::sun::star::uno::RuntimeException);*/
-
     // XRangeXMLConversion ---------------------------------------------------

     virtual ::rtl::OUString SAL_CALL convertRangeToXML( const
::rtl::OUString& sRangeRepresentation )
@@ -427,16 +424,6 @@ public:
         getSupportedServiceNames() throw(
                 ::com::sun::star::uno::RuntimeException);

-    // XUnoTunnel ------------------------------------------------------------
-
-// 	virtual sal_Int64 SAL_CALL getSomething( const
::com::sun::star::uno::Sequence<
-// 									sal_Int8 >& aIdentifier )
-// 								throw(::com::sun::star::uno::RuntimeException);
-
-// 	static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
-// 	static ScChart2DataSequence* getImplementation( const
com::sun::star::uno::Reference<
-// 									com::sun::star::uno::XInterface> xObj );
-
 private:
     void setDataChangedHint(bool b);

@@ -664,16 +651,6 @@ public:
         getSupportedServiceNames() throw(
                 ::com::sun::star::uno::RuntimeException);

-    // XUnoTunnel ------------------------------------------------------------
-
-// 	virtual sal_Int64 SAL_CALL getSomething( const
::com::sun::star::uno::Sequence<
-// 									sal_Int8 >& aIdentifier )
-// 								throw(::com::sun::star::uno::RuntimeException);
-
-// 	static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
-// 	static ScChart2DataSequence* getImplementation( const
com::sun::star::uno::Reference<
-// 									com::sun::star::uno::XInterface> xObj );
-
     // Implementation --------------------------------------------------------

     ScRangeListRef GetRangeList() { return m_xRanges; }
diff --git a/sc/inc/datauno.hxx b/sc/inc/datauno.hxx
old mode 100644
new mode 100755
index 22b2644..5f7428f
--- a/sc/inc/datauno.hxx
+++ b/sc/inc/datauno.hxx
@@ -233,7 +233,6 @@ public:

                             // external access:
     void					SetParam( const ScSubTotalParam& rNew );
-//	const ScSubTotalParam&	GetParam() const	{ return aStoredParam; }
 };


@@ -532,8 +531,6 @@ public:
                             getSubTotalDescriptor()
throw(::com::sun::star::uno::RuntimeException);
     virtual ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue > SAL_CALL
                             getImportDescriptor()
throw(::com::sun::star::uno::RuntimeException);
-// implemented for the XRefreshable Interface
-//    virtual void SAL_CALL	refresh()
throw(::com::sun::star::uno::RuntimeException);

                             // XRefreshable
     virtual void SAL_CALL	refresh()
throw(::com::sun::star::uno::RuntimeException);
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
old mode 100644
new mode 100755
index eb2a812..82a2ee6
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -147,8 +147,6 @@ public:
     virtual void SAL_CALL	acquire() throw();
     virtual void SAL_CALL	release() throw();

-//?	virtual UString			getClassName(void);
-
     virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );

                             // XSpreadsheetDocument
@@ -212,8 +210,6 @@ public:
     virtual ::com::sun::star::uno::Reference<
::com::sun::star::drawing::XDrawPages > SAL_CALL
                             getDrawPages()
throw(::com::sun::star::uno::RuntimeException);

-    //!	XPrintable??
-
                             //	XGoalSeek
     virtual ::com::sun::star::sheet::GoalResult SAL_CALL seekGoal(
                                 const
::com::sun::star::table::CellAddress& aFormulaPosition,
diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx
old mode 100644
new mode 100755
index 892ecf4..3d60162
--- a/sc/inc/dpglobal.hxx
+++ b/sc/inc/dpglobal.hxx
@@ -121,9 +121,6 @@ private:
     String	aString;
     double	fValue;
     BYTE	mbFlag;
-    //bool	bHasValue: 1 ;
-    //bool	bHasData: 1;
-    //bool	bErr: 1;

     friend class ScDPTableDataCache;
 public:
@@ -133,7 +130,6 @@ public:
     ScDPItemData( ScDocument* pDoc, SCROW nRow, USHORT nCol, USHORT nDocTab );

     void		SetString( const String& rS ) { aString = rS; mbFlag &=
~(MK_VAL|MK_DATE); nNumFormat = 0; mbFlag |= MK_DATA; }
-//	void		SetValue ( double value , ULONG nNumFormat = 0 ) { bHasValue
= TRUE; nNumFormat = 0;bHasData = TRUE; bDate = FALSE; fValue = value
;}
     bool        IsCaseInsEqual( const ScDPItemData& r ) const;

     size_t		Hash() const;
diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx
old mode 100644
new mode 100755
index cfed4c7..b423839
--- a/sc/inc/dptabres.hxx
+++ b/sc/inc/dptabres.hxx
@@ -389,7 +389,6 @@ public:
     BOOL				HasHiddenDetails() const;
     BOOL                IsSubTotalInTitle(long nMeasure) const;

-//	BOOL				SubTotalEnabled() const;
     long				GetSubTotalCount( long* pUserSubStart = NULL ) const;

     BOOL              IsNamedItem( SCROW nIndex ) const;
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
old mode 100644
new mode 100755
index 1486418..4ca3050
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -768,7 +768,6 @@ public:

     String					GetNameStr() const;
     void					FillItemData( ScDPItemData& rData ) const;
-    //  const ScDPItemData&  GetItemData() const{ return maData; }
     const ScDPItemData&  GetItemData() const;
     inline SCROW               GetItemDataId() const { return mnDataId; }
     BOOL                           IsNamedItem( SCROW    nIndex  ) const;
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
old mode 100644
new mode 100755
index 0273d30..19b2406
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -176,8 +176,6 @@ const SCSIZE PIVOT_MAXPAGEFIELD = 10;
                                     // FILTERED immer zusammen mit HIDDEN
                                     // FILTERED und MANUALSIZE nur
fuer Zeilen moeglich
 const BYTE   CR_HIDDEN      = 1;
-//const BYTE CR_MARKED      = 2;
-//const BYTE CR_PAGEBREAK   = 4;
 const BYTE   CR_MANUALBREAK = 8;
 const BYTE   CR_FILTERED    = 16;
 const BYTE   CR_MANUALSIZE  = 32;
diff --git a/sc/inc/optutil.hxx b/sc/inc/optutil.hxx
old mode 100644
new mode 100755
index cfc7d4e..db8cfdf
--- a/sc/inc/optutil.hxx
+++ b/sc/inc/optutil.hxx
@@ -69,11 +69,6 @@ public:
     using ConfigItem::EnableNotification;
     using ConfigItem::GetNodeNames;

-//	sal_Bool EnableNotification(com::sun::star::uno::Sequence<
rtl::OUString >& rNames)
-//							{ return ConfigItem::EnableNotification( rNames ); }
-
-//	com::sun::star::uno::Sequence< rtl::OUString >
GetNodeNames(rtl::OUString& rNode)
-//							{ return ConfigItem::GetNodeNames( rNode ); }
 };

 #endif
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
old mode 100644
new mode 100755
index 179c4a5..313bb9f
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -260,7 +260,6 @@ SC_DLLPUBLIC	void					SetAppOptions	( const
ScAppOptions& rOpt );

     //	Referenzeingabe:
     //<!--Added by PengYunQuan for Validity Cell Range Picker
-    //void				SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame*
pViewFrm = NULL );
     SC_DLLPUBLIC void				SetRefDialog( USHORT nId, BOOL bVis,
SfxViewFrame* pViewFrm = NULL );
     //-->Added by PengYunQuan for Validity Cell Range Picker
     BOOL                IsModalMode(SfxObjectShell* pDocSh = NULL);
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
old mode 100644
new mode 100755
index 574ab1f..bd52f4b
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -818,8 +818,6 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow,
SCROW nEndRow, SfxItemPoolCac
             }
             else
             {
-//!!!!!!!!!!!!!!!!!! mit diesem Remove gibt es Abstuerze (Calc1 Import)
-//!				pDocument->GetPool()->Remove(*pNewPattern);
                 nStart = pData[nPos].nRow + 1;
                 ++nPos;
             }
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
old mode 100644
new mode 100755
index 6e11a8d..f690d00
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -77,7 +77,6 @@ TYPEINIT1(ScPageScaleToItem,    SfxPoolItem);

 BOOL ScHasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther )
 {
-//	  DBG_ASSERT( pThis || pOther, "LineAttr == 0" );

     if (!pThis)
         return FALSE;
@@ -1089,7 +1088,6 @@ int ScDoubleItem::operator==( const SfxPoolItem&
rItem ) const
     DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
     const ScDoubleItem& _rItem = (const ScDoubleItem&)rItem;
     return int(nValue == _rItem.nValue);
-        //int(nValue == ((const ScDoubleItem&)rItem).nValue);
 }

 //------------------------------------------------------------------------
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
old mode 100644
new mode 100755
index 36d50f8..59e88eb
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -106,15 +106,12 @@ static SCSIZE initSlotDistribution(
ScSlotDistribution & rSD, SCSIZE & rBSR )
     // Must be sorted by row1,row2!
     while (nRow2 <= MAXROWCOUNT)
     {
-        //fprintf( stderr, "r1,r2,slice,cum: %7zu, %7zu, %7zu,
%7zu\n", (size_t)nRow1, (size_t)nRow2, (size_t)nSlice,
(size_t)nSlots);
-        // {0,32k,128,0;32k,64k,256,0+256;64k,128k,512,0+256+128;128k,256k,1024,0+256+128+128;256k,512k,2048,...;512k,1M,4096,...}
         rSD.push_back( ScSlotData( nRow1, nRow2, nSlice, nSlots));
         nSlots += (nRow2 - nRow1) / nSlice;
         nRow1 = nRow2;
         nRow2 *= 2;
         nSlice *= 2;
     }
-    //fprintf( stderr, "Slices: %zu, slots per sheet: %zu, memory per
referenced sheet: %zu\n", (size_t) nSlots, (size_t) nSlots *
BCA_SLOTS_COL, (size_t) nSlots * BCA_SLOTS_COL * sizeof(void*));
     rBSR = nSlots;
     return nSlots;
 }
@@ -543,7 +540,6 @@ inline void ComputeNextSlot( SCSIZE & nOff, SCSIZE
& nBreak, ScBroadcastAreaSlot
 void ScBroadcastAreaSlotMachine::StartListeningArea( const ScRange& rRange,
         SvtListener* pListener )
 {
-    //fprintf( stderr, "StartListeningArea (c,r,t): %d, %d, %d, %d,
%d, %d\n", (int)rRange.aStart.Col(), (int)rRange.aStart.Row(),
(int)rRange.aStart.Tab(), (int)rRange.aEnd.Col(),
(int)rRange.aEnd.Row(), (int)rRange.aEnd.Tab());
     if ( rRange == BCA_LISTEN_ALWAYS  )
     {
         if ( !pBCAlways )
@@ -592,7 +588,6 @@ void
ScBroadcastAreaSlotMachine::StartListeningArea( const ScRange& rRange,
 void ScBroadcastAreaSlotMachine::EndListeningArea( const ScRange& rRange,
         SvtListener* pListener )
 {
-    //fprintf( stderr, "EndListeningArea (c,r,t): %d, %d, %d, %d, %d,
%d\n", (int)rRange.aStart.Col(), (int)rRange.aStart.Row(),
(int)rRange.aStart.Tab(), (int)rRange.aEnd.Col(),
(int)rRange.aEnd.Row(), (int)rRange.aEnd.Tab());
     if ( rRange == BCA_LISTEN_ALWAYS  )
     {
         DBG_ASSERT( pBCAlways,
"ScBroadcastAreaSlotMachine::EndListeningArea: BCA_LISTEN_ALWAYS but
none established");
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
old mode 100644
new mode 100755
index 77f585a..039e6de
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1390,8 +1390,6 @@ void ScColumn::CopyUpdated( const ScColumn&
rPosCol, ScColumn& rDestCol ) const
         }
     }

-    //	Dummy:
-    //	CopyToColumn( 0,MAXROW, IDF_FORMULA, false, rDestCol, NULL, false );
 }


diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
old mode 100644
new mode 100755
index 180cc31..dc85236
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1425,9 +1425,6 @@ void ScColumn::FindDataAreaPos(SCROW& rRow, long
nMovY) const

 bool ScColumn::HasDataAt(SCROW nRow) const
 {
-/*	SCSIZE nIndex;
-    return Search( nRow, nIndex );
-*/
         //	immer nur sichtbare interessant ?
         //!	dann HasVisibleDataAt raus

@@ -1575,11 +1572,7 @@ void ScColumn::EndListening( SvtListener& rLst,
SCROW nRow )
                     pCell->DeleteBroadcaster();
             }
         }
-//		else
-//			DBG_ERROR("ScColumn::EndListening - kein Broadcaster");
     }
-//	else
-//		DBG_ERROR("ScColumn::EndListening - keine Zelle");
 }

 void ScColumn::CompileDBFormula()
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
old mode 100644
new mode 100755
index 0ba6a58..bc1e577
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -439,7 +439,6 @@ BOOL ScValueIterator::GetFirst(double& rValue, USHORT& rErr)
     nRow = nStartRow;
     nTab = nStartTab;

-//	nColRow = 0;
     ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
     pCol->Search( nRow, nColRow );

@@ -450,14 +449,6 @@ BOOL ScValueIterator::GetFirst(double& rValue,
USHORT& rErr)
     return GetThis(rValue, rErr);
 }

-/*	ist inline:
-BOOL ScValueIterator::GetNext(double& rValue, USHORT& rErr)
-{
-    ++nRow;
-    return GetThis(rValue, rErr);
-}
-*/
-
 // ============================================================================

 ScDBQueryDataIterator::DataAccess::DataAccess(const
ScDBQueryDataIterator* pParent) :
@@ -625,7 +616,6 @@ bool
ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue)
             nRow = mpParam->nRow2 + 1; // Naechste Spalte
     }
 // statement unreachable
-//    return false;
 }

 bool ScDBQueryDataIterator::DataAccessInternal::getFirst(Value& rValue)
@@ -1060,7 +1050,6 @@ ScBaseCell* ScCellIterator::GetFirst()
     nCol = nStartCol;
     nRow = nStartRow;
     nTab = nStartTab;
-//	nColRow = 0;
     ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
     pCol->Search( nRow, nColRow );
     return GetThis();
@@ -1207,7 +1196,6 @@ ScBaseCell* ScQueryCellIterator::GetFirst()
     nRow = aParam.nRow1;
     if (aParam.bHasHeader)
         nRow++;
-//	nColRow = 0;
     ScColumn* pCol = &(pDoc->pTab[nTab])->aCol[nCol];
     pCol->Search( nRow, nColRow );
     return GetThis();
@@ -1888,8 +1876,6 @@ const ScPatternAttr*
ScHorizontalAttrIterator::GetNext( SCCOL& rCol1, SCCOL& rCo
         bRowEmpty = bEmpty;
         nCol = nStartCol;			// wieder links anfangen
     }
-
-//    return NULL;
 }

 //-------------------------------------------------------------------------------
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
old mode 100644
new mode 100755
index ec1d4e4..d2ff9bc
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -1024,7 +1024,6 @@ ULONG ScDocument::TransferTab( ScDocument*
pSrcDoc, SCTAB nSrcPos,
                 else
                 {
                     pSrcRangeNames[i] = NULL;
-                    //aSrcRangeMap.SetPair( i, 0, 0 );		// not
needed, defaulted
                 }
             }
             if ( bRangeNameReplace )
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
old mode 100644
new mode 100755
index b69ab56..445e415
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -259,10 +259,6 @@ void ScDocument::SetScenario( SCTAB nTab, BOOL bFlag )
 BOOL ScDocument::IsScenario( SCTAB nTab ) const
 {
     return ValidTab(nTab) && pTab[nTab] &&pTab[nTab]->IsScenario();
-    //if (ValidTab(nTab) && pTab[nTab])
-    //	return pTab[nTab]->IsScenario();
-
-    //return FALSE;
 }

 void ScDocument::SetScenarioData( SCTAB nTab, const String& rComment,
@@ -577,11 +573,6 @@ ScOutlineTable* ScDocument::GetOutlineTable(
SCTAB nTab, BOOL bCreate )
 BOOL ScDocument::SetOutlineTable( SCTAB nTab, const ScOutlineTable*
pNewOutline )
 {
     return VALIDTAB(nTab) && pTab[nTab] &&
pTab[nTab]->SetOutlineTable(pNewOutline);
-    //if (VALIDTAB(nTab))
-    //	if (pTab[nTab])
-    //		return pTab[nTab]->SetOutlineTable(pNewOutline);
-
-    //return FALSE;
 }

 void ScDocument::DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
@@ -594,10 +585,6 @@ void ScDocument::DoAutoOutline( SCCOL nStartCol,
SCROW nStartRow,
 BOOL ScDocument::TestRemoveSubTotals( SCTAB nTab, const
ScSubTotalParam& rParam )
 {
     return VALIDTAB(nTab) && pTab[nTab] &&
pTab[nTab]->TestRemoveSubTotals( rParam );
-    //if (VALIDTAB(nTab) && pTab[nTab] )
-    //	return pTab[nTab]->TestRemoveSubTotals( rParam );
-
-    //return FALSE;
 }

 void ScDocument::RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam )
@@ -609,11 +596,6 @@ void ScDocument::RemoveSubTotals( SCTAB nTab,
ScSubTotalParam& rParam )
 BOOL ScDocument::DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam )
 {
     return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->DoSubTotals( rParam );
-    //if (VALIDTAB(nTab))
-    //	if (pTab[nTab])
-    //		return pTab[nTab]->DoSubTotals( rParam );
-
-    //return FALSE;
 }

 BOOL ScDocument::HasSubTotalCells( const ScRange& rRange )
@@ -1297,22 +1279,12 @@ BOOL ScDocument::HasColHeader( SCCOL
nStartCol, SCROW nStartRow, SCCOL nEndCol,
                                     SCTAB nTab )
 {
     return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->HasColHeader(
nStartCol, nStartRow, nEndCol, nEndRow );
-    //if (VALIDTAB(nTab))
-    //	if (pTab[nTab])
-    //		return pTab[nTab]->HasColHeader( nStartCol, nStartRow,
nEndCol, nEndRow );
-
-    //return FALSE;
 }

 BOOL ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow,
                                     SCTAB nTab )
 {
     return VALIDTAB(nTab) && pTab[nTab] && pTab[nTab]->HasRowHeader(
nStartCol, nStartRow, nEndCol, nEndRow );
-    //if (VALIDTAB(nTab))
-    //	if (pTab[nTab])
-    //		return pTab[nTab]->HasRowHeader( nStartCol, nStartRow,
nEndCol, nEndRow );
-
-    //return FALSE;
 }

 void ScDocument::UpdateDynamicEndRow(ScDBData& rDBData) const
@@ -1423,10 +1395,6 @@ BOOL ScDocument::GetDataEntries( SCCOL nCol,
SCROW nRow, SCTAB nTab,
     }

     return ValidTab(nTab) && pTab[nTab] &&
pTab[nTab]->GetDataEntries( nCol, nRow, rStrings, bLimit );
-    //if (ValidTab(nTab) && pTab[nTab])
-    //	return pTab[nTab]->GetDataEntries( nCol, nRow, rStrings, bLimit );
-
-    //return FALSE;
 }

 //
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
old mode 100644
new mode 100755
index a3d98ef..60eaeb6
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -207,9 +207,6 @@ VirtualDevice* ScDocument::GetVirtualDevice_100th_mm()
 {
     if (!pVirtualDevice_100th_mm)
     {
-//		pVirtualDevice_100th_mm = new VirtualDevice;
-//		pVirtualDevice_100th_mm->SetMapMode( MAP_100TH_MM );
-
         pVirtualDevice_100th_mm = new VirtualDevice( 1 );
         pVirtualDevice_100th_mm->SetReferenceDevice(VirtualDevice::REFDEV_MODE_MSO1);
         MapMode aMapMode( pVirtualDevice_100th_mm->GetMapMode() );
@@ -457,9 +454,6 @@ BOOL ScDocument::IdleCalcTextWidth()			// TRUE =
demnaechst wieder versuchen
         return FALSE;
     bIdleDisabled = TRUE;

-// ULONG nMs = 0;
-// USHORT nIter = 0;
-
     const ULONG			nStart	 = Time::GetSystemTicks();
     OutputDevice*		pDev	 = NULL;
     MapMode				aOldMap;
@@ -480,8 +474,6 @@ BOOL ScDocument::IdleCalcTextWidth()			// TRUE =
demnaechst wieder versuchen
     if ( !ValidTab(nTab) || !pTab[nTab] )
         nTab = 0;

-//	DBG_ERROR( String("Start = ") + String(nTab) + String(',') +
String(nCol) + String(',') + String(nRow)  );
-
     //	SearchMask/Family muss gemerkt werden,
     //	damit z.B. der Organizer nicht durcheinanderkommt, wenn
zwischendurch eine
     //	Query-Box aufgemacht wird !!!
@@ -534,16 +526,11 @@ BOOL ScDocument::IdleCalcTextWidth()			// TRUE =
demnaechst wieder versuchen
                         bProgress = TRUE;
                     }

-//					DBG_ERROR( String("t,c,r = ") + String(nTab) + String(',') +
String(nCol) + String(',') + String(nRow)  );
-//					DBG_ERROR( String("nOldWidth = ") + String(pCell->GetTextWidth()) );
-
                     USHORT nNewWidth = (USHORT)GetNeededSize( nCol, nRow, nTab,
                                                               pDev,
nPPTX, nPPTY,

aZoomFract,aZoomFract, TRUE,
                                                               TRUE
);	// bTotalSize

-//					DBG_ERROR( String("nNewWidth = ") + String(nNewWidth) );
-
                     pCell->SetTextWidth( nNewWidth );

                     bNeedMore = TRUE;
@@ -604,15 +591,12 @@ BOOL ScDocument::IdleCalcTextWidth()			// TRUE =
demnaechst wieder versuchen
                 }
             }

-// nIter = nCount;
-
             nCount++;

             // Idle Berechnung abbrechen, wenn Berechnungen laenger als
             // 50ms dauern, oder nach 32 Berechnungen mal nachschauen, ob
             // bestimmte Events anstehen, die Beachtung wuenschen:

-// nMs = SysTicksToMs( GetSysTicks() - nStart );

             if (   ( 50L < Time::GetSystemTicks() - nStart )
                 || ( !(nCount&31) && Application::AnyInput( ABORT_EVENTS ) ) )
@@ -627,8 +611,6 @@ BOOL ScDocument::IdleCalcTextWidth()			// TRUE =
demnaechst wieder versuchen

     delete pColIter;

-//	DBG_ERROR( String(nCount) + String(" End = ") + String(nTab) +
String(',') + String(nCol) + String(',') + String(nRow)  );
-
     if (pDev)
         pDev->SetMapMode(aOldMap);

@@ -636,8 +618,6 @@ BOOL ScDocument::IdleCalcTextWidth()			// TRUE =
demnaechst wieder versuchen
     aCurTextWidthCalcPos.SetRow( nRow );
     aCurTextWidthCalcPos.SetCol( (SCCOL)nCol );

-// DBG_ERROR( String(nMs) + String(" ms (") + String(nIter) + String(')') );
-
     pStylePool->SetSearchMask( eOldFam, nOldMask );
     bIdleDisabled = FALSE;

diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
old mode 100644
new mode 100755
index c036f4d..c557e29
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -139,8 +139,6 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell )
     if (pDocShell && !pShell)
         pShell = pDocShell;

-//	DBG_ASSERT(pShell,"InitDrawLayer ohne Shell");
-
     if (!pDrawLayer)
     {
         String aName;
@@ -215,9 +213,6 @@ void ScDocument::UpdateDrawPrinter()
     {
         // use the printer even if IsValid is false
         // Application::GetDefaultDevice causes trouble with changing MapModes
-
-//		OutputDevice* pRefDev = GetPrinter();
-//		pRefDev->SetMapMode( MAP_100TH_MM );
         pDrawLayer->SetRefDevice(GetRefDevice());
     }
 }
@@ -538,8 +533,6 @@ void ScDocument::Clear( sal_Bool bFromDestructor )

     if (pDrawLayer)
     {
-        // #116168#
-        //pDrawLayer->Clear();
         pDrawLayer->ClearModel( bFromDestructor );
     }
 }
@@ -594,7 +587,6 @@ void ScDocument::InvalidateControls( Window* pWin,
SCTAB nTab, const Rectangle&
                         //	auf ClippingRegions. Darum muss das ganze
Objekt neu gepainted
                         //	werden, damit die Selektion auf der
Tabelle nicht uebermalt wird.

-                        //pWin->Invalidate( aObjRect.GetIntersection(
rMMRect ) );
                         pWin->Invalidate( aObjRect );
                     }
                 }
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
old mode 100644
new mode 100755
index 8ef52e5..d8187f5
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2241,7 +2241,6 @@ void ScDocument::CopyFromClip( const ScRange&
rDestRange, const ScMarkData& rMar

             SCCOL nClipStartCol = aClipRange.aStart.Col();
             SCROW nClipStartRow = aClipRange.aStart.Row();
-            // WaE: commented because unused:   SCCOL nClipEndCol =
pClipDoc->aClipRange.aEnd.Col();
             SCROW nClipEndRow = aClipRange.aEnd.Row();
             for ( size_t nRange = 0; nRange < pDestRanges->size(); ++nRange )
             {
@@ -2286,9 +2285,6 @@ void ScDocument::CopyFromClip( const ScRange&
rDestRange, const ScMarkData& rMar
                             CopyNonFilteredFromClip( nC1, nR1, nC2, nR2, rMark,
                                     nDx, nDy, &aCBFCP, nClipStartRow );
                         }
-                        // Not needed for columns, but if it was this
would be how to.
-                        //if (nClipStartCol > nClipEndCol)
-                        //    nClipStartCol =
pClipDoc->aClipRange.aStart.Col();
                         nC1 = nC2 + 1;
                         nC2 = Min((SCCOL)(nC1 + nXw), nCol2);
                     } while (nC1 <= nCol2);
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
old mode 100644
new mode 100755
index 9ef31d5..6ad127f
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -303,8 +303,7 @@ ScDPGroupDateFilter::ScDPGroupDateFilter(double
fMatchValue, sal_Int32 nDatePart
     mfMatchValue(fMatchValue),
     mnDatePart(nDatePart)
 {
-//  fprintf(stdout, "ScDPCacheTable:DateGroupFilter::DateGroupFilter:
match value = %g; date part = %ld\n",
-//          mfMatchValue, mnDatePart);
+
 }
 bool ScDPGroupDateFilter::match( const ScDPItemData & rCellData ) const
 {
@@ -314,7 +313,7 @@ bool ScDPGroupDateFilter::match( const
ScDPItemData & rCellData ) const

     if ( !rCellData.IsValue() )
         return false;
-//	ScDPCacheCell rCell( rCellData.fValue );
+
     if (!mpNumInfo)
         return false;

@@ -727,8 +726,7 @@ ScDPGroupDimension::ScDPGroupDimension( long
nSource, const String& rNewName ) :
     nSourceDim( nSource ),
     nGroupDim( -1 ),
     aGroupName( rNewName ),
-    pDateHelper( NULL )/*,
-    pCollection( NULL )*/
+    pDateHelper( NULL )
 {
 }

@@ -1272,9 +1270,7 @@ void
ScDPGroupTableData::ModifyFilterCriteria(vector<ScDPCacheTable::Criterion>&
                 {
                     const ScDPGroupItem* pGrpItem =
pGrpDim->GetGroupByIndex(i);
                     ScDPItemData aName(
pFilter->getMatchString(),pFilter->getMatchValue(),pFilter->hasValue())
;
-                    /*aName.aString   = pFilter->getMatchString();
-                    aName.fValue    = pFilter->getMatchValue();
-                    aName.bHasValue = pFilter->hasValue();*/
+
                                        if (!pGrpItem ||
!pGrpItem->GetName().IsCaseInsEqual(aName))
                         continue;

@@ -1392,7 +1388,6 @@ void ScDPGroupTableData::FillGroupValues(
/*ScDPItemData* pItemData*/ SCROW* pIt
                 sal_Int32 nPartValue = lcl_GetDatePartValue(
                     pData->GetValue(), pDateHelper->GetDatePart(),
pDoc->GetFormatTable(),
                     &pDateHelper->GetNumInfo() );
-                //String aName = lcl_GetDateGroupName( pDateHelper,
nPartValue, pDoc->GetFormatTable() );
                 ScDPItemData  aItemData( pDateHelper->GetDatePart(),
String(), nPartValue,
ScDPItemData::MK_DATA|ScDPItemData::MK_VAL|ScDPItemData::MK_DATEPART
);
                 pItemDataIndex[nDim] =
GetCacheTable().getCache()->GetAdditionalItemID( aItemData );
             }
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
old mode 100644
new mode 100755
index cd65675..10cc110
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -114,7 +114,6 @@ using ::rtl::OUString;
 #define DP_PROP_FUNCTION			"Function"
 #define DP_PROP_IGNOREEMPTY			"IgnoreEmptyRows"
 #define DP_PROP_ISDATALAYOUT		"IsDataLayoutDimension"
-//#define DP_PROP_ISVISIBLE			"IsVisible"
 #define DP_PROP_ORIENTATION			"Orientation"
 #define DP_PROP_ORIGINAL			"Original"
 #define DP_PROP_POSITION			"Position"
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
old mode 100644
new mode 100755
index 50c7c75..f950541
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -116,7 +116,6 @@ struct ScDPOutLevelData
             ( nDimPos==r.nDimPos && nHier==r.nHier && nLevel<r.nLevel ); }

     void Swap(ScDPOutLevelData& r)
-//!		{ ScDPOutLevelData aTemp = r; r = *this; *this = aTemp; }
         { ScDPOutLevelData aTemp; aTemp = r; r = *this; *this = aTemp; }

     //!	bug (73840) in uno::Sequence - copy and then assign doesn't work!
@@ -605,11 +604,6 @@ void ScDPOutput::DataCell( SCCOL nCol, SCROW
nRow, SCTAB nTab, const sheet::Data
         if ( nFormat != 0 )
             pDoc->ApplyAttr( nCol, nRow, nTab, SfxUInt32Item(
ATTR_VALUE_FORMAT, nFormat ) );
     }
-    else
-    {
-        //pDoc->SetString( nCol, nRow, nTab, EMPTY_STRING );
-    }
-
     //	SubTotal formatting is controlled by headers
 }

@@ -628,21 +622,15 @@ void ScDPOutput::HeaderCell( SCCOL nCol, SCROW
nRow, SCTAB nTab,
     {
         pDoc->SetString( nCol, nRow, nTab, aCaptionBuf.makeStringAndClear() );
     }
-    else
-    {
-        //pDoc->SetString( nCol, nRow, nTab, EMPTY_STRING );
-    }

     if ( nFlags & sheet::MemberResultFlags::SUBTOTAL )
     {
-//		SvxWeightItem aItem( WEIGHT_BOLD );		// weight is in the style
         OutputImpl outputimp( pDoc, nTab,
             nTabStartCol, nTabStartRow, nMemberStartCol, nMemberStartRow,
             nDataStartCol, nDataStartRow, nTabEndCol, nTabEndRow );
         //!	limit frames to horizontal or vertical?
         if (bColHeader)
         {
-            //lcl_SetFrame( pDoc,nTab,
nCol,nMemberStartRow+(SCROW)nLevel, nCol,nTabEndRow,
SC_DP_FRAME_INNER_BOLD );
             outputimp.OutputBlockFrame(
nCol,nMemberStartRow+(SCROW)nLevel, nCol,nDataStartRow-1 );

             lcl_SetStyleById( pDoc,nTab,
nCol,nMemberStartRow+(SCROW)nLevel, nCol,nDataStartRow-1,
@@ -652,7 +640,6 @@ void ScDPOutput::HeaderCell( SCCOL nCol, SCROW
nRow, SCTAB nTab,
         }
         else
         {
-            //lcl_SetFrame( pDoc,nTab,
nMemberStartCol+(USHORT)nLevel,nRow, nTabEndCol,nRow,
SC_DP_FRAME_INNER_BOLD );
             outputimp.OutputBlockFrame(
nMemberStartCol+(SCCOL)nLevel,nRow, nDataStartCol-1,nRow );
             lcl_SetStyleById( pDoc,nTab,
nMemberStartCol+(SCCOL)nLevel,nRow, nDataStartCol-1,nRow,
                                     STR_PIVOT_STYLE_TITLE );
@@ -884,8 +871,6 @@ void ScDPOutput::Output()
                 SCCOL nEndColPos = nDataStartCol + (SCCOL)nEnd;
//! check for overflow
                 if ( nField+1 < nColFieldCount )
                 {
-                    //                  lcl_SetFrame( pDoc,nTab,
nColPos,nRowPos, nEndColPos,nRowPos, SC_DP_FRAME_INNER_BOLD );
-                    //                  lcl_SetFrame( pDoc,nTab,
nColPos,nRowPos, nEndColPos,nTabEndRow, SC_DP_FRAME_INNER_BOLD );
                     if ( nField == nColFieldCount - 2 )
                     {
                         outputimp.AddCol( nColPos );
@@ -937,8 +922,6 @@ void ScDPOutput::Output()
                     while ( nEnd+1 < nThisRowCount && (
pArray[nEnd+1].Flags & sheet::MemberResultFlags::CONTINUE ) )
                         ++nEnd;
                     SCROW nEndRowPos = nDataStartRow +
(SCROW)nEnd;		//! check for overflow
-                    //  lcl_SetFrame( pDoc,nTab, nColPos,nRowPos,
nColPos,nEndRowPos, SC_DP_FRAME_INNER_BOLD );
-                    //lcl_SetFrame( pDoc,nTab, nColPos,nRowPos,
nTabEndCol,nEndRowPos, SC_DP_FRAME_INNER_BOLD );
                     outputimp.AddRow( nRowPos );
                     if ( vbSetBorder[ nRow ] == FALSE )
                     {
@@ -969,12 +952,6 @@ ScRange ScDPOutput::GetOutputRange( sal_Int32 nRegionType )

     CalcSizes();

-//  fprintf(stdout, "ScDPOutput::GetOutputRange: aStartPos = (%ld,
%d)\n", aStartPos.Row(), aStartPos.Col());fflush(stdout);
-//  fprintf(stdout, "ScDPOutput::GetOutputRange: nTabStart (Row =
%ld, Col = %ld)\n", nTabStartRow, nTabStartCol);fflush(stdout);
-//  fprintf(stdout, "ScDPOutput::GetOutputRange: nMemberStart (Row =
%ld, Col = %ld)\n", nMemberStartRow, nMemberStartCol);fflush(stdout);
-//  fprintf(stdout, "ScDPOutput::GetOutputRange: nDataStart (Row =
%ld, Col = %ld)\n", nDataStartRow, nDataStartCol);fflush(stdout);
-//  fprintf(stdout, "ScDPOutput::GetOutputRange: nTabEnd (Row = %ld,
Col = %ld)\n", nTabEndRow, nTabStartCol);fflush(stdout);
-
     SCTAB nTab = aStartPos.Tab();
     switch (nRegionType)
     {
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
old mode 100644
new mode 100755
index f829299..556be30
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -600,7 +600,6 @@ void ScDPAggData::Calculate( ScSubTotalFunc eFunc,
const ScDPSubTotalState& rSub
     if ( bEmpty || bError )
         fResult = 0.0;		// default, in case the state is later modified

-//  fprintf(stdout, "ScDPAggData::Calculate: result = %g\n",
fResult);fflush(stdout);
     fVal = fResult;			// used directly from now on
     fAux = 0.0;				// used for running total or original result of
reference value
 }
@@ -1448,7 +1447,6 @@ void ScDPResultMember::FillMemberResults(
uno::Sequence<sheet::MemberResult>* pS
         if (bRoot)		// same sequence for root member
             pChildDimension->FillMemberResults( pSequences, rPos, nMeasure );
         else
-            //pChildDimension->FillMemberResults( pSequences + 1,
rPos, nMeasure );
             pChildDimension->FillMemberResults( pSequences +
nMemberStep/*1*/, rPos, nMeasure );

         if ( bTitleLine )           // title row is included in
GetSize, so the following
@@ -2260,7 +2258,6 @@ void ScDPDataMember::UpdateRunningTotals( const
ScDPResultMember* pRefMember,
         BOOL bHasChild = ( pRefChild != NULL );

         long nUserSubCount = pRefMember->GetSubTotalCount();
-        //if ( nUserSubCount || !bHasChild )
         {
             // Calculate at least automatic if no subtotals are selected,
             // show only own values if there's no child dimension (innermost).
@@ -2947,9 +2944,6 @@ void ScDPResultDimension::LateInitFrom(
LateInitParams& rParams/* const vector<S
             ScDPResultMember* pResultMember = FindMember( rThisData );
             if( NULL != pResultMember )
             {
-                 //DBG_TRACE( "ScDPResultDimension::LateInitFrom");
-                 // DBG_TRACESTR( pResultMember->GetDPMember()->GetNameStr());
-
                 rInitState.AddMember( nDimSource,
pResultMember->GetDataId() );
                 pResultMember->LateInitFrom( rParams, pItemData,
nPos+1, rInitState );
                 rInitState.RemoveMember();
@@ -2992,7 +2986,6 @@ bool ScDPResultDimension::IsValidEntry( const
vector< SCROW >& aMembers ) const
     ByteString strTemp ("IsValidEntry: Member not found, DimName = " );
     strTemp += ByteString( GetName(), RTL_TEXTENCODING_UTF8 );
     DBG_TRACE( strTemp.GetBuffer() );
-    //    DBG_ERROR("IsValidEntry: Member not found");
 #endif
     return false;
 }
@@ -3983,8 +3976,6 @@ void ScDPResultDimension::  InitWithMembers(
LateInitParams& rParams,
         }
         if ( pResultMember )
         {
- //           DBG_TRACE( "ScDPResultDimension::InitWithMembers");
- //           DBG_TRACESTR( pResultMember->GetDPMember()->GetNameStr());
             rInitState.AddMember( nDimSource, pResultMember->GetDataId()  );
             pResultMember->LateInitFrom( rParams /*ppDim, ppLev*/,
pItemData, nPos+1 , rInitState );
             rInitState.RemoveMember();
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
old mode 100644
new mode 100755
index ff7c1e4..b9a570b
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -1790,7 +1790,6 @@ uno::Any SAL_CALL ScDPHierarchies::getByName(
const rtl::OUString& aName )
         }

     throw container::NoSuchElementException();
-//    return uno::Any();
 }

 uno::Sequence<rtl::OUString> SAL_CALL
ScDPHierarchies::getElementNames() throw(uno::RuntimeException)
@@ -1974,7 +1973,6 @@ uno::Any SAL_CALL ScDPLevels::getByName( const
rtl::OUString& aName )
         }

     throw container::NoSuchElementException();
-//    return uno::Any();
 }

 uno::Sequence<rtl::OUString> SAL_CALL ScDPLevels::getElementNames()
throw(uno::RuntimeException)
@@ -2120,7 +2118,6 @@ void ScDPLevel::EvaluateSortOrder()
                 ScDPMembers* pLocalMembers = GetMembersObject();
                 long nCount = pLocalMembers->getCount();

-//                DBG_ASSERT( aGlobalOrder.empty(), "sort twice?" );
                 aGlobalOrder.resize( nCount );
                 for (long nPos=0; nPos<nCount; nPos++)
                     aGlobalOrder[nPos] = nPos;
@@ -2315,7 +2312,6 @@ void SAL_CALL ScDPLevel::setPropertyValue( const
rtl::OUString& aPropertyName, c
     else
     {
         DBG_ERROR("unknown property");
-        //!	THROW( UnknownPropertyException() );
     }
 }

@@ -2355,7 +2351,6 @@ uno::Any SAL_CALL ScDPLevel::getPropertyValue(
const rtl::OUString& aPropertyNam
     else
     {
         DBG_ERROR("unknown property");
-        //!	THROW( UnknownPropertyException() );
     }
     return aRet;
 }
@@ -2486,7 +2481,6 @@ uno::Any SAL_CALL ScDPMembers::getByName( const
rtl::OUString& aName )
     }

     throw container::NoSuchElementException();
-//    return uno::Any();
 }

 uno::Sequence<rtl::OUString> SAL_CALL ScDPMembers::getElementNames()
throw(uno::RuntimeException)
@@ -2800,7 +2794,6 @@ void SAL_CALL ScDPMember::setPropertyValue(
const rtl::OUString& aPropertyName,
     else
     {
         DBG_ERROR("unknown property");
-        //!	THROW( UnknownPropertyException() );
     }
 }

@@ -2821,7 +2814,6 @@ uno::Any SAL_CALL ScDPMember::getPropertyValue(
const rtl::OUString& aPropertyNa
     else
     {
         DBG_ERROR("unknown property");
-        //!	THROW( UnknownPropertyException() );
     }
     return aRet;
 }
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
old mode 100644
new mode 100755
index 92a1f47..9e92ac8
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -308,8 +308,6 @@ ScDrawLayer::~ScDrawLayer()
 {
     Broadcast(SdrHint(HINT_MODELCLEARED));

-    // #116168#
-    //Clear();
     ClearModel(sal_True);

     delete pUndoGroup;
@@ -442,9 +440,7 @@ void ScDrawLayer::ScCopyPage( USHORT nOldPos,
USHORT nNewPos, BOOL bAlloc )
         SdrObject* pOldObject = aIter.Next();
         while (pOldObject)
         {
-            // #116235#
             SdrObject* pNewObject = pOldObject->Clone();
-            //SdrObject* pNewObject = pOldObject->Clone( pNewPage, this );
             pNewObject->SetModel(this);
             pNewObject->SetPage(pNewPage);

@@ -869,16 +865,12 @@ void ScDrawLayer::AddCalcUndo( SdrUndoAction* pUndo )

 void ScDrawLayer::BeginCalcUndo()
 {
-//! DBG_ASSERT( !bRecording, "BeginCalcUndo ohne GetCalcUndo" );
-
     DELETEZ(pUndoGroup);
     bRecording = TRUE;
 }

 SdrUndoGroup* ScDrawLayer::GetCalcUndo()
 {
-//! DBG_ASSERT( bRecording, "GetCalcUndo ohne BeginCalcUndo" );
-
     SdrUndoGroup* pRet = pUndoGroup;
     pUndoGroup = NULL;
     bRecording = FALSE;
@@ -1357,9 +1349,7 @@ void ScDrawLayer::CopyToClip( ScDocument*
pClipDoc, SCTAB nTab, const Rectangle&
                 DBG_ASSERT( pDestPage, "no page" );
                 if (pDestPage)
                 {
-                    // #116235#
                     SdrObject* pNewObject = pOldObject->Clone();
-                    //SdrObject* pNewObject = pOldObject->Clone(
pDestPage, pDestModel );
                     pNewObject->SetModel(pDestModel);
                     pNewObject->SetPage(pDestPage);

@@ -1521,9 +1511,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer*
pClipModel, SCTAB nSourceTab, const
         // do not copy internal objects (detective) and note captions
         if ( rSourceRange.IsInside( aObjRect ) &&
(pOldObject->GetLayer() != SC_LAYER_INTERN) && !IsNoteCaption(
pOldObject ) )
         {
-            // #116235#
             SdrObject* pNewObject = pOldObject->Clone();
-            //SdrObject* pNewObject = pOldObject->Clone( pDestPage, this );
             pNewObject->SetModel(this);
             pNewObject->SetPage(pDestPage);

diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
old mode 100644
new mode 100755
index b1240ff..ac22f03
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -618,7 +618,6 @@ void ScGlobal::InitTextHeight(SfxItemPool* pPool)
         return;
     }

-//	String aTestString('X');
     OutputDevice* pDefaultDev = Application::GetDefaultDevice();
     VirtualDevice aVirtWindow( *pDefaultDev );
     aVirtWindow.SetMapMode(MAP_PIXEL);
@@ -1761,7 +1760,6 @@ ScFunctionMgr::~ScFunctionMgr()
 {
     for (USHORT i = 0; i < MAX_FUNCCAT; i++)
         delete aCatLists[i];
-//  delete pFuncList;       // Macht spaeter die App
 }

 //------------------------------------------------------------------------
diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx
old mode 100644
new mode 100755
index 0b79a7a..791af19
--- a/sc/source/core/data/markarr.cxx
+++ b/sc/source/core/data/markarr.cxx
@@ -249,7 +249,6 @@ void ScMarkArray::SetMarkArea( SCROW nStartRow,
SCROW nEndRow, BOOL bMarked )
             }
         }
     }
-//	InfoBox(0, String(nCount) + String(" Eintraege") ).Execute();
 }

 BOOL ScMarkArray::IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
old mode 100644
new mode 100755
index 8cfdcb3..12d85a7
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -271,35 +271,6 @@ BOOL ScOutlineArray::Insert( SCCOLROW nStartCol,
SCCOLROW nEndCol, BOOL& rSizeCh
         rSizeChanged = TRUE;
     }

-/*          nicht zusammenfassen!
-
-    //  zusammenfassen
-
-    USHORT nCount = aCollections[nLevel].GetCount();
-    USHORT nIndex;
-    bFound = FALSE;
-    for ( nIndex=0; nIndex<nCount && !bFound; nIndex++ )
-    {
-        if ( ((ScOutlineEntry*)
aCollections[nLevel].At(nIndex))->GetEnd() + 1 == nStartCol )
-        {
-            nStartCol = ((ScOutlineEntry*)
aCollections[nLevel].At(nIndex))->GetStart();
-            aCollections[nLevel].AtFree(nIndex);
-            nCount = aCollections[nLevel].GetCount();       // Daten geaendert
-            bFound = TRUE;
-        }
-    }
-
-    bFound = FALSE;
-    for ( nIndex=0; nIndex<nCount && !bFound; nIndex++ )
-    {
-        if ( ((ScOutlineEntry*)
aCollections[nLevel].At(nIndex))->GetStart() == nEndCol + 1 )
-        {
-            nEndCol = ((ScOutlineEntry*)
aCollections[nLevel].At(nIndex))->GetEnd();
-            aCollections[nLevel].AtFree(nIndex);
-            bFound = TRUE;
-        }
-    }
-*/
     ScOutlineEntry* pNewEntry = new ScOutlineEntry( nStartCol,
nEndCol+1-nStartCol, bHidden );
     pNewEntry->SetVisible( bVisible );
     aCollections[nLevel].Insert( pNewEntry );
@@ -426,7 +397,6 @@ BOOL ScOutlineArray::Remove( SCCOLROW nBlockStart,
SCCOLROW nBlockEnd, BOOL& rSi

         if ( nBlockStart<=nEnd && nBlockEnd>=nStart )
         {
-//          RemoveSub( nStart, nEnd, nLevel+1 );
             pCollect->AtFree(i);
             PromoteSub( nStart, nEnd, nLevel+1 );
             nCount = pCollect->GetCount();
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
old mode 100644
new mode 100755
index 3ae27d9..efe9c6e
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -255,7 +255,6 @@ void ScStyleSheetPool::CreateStandardStyles()
     String			aStr;
     xub_StrLen		nStrLen;
     String			aHelpFile;//XXX JN welcher Text???
-    //ULONG			nNumFmt			= 0L;
     SfxItemSet*		pSet			= NULL;
     SfxItemSet*		pHFSet			= NULL;
     SvxSetItem*		pHFSetItem		= NULL;
@@ -337,11 +336,6 @@ void ScStyleSheetPool::CreateStandardStyles()

     pSheet->SetParent( SCSTR( STR_STYLENAME_RESULT ) );
     pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_CELL_ERG1 );
-    // will now be done in GetItemSet();
-    // pSet = &pSheet->GetItemSet();
-    // nNumFmt = pDoc->GetFormatTable()->GetStandardFormat(
NUMBERFORMAT_CURRENCY,
-            //										    ScGlobal::eLnge );
-    // pSet->Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNumFmt ) );

     //----------------
     // 4. Ueberschrift
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
old mode 100644
new mode 100755
index 2b98049..221fbf3
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -205,7 +205,6 @@ SfxItemSet& ScStyleSheet::GetItemSet()
                         aBoxInfoItem.SetDist( TRUE );
                         aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE );

-                        // aPageItem.SetLandscape(
ORIENTATION_LANDSCAPE == pPrinter->GetOrientation() );
                         aPageItem.SetLandscape( FALSE );

                         rHFSet.Put( aBoxInfoItem );
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
old mode 100644
new mode 100755
index 5523d06..036dae0
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -545,26 +545,6 @@ BOOL ScTable::GetTableArea( SCCOL& rEndCol,
SCROW& rEndRow ) const
     return bRet;
 }

-/*		vorher:
-
-    BOOL bFound = FALSE;
-    SCCOL nMaxX = 0;
-    SCROW nMaxY = 0;
-    for (SCCOL i=0; i<=MAXCOL; i++)
-        if (!aCol[i].IsEmpty())
-        {
-            bFound = TRUE;
-            nMaxX = i;
-            SCCOL nColY = aCol[i].GetLastEntryPos();
-            if (nColY > nMaxY)
-                nMaxY = nColY;
-        }
-
-    rEndCol = nMaxX;
-    rEndRow = nMaxY;
-    return bFound;
-*/
-
 const SCCOL SC_COLUMNS_STOP = 30;

 BOOL ScTable::GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, BOOL bNotes ) const
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
old mode 100644
new mode 100755
index 81204ec..c58a96c
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -398,8 +398,6 @@ void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2, USH
             aPattern.GetItemSet().Put( ScProtectionAttr( FALSE ) );
             ApplyPatternArea( nCol1, nRow1, nCol2, nRow2, aPattern );
         }
-
-//		DecRecalcLevel();
     }
 }

@@ -790,8 +788,7 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW
nRow1, SCCOL nCol2, SCROW nRow2,
                         if (nLastRow >= nRow2)
                             // the last row shouldn't exceed the
upper bound the caller specified.
                             nLastRow = nRow2;
-
-                        //pDestTab->SetRowHidden(i, nLastRow, bThisHidden);
+
                         aEntries.push_back(ScShowRowsEntry(i,
nLastRow, bThisHidden));

                         bool bThisHiddenChange = (bThisHidden != bDestHidden);
@@ -2098,7 +2095,6 @@ void ScTable::SetColWidth( SCCOL nCol, USHORT nNewWidth )
     {
         if (!nNewWidth)
         {
-//			DBG_ERROR("Spaltenbreite 0 in SetColWidth");
             nNewWidth = STD_COL_WIDTH;
         }

@@ -2969,9 +2965,6 @@ void ScTable::DoAutoOutline( SCCOL nStartCol,
SCROW nStartRow, SCCOL nEndCol, SC
     ScOutlineArray* pArray;
     ScBaseCell* pCell;
     ScRange aRef;
-/*	ScPatternAttr aBoldPattern( pDocument->GetPool()
);				//!	spezielle Format-Vorlage
-    aBoldPattern.GetItemSet().Put( SvxWeightItem( WEIGHT_BOLD ) );
-*/

     StartOutlineTable();

@@ -3004,7 +2997,6 @@ void ScTable::DoAutoOutline( SCCOL nStartCol,
SCROW nStartRow, SCCOL nEndCol, SC
                                 {
                                     if (pArray->Insert(
aRef.aStart.Row(), aRef.aEnd.Row(), bSizeChanged ))
                                     {
-//										ApplyPatternArea( nStartCol, nRow, nEndCol, nRow, aBoldPattern );
                                         bFound = TRUE;
                                     }
                                     else
@@ -3035,7 +3027,6 @@ void ScTable::DoAutoOutline( SCCOL nStartCol,
SCROW nStartRow, SCCOL nEndCol, SC
                         {
                             if (pArray->Insert( aRef.aStart.Col(),
aRef.aEnd.Col(), bSizeChanged ))
                             {
-//								ApplyPatternArea( nCol, nStartRow, nCol, nEndRow, aBoldPattern );
                                 bFound = TRUE;
                             }
                             else
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
old mode 100644
new mode 100755
index d536371..3d66d3d
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1008,10 +1008,6 @@ BOOL ScTable::DoSubTotals( ScSubTotalParam& rParam )
                 bBlockVis = !RowFiltered(nRow);
             }
         }
-        else
-        {
-//			DBG_ERROR( "nSubTotals==0 bei DoSubTotals" );
-        }
     }

     // now insert the formulas
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
old mode 100644
new mode 100755
index 297c169..27afcae
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -419,82 +419,45 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW
nRow1, SCCOL nCol2, SCROW nRow2,
 void ScTable::FillFormula(ULONG& /* nFormulaCounter */, BOOL /*
bFirst */, ScFormulaCell* pSrcCell,
                           SCCOL nDestCol, SCROW nDestRow, BOOL bLast )
 {
-/*	USHORT nTokArrLen = pSrcCell->GetTokenArrayLen();
-    if ( nTokArrLen > 15 )							// mehr als =A1 oder =67
-    {
-        ScRangeName* pRangeName = pDocument->GetRangeName();
-        String aName("___SC_");						// Wird dieser String veraendert,
-                                                    // auch in
document2 EraseNonUsed...
-                                                    // mitaendern!!
-        aName += pRangeName->GetSharedMaxIndex() + 1;
-        aName += '_';
-        aName += nFormulaCounter;
-        nFormulaCounter++;
-        if (bFirst)
-        {
-            ScRangeData *pAktRange = new ScRangeData(
-                            pDocument, aName,
pSrcCell->GetTokenArray(), nTokArrLen,
-                            pSrcCell->GetCol(), pSrcCell->GetRow(),
nTab ,RT_SHARED);
-            if (!pRangeName->Insert( pAktRange ))
-                delete pAktRange;
-            else
-                bSharedNameInserted = TRUE;
-        }
-        USHORT nIndex;
-        pRangeName->SearchName(aName, nIndex);
-        if (!pRangeName)
-        {
-            DBG_ERROR("ScTable::FillFormula: Falscher Name");
-            return;
-        }
-        nIndex = ((ScRangeData*) ((*pRangeName)[nIndex]))->GetIndex();
-        ScTokenArray aArr;
-        aArr.AddName(nIndex);
-        aArr.AddOpCode(ocStop);
-        ScFormulaCell* pDestCell = new ScFormulaCell
-            (pDocument, ScAddress( nDestCol, nDestRow, nTab ), aArr );
-        aCol[nDestCol].Insert(nDestRow, pDestCell);
-    }
-    else
-*/	{
-        pDocument->SetNoListening( TRUE );	// noch falsche Referenzen
-        ScAddress aAddr( nDestCol, nDestRow, nTab );
-        ScFormulaCell* pDestCell = new ScFormulaCell( *pSrcCell,
*pDocument, aAddr );
-        aCol[nDestCol].Insert(nDestRow, pDestCell);

-        if ( bLast && pDestCell->GetMatrixFlag() )
+    pDocument->SetNoListening( TRUE );	// noch falsche Referenzen
+    ScAddress aAddr( nDestCol, nDestRow, nTab );
+    ScFormulaCell* pDestCell = new ScFormulaCell( *pSrcCell,
*pDocument, aAddr );
+    aCol[nDestCol].Insert(nDestRow, pDestCell);
+
+    if ( bLast && pDestCell->GetMatrixFlag() )
+    {
+        ScAddress aOrg;
+        if ( pDestCell->GetMatrixOrigin( aOrg ) )
         {
-            ScAddress aOrg;
-            if ( pDestCell->GetMatrixOrigin( aOrg ) )
+            if ( nDestCol >= aOrg.Col() && nDestRow >= aOrg.Row() )
             {
-                if ( nDestCol >= aOrg.Col() && nDestRow >= aOrg.Row() )
+                ScBaseCell* pOrgCell = pDocument->GetCell( aOrg );
+                if ( pOrgCell && pOrgCell->GetCellType() == CELLTYPE_FORMULA
+                  && ((ScFormulaCell*)pOrgCell)->GetMatrixFlag() ==
MM_FORMULA )
                 {
-                    ScBaseCell* pOrgCell = pDocument->GetCell( aOrg );
-                    if ( pOrgCell && pOrgCell->GetCellType() ==
CELLTYPE_FORMULA
-                      && ((ScFormulaCell*)pOrgCell)->GetMatrixFlag()
== MM_FORMULA )
-                    {
-                        ((ScFormulaCell*)pOrgCell)->SetMatColsRows(
-                            nDestCol - aOrg.Col() + 1,
-                            nDestRow - aOrg.Row() + 1 );
-                    }
-                    else
-                    {
-                        DBG_ERRORFILE( "FillFormula: MatrixOrigin
keine Formelzelle mit MM_FORMULA" );
-                    }
+                    ((ScFormulaCell*)pOrgCell)->SetMatColsRows(
+                        nDestCol - aOrg.Col() + 1,
+                        nDestRow - aOrg.Row() + 1 );
                 }
                 else
                 {
-                    DBG_ERRORFILE( "FillFormula: MatrixOrigin rechts unten" );
+                    DBG_ERRORFILE( "FillFormula: MatrixOrigin keine
Formelzelle mit MM_FORMULA" );
                 }
             }
             else
             {
-                DBG_ERRORFILE( "FillFormula: kein MatrixOrigin" );
+                DBG_ERRORFILE( "FillFormula: MatrixOrigin rechts unten" );
             }
         }
-        pDocument->SetNoListening( FALSE );
-        pDestCell->StartListeningTo( pDocument );
+        else
+        {
+            DBG_ERRORFILE( "FillFormula: kein MatrixOrigin" );
+        }
     }
+    pDocument->SetNoListening( FALSE );
+    pDestCell->StartListeningTo( pDocument );
+
 }

 void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
@@ -1591,8 +1554,6 @@ void ScTable::AutoFormatArea(SCCOL nStartCol,
SCROW nStartRow, SCCOL nEndCol, SC
         ScAutoFormatData* pData = (*pAutoFormat)[nFormatNo];
         if (pData)
         {
-//			ScPatternAttr aPattern(pDocument->GetPool());
-//            pData->FillToItemSet(nIndex, aPattern.GetItemSet(), *pDocument);
             ApplyPatternArea(nStartCol, nStartRow, nEndCol, nEndRow, rAttr);
         }
     }


More information about the LibreOffice mailing list