[PATCH 3/9] clean dead code in sc fileter excel
pjacquod
pjacquod at alumni.ethz.ch
Sat Nov 20 09:19:44 PST 2010
---
sc/source/filter/excel/read.cxx | 8 --------
sc/source/filter/excel/xeescher.cxx | 19 -------------------
sc/source/filter/excel/xestream.cxx | 13 +------------
3 files changed, 1 insertions(+), 39 deletions(-)
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index e2737ec..3ca0bd5 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -865,7 +865,6 @@ FltError ImportExcel8::Read( void )
eAkt = EXC_STATE_SHEET;
aIn.SeekGlobalPosition();
continue; // next iteration in while loop
-// break; // unxsols warning: statement unreachable
case EXC_STATE_SHEET:
Eof();
eAkt = EXC_STATE_END;
@@ -1276,13 +1275,6 @@ FltError ImportExcel8::Read( void )
GetPivotTableManager().ConvertPivotTables();
pProgress.reset();
-#if 0
- // Excel documents look much better without this call; better in the
- // sense that the row heights are identical to the original heights in
- // Excel.
- if (pD->IsAdjustHeightEnabled())
- AdjustRowHeight();
-#endif
PostDocLoad();
pD->CalcAfterLoad();
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index efebe80..acf24d2 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1119,7 +1119,6 @@ void XclExpChartObj::SaveXml( XclExpXmlStream& rStrm )
nChartCount++;
aChartExport.WriteChartObj( mxShape, nChartCount );
// TODO: get the correcto chart number
- //WriteChartObj( pDrawing, rStrm );
}
pDrawing->singleElement( FSNS( XML_xdr, XML_clientData),
@@ -1155,9 +1154,7 @@ void XclExpChartObj::WriteChartObj( sax_fastparser::FSHelperPtr pDrawing, XclExp
pDrawing->endElement( FSNS( XML_xdr, XML_nvGraphicFramePr ) );
// visual chart properties
- //pDrawing->startElement( FSNS( XML_xdr, XML_xfrm ), FSEND );
WriteShapeTransformation( pDrawing, mxShape );
- //pDrawing->endElement( FSNS( XML_xdr, XML_xfrm ) );
// writer chart object
pDrawing->startElement( FSNS( XML_a, XML_graphic ), FSEND );
@@ -1260,13 +1257,6 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos,
// AutoFill style would change if Postit.cxx object creation values are changed
OUString aCol(((XFillColorItem &)GETITEM(aItemSet, XFillColorItem , XATTR_FILLCOLOR)).GetValue());
mbAutoFill = !aCol.getLength() && (GETITEMVALUE(aItemSet, XFillStyleItem, XATTR_FILLSTYLE, ULONG) == XFILL_SOLID);
-#if 0
- // TODO: Get AutoLine bool
- aCol = OUString(((XLineStartItem &)GETITEM(aItemSet, XLineStartItem, XATTR_LINESTART)).GetValue());
- mbAutoLine = !aCol.getLength() &&
- (GETITEMVALUE(aItemSet, XLineStartWidthItem, XATTR_LINESTARTWIDTH, ULONG) == 200) &&
- (GETITEMBOOL(aItemSet, XATTR_LINESTARTCENTER) == FALSE);
-#endif
mbAutoLine = true;
mbRowHidden = (rRoot.GetDoc().RowHidden(maScPos.Row(),maScPos.Tab()));
mbColHidden = (rRoot.GetDoc().ColHidden(maScPos.Col(),maScPos.Tab()));
@@ -1350,18 +1340,11 @@ void XclExpNote::WriteXml( sal_Int32 nAuthorId, XclExpXmlStream& rStrm )
rComments->startElement( XML_comment,
XML_ref, XclXmlUtils::ToOString( maScPos ).getStr(),
XML_authorId, OString::valueOf( nAuthorId ).getStr(),
- // OOXTODO: XML_guid,
FSEND );
rComments->startElement( XML_text, FSEND );
// OOXTODO: phoneticPr, rPh, r
-#if 0
- rComments->startElement( XML_t, FSEND );
- rComments->writeEscaped( XclXmlUtils::ToOUString( maOrigNoteText ) );
- rComments->endElement ( XML_t );
-#else
if( mpNoteContents )
mpNoteContents->WriteXml( rStrm );
-#endif
rComments->endElement( XML_text );
/*
@@ -1374,9 +1357,7 @@ void XclExpNote::WriteXml( sal_Int32 nAuthorId, XclExpXmlStream& rStrm )
rComments->startElement( XML_commentPr,
XML_autoFill, XclXmlUtils::ToPsz( mbAutoFill ),
XML_autoScale, XclXmlUtils::ToPsz( mbAutoScale ),
- // XML_autoLine, XclXmlUtils::ToPsz( mbAutoLine ),
XML_colHidden, XclXmlUtils::ToPsz( mbColHidden ),
- // XML_defaultSize, "true",
XML_locked, XclXmlUtils::ToPsz( mbLocked ),
XML_rowHidden, XclXmlUtils::ToPsz( mbRowHidden ),
XML_textHAlign, ToHorizAlign( meTHA ),
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index b6d5051..92c8133 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -1110,18 +1110,7 @@ bool XclExpXmlStream::exportDocument() throw()
mpRoot = &aRoot;
aRoot.GetOldRoot().pER = &aRoot;
aRoot.GetOldRoot().eDateiTyp = Biff8;
-#if 0 // FIXME: Re-write this block without using SotStorage.
- if ( SvtFilterOptions* pOptions = SvtFilterOptions::Get() )
- if ( pShell && pOptions->IsLoadExcelBasicStorage() )
- if ( sal_uInt32 nError
- = SvxImportMSVBasic( *pShell, *rStorage,
- pOptions->IsLoadExcelBasicCode(),
- pOptions->IsLoadExcelBasicStorage() )
- .SaveOrDelMSVBAStorage( true, EXC_STORAGE_VBA_PROJECT) )
- {
- pShell->SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
- }
-#endif
+
// Get the viewsettings before processing
if( pShell->GetViewData() )
pShell->GetViewData()->WriteExtOptions( mpRoot->GetExtDocOptions() );
--
1.7.1
--------------070903000307090300090306
Content-Type: text/x-patch;
name="0004-removing-dead-code-in-calc-docshell.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="0004-removing-dead-code-in-calc-docshell.patch"
More information about the LibreOffice
mailing list